[llvm-commits] [dragonegg] r144998 - /dragonegg/trunk/src/Backend.cpp

Duncan Sands baldrick at free.fr
Sat Nov 19 06:46:05 PST 2011


Author: baldrick
Date: Sat Nov 19 08:46:04 2011
New Revision: 144998

URL: http://llvm.org/viewvc/llvm-project?rev=144998&view=rev
Log:
Add back a header file that is only used if GCC was built
with checking enabled.  Change things so that it is used
if LLVM was built with checking enabled.

Modified:
    dragonegg/trunk/src/Backend.cpp

Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=144998&r1=144997&r2=144998&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Sat Nov 19 08:46:04 2011
@@ -35,6 +35,7 @@
 #include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/ADT/StringExtras.h"
+#include "llvm/Analysis/Verifier.h"
 #include "llvm/Assembly/PrintModulePass.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/CodeGen/RegAllocRegistry.h"
@@ -579,7 +580,7 @@
   PerFunctionPasses = new FunctionPassManager(TheModule);
   PerFunctionPasses->add(new TargetData(TheModule));
 
-#ifdef ENABLE_CHECKING
+#ifndef NDEBUG
   PerFunctionPasses->add(createVerifierPass());
 #endif
 
@@ -1032,7 +1033,7 @@
   if (Value *V = get_decl_llvm(decl))
     return V;
 
-#ifdef ENABLE_CHECKING
+#ifndef NDEBUG
   // Check that we are not being given an automatic variable or a type or label.
   // A weak alias has TREE_PUBLIC set but not the other bits.
   if (TREE_CODE(decl) == PARM_DECL || TREE_CODE(decl) == RESULT_DECL ||





More information about the llvm-commits mailing list