@@ -41,6 +41,9 @@ entry(%pack : $Pack):
41
41
return %printGeneric_result1 : $()
42
42
}
43
43
44
+ // Defined in _Concurrency
45
+ sil public_external @$s12_Concurrency8runAsyncyyyyYcF : $@convention(thin) (@guaranteed @async @callee_guaranteed () -> ()) -> ()
46
+
44
47
// CHECK-LL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @test_case(%swift.task* {{%[0-9]+}}, %swift.executor* {{%[0-9]+}}, %swift.context* {{%[0-9]+}}) {{#[0-9]*}} {
45
48
sil @test_case : $@async @convention(thin) () -> () {
46
49
@@ -64,12 +67,13 @@ sil @test_case : $@async @convention(thin) () -> () {
64
67
65
68
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
66
69
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
67
-
68
- %test_case = function_ref @test_case : $@convention(thin) @async () -> ()
69
- %result = apply %test_case() : $@convention(thin) @async () -> ()
70
70
71
- %2 = integer_literal $Builtin.Int32, 0
72
- %3 = struct $Int32 ( %2 : $Builtin.Int32 )
73
- return %3 : $Int32
74
- }
71
+ %2 = function_ref @test_case : $@convention(thin) @async () -> ()
72
+ %3 = thin_to_thick_function %2 : $@convention(thin) @async () -> () to $@async @callee_guaranteed () -> ( )
73
+ %4 = function_ref @$s12_Concurrency8runAsyncyyyyYcF : $@convention(thin) (@guaranteed @async @callee_guaranteed () -> ()) -> ()
74
+ %5 = apply %4(%3) : $@convention(thin) (@guaranteed @async @callee_guaranteed () -> ()) -> ()
75
75
76
+ %6 = integer_literal $Builtin.Int32, 0
77
+ %7 = struct $Int32 (%6 : $Builtin.Int32)
78
+ return %7 : $Int32
79
+ }
0 commit comments