@@ -446,18 +446,19 @@ static mlir::cir::CIRCallOpInterface
446
446
buildCallLikeOp (CIRGenFunction &CGF, mlir::Location callLoc,
447
447
mlir::cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal,
448
448
mlir::cir::FuncOp directFuncOp,
449
- SmallVectorImpl<mlir::Value> &CIRCallArgs,
450
- mlir::Operation *InvokeDest, mlir:: cir::CallingConv callingConv,
449
+ SmallVectorImpl<mlir::Value> &CIRCallArgs, bool isInvoke,
450
+ mlir::cir::CallingConv callingConv,
451
451
mlir::cir::ExtraFuncAttributesAttr extraFnAttrs) {
452
452
auto &builder = CGF.getBuilder ();
453
453
454
- if (InvokeDest ) {
454
+ if (isInvoke ) {
455
455
// This call can throw, few options:
456
456
// - If this call does not have an associated cir.try, use the
457
457
// one provided by InvokeDest,
458
458
// - User written try/catch clauses require calls to handle
459
459
// exceptions under cir.try.
460
- auto tryOp = dyn_cast_if_present<mlir::cir::TryOp>(InvokeDest);
460
+ auto *invokeDest = CGF.getInvokeDest ();
461
+ auto tryOp = dyn_cast_if_present<mlir::cir::TryOp>(invokeDest);
461
462
mlir::OpBuilder::InsertPoint ip = builder.saveInsertionPoint ();
462
463
bool changeInsertion = tryOp && tryOp.getSynthetic ();
463
464
if (changeInsertion) {
@@ -730,7 +731,8 @@ RValue CIRGenFunction::buildCall(const CIRGenFunctionInfo &CallInfo,
730
731
noThrowAttr.getMnemonic ()))
731
732
CannotThrow = true ;
732
733
}
733
- auto InvokeDest = CannotThrow ? nullptr : getInvokeDest ();
734
+ // mlir::Operation *InvokeDest = CannotThrow ? nullptr : getInvokeDest();
735
+ bool isInvoke = CannotThrow ? false : isInvokeDest ();
734
736
735
737
// TODO: UnusedReturnSizePtr
736
738
if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(CurFuncDecl))
@@ -772,7 +774,7 @@ RValue CIRGenFunction::buildCall(const CIRGenFunctionInfo &CallInfo,
772
774
773
775
mlir::cir::CIRCallOpInterface callLikeOp = buildCallLikeOp (
774
776
*this , callLoc, indirectFuncTy, indirectFuncVal, directFuncOp,
775
- CIRCallArgs, InvokeDest , callingConv, extraFnAttrs);
777
+ CIRCallArgs, isInvoke , callingConv, extraFnAttrs);
776
778
777
779
if (E)
778
780
callLikeOp->setAttr (
0 commit comments