diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-17 21:13:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-17 21:13:22 +0000 |
commit | b43f3925e335102d292ed6657e64a1471389627f (patch) | |
tree | f586cc606ff85a25d0a3df2ca44e6c8784c69442 | |
parent | f035738e346da0a82538ab236aef218a27373635 (diff) |
Print current function on verification failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56291 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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, |