We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2135e9 commit 9c9124eCopy full SHA for 9c9124e
test/IRGen/async_dynamic_replacement.swift
@@ -0,0 +1,23 @@
1
+// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop | %FileCheck %s
2
+
3
+// REQUIRES: concurrency
4
5
+public dynamic func number() async -> Int {
6
+ return 100
7
+}
8
9
+@_dynamicReplacement(for: number())
10
+internal func _replacement_number() async -> Int {
11
+ return 200
12
13
14
+// rdar://78284346 - Dynamic replacement should use musttail
15
+// for tail calls from swifttailcc to swifttailcc
16
+// CHECK-LABEL: define {{.*}} swifttailcc void @"$s25async_dynamic_replacement01_C7_numberSiyYaFTI"
17
+// CHECK-NOT: musttail
18
+// CHECK: call swifttailcc void
19
+// CHECK-NEXT: ret void
20
21
+public func calls_number() async -> Int {
22
+ await number()
23
0 commit comments