summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-30 22:32:49 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-30 22:32:49 +0000
commit1cae849c04f343abb30817982633c369b6d90cda (patch)
tree48361c99c94ea2ec29580bbc0a45e80600aaefed /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent437aa948b838c137333575c2e53b92e133d09f4d (diff)
downloadbcm5719-llvm-1cae849c04f343abb30817982633c369b6d90cda.tar.gz
bcm5719-llvm-1cae849c04f343abb30817982633c369b6d90cda.zip
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. llvm-svn: 218713
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 71d076eb480..8dfd1c33912 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -317,6 +317,8 @@ DIE &DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
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) {
@@ -529,7 +531,7 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
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());
@@ -569,8 +571,6 @@ DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
if (ObjectPointer)
TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
-
- return ScopeDIE;
}
// Construct a DIE for this scope.
@@ -1725,9 +1725,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
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
OpenPOWER on IntegriCloud