mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Sink DwarfDebug::createAndAddScopeChildren down into DwarfCompileUnit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -330,19 +330,6 @@ bool DwarfDebug::isLexicalScopeDIENull(LexicalScope *Scope) {
|
||||
return !getLabelAfterInsn(Ranges.front().second);
|
||||
}
|
||||
|
||||
DIE *DwarfDebug::createAndAddScopeChildren(DwarfCompileUnit &TheCU,
|
||||
LexicalScope *Scope, DIE &ScopeDIE) {
|
||||
// We create children when the scope DIE is not null.
|
||||
SmallVector<std::unique_ptr<DIE>, 8> Children;
|
||||
DIE *ObjectPointer = TheCU.createScopeChildrenDIE(Scope, Children);
|
||||
|
||||
// Add children
|
||||
for (auto &I : Children)
|
||||
ScopeDIE.addChild(std::move(I));
|
||||
|
||||
return ObjectPointer;
|
||||
}
|
||||
|
||||
void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
||||
LexicalScope *Scope) {
|
||||
assert(Scope && Scope->getScopeNode());
|
||||
@ -380,7 +367,7 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
||||
|
||||
if (TheCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly)
|
||||
SPCU.addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
|
||||
if (DIE *ObjectPointer = createAndAddScopeChildren(SPCU, Scope, *AbsDef))
|
||||
if (DIE *ObjectPointer = SPCU.createAndAddScopeChildren(Scope, *AbsDef))
|
||||
SPCU.addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user