[cfe-commits] r102622 - in /cfe/trunk/lib/Frontend: CodeGenAction.cpp CompilerInvocation.cpp

Daniel Dunbar daniel at zuster.org
Thu Apr 29 09:29:07 PDT 2010


Author: ddunbar
Date: Thu Apr 29 11:29:06 2010
New Revision: 102622

URL: http://llvm.org/viewvc/llvm-project?rev=102622&view=rev
Log:
Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,
instead of NDEBUG.

Modified:
    cfe/trunk/lib/Frontend/CodeGenAction.cpp
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/lib/Frontend/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CodeGenAction.cpp?rev=102622&r1=102621&r2=102622&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/Frontend/CodeGenAction.cpp Thu Apr 29 11:29:06 2010
@@ -335,21 +335,13 @@
   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;
   }

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=102622&r1=102621&r2=102622&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Apr 29 11:29:06 2010
@@ -145,7 +145,6 @@
   // TimePasses is only derived.
   // UnitAtATime is unused.
   // UnrollLoops is only derived.
-  // VerifyModule is only derived.
   // Inlining is only derived.
 
   if (Opts.DataSections)





More information about the cfe-commits mailing list