summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-23 04:23:06 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-23 04:23:06 +0000
commit96fb9024f2353f2215549372a30faf445533879c (patch)
tree1f0f5e17b3dd075a913d8fd01ec8c08ca88ceac7 /llvm/lib
parent0e57b91f9cee7c646416239d9becea8be4d0596f (diff)
downloadbcm5719-llvm-96fb9024f2353f2215549372a30faf445533879c.tar.gz
bcm5719-llvm-96fb9024f2353f2215549372a30faf445533879c.zip
DebugInfo: Fix cross-CU references for scopes (and variables within those scopes) in abstract definitions of cross-CU inlined functions
Found by Adrian Prantl during post-commit review of r209335. llvm-svn: 209498
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 049e9e28c11..44aa529cfa4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -528,11 +528,12 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
// Find the subprogram's DwarfCompileUnit in the SPMap in case the subprogram
// was inlined from another compile unit.
- DIE *ScopeDIE = SPMap[Sub]->getDIE(Sub);
+ DwarfCompileUnit &SPCU = *SPMap[Sub];
+ DIE *ScopeDIE = SPCU.getDIE(Sub);
assert(ScopeDIE);
AbstractSPDies.insert(std::make_pair(Sub, ScopeDIE));
- TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
- createAndAddScopeChildren(TheCU, Scope, *ScopeDIE);
+ SPCU.addUInt(*ScopeDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
+ createAndAddScopeChildren(SPCU, Scope, *ScopeDIE);
}
DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
OpenPOWER on IntegriCloud