summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-03-01 18:59:50 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-03-01 18:59:50 +0000
commit45ebda4278681e7085e7f2751a3d8f9773e47d49 (patch)
tree4479508b02cd35826f544ea8ee49654769c3653d /llvm/lib/IR
parent8832e5e2f59ca8001d10965af9a8ad3c9b3604da (diff)
downloadbcm5719-llvm-45ebda4278681e7085e7f2751a3d8f9773e47d49.tar.gz
bcm5719-llvm-45ebda4278681e7085e7f2751a3d8f9773e47d49.zip
[Verifier] Don't abort on invalid cleanuprets
Code in visitEHPadPredecessors assume a little too much about the validity of a cleanupret with an invalid cleanuppad operand. llvm-svn: 262364
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Verifier.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index bea9b340f7b..48792fbfc42 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -3055,7 +3055,7 @@ void Verifier::visitEHPadPredecessors(Instruction &I) {
else
FromPad = ConstantTokenNone::get(II->getContext());
} else if (auto *CRI = dyn_cast<CleanupReturnInst>(TI)) {
- FromPad = CRI->getCleanupPad();
+ FromPad = CRI->getOperand(0);
Assert(FromPad != ToPadParent, "A cleanupret must exit its cleanup", CRI);
} else if (auto *CSI = dyn_cast<CatchSwitchInst>(TI)) {
FromPad = CSI;
OpenPOWER on IntegriCloud