Rename a couple of variables to be more accurate.

It's not really a "ScopeDIE", as such - it's the abstract function
definition's DIE. And we usually use "SP" for subprograms, rather than
"Sub".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-05-23 05:03:23 +00:00
parent e4dfe5d46f
commit 1ed412cb72

View File

@ -521,19 +521,19 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
assert(Scope->isAbstractScope()); assert(Scope->isAbstractScope());
assert(!Scope->getInlinedAt()); assert(!Scope->getInlinedAt());
DISubprogram Sub(Scope->getScopeNode()); DISubprogram SP(Scope->getScopeNode());
if (!ProcessedSPNodes.insert(Sub)) if (!ProcessedSPNodes.insert(SP))
return; return;
// Find the subprogram's DwarfCompileUnit in the SPMap in case the subprogram // Find the subprogram's DwarfCompileUnit in the SPMap in case the subprogram
// was inlined from another compile unit. // was inlined from another compile unit.
DwarfCompileUnit &SPCU = *SPMap[Sub]; DwarfCompileUnit &SPCU = *SPMap[SP];
DIE *ScopeDIE = SPCU.getDIE(Sub); DIE *AbsDef = SPCU.getDIE(SP);
assert(ScopeDIE); assert(AbsDef);
AbstractSPDies.insert(std::make_pair(Sub, ScopeDIE)); AbstractSPDies.insert(std::make_pair(SP, AbsDef));
SPCU.addUInt(*ScopeDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); SPCU.addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
createAndAddScopeChildren(SPCU, Scope, *ScopeDIE); createAndAddScopeChildren(SPCU, Scope, *AbsDef);
} }
DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU, DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,