Add a flag to disable jump table generation (all
switches use the binary search algorithm) for
environments that don't support it.  PPC64 JIT
is such an environment; turn the flag on for that.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54248 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 0764968..600a120 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -39,6 +39,7 @@
   unsigned StackAlignment;
   bool RealignStack;
   bool VerboseAsm;
+  bool DisableJumpTables;
 }
 
 static cl::opt<bool, true> PrintCode("print-machineinstrs",
@@ -156,6 +157,11 @@
            cl::location(VerboseAsm),
            cl::init(false));
 
+static cl::opt<bool, true>
+DisableSwitchTables(cl::Hidden, "disable-jump-tables", 
+           cl::desc("Do not generate jump tables."),
+           cl::location(DisableJumpTables),
+           cl::init(false));
 
 //---------------------------------------------------------------------------
 // TargetMachine Class