summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-13 03:50:24 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-13 03:50:24 +0000
commitbb79b5f6f35c912b3a9982a4d3d18288da7b150a (patch)
treea03762872e4482e2c3a072cd36000e7eb91f17ac /clang/lib/Driver/Tools.cpp
parentf83726f6ba88bd61b49a8cf5410c83f82a855e0d (diff)
downloadbcm5719-llvm-bb79b5f6f35c912b3a9982a4d3d18288da7b150a.tar.gz
bcm5719-llvm-bb79b5f6f35c912b3a9982a4d3d18288da7b150a.zip
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. llvm-svn: 96077
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index f3b19f52426..aff70bc7ba0 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud