[cfe-commits] r96046 - in /cfe/trunk: include/clang/Driver/CC1Options.td lib/Frontend/CompilerInvocation.cpp

John McCall rjmccall at apple.com
Fri Feb 12 15:47:27 PST 2010


Author: rjmccall
Date: Fri Feb 12 17:47:27 2010
New Revision: 96046

URL: http://llvm.org/viewvc/llvm-project?rev=96046&view=rev
Log:
Add an option to disable the LLVM verifier pass (which is still always
disabled in NDEBUG builds).  The option applies only to -cc1 invocations and is:
  -disable_llvm_verifier


Modified:
    cfe/trunk/include/clang/Driver/CC1Options.td
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=96046&r1=96045&r2=96046&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Fri Feb 12 17:47:27 2010
@@ -102,6 +102,8 @@
 
 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">,

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=96046&r1=96045&r2=96046&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Feb 12 17:47:27 2010
@@ -794,7 +794,7 @@
 #ifdef NDEBUG
   Opts.VerifyModule = 0;
 #else
-  Opts.VerifyModule = 1;
+  Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier);
 #endif
 }
 





More information about the cfe-commits mailing list