summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2011-09-26 17:40:42 +0000
committerJames Molloy <james.molloy@arm.com>2011-09-26 17:40:42 +0000
commit0ceb8cadd223d62b4b562a22285a846354e6e3cd (patch)
tree51ee20b1c80e2cd086be56cb61594e161c5272ef /llvm/lib/CodeGen
parent374eaa9c4e1a65b6238940a6511b80a891966223 (diff)
downloadbcm5719-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.cpp4
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);
OpenPOWER on IntegriCloud