[codegen][debug info] debug info generation do not touch llvm builder in the most cases.
This commit is contained in:
committed by
Vasily Levchenko
parent
e64c2f5990
commit
56d1881f18
@@ -241,15 +241,22 @@ void DIInsertDeclaration(DIBuilderRef builder, LLVMValueRef value, DILocalVariab
|
||||
llvm::unwrap(bb));
|
||||
}
|
||||
|
||||
DILocationRef LLVMBuilderSetDebugLocation(LLVMBuilderRef builder, unsigned line,
|
||||
DILocationRef LLVMCreateLocation(LLVMContextRef contextRef, unsigned line,
|
||||
unsigned col, DIScopeOpaqueRef scope) {
|
||||
auto sp = llvm::unwrap(scope);
|
||||
auto llvmBuilder = llvm::unwrap(builder);
|
||||
auto location = llvm::DILocation::get(llvmBuilder->getContext(), line, col, sp, nullptr);
|
||||
llvmBuilder->SetCurrentDebugLocation(location);
|
||||
auto location = llvm::DILocation::get(*llvm::unwrap(contextRef), line, col, llvm::unwrap(scope), nullptr);
|
||||
return llvm::wrap(location);
|
||||
}
|
||||
|
||||
DILocationRef LLVMCreateLocationInlinedAt(LLVMContextRef contextRef, unsigned line,
|
||||
unsigned col, DIScopeOpaqueRef scope, DILocationRef refLocationInlinedAt) {
|
||||
auto location = llvm::DILocation::get(*llvm::unwrap(contextRef), line, col, llvm::unwrap(scope), llvm::unwrap(refLocationInlinedAt));
|
||||
return llvm::wrap(location);
|
||||
}
|
||||
|
||||
void LLVMBuilderSetDebugLocation(LLVMBuilderRef builder, DILocationRef refLocation) {
|
||||
llvm::unwrap(builder)->SetCurrentDebugLocation(llvm::unwrap(refLocation));
|
||||
}
|
||||
|
||||
void LLVMBuilderResetDebugLocation(LLVMBuilderRef builder) {
|
||||
llvm::unwrap(builder)->SetCurrentDebugLocation(nullptr);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,9 @@ DILocalVariableRef DICreateParameterVariable(DIBuilderRef builder, DIScopeOpaque
|
||||
void DIInsertDeclaration(DIBuilderRef builder, LLVMValueRef value, DILocalVariableRef localVariable, DILocationRef location, LLVMBasicBlockRef bb, int64_t *expr, uint64_t exprCount);
|
||||
DIExpressionRef DICreateEmptyExpression(DIBuilderRef builder);
|
||||
void DIFunctionAddSubprogram(LLVMValueRef fn, DISubprogramRef sp);
|
||||
DILocationRef LLVMBuilderSetDebugLocation(LLVMBuilderRef builder, unsigned line, unsigned col, DIScopeOpaqueRef scope);
|
||||
DILocationRef LLVMCreateLocation(LLVMContextRef contextRef, unsigned line, unsigned col, DIScopeOpaqueRef scope);
|
||||
DILocationRef LLVMCreateLocationInlinedAt(LLVMContextRef contextRef, unsigned line, unsigned col, DIScopeOpaqueRef scope, DILocationRef refLocation);
|
||||
void LLVMBuilderSetDebugLocation(LLVMBuilderRef builder, DILocationRef refLocation);
|
||||
void LLVMBuilderResetDebugLocation(LLVMBuilderRef builder);
|
||||
const char* LLVMBuilderGetCurrentBbName(LLVMBuilderRef builder);
|
||||
const char *DIGetSubprogramLinkName(DISubprogramRef sp);
|
||||
|
||||
Reference in New Issue
Block a user