aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-04 06:15:30 +0000
committerDevang Patel <dpatel@apple.com>2010-05-04 06:15:30 +0000
commitab4b3ce2fbaa457d86d1d7f5d95d2fb3d4152ad5 (patch)
treeff8d54fd23cc8a6f2cf4788c3f3b773adfddf751 /lib/CodeGen
parent638ef70a0a8f70c80433942d9c6ae13a9ecf16b9 (diff)
downloadexternal_llvm-ab4b3ce2fbaa457d86d1d7f5d95d2fb3d4152ad5.zip
external_llvm-ab4b3ce2fbaa457d86d1d7f5d95d2fb3d4152ad5.tar.gz
external_llvm-ab4b3ce2fbaa457d86d1d7f5d95d2fb3d4152ad5.tar.bz2
Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is available all the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index e68a17d..e9e9ba5 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1334,9 +1334,6 @@ DIE *DwarfDebug::createSubprogramDIE(const DISubprogram &SP, bool MakeDecl) {
if (SP.isOptimized())
addUInt(SPDie, dwarf::DW_AT_APPLE_optimized, dwarf::DW_FORM_flag, 1);
- if (!DisableFramePointerElim(*Asm->MF))
- addUInt(SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr, dwarf::DW_FORM_flag, 1);
-
// DW_TAG_inlined_subroutine may refer to this DIE.
ModuleCU->insertDIE(SP.getNode(), SPDie);
@@ -2533,8 +2530,13 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
AE = AbstractScopesList.end(); AI != AE; ++AI)
constructScopeDIE(*AI);
- constructScopeDIE(CurrentFnDbgScope);
+ DIE *CurFnDIE = constructScopeDIE(CurrentFnDbgScope);
+ if (!DisableFramePointerElim(*MF))
+ addUInt(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr,
+ dwarf::DW_FORM_flag, 1);
+
+
DebugFrames.push_back(FunctionDebugFrameInfo(Asm->getFunctionNumber(),
MMI->getFrameMoves()));
}