File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -942,26 +942,26 @@ void WinEHPrepare::removeImplausibleInstructions(Function &F) {
942
942
943
943
for (BasicBlock *BB : BlocksInFunclet) {
944
944
for (Instruction &I : *BB) {
945
- CallSite CS (&I);
946
- if (!CS )
945
+ auto *CB = dyn_cast<CallBase> (&I);
946
+ if (!CB )
947
947
continue ;
948
948
949
949
Value *FuncletBundleOperand = nullptr ;
950
- if (auto BU = CS. getOperandBundle (LLVMContext::OB_funclet))
950
+ if (auto BU = CB-> getOperandBundle (LLVMContext::OB_funclet))
951
951
FuncletBundleOperand = BU->Inputs .front ();
952
952
953
953
if (FuncletBundleOperand == FuncletPad)
954
954
continue ;
955
955
956
956
// Skip call sites which are nounwind intrinsics or inline asm.
957
957
auto *CalledFn =
958
- dyn_cast<Function>(CS. getCalledValue ()->stripPointerCasts ());
959
- if (CalledFn && ((CalledFn->isIntrinsic () && CS. doesNotThrow ()) ||
960
- CS. isInlineAsm ()))
958
+ dyn_cast<Function>(CB-> getCalledValue ()->stripPointerCasts ());
959
+ if (CalledFn && ((CalledFn->isIntrinsic () && CB-> doesNotThrow ()) ||
960
+ CB-> isInlineAsm ()))
961
961
continue ;
962
962
963
963
// This call site was not part of this funclet, remove it.
964
- if (CS. isInvoke ( )) {
964
+ if (isa<InvokeInst>(CB )) {
965
965
// Remove the unwind edge if it was an invoke.
966
966
removeUnwindEdge (BB);
967
967
// Get a pointer to the new call.
You can’t perform that action at this time.
0 commit comments