mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
DebugInfo: Sink the code emitting DW_AT_APPLE_omit_frame_ptr down to a more common spot.
No functional change. Pre-emptive refactoring before I start pushing some of this subprogram creation down into DWARFCompileUnit so I can build different subprograms in the skeleton unit from the dwo unit for adding -gmlt-like data to the skeleton. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218713 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -317,6 +317,8 @@ DIE &DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
|
|||||||
DIE *SPDie = SPCU.getOrCreateSubprogramDIE(SP);
|
DIE *SPDie = SPCU.getOrCreateSubprogramDIE(SP);
|
||||||
|
|
||||||
attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym);
|
attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym);
|
||||||
|
if (!CurFn->getTarget().Options.DisableFramePointerElim(*CurFn))
|
||||||
|
SPCU.addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr);
|
||||||
|
|
||||||
// Only include DW_AT_frame_base in full debug info
|
// Only include DW_AT_frame_base in full debug info
|
||||||
if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) {
|
if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) {
|
||||||
@@ -529,7 +531,7 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
|||||||
SPCU.addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
SPCU.addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
void DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
||||||
LexicalScope *Scope) {
|
LexicalScope *Scope) {
|
||||||
assert(Scope && Scope->getScopeNode());
|
assert(Scope && Scope->getScopeNode());
|
||||||
assert(!Scope->getInlinedAt());
|
assert(!Scope->getInlinedAt());
|
||||||
@@ -569,8 +571,6 @@ DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
|||||||
|
|
||||||
if (ObjectPointer)
|
if (ObjectPointer)
|
||||||
TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
|
||||||
|
|
||||||
return ScopeDIE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct a DIE for this scope.
|
// Construct a DIE for this scope.
|
||||||
@@ -1725,9 +1725,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
|
|||||||
constructAbstractSubprogramScopeDIE(TheCU, AScope);
|
constructAbstractSubprogramScopeDIE(TheCU, AScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
DIE &CurFnDIE = constructSubprogramScopeDIE(TheCU, FnScope);
|
constructSubprogramScopeDIE(TheCU, FnScope);
|
||||||
if (!CurFn->getTarget().Options.DisableFramePointerElim(*CurFn))
|
|
||||||
TheCU.addFlag(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr);
|
|
||||||
|
|
||||||
// Clear debug info
|
// Clear debug info
|
||||||
// Ownership of DbgVariables is a bit subtle - ScopeVariables owns all the
|
// Ownership of DbgVariables is a bit subtle - ScopeVariables owns all the
|
||||||
|
@@ -382,7 +382,7 @@ class DwarfDebug : public AsmPrinterHandler {
|
|||||||
void constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
void constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
||||||
LexicalScope *Scope);
|
LexicalScope *Scope);
|
||||||
/// \brief Construct a DIE for this subprogram scope.
|
/// \brief Construct a DIE for this subprogram scope.
|
||||||
DIE &constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
void constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
|
||||||
LexicalScope *Scope);
|
LexicalScope *Scope);
|
||||||
/// A helper function to create children of a Scope DIE.
|
/// A helper function to create children of a Scope DIE.
|
||||||
DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope,
|
DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope,
|
||||||
|
Reference in New Issue
Block a user