From b43f3925e335102d292ed6657e64a1471389627f Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 17 Sep 2008 21:13:22 +0000 Subject: [PATCH] Print current function on verification failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56291 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index c9ee212d01..e3674281e0 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -100,7 +100,10 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { 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, -- 2.50.1