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

Daniel Dunbar daniel at zuster.org
Fri Feb 12 18:44:18 PST 2010


Hi John,

On Fri, Feb 12, 2010 at 3:47 PM, John McCall <rjmccall at apple.com> wrote:
> 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

Thanks!

This is missing the case which serializes the argument to a list of
strings. See CodeGenOptsToArgs in CompilerInvocation.cpp.

Also, could you lift the NDEBUG logic higher, so that we make clang
-cc1 default to always running the verifier, and have the driver pass
this option when it is built in NDEBUG? I am trying to get all
"thinking" out of clang -cc1.

 - Daniel

> 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
>  }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list