diff options
-rw-r--r-- | lib/Target/X86/X86FrameLowering.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FrameLowering.cpp b/lib/Target/X86/X86FrameLowering.cpp index 189c80d5f2..c64fbdbcdd 100644 --- a/lib/Target/X86/X86FrameLowering.cpp +++ b/lib/Target/X86/X86FrameLowering.cpp @@ -34,6 +34,12 @@ using namespace llvm; // FIXME: completely move here. extern cl::opt<bool> ForceStackAlign; +// FIXME: Remove once linker support is available. +static cl::opt<bool> +GenerateCompactUnwind("gen-compact-unwind", + cl::desc("Generate compact unwind encoding"), + cl::Hidden); + bool X86FrameLowering::hasReservedCallFrame(const MachineFunction &MF) const { return !MF.getFrameInfo()->hasVarSizedObjects(); } @@ -897,7 +903,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const { } // Darwin 10.7 and greater has support for compact unwind encoding. - if (false && // FIXME: Enable once linker support is available. + if (GenerateCompactUnwind && STI.isTargetDarwin() && !STI.getTargetTriple().isMacOSXVersionLT(10, 6)) MMI.setCompactUnwindEncoding(getCompactUnwindEncoding(MF)); } |