summaryrefslogtreecommitdiff
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-08-10 20:55:20 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-08-10 20:55:20 +0000
commit6b951b25c35f739ee0a1b5a4615718220830817d (patch)
treef694880df3f60acec17d71960f8c6652927e8733 /lib/VMCore/Verifier.cpp
parentd9b45125935b05578255501a7e05fba9de603609 (diff)
downloadllvm-6b951b25c35f739ee0a1b5a4615718220830817d.tar.gz
llvm-6b951b25c35f739ee0a1b5a4615718220830817d.tar.bz2
llvm-6b951b25c35f739ee0a1b5a4615718220830817d.tar.xz
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
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp2
1 files changed, 1 insertions, 1 deletions
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<InvokeInst>((*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);
}