diff options
author | Stuart Hastings <stuart@apple.com> | 2010-07-19 23:56:30 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2010-07-19 23:56:30 +0000 |
commit | 61475c5c3c30662d82efe16076d31303b9d28637 (patch) | |
tree | aa8593379734a21b76463d17331c53c3a84d6dfa /llvm/lib/Analysis/DebugInfo.cpp | |
parent | b792b463afd6884554b9397bdf54743099dea7c5 (diff) | |
download | bcm5719-llvm-61475c5c3c30662d82efe16076d31303b9d28637.tar.gz bcm5719-llvm-61475c5c3c30662d82efe16076d31303b9d28637.zip |
Correct line info for declarations/definitions. Radar 8063111.
llvm-svn: 108784
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index c8d0d22ec2e..ca6c2e6d721 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -1107,14 +1107,19 @@ DIVariable DIFactory::CreateComplexVariable(unsigned Tag, DIDescriptor Context, /// CreateBlock - This creates a descriptor for a lexical block with the /// specified parent VMContext. DILexicalBlock DIFactory::CreateLexicalBlock(DIDescriptor Context, - unsigned LineNo, unsigned Col) { + DIFile F, unsigned LineNo, + unsigned Col) { + // Defeat MDNode uniqing for lexical blocks. + static unsigned int unique_id = 0; Value *Elts[] = { GetTagConstant(dwarf::DW_TAG_lexical_block), Context, ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), - ConstantInt::get(Type::getInt32Ty(VMContext), Col) + ConstantInt::get(Type::getInt32Ty(VMContext), Col), + F, + ConstantInt::get(Type::getInt32Ty(VMContext), unique_id++) }; - return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 4)); + return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 6)); } /// CreateNameSpace - This creates new descriptor for a namespace |