Print current function on verification failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56291 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index c9ee212..e367428 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -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,