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 | d9d1f5f52213d3646fc931993272e8c55f13ff16 (patch) | |
tree | 75710f407682e0b035b79beb885a4018f9561584 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | f8610ebebc3e70a7a398dc538ee068e64d081d3b (diff) | |
download | bcm5719-llvm-d9d1f5f52213d3646fc931993272e8c55f13ff16.tar.gz bcm5719-llvm-d9d1f5f52213d3646fc931993272e8c55f13ff16.zip |
Print current function on verification failures.
llvm-svn: 56291
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index c9ee212d01f..e3674281e03 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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, |