diff options
author | John McCall <rjmccall@apple.com> | 2010-02-13 03:50:24 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-13 03:50:24 +0000 |
commit | b689afb75049012a431d483432114ad5e75d4a92 (patch) | |
tree | 10b9fa9ebc72d885b83989ed5f2b625270855c2a /lib/Driver/Tools.cpp | |
parent | 0c0eeb2fb0a4deb63a5b6603cfabff026bc8d547 (diff) |
Raise the responsibility for passing -disable-llvm-verifier in NDEBUG builds
to the driver, and support it in CodeGenOptsToArgs(). Note that this changes
the default behavior of clang -cc1 to always run the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index f3b19f5242..aff70bc7ba 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -687,6 +687,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // The make clang go fast button. CmdArgs.push_back("-disable-free"); + // Disable the verification pass in -asserts builds. +#ifdef NDEBUG + CmdArgs.push_back("-disable-llvm-verifier"); +#endif + // Set the main file name, so that debug info works even with // -save-temps. CmdArgs.push_back("-main-file-name"); |