From 6b951b25c35f739ee0a1b5a4615718220830817d Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 10 Aug 2012 20:55:20 +0000 Subject: The normal edge of an invoke is not allowed to branch to a block with a landingpad. Enforce it in the verifier, and fix the regression tests to match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161697 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Verifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/VMCore/Verifier.cpp') diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 5d51f4164a..6851246281 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -1536,7 +1536,7 @@ void Verifier::visitLandingPadInst(LandingPadInst &LPI) { // 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) { const InvokeInst *II = dyn_cast((*I)->getTerminator()); - Assert1(II && II->getUnwindDest() == BB, + Assert1(II && II->getUnwindDest() == BB && II->getNormalDest() != BB, "Block containing LandingPadInst must be jumped to " "only by the unwind edge of an invoke.", &LPI); } -- cgit v1.2.3