Revert r138826 until PR10834 can be fixed.
authorBill Wendling <isanbard@gmail.com>
Fri, 2 Sep 2011 18:15:04 +0000 (18:15 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 2 Sep 2011 18:15:04 +0000 (18:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139018 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FrameLowering.cpp

index 6bc349ffc10d7c113f4e995e6198b2448d89e316..19486f871f0c7b3d33b190eefdaa8e897c4edb80 100644 (file)
@@ -35,6 +35,13 @@ using namespace llvm;
 // FIXME: completely move here.
 extern cl::opt<bool> ForceStackAlign;
 
+// FIXME: Remove once linker support is available. The feature exists only on
+// Darwin at the moment.
+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();
 }
@@ -901,7 +908,7 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF) const {
   }
 
   // Darwin 10.7 and greater has support for compact unwind encoding.
-  if (STI.getTargetTriple().isMacOSX() &&
+  if (GenerateCompactUnwind && STI.getTargetTriple().isMacOSX() &&
       !STI.getTargetTriple().isMacOSXVersionLT(10, 7))
     MMI.setCompactUnwindEncoding(getCompactUnwindEncoding(MF));
 }