Skip to content

Commit 9987ae9

Browse files
committed
[Concurrency] fix symbol linkage of asyncHandler class methods.
Fixes a TBD verification error. rdar://72329062
1 parent fb4583f commit 9987ae9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

lib/SILGen/SILGenFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ void SILGenFunction::emitAsyncHandler(FuncDecl *fd) {
555555
SILLinkage::Hidden, name, bodyFnTy, F.getGenericEnvironment(),
556556
loc, F.isBare(), F.isTransparent(),
557557
F.isSerialized(), IsNotDynamic, ProfileCounter(), IsNotThunk,
558-
F.getClassSubclassScope(), F.getInlineStrategy(), F.getEffectsKind());
558+
SubclassScope::NotApplicable, F.getInlineStrategy(), F.getEffectsKind());
559559
bodyFn->setDebugScope(new (getModule()) SILDebugScope(loc, bodyFn));
560560

561561
SILGenFunction(SGM, *bodyFn, fd).emitFunction(fd);

test/TBD/async-handler.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %target-swift-frontend -enable-experimental-concurrency -emit-ir -o/dev/null -parse-as-library -module-name test -validate-tbd-against-ir=all %s
2+
3+
// REQUIRES: VENDOR=apple
4+
// REQUIRES: concurrency
5+
6+
open class TestClass {
7+
@asyncHandler
8+
internal func publicFunc() { }
9+
10+
@asyncHandler
11+
internal func internalFunc() { }
12+
}
13+
14+
@asyncHandler
15+
public func globalFunc() { }

0 commit comments

Comments
 (0)