diff options
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); } |