diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -250,8 +250,7 @@ // Retrive the new State State = EHInfo.CxxUnwindMap[State].ToState; // Retrive next State } else if (isa(TI)) { - auto *Call = dyn_cast(TI); - assert(Call && "Unexpected value of Call"); + auto *Call = cast(TI); const Function *Fn = Call->getCalledFunction(); if (Fn && Fn->isIntrinsic() && (Fn->getIntrinsicID() == Intrinsic::seh_scope_begin || @@ -319,8 +318,7 @@ // Retrive the new State. State = EHInfo.SEHUnwindMap[State].ToState; // Retrive next State } else if (isa(TI)) { - auto *Call = dyn_cast(TI); - assert(Call && "Unexpected value of Call"); + auto *Call = cast(TI); const Function *Fn = Call->getCalledFunction(); if (Fn && Fn->isIntrinsic() && Fn->getIntrinsicID() == Intrinsic::seh_try_begin)