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,7 +250,7 @@ // Retrive the new State State = EHInfo.CxxUnwindMap[State].ToState; // Retrive next State } else if (isa(TI)) { - auto *Call = dyn_cast(TI); + auto *Call = cast(TI); const Function *Fn = Call->getCalledFunction(); if (Fn && Fn->isIntrinsic() && (Fn->getIntrinsicID() == Intrinsic::seh_scope_begin || @@ -318,7 +318,7 @@ // Retrive the new State. State = EHInfo.SEHUnwindMap[State].ToState; // Retrive next State } else if (isa(TI)) { - auto *Call = dyn_cast(TI); + auto *Call = cast(TI); const Function *Fn = Call->getCalledFunction(); if (Fn && Fn->isIntrinsic() && Fn->getIntrinsicID() == Intrinsic::seh_try_begin)