Skip to content

[IRGen] Corrected mangling of AsyncFunctionPointers. #35103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/ABI/Mangling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ types where the metadata itself has unknown layout.)
global ::= global 'TD' // dynamic dispatch thunk
global ::= global 'Td' // direct method reference thunk
global ::= global 'TI' // implementation of a dynamic_replaceable function
global :== global 'Tu' // async function pointer of a function
global ::= global 'TX' // function pointer of a dynamic_replaceable function
global ::= entity entity 'TV' // vtable override thunk, derived followed by base
global ::= type label-list? 'D' // type mangling for the debugger with label list for function types.
Expand Down
3 changes: 3 additions & 0 deletions include/swift/Demangling/DemangleNodes.def
Original file line number Diff line number Diff line change
Expand Up @@ -306,5 +306,8 @@ NODE(GlobalVariableOnceToken)
NODE(GlobalVariableOnceDeclList)
NODE(CanonicalPrespecializedGenericTypeCachingOnceToken)

// Added in Swift 5.5
NODE(AsyncFunctionPointer)

#undef CONTEXT_NODE
#undef NODE
2 changes: 2 additions & 0 deletions lib/Demangling/Demangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ bool swift::Demangle::isFunctionAttr(Node::Kind kind) {
case Node::Kind::DynamicallyReplaceableFunctionImpl:
case Node::Kind::DynamicallyReplaceableFunctionKey:
case Node::Kind::DynamicallyReplaceableFunctionVar:
case Node::Kind::AsyncFunctionPointer:
return true;
default:
return false;
Expand Down Expand Up @@ -2473,6 +2474,7 @@ NodePointer Demangler::popProtocolConformance() {
return nullptr;
return createNode(Node::Kind::OutlinedBridgedMethod, Params);
}
case 'u': return createNode(Node::Kind::AsyncFunctionPointer);
default:
return nullptr;
}
Expand Down
4 changes: 4 additions & 0 deletions lib/Demangling/NodePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ class NodePrinter {
case Node::Kind::GlobalVariableOnceFunction:
case Node::Kind::GlobalVariableOnceToken:
case Node::Kind::CanonicalPrespecializedGenericTypeCachingOnceToken:
case Node::Kind::AsyncFunctionPointer:
return false;
}
printer_unreachable("bad node kind");
Expand Down Expand Up @@ -2552,6 +2553,9 @@ NodePointer NodePrinter::print(NodePointer Node, bool asPrefixContext) {
"metadata for ";
print(Node->getChild(0));
return nullptr;
case Node::Kind::AsyncFunctionPointer:
Printer << "async function pointer to ";
return nullptr;
}
printer_unreachable("bad node kind!");
}
Expand Down
4 changes: 4 additions & 0 deletions lib/Demangling/OldRemangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,10 @@ void Remangler::mangleDefaultArgumentInitializer(Node *node,
mangleNamedEntity(node, 'I', "A", ctx);
}

void Remangler::mangleAsyncFunctionPointer(Node *node) {
Buffer << "Tu";
}

void Remangler::mangleDeallocator(Node *node, EntityContext &ctx) {
mangleSimpleEntity(node, 'F', "D", ctx);
}
Expand Down
5 changes: 5 additions & 0 deletions lib/Demangling/Remangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,10 @@ void Remangler::mangleDefaultArgumentInitializer(Node *node) {
mangleChildNode(node, 1);
}

void Remangler::mangleAsyncFunctionPointer(Node *node) {
Buffer << "Tu";
}

void Remangler::mangleDependentAssociatedTypeRef(Node *node) {
mangleIdentifier(node->getFirstChild());
if (node->getNumChildren() > 1)
Expand Down Expand Up @@ -1382,6 +1386,7 @@ void Remangler::mangleGlobal(Node *node) {
case Node::Kind::DynamicallyReplaceableFunctionKey:
case Node::Kind::DynamicallyReplaceableFunctionImpl:
case Node::Kind::DynamicallyReplaceableFunctionVar:
case Node::Kind::AsyncFunctionPointer:
mangleInReverseOrder = true;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/Linking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,13 @@ std::string LinkEntity::mangleAsString() const {
getSILDifferentiabilityWitness()->getConfig()});
case Kind::AsyncFunctionPointer: {
std::string Result(getSILFunction()->getName());
Result.append("AD");
Result.append("Tu");
return Result;
}
case Kind::AsyncFunctionPointerAST: {
std::string Result;
Result = mangler.mangleEntity(getDecl());
Result.append("AD");
Result.append("Tu");
return Result;
}
}
Expand Down
1 change: 1 addition & 0 deletions test/Demangle/Inputs/manglings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,4 @@ $s7example1fyyYF -> example.f() async -> ()
$s7example1fyyYKF -> example.f() async throws -> ()
$s4main20receiveInstantiationyySo34__CxxTemplateInst12MagicWrapperIiEVzF ---> main.receiveInstantiation(inout __C.__CxxTemplateInst12MagicWrapperIiE) -> ()
$s4main19returnInstantiationSo34__CxxTemplateInst12MagicWrapperIiEVyF ---> main.returnInstantiation() -> __C.__CxxTemplateInst12MagicWrapperIiE
$s4main6testityyYFTu ---> async function pointer to main.testit() async -> ()
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class S {
init()
}

// CHECK-LL: @classinstanceSInt64ToVoidAD =
// CHECK-LL: @classinstanceSInt64ToVoidTu =
// CHECK-LL: define hidden swiftcc void @classinstanceSInt64ToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]+}} {
sil hidden @classinstanceSInt64ToVoid : $@async @convention(method) (Int64, @guaranteed S) -> () {
bb0(%int : $Int64, %instance : $S):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-classinstance-void-to-void.sil
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class S {
init()
}

// CHECK-LL: @classinstanceSVoidToVoidAD =
// CHECK-LL: @classinstanceSVoidToVoidTu =
// CHECK-LL: define hidden swiftcc void @classinstanceSVoidToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @classinstanceSVoidToVoid : $@async @convention(method) (@guaranteed S) -> () {
bb0(%instance : $S):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-existential-to-void.sil
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bb0(%int : $Int64, %S_type : $@thin S.Type):
return %instance : $S
}

// CHECK-LL: @existentialToVoidAD =
// CHECK-LL: @existentialToVoidTu =
// CHECK-LL: define hidden swiftcc void @existentialToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @existentialToVoid : $@async @convention(thin) (@in_guaranteed P) -> () {
bb0(%existential : $*P):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-generic-to-generic.sil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printInt64 : $@convention(thin) (Int64) -> ()

// CHECK-LL: @genericToGenericAD =
// CHECK-LL: @genericToGenericTu =
// CHECK-LL: define hidden swiftcc void @genericToGeneric(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @genericToGeneric : $@async @convention(thin) <T> (@in_guaranteed T) -> @out T {
bb0(%out : $*T, %in : $*T):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-generic-to-void.sil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printGeneric : $@convention(thin) <T> (@in_guaranteed T) -> ()

// CHECK-LL: @genericToVoidAD =
// CHECK-LL: @genericToVoidTu =
// CHECK-LL: define hidden swiftcc void @genericToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @genericToVoid : $@async @convention(thin) <T> (@in_guaranteed T) -> () {
bb0(%instance : $*T):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printBool : $@convention(thin) (Bool) -> ()

// CHECK-LL: @genericEquatableAndGenericEquatableToBoolAD =
// CHECK-LL: @genericEquatableAndGenericEquatableToBoolTu =
// CHECK-LL: define hidden swiftcc void @genericEquatableAndGenericEquatableToBool(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @genericEquatableAndGenericEquatableToBool : $@async @convention(thin) <T where T : Equatable> (@in_guaranteed T, @in_guaranteed T) -> Bool {
bb0(%0 : $*T, %1 : $*T):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-int64-and-int64-to-void.sil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printInt64 : $@convention(thin) (Int64) -> ()

// CHECK-LL: @int64AndInt64ToVoidAD =
// CHECK-LL: @int64AndInt64ToVoidTu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @int64AndInt64ToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @int64AndInt64ToVoid : $@async @convention(thin) (Int64, Int64) -> () {
entry(%int1: $Int64, %int2: $Int64):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-int64-to-void.sil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printInt64 : $@convention(thin) (Int64) -> ()

// CHECK-LL: @int64ToVoidAD =
// CHECK-LL: @int64ToVoidTu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @int64ToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @int64ToVoid : $@async @convention(thin) (Int64) -> () {
entry(%int: $Int64):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct I : P {
init(int: Int64)
}

