llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
authorAndrew Lenharth <andrewl@lenharth.org>
Wed, 19 Mar 2008 20:49:51 +0000 (20:49 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Wed, 19 Mar 2008 20:49:51 +0000 (20:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48550 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-ld/Optimize.cpp

index 17c65b5778f7917b341ff99cdb5361847649bc2a..85c6074843873ee2f5fe512700ac9283a6387f59 100644 (file)
@@ -32,6 +32,9 @@ using namespace llvm;
 static cl::list<const PassInfo*, bool, PassNameParser>
   OptimizationList(cl::desc("Optimizations available:"));
 
+//Don't veryify at the end
+static cl::opt<bool> DontVerify("disable-verify", cl::ReallyHidden);
+
 // Optimization Enumeration
 enum OptimizationLevels {
   OPT_FAST_COMPILE         = 1,
@@ -206,7 +209,8 @@ void Optimize(Module* M) {
   }
 
   // Make sure everything is still good.
-  Passes.add(createVerifierPass());
+  if(!DontVerify)
+    Passes.add(createVerifierPass());
 
   // Run our queue of passes all at once now, efficiently.
   Passes.run(*M);