Initial support for emitting DWARF for static vars.
Only supports crate level statics. No debug info is generated for function level statics. Closes #9227.
This commit is contained in:
parent
13dafa09f1
commit
f4518cdba7
15 changed files with 733 additions and 99 deletions
|
@ -323,6 +323,28 @@ extern "C" LLVMValueRef LLVMDIBuilderCreateLexicalBlock(
|
|||
unwrapDI<DIFile>(File), Line, Col));
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef LLVMDIBuilderCreateStaticVariable(
|
||||
DIBuilderRef Builder,
|
||||
LLVMValueRef Context,
|
||||
const char* Name,
|
||||
const char* LinkageName,
|
||||
LLVMValueRef File,
|
||||
unsigned LineNo,
|
||||
LLVMValueRef Ty,
|
||||
bool isLocalToUnit,
|
||||
LLVMValueRef Val,
|
||||
LLVMValueRef Decl = NULL) {
|
||||
return wrap(Builder->createStaticVariable(unwrapDI<DIDescriptor>(Context),
|
||||
Name,
|
||||
LinkageName,
|
||||
unwrapDI<DIFile>(File),
|
||||
LineNo,
|
||||
unwrapDI<DIType>(Ty),
|
||||
isLocalToUnit,
|
||||
unwrap(Val),
|
||||
unwrapDI<MDNode*>(Decl)));
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef LLVMDIBuilderCreateLocalVariable(
|
||||
DIBuilderRef Builder,
|
||||
unsigned Tag,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue