summaryrefslogtreecommitdiff
path: root/lib
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
commit439780eeaef1a2c6a1105fb705a27c5c819e8d0e (patch)
tree46b65cbbddb15ffedd5e7fd1ab952d194a2e5b04 /lib
parent6272c5d874bb2b342b02a16aacc9806b4ac55ffe (diff)
downloadllvm-439780eeaef1a2c6a1105fb705a27c5c819e8d0e.tar.gz
llvm-439780eeaef1a2c6a1105fb705a27c5c819e8d0e.tar.bz2
llvm-439780eeaef1a2c6a1105fb705a27c5c819e8d0e.tar.xz
Fix emission of debug data for global variables. getContext() on DIGlobalVariables is not valid any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 1e1ddca21c..7f294d3e56 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/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);