From ce61e2ea1144051bc2e4be4ef5f71f02f03cacc2 Mon Sep 17 00:00:00 2001 From: Nate Chandler Date: Fri, 4 Apr 2025 18:16:51 -0700 Subject: [PATCH] [IRGen] Fix type of deleted coro error func. It was previously erroneously an async function pointer. Also fix the name. --- lib/IRGen/GenMeta.cpp | 2 +- lib/IRGen/GenProto.cpp | 2 +- lib/IRGen/IRGenModule.cpp | 4 ++-- lib/IRGen/IRGenModule.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/IRGen/GenMeta.cpp b/lib/IRGen/GenMeta.cpp index 7a806da1512..055e9ce477c 100644 --- a/lib/IRGen/GenMeta.cpp +++ b/lib/IRGen/GenMeta.cpp @@ -4625,7 +4625,7 @@ namespace { } else if (accessor && requiresFeatureCoroutineAccessors( accessor->getAccessorKind())) { ptr = llvm::ConstantExpr::getBitCast( - IGM.getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer(), + IGM.getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer(), IGM.FunctionPtrTy); } else { ptr = llvm::ConstantExpr::getBitCast(IGM.getDeletedMethodErrorFn(), diff --git a/lib/IRGen/GenProto.cpp b/lib/IRGen/GenProto.cpp index 0957f6f0991..8cd1e0d48f3 100644 --- a/lib/IRGen/GenProto.cpp +++ b/lib/IRGen/GenProto.cpp @@ -1678,7 +1678,7 @@ public: IGM.FunctionPtrTy); } else if (isCalleeAllocatedCoroutineRequirement) { witness = llvm::ConstantExpr::getBitCast( - IGM.getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer(), + IGM.getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer(), IGM.CoroFunctionPointerPtrTy); } else { witness = llvm::ConstantExpr::getBitCast( diff --git a/lib/IRGen/IRGenModule.cpp b/lib/IRGen/IRGenModule.cpp index 85d0c402ec6..5a00d2ecbb4 100644 --- a/lib/IRGen/IRGenModule.cpp +++ b/lib/IRGen/IRGenModule.cpp @@ -1233,9 +1233,9 @@ llvm::Constant *IRGenModule::getDeletedAsyncMethodErrorAsyncFunctionPointer() { } llvm::Constant *IRGenModule:: - getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer() { + getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer() { return getAddrOfLLVMVariableOrGOTEquivalent( - LinkEntity::forKnownAsyncFunctionPointer( + LinkEntity::forKnownCoroFunctionPointer( "swift_deletedCalleeAllocatedCoroutineMethodError")) .getValue(); } diff --git a/lib/IRGen/IRGenModule.h b/lib/IRGen/IRGenModule.h index 1950135021d..e0a333bce84 100644 --- a/lib/IRGen/IRGenModule.h +++ b/lib/IRGen/IRGenModule.h @@ -1537,7 +1537,7 @@ public: llvm::AttributeList getAllocAttrs(); llvm::Constant *getDeletedAsyncMethodErrorAsyncFunctionPointer(); llvm::Constant * - getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer(); + getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer(); private: llvm::Constant *EmptyTupleMetadata = nullptr;