diff options
author | James Molloy <james.molloy@arm.com> | 2011-09-26 17:40:42 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2011-09-26 17:40:42 +0000 |
commit | 0ceb8cadd223d62b4b562a22285a846354e6e3cd (patch) | |
tree | 51ee20b1c80e2cd086be56cb61594e161c5272ef /llvm/lib/CodeGen | |
parent | 374eaa9c4e1a65b6238940a6511b80a891966223 (diff) | |
download | bcm5719-llvm-0ceb8cadd223d62b4b562a22285a846354e6e3cd.tar.gz bcm5719-llvm-0ceb8cadd223d62b4b562a22285a846354e6e3cd.zip |
Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.
llvm-svn: 140539
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 1e1ddca21c8..7f294d3e56c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -135,8 +135,8 @@ void CompileUnit::addSourceLine(DIE *Die, DIGlobalVariable G) { unsigned Line = G.getLineNumber(); if (Line == 0) return; - unsigned FileID = DD->GetOrCreateSourceID(G.getContext().getFilename(), - G.getContext().getDirectory()); + unsigned FileID = DD->GetOrCreateSourceID(G.getFilename(), + G.getDirectory()); assert(FileID && "Invalid file id"); addUInt(Die, dwarf::DW_AT_decl_file, 0, FileID); addUInt(Die, dwarf::DW_AT_decl_line, 0, Line); |