Add new -no-verify option
authorChris Lattner <sabre@nondot.org>
Wed, 12 Feb 2003 18:45:08 +0000 (18:45 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Feb 2003 18:45:08 +0000 (18:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5542 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 9d0837c29d745d8f8058a1313ec5951e2d026902..74c30d120046cc419f9d2b129c4f1cbf9bcc755c 100644 (file)
@@ -50,6 +50,9 @@ PrintEachXForm("p", cl::desc("Print module after each transformation"));
 static cl::opt<bool>
 NoOutput("no-output", cl::desc("Do not write result bytecode file"), cl::Hidden);
 
+static cl::opt<bool>
+NoVerify("no-verify", cl::desc("Do not verify result module"), cl::Hidden);
+
 static cl::opt<bool>
 Quiet("q", cl::desc("Don't print 'program modified' message"));
 
@@ -128,7 +131,8 @@ int main(int argc, char **argv) {
   }
 
   // Check that the module is well formed on completion of optimization
-  Passes.add(createVerifierPass());
+  if (!NoVerify)
+    Passes.add(createVerifierPass());
 
   // Write bytecode out to disk or cout as the last step...
   if (!NoOutput)