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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209498 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-05-23 04:23:06 +00:00
parent df9a78247a
commit e4dfe5d46f
2 changed files with 10 additions and 3 deletions

View File

@ -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,