Reverse sense of unwind-tables option. This means
authorDale Johannesen <dalej@apple.com>
Mon, 14 Apr 2008 17:54:17 +0000 (17:54 +0000)
committerDale Johannesen <dalej@apple.com>
Mon, 14 Apr 2008 17:54:17 +0000 (17:54 +0000)
stack tracebacks on Darwin x86-64 won't work by default;
nevertheless, everybody but me thinks this is a good idea.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49663 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetOptions.h
lib/CodeGen/DwarfWriter.cpp
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/TargetMachine.cpp
lib/Target/X86/X86RegisterInfo.cpp

index 881ec21a0a28b2e58723f5b2486d2e3f7aeb46fc..890263f043106cebd17296bd0924c142a3552899 100644 (file)
@@ -74,10 +74,9 @@ namespace llvm {
   /// be emitted.
   extern bool ExceptionHandling;
 
-  /// UnwindTablesOptional - This flag indicates that unwind tables need not
-  /// be emitted for all functions.  Exception handling may still require them
-  /// for some functions.
-  extern bool UnwindTablesOptional;
+  /// UnwindTablesMandatory - This flag indicates that unwind tables should
+  /// be emitted for all functions.
+  extern bool UnwindTablesMandatory;
 
   /// PerformTailCallOpt - This flag is enabled when -tailcallopt is specified
   /// on the commandline. When the flag is on, the target will perform tail call
index 6cdc91e1f723bffecadc21688c196fb03d5e1bf2..3a3a04d2fa027caa08ca041225c1985877b77fc2 100644 (file)
@@ -2906,10 +2906,10 @@ private:
     // If there are no calls then you can't unwind.  This may mean we can
     // omit the EH Frame, but some environments do not handle weak absolute
     // symbols.  
-    // If UnwindTablesOptional is not set we cannot do this optimization; the
+    // If UnwindTablesMandatory is set we cannot do this optimization; the
     // unwind info is to be available for non-EH uses.
     if (!EHFrameInfo.hasCalls &&
-        UnwindTablesOptional &&
+        !UnwindTablesMandatory &&
         ((linkage != Function::WeakLinkage && 
           linkage != Function::LinkOnceLinkage) ||
          !TAI->getWeakDefDirective() ||
@@ -3432,7 +3432,7 @@ public:
       // See if we need frame move info.
       if (MMI->hasDebugInfo() || 
           !MF->getFunction()->doesNotThrow() ||
-          !UnwindTablesOptional)
+          UnwindTablesMandatory)
         shouldEmitMoves = true;
 
       if (shouldEmitMoves || shouldEmitTable)
index 8b4fb6a356a5a07005dcb32eda27ea039955b5d4..984021068b2fc3fed89d9262f6490eeeca8a4727 100644 (file)
@@ -949,7 +949,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
   MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
   bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) ||
        !MF.getFunction()->doesNotThrow() ||
-       !UnwindTablesOptional;
+       UnwindTablesMandatory;
   
   // Prepare for frame info.
   unsigned FrameLabelId = 0;
index 6f2f1235d7a6665cd077241c5a668ea622f17fe9..c252368b1a3b4c9a940fa44cc5c26dd55423b5b1 100644 (file)
@@ -31,7 +31,7 @@ namespace llvm {
   bool UseSoftFloat;
   bool NoZerosInBSS;
   bool ExceptionHandling;
-  bool UnwindTablesOptional;
+  bool UnwindTablesMandatory;
   Reloc::Model RelocationModel;
   CodeModel::Model CMModel;
   bool PerformTailCallOpt;
@@ -85,9 +85,9 @@ namespace {
                cl::location(ExceptionHandling),
                cl::init(false));
   cl::opt<bool, true>
-  DisableUnwindTables("unwind-tables-optional",
-               cl::desc("Generate unwinding tables only for functions that require them"),
-               cl::location(UnwindTablesOptional),
+  EnableUnwindTables("unwind-tables",
+               cl::desc("Generate unwinding tables for all functions"),
+               cl::location(UnwindTablesMandatory),
                cl::init(false));
 
   cl::opt<llvm::Reloc::Model, true>
index 2668582aefabb331f127e6781a8080f58a6f245f..6d9183ecc7d0df23afa7ad47215ceb498a1c854e 100644 (file)
@@ -506,7 +506,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
   MachineBasicBlock::iterator MBBI = MBB.begin();
   bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) || 
                           !Fn->doesNotThrow() ||
-                          !UnwindTablesOptional;
+                          UnwindTablesMandatory;
   
   // Prepare for frame info.
   unsigned FrameLabelId = 0;