summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2014-11-18 00:29:08 +0000
committerManman Ren <manman.ren@gmail.com>2014-11-18 00:29:08 +0000
commit554865da5b605d975884f8dbfbc723f972ebfc82 (patch)
tree2ef9b3e413be699ea9d608962fb0cbd647775ca1 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent0d8d6c094f5da64e2c1bda992e8a65a5af27fdb1 (diff)
downloadbcm5719-llvm-554865da5b605d975884f8dbfbc723f972ebfc82.tar.gz
bcm5719-llvm-554865da5b605d975884f8dbfbc723f972ebfc82.zip
Debug Info: In DIBuilder, the context field of a global variable is updated to
use DIScopeRef. A paired commit at clang will follow to show cases where we will use an identifer for the context of a global variable. rdar://18958417 llvm-svn: 222195
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-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 a8f867a16c8..4dc1224c4a4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -103,7 +103,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
assert(GV.isGlobalVariable());
- DIScope GVContext = GV.getContext();
+ DIScope GVContext = DD->resolve(GV.getContext());
DIType GTy = DD->resolve(GV.getType());
// Construct the context before querying for the existence of the DIE in
@@ -122,7 +122,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
DIE *VariableSpecDIE = getOrCreateStaticMemberDIE(SDMDecl);
addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE);
} else {
- DeclContext = GV.getContext();
+ DeclContext = resolve(GV.getContext());
// Add name and type.
addString(*VariableDIE, dwarf::DW_AT_name, GV.getDisplayName());
addType(*VariableDIE, GTy);
OpenPOWER on IntegriCloud