[llvm-branch-commits] [llvm-branch] r136140 - /llvm/branches/exception-handling-rewrite/lib/VMCore/Verifier.cpp
Bill Wendling
isanbard at gmail.com
Tue Jul 26 13:52:57 PDT 2011
Author: void
Date: Tue Jul 26 15:52:57 2011
New Revision: 136140
URL: http://llvm.org/viewvc/llvm-project?rev=136140&view=rev
Log:
Add to verifier that the landingpad needs clauses or if it doesn't have them
must be a cleanup.
Modified:
llvm/branches/exception-handling-rewrite/lib/VMCore/Verifier.cpp
Modified: llvm/branches/exception-handling-rewrite/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/lib/VMCore/Verifier.cpp?rev=136140&r1=136139&r2=136140&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/lib/VMCore/Verifier.cpp (original)
+++ llvm/branches/exception-handling-rewrite/lib/VMCore/Verifier.cpp Tue Jul 26 15:52:57 2011
@@ -1351,6 +1351,11 @@
void Verifier::visitLandingPadInst(LandingPadInst &LPI) {
BasicBlock *BB = LPI.getParent();
+ // The landingpad instruction is ill-formed if it doesn't have any clauses and
+ // isn't a cleanup.
+ Assert1(LPI.getNumClauses() > 0 || LPI.isCleanup(),
+ "LandingPadInst needs at least one clause or to be a cleanup.", &LPI);
+
// The landingpad instruction defines its parent as a landing pad block. The
// landing pad block may be branched to only by the unwind edge of an invoke.
for (pred_iterator I = pred_begin(BB), E = pred_end(BB); I != E; ++I) {
More information about the llvm-branch-commits
mailing list