diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-04-29 16:29:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-04-29 16:29:06 +0000 |
commit | 8a5e83c0237a39341736bc3e6068bf8ecf8e0daa (patch) | |
tree | e92a9742335ba869036747952a5018e356a64f99 /lib/Frontend/CodeGenAction.cpp | |
parent | 5ac28332220692f7b0095a7fd0de2c230ea6cd82 (diff) |
Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,
instead of NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CodeGenAction.cpp')
-rw-r--r-- | lib/Frontend/CodeGenAction.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/Frontend/CodeGenAction.cpp b/lib/Frontend/CodeGenAction.cpp index 80b00389fb..b3443c0db3 100644 --- a/lib/Frontend/CodeGenAction.cpp +++ b/lib/Frontend/CodeGenAction.cpp @@ -335,21 +335,13 @@ bool BackendConsumer::AddEmitPasses() { case 3: OptLevel = CodeGenOpt::Aggressive; break; } - // Request that addPassesToEmitFile run the Verifier after running - // passes which modify the IR. -#ifndef NDEBUG - bool DisableVerify = false; -#else - bool DisableVerify = true; -#endif - // Normal mode, emit a .s or .o file by running the code generator. Note, // this also adds codegenerator level optimization passes. TargetMachine::CodeGenFileType CGFT = TargetMachine::CGFT_AssemblyFile; if (Action == Backend_EmitObj) CGFT = TargetMachine::CGFT_ObjectFile; if (TM->addPassesToEmitFile(*PM, FormattedOutStream, CGFT, OptLevel, - DisableVerify)) { + /*DisableVerify=*/!CodeGenOpts.VerifyModule)) { Diags.Report(diag::err_fe_unable_to_interface_with_target); return false; } |