diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-07-10 07:01:07 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-07-10 07:01:07 +0000 |
commit | 82771b1ad65333a6ecaaf6d0b8dc03df9e11dad5 (patch) | |
tree | 5aee44b4139ba7f604a621467dd25b5237d90615 /llvm/lib/IR/Verifier.cpp | |
parent | 11aeb90aaa40eefec46073ae06027fcee003875a (diff) | |
download | bcm5719-llvm-82771b1ad65333a6ecaaf6d0b8dc03df9e11dad5.tar.gz bcm5719-llvm-82771b1ad65333a6ecaaf6d0b8dc03df9e11dad5.zip |
Tighten the verifier check for catchblock.
llvm-svn: 241891
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 6def326a618..c85be99bc24 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2861,9 +2861,10 @@ void Verifier::visitCatchBlockInst(CatchBlockInst &CBI) { BasicBlock *UnwindDest = CBI.getUnwindDest(); Instruction *I = UnwindDest->getFirstNonPHI(); - Assert(I->isEHBlock() && !isa<LandingPadInst>(I), - "CatchBlockInst must unwind to an EH block which is not a landingpad.", - &CBI); + Assert( + isa<CatchBlockInst>(I) || isa<CatchEndBlockInst>(I), + "CatchBlockInst must unwind to a CatchBlockInst or a CatchEndBlockInst.", + &CBI); visitTerminatorInst(CBI); } |