// CHECK-LL: @callPrintMeAD =
// CHECK-LL: @callPrintMeTu =
// CHECK-LL: define hidden swiftcc void @callPrintMe(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @callPrintMe : $@async @convention(method) <Self where Self : P> (@in_guaranteed Self) -> Int64 {
bb0(%self : $*Self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct I : P {
init(int: Int64)
}

// CHECK-LL: @I_printMeAD =
// CHECK-LL: @I_printMeTu =
// CHECK-LL-LABEL: define hidden swiftcc void @I_printMe(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @I_printMe : $@async @convention(method) (I) -> Int64 {
bb0(%self : $I):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-struct_five_bools-to-void.sil
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct Pack {
public let e: Bool
}

// CHECK-LL: @test_caseAD =
// CHECK-LL: @test_caseTu =

sil @structPackToVoid : $@async @convention(thin) (Pack) -> () {
entry(%pack : $Pack):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct S {
init(storage: Int64)
}

// CHECK-LL: @structinstanceSInt64ToVoidAD =
// CHECK-LL: @structinstanceSInt64ToVoidTu =
// CHECK-LL: define hidden swiftcc void @structinstanceSInt64ToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @structinstanceSInt64ToVoid : $@async @convention(method) (Int64, S) -> () {
bb0(%int : $Int64, %self : $S):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bb5:
br bb2
}

// CHECK-LL: @voidThrowsToIntAD =
// CHECK-LL: @voidThrowsToIntTu =
// CHECK-LL: define hidden swiftcc void @voidThrowsToInt(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @voidThrowsToInt : $@async @convention(thin) () -> (Int, @error Error) {
bb0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ bb5:
br bb2
}

// CHECK-LL: @voidThrowsToIntAD =
// CHECK-LL: @voidThrowsToIntTu =
// CHECK-LL: define hidden swiftcc void @voidThrowsToInt(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @voidThrowsToInt : $@async @convention(thin) () -> (Int64, @error Error) {
entry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bb5:
br bb2
}

// CHECK-LL: @voidThrowsToIntAD =
// CHECK-LL: @voidThrowsToIntTu =
// CHECK-LL: define hidden swiftcc void @voidThrowsToInt(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @voidThrowsToInt : $@async @convention(thin) () -> (Int, @error Error) {
bb0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bb5:
br bb2
}

// CHECK-LL: @voidThrowsToIntAD =
// CHECK-LL: @voidThrowsToIntTu =
// CHECK-LL: define hidden swiftcc void @voidThrowsToInt(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @voidThrowsToInt : $@async @convention(thin) () -> (Int64, @error Error) {
entry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bb5:
br bb2
}

// CHECK-LL: @voidThrowsToIntAD =
// CHECK-LL: @voidThrowsToIntTu =
// CHECK-LL: define hidden swiftcc void @voidThrowsToInt(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @voidThrowsToInt : $@async @convention(thin) () -> (Int, @error Error) {
bb0:
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-void-to-existential.sil
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bb0(%int : $Int64, %S_type : $@thin S.Type):
return %instance : $S
}

// CHECK-LL: @voidToExistentialAD =
// CHECK-LL: @voidToExistentialTu =
// CHECK-LL: define hidden swiftcc void @voidToExistential(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @voidToExistential : $@async @convention(thin) () -> @out P {
bb0(%out : $*P):
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-void-to-int64-and-int64.sil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printInt64 : $@convention(thin) (Int64) -> ()

// CHECK-LL: @voidToInt64AndInt64AD =
// CHECK-LL: @voidToInt64AndInt64Tu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @voidToInt64AndInt64(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @voidToInt64AndInt64 : $@async @convention(thin) () -> (Int64, Int64) {
%int_literal1 = integer_literal $Builtin.Int64, 42
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-void-to-int64.sil
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency

sil public_external @printInt64 : $@convention(thin) (Int64) -> ()

// CHECK-LL: @voidToInt64AD =
// CHECK-LL: @voidToInt64Tu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @voidToInt64(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @voidToInt64 : $@async @convention(thin) () -> (Int64) {
%int_literal = integer_literal $Builtin.Int64, 42
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/async/run-call-void-to-struct_large.sil
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bb0(%0 : $@thin Big.Type):
return %62 : $Big
}

// CHECK-LL: @getBigAD =
// CHECK-LL: @getBigTu =
// CHECK-LL: define hidden swiftcc void @getBig(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @getBig : $@async @convention(thin) () -> Big {
bb0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ bb0(%out_addr : $*T, %in_addr : $*T, %self : $I):
return %value : $Int64
}

