aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.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
commitb689afb75049012a431d483432114ad5e75d4a92 (patch)
tree10b9fa9ebc72d885b83989ed5f2b625270855c2a /lib/Frontend/CompilerInvocation.cpp
parent0c0eeb2fb0a4deb63a5b6603cfabff026bc8d547 (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/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index bd45f074b1..a193ac8703 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -180,6 +180,8 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts,
Res.push_back("-mrelocation-model");
Res.push_back(Opts.RelocationModel);
}
+ if (!Opts.VerifyModule)
+ Res.push_back("-disable-llvm-verifier");
}
static void DependencyOutputOptsToArgs(const DependencyOutputOptions &Opts,
@@ -789,13 +791,7 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
Opts.RelocationModel = getLastArgValue(Args, OPT_mrelocation_model, "pic");
Opts.MainFileName = getLastArgValue(Args, OPT_main_file_name);
-
- // FIXME: Put elsewhere?
-#ifdef NDEBUG
- Opts.VerifyModule = 0;
-#else
Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier);
-#endif
}
static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,