DIE *SPDie = SPCU.getOrCreateSubprogramDIE(SP);
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
if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) {
SPCU.addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
}
-DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
+void DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
LexicalScope *Scope) {
assert(Scope && Scope->getScopeNode());
assert(!Scope->getInlinedAt());
if (ObjectPointer)
TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
-
- return ScopeDIE;
}
// Construct a DIE for this scope.
constructAbstractSubprogramScopeDIE(TheCU, AScope);
}
- DIE &CurFnDIE = constructSubprogramScopeDIE(TheCU, FnScope);
- if (!CurFn->getTarget().Options.DisableFramePointerElim(*CurFn))
- TheCU.addFlag(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr);
+ constructSubprogramScopeDIE(TheCU, FnScope);
// Clear debug info
// Ownership of DbgVariables is a bit subtle - ScopeVariables owns all the
void constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
LexicalScope *Scope);
/// \brief Construct a DIE for this subprogram scope.
- DIE &constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
+ void constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
LexicalScope *Scope);
/// A helper function to create children of a Scope DIE.
DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope,