Merge pull request #80556 from nate-chandler/bug/20250404/2

[IRGen] Fix type of deleted coro error func.
This commit is contained in:
nate-chandler
2025-04-07 14:44:03 -07:00
committed by GitHub
4 changed files with 5 additions and 5 deletions

View File

@@ -4623,7 +4623,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(),

View File

@@ -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(

View File

@@ -1233,9 +1233,9 @@ llvm::Constant *IRGenModule::getDeletedAsyncMethodErrorAsyncFunctionPointer() {
}
llvm::Constant *IRGenModule::
getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer() {
getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer() {
return getAddrOfLLVMVariableOrGOTEquivalent(
LinkEntity::forKnownAsyncFunctionPointer(
LinkEntity::forKnownCoroFunctionPointer(
"swift_deletedCalleeAllocatedCoroutineMethodError"))
.getValue();
}

View File

@@ -1537,7 +1537,7 @@ public:
llvm::AttributeList getAllocAttrs();
llvm::Constant *getDeletedAsyncMethodErrorAsyncFunctionPointer();
llvm::Constant *
getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer();
getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer();
private:
llvm::Constant *EmptyTupleMetadata = nullptr;