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) diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -1006,7 +1006,7 @@ bool IsOr = CombineType == "any_of"; // Change (any_of FeatureAll, (any_of ...)) to (any_of FeatureAll, ...). if (IsOr && D->getNumArgs() == 2 && isa(D->getArg(1))) { - DagInit *RHS = dyn_cast(D->getArg(1)); + DagInit *RHS = cast(D->getArg(1)); SmallVector Args{D->getArg(0)}; SmallVector ArgNames{D->getArgName(0)}; for (unsigned i = 0, e = RHS->getNumArgs(); i != e; ++i) {