[cfe-commits] r56291 - /cfe/trunk/lib/CodeGen/CodeGenFunction.cpp

Daniel Dunbar daniel at zuster.org
Wed Sep 17 14:13:22 PDT 2008


Author: ddunbar
Date: Wed Sep 17 16:13:22 2008
New Revision: 56291

URL: http://llvm.org/viewvc/llvm-project?rev=56291&view=rev
Log:
Print current function on verification failures.

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

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Wed Sep 17 16:13:22 2008
@@ -100,7 +100,10 @@
   AllocaInsertPt = 0;
   
   // Verify that the function is well formed.
-  assert(!verifyFunction(*CurFn) && "Generated function is not well formed.");
+  if (verifyFunction(*CurFn, llvm::PrintMessageAction)) {
+    CurFn->dump();
+    assert(0 && "Function failed verification!");
+  }
 }
 
 void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy, 





More information about the cfe-commits mailing list