]> granicus.if.org Git - clang/commitdiff
Add an option to disable the LLVM verifier pass (which is still always
authorJohn McCall <rjmccall@apple.com>
Fri, 12 Feb 2010 23:47:27 +0000 (23:47 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 12 Feb 2010 23:47:27 +0000 (23:47 +0000)
disabled in NDEBUG builds).  The option applies only to -cc1 invocations and is:
  -disable_llvm_verifier

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

include/clang/Driver/CC1Options.td
lib/Frontend/CompilerInvocation.cpp

index eac6e0761f2776d51711587170f466d489185479..bd243d681fe5797a7619f1fa413039d45f2e969f 100644 (file)
@@ -102,6 +102,8 @@ def analyzer_viz_egraph_ubigraph : Flag<"-analyzer-viz-egraph-ubigraph">,
 
 def disable_llvm_optzns : Flag<"-disable-llvm-optzns">,
   HelpText<"Don't run LLVM optimization passes">;
+def disable_llvm_verifier : Flag<"-disable-llvm-verifier">,
+  HelpText<"Don't run the LLVM IR verifier pass">;
 def disable_red_zone : Flag<"-disable-red-zone">,
   HelpText<"Do not emit code that uses the red zone.">;
 def dwarf_debug_flags : Separate<"-dwarf-debug-flags">,
index 7287d429b439068bbebfc30627d70cca81c74404..bd45f074b135a5aedf06fd1ab88411fca1ba03f2 100644 (file)
@@ -794,7 +794,7 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
 #ifdef NDEBUG
   Opts.VerifyModule = 0;
 #else
-  Opts.VerifyModule = 1;
+  Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier);
 #endif
 }