[cfe-commits] r50485 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Chris Lattner sabre at nondot.org
Wed Apr 30 09:05:42 PDT 2008


Author: lattner
Date: Wed Apr 30 11:05:42 2008
New Revision: 50485

URL: http://llvm.org/viewvc/llvm-project?rev=50485&view=rev
Log:
Verify the whole module after codegen to catch silly IR bugs.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=50485&r1=50484&r2=50485&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed Apr 30 11:05:42 2008
@@ -24,6 +24,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"
 #include "llvm/Intrinsics.h"
+#include "llvm/Analysis/Verifier.h"
 #include <algorithm>
 using namespace clang;
 using namespace CodeGen;
@@ -48,6 +49,9 @@
   EmitGlobalCtors();
   EmitAnnotations();
   delete Runtime;
+  
+  // Run the verifier to check that the generated code is consistent.
+  assert(!verifyModule(TheModule));
 }
 
 /// WarnUnsupported - Print out a warning that codegen doesn't support the





More information about the cfe-commits mailing list