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( } else if (accessor && requiresFeatureCoroutineAccessors(
accessor->getAccessorKind())) { accessor->getAccessorKind())) {
ptr = llvm::ConstantExpr::getBitCast( ptr = llvm::ConstantExpr::getBitCast(
IGM.getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer(), IGM.getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer(),
IGM.FunctionPtrTy); IGM.FunctionPtrTy);
} else { } else {
ptr = llvm::ConstantExpr::getBitCast(IGM.getDeletedMethodErrorFn(), ptr = llvm::ConstantExpr::getBitCast(IGM.getDeletedMethodErrorFn(),

View File

@@ -1678,7 +1678,7 @@ public:
IGM.FunctionPtrTy); IGM.FunctionPtrTy);
} else if (isCalleeAllocatedCoroutineRequirement) { } else if (isCalleeAllocatedCoroutineRequirement) {
witness = llvm::ConstantExpr::getBitCast( witness = llvm::ConstantExpr::getBitCast(
IGM.getDeletedCalleeAllocatedCoroutineMethodErrorAsyncFunctionPointer(), IGM.getDeletedCalleeAllocatedCoroutineMethodErrorCoroFunctionPointer(),
IGM.CoroFunctionPointerPtrTy); IGM.CoroFunctionPointerPtrTy);
} else { } else {
witness = llvm::ConstantExpr::getBitCast( witness = llvm::ConstantExpr::getBitCast(

View File

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

View File

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