// CHECK-LL: @I_P_printMeAD =
// CHECK-LL: @I_P_printMeTu =
// CHECK-LL: define internal swiftcc void @I_P_printMe(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil private [transparent] [thunk] @I_P_printMe : $@convention(witness_method: P) @async <τ_0_0> (@in_guaranteed τ_0_0, @in_guaranteed I) -> (Int64, @out τ_0_0) {
bb0(%out_addr : $*τ_0_0, %in_addr : $*τ_0_0, %self_addr : $*I):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ struct I : P {
init(int: Int64)
}

// CHECK-LL: @I_printMeAD =
// CHECK-LL: @I_P_printMeAD =
// CHECK-LL: @I_printMeTu =
// CHECK-LL: @I_P_printMeTu =

// CHECK-LL-LABEL: define hidden swiftcc void @I_printMe(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @I_printMe : $@async @convention(method) (I) -> Int64 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sil_vtable S {
#S.deinit!deallocator: @S_deallocating_deinit
}

// CHECK-LL: @classinstanceSToVoidAD =
// CHECK-LL: @classinstanceSToVoidTu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @classinstanceSToVoid(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @classinstanceSToVoid : $@async @convention(thin) (@owned S) -> () {
entry(%c : $S):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import _Concurrency
sil public_external @printGeneric : $@convention(thin) <T> (@in_guaranteed T) -> ()
sil public_external @printInt64 : $@convention(thin) (Int64) -> ()

// CHECK-LL: @inGenericAndInoutGenericToGenericAD =
// CHECK-LL: @inGenericAndInoutGenericToGenericTu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @inGenericAndInoutGenericToGeneric(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
// CHECK-LL: define internal swiftcc void @"$s017inGenericAndInoutb2ToB0TA"(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @inGenericAndInoutGenericToGeneric : $@async @convention(thin) <T> (@in T, @inout T) -> @out T {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exit:
return %out : $()
}

// CHECK-LL: @closureAD =
// CHECK-LL: @closureTu =
// CHECK-LL: define internal swiftcc void @closure(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}}
// CHECK-LL: define internal swiftcc void @"$s7closureTA"(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}}
sil hidden @createPartialApply : $@async @convention(thin) (Int64) -> @owned @async @callee_guaranteed (Int64) -> (Int64, @error Error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bb0:
return %result : $()
}

// CHECK-LL: @closureAD =
// CHECK-LL: @closureTu =
// CHECK-LL: define internal swiftcc void @closure(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}}
// CHECK-LL: define internal swiftcc void @"$s7closureTA"(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}}
sil hidden @createPartialApply : $@async @convention(thin) (Int64) -> @owned @async @callee_guaranteed (Int64) -> Int64 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ sil_vtable C {

struct S { var x: C, y: C }

// CHECK-LL: @structClassInstanceClassInstanceAndInt64ToInt64AD =
// CHECK-LL: @structClassInstanceClassInstanceAndInt64ToInt64Tu =
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @structClassInstanceClassInstanceAndInt64ToInt64(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
// CHECK-LL: define internal swiftcc void @"$s019structClassInstancebc10AndInt64ToE0TA"(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @structClassInstanceClassInstanceAndInt64ToInt64 : $@async @convention(thin) (Int64, @guaranteed S) -> Int64 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ entry(%value : $A2<A3>):
return %result : $()
}

// CHECK-LL: @amethodAD =
// CHECK-LL: @repoAD =
// CHECK-LL: @amethodTu =
// CHECK-LL: @repoTu =

// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @amethod(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil @amethod : $@async @convention(method) (@in_guaranteed A2<A3>) -> (@owned A1, @error Error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sil_witness_table <T> BaseProducer<T> : Q module main {
public class WeakBox<T> {}
sil_vtable WeakBox {}

// CHECK-LL: @takingQAD =
// CHECK-LL: @takingQTu =
// CHECK-LL: define hidden swiftcc void @takingQ(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
sil hidden @takingQ : $@async @convention(thin) <τ_0_0 where τ_0_0 : Q> (@owned WeakBox<τ_0_0>) -> () {
entry(%box : $WeakBox<τ_0_0>):
Expand Down
2 changes: 1 addition & 1 deletion test/TBD/async-function-pointer.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRES: VENDOR=apple
// RUN: %target-swift-frontend -emit-ir %s -enable-experimental-concurrency -validate-tbd-against-ir=all -module-name test | %FileCheck %s

// CHECK: @"$s4test6testityyYFAD" = hidden global %swift.async_func_pointer
// CHECK: @"$s4test6testityyYFTu" = hidden global %swift.async_func_pointer

@asyncHandler
public func testit() { }