@@ -1444,7 +1444,7 @@ void LifetimeCheckPass::checkPointerDeref(mlir::Value addr, mlir::Location loc,
1444
1444
}
1445
1445
1446
1446
static const ASTCXXMethodDeclInterface getMethod (ModuleOp mod, CallOp callOp) {
1447
- auto method = callOp.getDirectCallee (mod);
1447
+ cir::FuncOp method = callOp.getDirectCallee (mod);
1448
1448
if (!method || method.getBuiltin ())
1449
1449
return nullptr ;
1450
1450
return dyn_cast<ASTCXXMethodDeclInterface>(method.getAstAttr ());
@@ -1747,9 +1747,9 @@ bool LifetimeCheckPass::isTaskType(mlir::Value taskVal) {
1747
1747
}
1748
1748
1749
1749
void LifetimeCheckPass::trackCallToCoroutine (CallOp callOp) {
1750
- if (auto calleeFuncOp = callOp.getDirectCallee (theModule)) {
1751
- if (calleeFuncOp .getCoroutine () ||
1752
- (calleeFuncOp .isDeclaration () && callOp->getNumResults () > 0 &&
1750
+ if (cir::FuncOp callee = callOp.getDirectCallee (theModule)) {
1751
+ if (callee .getCoroutine () ||
1752
+ (callee .isDeclaration () && callOp->getNumResults () > 0 &&
1753
1753
isTaskType (callOp->getResult (0 )))) {
1754
1754
currScope->localTempTasks .insert (callOp->getResult (0 ));
1755
1755
}
@@ -1781,10 +1781,10 @@ void LifetimeCheckPass::checkCall(CallOp callOp) {
1781
1781
1782
1782
// From this point on only owner and pointer class methods handling,
1783
1783
// starting from special methods.
1784
- auto calleeFuncOp = callOp.getDirectCallee (theModule);
1785
- if (calleeFuncOp && calleeFuncOp .getCxxSpecialMember ())
1784
+ cir::FuncOp callee = callOp.getDirectCallee (theModule);
1785
+ if (callee && callee .getCxxSpecialMember ())
1786
1786
if (auto cxxCtor =
1787
- dyn_cast<cir::CXXCtorAttr>(*calleeFuncOp .getCxxSpecialMember ()))
1787
+ dyn_cast<cir::CXXCtorAttr>(*callee .getCxxSpecialMember ()))
1788
1788
return checkCtor (callOp, cxxCtor);
1789
1789
if (methodDecl.isMoveAssignmentOperator ())
1790
1790
return checkMoveAssignment (callOp, methodDecl);
0 commit comments