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 | 117c19fa4d081a0b9c7113bd903d93836ed82b5a (patch) | |
tree | a89ed693fb22fcea1565e8b0a269c4d8d7fe48af /clang/lib | |
parent | c1626e3317f730bfdc24746108f1413040c211c9 (diff) | |
download | bcm5719-llvm-117c19fa4d081a0b9c7113bd903d93836ed82b5a.tar.gz bcm5719-llvm-117c19fa4d081a0b9c7113bd903d93836ed82b5a.zip |
Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,
instead of NDEBUG.
llvm-svn: 102622
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Frontend/CodeGenAction.cpp | 10 | ||||
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 1 |
2 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/Frontend/CodeGenAction.cpp b/clang/lib/Frontend/CodeGenAction.cpp index 80b00389fb4..b3443c0db3b 100644 --- a/clang/lib/Frontend/CodeGenAction.cpp +++ b/clang/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; } diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 68842a40155..932c35e4f4e 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -145,7 +145,6 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts, // TimePasses is only derived. // UnitAtATime is unused. // UnrollLoops is only derived. - // VerifyModule is only derived. // Inlining is only derived. if (Opts.DataSections) |