1
Fork 0

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:
gentlefolk 2014-02-20 20:44:29 -05:00
parent 13dafa09f1
commit f4518cdba7
15 changed files with 733 additions and 99 deletions

View file

@ -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,