Skip to content

Commit 4ab808d

Browse files
authored
Merge pull request swiftlang#36682 from nate-chandler/rdar76026408
2 parents 6d4015e + eb5fadc commit 4ab808d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/IRGen/Linking.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,9 @@ std::string LinkEntity::mangleAsString() const {
457457

458458
case Kind::AsyncFunctionPointerAST: {
459459
std::string Result;
460-
Result = mangler.mangleEntity(getDecl());
460+
Result =
461+
SILDeclRef(const_cast<ValueDecl *>(getDecl()), SILDeclRef::Kind::Func)
462+
.mangle();
461463
Result.append("Tu");
462464
return Result;
463465
}

test/TBD/async-function-pointer.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
@asyncHandler
88
public func testit() { }
99

10+
// CHECK: @barTu = global %swift.async_func_pointer
11+
@_silgen_name("bar")
12+
public func foo() async {}
13+
1014
// CHECK: @"$s4test1CC1f33_295642D23064661A21CD592AD781409CLLyyYFTu" = global %swift.async_func_pointer
1115

1216
open class C {

0 commit comments

Comments
 (0)