@@ -27,11 +27,11 @@ entry(%c : $SwiftClass, %d : $SwiftClass):
27
27
sil @use_closure : $@async @convention(thin) (@noescape @async @callee_guaranteed () -> ()) -> ()
28
28
29
29
// CHECK: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_class(
30
- sil @partial_apply_class : $@async @convention(thin) (SwiftClass) -> @async @callee_owned () -> () {
30
+ sil @partial_apply_class : $@async @convention(thin) (SwiftClass) -> @async @callee_guaranteed () -> () {
31
31
entry(%c : $SwiftClass):
32
32
%f = function_ref @partially_applyable_to_class : $@async @convention(thin) (@owned SwiftClass) -> ()
33
- %g = partial_apply %f(%c) : $@async @convention(thin) (@owned SwiftClass) -> ()
34
- return %g : $@async @callee_owned () -> ()
33
+ %g = partial_apply [callee_guaranteed] %f(%c) : $@async @convention(thin) (@owned SwiftClass) -> ()
34
+ return %g : $@async @callee_guaranteed () -> ()
35
35
}
36
36
37
37
// CHECK: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_class_on_stack(
@@ -67,14 +67,14 @@ entry(%i : $Int, %t : $*T):
67
67
return %i : $Int
68
68
}
69
69
70
- sil @partial_apply_generic_capture : $@async @convention(thin) (Int) -> @async @callee_owned (Int) -> Int {
70
+ sil @partial_apply_generic_capture : $@async @convention(thin) (Int) -> @async @callee_guaranteed (Int) -> Int {
71
71
entry(%x : $Int):
72
72
%a = alloc_stack $Int
73
73
store %x to %a : $*Int
74
74
%f = function_ref @generic_captured_param : $@async @convention(thin) <T> (Int, @inout T) -> Int
75
- %p = partial_apply %f<Int>(%a) : $@async @convention(thin) <T> (Int, @inout T) -> Int
75
+ %p = partial_apply [callee_guaranteed] %f<Int>(%a) : $@async @convention(thin) <T> (Int, @inout T) -> Int
76
76
dealloc_stack %a : $*Int
77
- return %p : $@async @callee_owned (Int) -> Int
77
+ return %p : $@async @callee_guaranteed (Int) -> Int
78
78
}
79
79
80
80
sil public @generic_captured_and_open_param : $@async @convention(thin) <T> (@in T, @inout T) -> @out T {
@@ -85,11 +85,11 @@ entry(%o : $*T, %i : $*T, %io : $*T):
85
85
86
86
87
87
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_open_generic_capture(
88
- sil @partial_apply_open_generic_capture : $@async @convention(thin) <T> (@inout T) -> @async @callee_owned (@in T) -> @out T {
88
+ sil @partial_apply_open_generic_capture : $@async @convention(thin) <T> (@inout T) -> @async @callee_guaranteed (@in T) -> @out T {
89
89
entry(%a : $*T):
90
90
%f = function_ref @generic_captured_and_open_param : $@async @convention(thin) <U> (@in U, @inout U) -> @out U
91
- %p = partial_apply %f<T>(%a) : $@async @convention(thin) <U> (@in U, @inout U) -> @out U
92
- return %p : $@async @callee_owned (@in T) -> @out T
91
+ %p = partial_apply [callee_guaranteed] %f<T>(%a) : $@async @convention(thin) <U> (@in U, @inout U) -> @out U
92
+ return %p : $@async @callee_guaranteed (@in T) -> @out T
93
93
}
94
94
95
95
/*****************************************************************************/
@@ -105,11 +105,11 @@ entry(%i : $Int, %c : $SwiftClass):
105
105
106
106
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_guaranteed_class_param(
107
107
108
- sil @partial_apply_guaranteed_class_param : $@async @convention(thin) (@owned SwiftClass) -> @async @callee_owned (Int) -> Int {
108
+ sil @partial_apply_guaranteed_class_param : $@async @convention(thin) (@owned SwiftClass) -> @async @callee_guaranteed (Int) -> Int {
109
109
bb0(%x : $SwiftClass):
110
110
%f = function_ref @guaranteed_captured_class_param : $@async @convention(thin) (Int, @guaranteed SwiftClass) -> Int
111
- %p = partial_apply %f(%x) : $@async @convention(thin) (Int, @guaranteed SwiftClass) -> Int
112
- return %p : $@async @callee_owned (Int) -> Int
111
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @convention(thin) (Int, @guaranteed SwiftClass) -> Int
112
+ return %p : $@async @callee_guaranteed (Int) -> Int
113
113
}
114
114
115
115
sil public @indirect_guaranteed_captured_class_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClass) -> Int {
@@ -121,11 +121,11 @@ entry(%i : $Int, %c : $*SwiftClass):
121
121
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_indirect_guaranteed_class_param(
122
122
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s40indirect_guaranteed_captured_class_paramTA"(
123
123
124
- sil @partial_apply_indirect_guaranteed_class_param : $@async @convention(thin) (@in SwiftClass) -> @async @callee_owned (Int) -> Int {
124
+ sil @partial_apply_indirect_guaranteed_class_param : $@async @convention(thin) (@in SwiftClass) -> @async @callee_guaranteed (Int) -> Int {
125
125
bb0(%x : $*SwiftClass):
126
126
%f = function_ref @indirect_guaranteed_captured_class_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClass) -> Int
127
- %p = partial_apply %f(%x) : $@async @convention(thin) (Int, @in_guaranteed SwiftClass) -> Int
128
- return %p : $@async @callee_owned (Int) -> Int
127
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @convention(thin) (Int, @in_guaranteed SwiftClass) -> Int
128
+ return %p : $@async @callee_guaranteed (Int) -> Int
129
129
}
130
130
131
131
sil public @indirect_consumed_captured_class_param : $@async @convention(thin) (Int, @in SwiftClass) -> Int {
@@ -137,11 +137,11 @@ entry(%i : $Int, %c : $*SwiftClass):
137
137
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_indirect_consumed_class_param(
138
138
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s38indirect_consumed_captured_class_paramTA"(
139
139
140
- sil @partial_apply_indirect_consumed_class_param : $@async @convention(thin) (@in SwiftClass) -> @async @callee_owned (Int) -> Int {
140
+ sil @partial_apply_indirect_consumed_class_param : $@async @convention(thin) (@in SwiftClass) -> @async @callee_guaranteed (Int) -> Int {
141
141
bb0(%x : $*SwiftClass):
142
142
%f = function_ref @indirect_consumed_captured_class_param : $@async @convention(thin) (Int, @in SwiftClass) -> Int
143
- %p = partial_apply %f(%x) : $@async @convention(thin) (Int, @in SwiftClass) -> Int
144
- return %p : $@async @callee_owned (Int) -> Int
143
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @convention(thin) (Int, @in SwiftClass) -> Int
144
+ return %p : $@async @callee_guaranteed (Int) -> Int
145
145
}
146
146
147
147
/*****************************************************************************/
@@ -161,11 +161,11 @@ entry(%i : $Int, %c : $SwiftClassPair):
161
161
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_guaranteed_class_pair_param(
162
162
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s36guaranteed_captured_class_pair_paramTA"(
163
163
164
- sil @partial_apply_guaranteed_class_pair_param : $@async @convention(thin) (@owned SwiftClassPair) -> @async @callee_owned (Int) -> Int {
164
+ sil @partial_apply_guaranteed_class_pair_param : $@async @convention(thin) (@owned SwiftClassPair) -> @async @callee_guaranteed (Int) -> Int {
165
165
bb0(%x : $SwiftClassPair):
166
166
%f = function_ref @guaranteed_captured_class_pair_param : $@async @convention(thin) (Int, @guaranteed SwiftClassPair) -> Int
167
- %p = partial_apply %f(%x) : $@async @convention(thin) (Int, @guaranteed SwiftClassPair) -> Int
168
- return %p : $@async @callee_owned (Int) -> Int
167
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @convention(thin) (Int, @guaranteed SwiftClassPair) -> Int
168
+ return %p : $@async @callee_guaranteed (Int) -> Int
169
169
}
170
170
171
171
sil public @indirect_guaranteed_captured_class_pair_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int {
@@ -177,11 +177,11 @@ entry(%i : $Int, %c : $*SwiftClassPair):
177
177
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_indirect_guaranteed_class_pair_param(
178
178
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s45indirect_guaranteed_captured_class_pair_paramTA"(
179
179
180
- sil @partial_apply_indirect_guaranteed_class_pair_param : $@async @convention(thin) (@in SwiftClassPair) -> @async @callee_owned (Int) -> Int {
180
+ sil @partial_apply_indirect_guaranteed_class_pair_param : $@async @convention(thin) (@in SwiftClassPair) -> @async @callee_guaranteed (Int) -> Int {
181
181
bb0(%x : $*SwiftClassPair):
182
182
%f = function_ref @indirect_guaranteed_captured_class_pair_param : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
183
- %p = partial_apply %f(%x) : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
184
- return %p : $@async @callee_owned (Int) -> Int
183
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @convention(thin) (Int, @in_guaranteed SwiftClassPair) -> Int
184
+ return %p : $@async @callee_guaranteed (Int) -> Int
185
185
}
186
186
187
187
sil public @indirect_consumed_captured_class_pair_param : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int {
@@ -194,11 +194,11 @@ entry(%i : $Int, %c : $*SwiftClassPair):
194
194
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_indirect_consumed_class_pair_param(
195
195
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s43indirect_consumed_captured_class_pair_paramTA"(
196
196
197
- sil @partial_apply_indirect_consumed_class_pair_param : $@async @convention(thin) (@in SwiftClassPair) -> @async @callee_owned (Int) -> Int {
197
+ sil @partial_apply_indirect_consumed_class_pair_param : $@async @convention(thin) (@in SwiftClassPair) -> @async @callee_guaranteed (Int) -> Int {
198
198
bb0(%x : $*SwiftClassPair):
199
199
%f = function_ref @indirect_consumed_captured_class_pair_param : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int
200
- %p = partial_apply %f(%x) : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int
201
- return %p : $@async @callee_owned (Int) -> Int
200
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @convention(thin) (Int, @in SwiftClassPair) -> Int
201
+ return %p : $@async @callee_guaranteed (Int) -> Int
202
202
}
203
203
204
204
sil public @captured_fixed_and_dependent_params : $@async @convention(thin) <A> (@owned SwiftClass, @in A, Int) -> () {
@@ -209,11 +209,11 @@ entry(%c : $SwiftClass, %a : $*A, %i : $Int):
209
209
210
210
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_indirect_non_fixed_layout
211
211
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s35captured_fixed_and_dependent_paramsTA"(
212
- sil @partial_apply_indirect_non_fixed_layout : $@async @convention(thin) <T> (@owned SwiftClass, @in T, Int) -> @async @callee_owned () -> () {
212
+ sil @partial_apply_indirect_non_fixed_layout : $@async @convention(thin) <T> (@owned SwiftClass, @in T, Int) -> @async @callee_guaranteed () -> () {
213
213
bb0(%a : $SwiftClass, %b : $*T, %c : $Int):
214
214
%f = function_ref @captured_fixed_and_dependent_params : $@async @convention(thin) <B> (@owned SwiftClass, @in B, Int) -> ()
215
- %p = partial_apply %f<T>(%a, %b, %c) : $@async @convention(thin) <C> (@owned SwiftClass, @in C, Int) -> ()
216
- return %p : $@async @callee_owned () -> ()
215
+ %p = partial_apply [callee_guaranteed] %f<T>(%a, %b, %c) : $@async @convention(thin) <C> (@owned SwiftClass, @in C, Int) -> ()
216
+ return %p : $@async @callee_guaranteed () -> ()
217
217
}
218
218
219
219
sil public @captured_dependent_out_param : $@async @convention(thin) <A> (@in A) -> @out A {
@@ -222,19 +222,19 @@ entry(%o : $*A, %i : $*A):
222
222
unreachable
223
223
}
224
224
225
- sil @partial_apply_with_out_param : $@async @convention(thin) <T> (@in T) -> @async @callee_owned () -> @out T {
225
+ sil @partial_apply_with_out_param : $@async @convention(thin) <T> (@in T) -> @async @callee_guaranteed () -> @out T {
226
226
bb0(%x : $*T):
227
227
%f = function_ref @captured_dependent_out_param : $@async @convention(thin) <B> (@in B) -> @out B
228
- %p = partial_apply %f<T>(%x) : $@async @convention(thin) <C> (@in C) -> @out C
229
- return %p : $@async @callee_owned () -> @out T
228
+ %p = partial_apply [callee_guaranteed] %f<T>(%x) : $@async @convention(thin) <C> (@in C) -> @out C
229
+ return %p : $@async @callee_guaranteed () -> @out T
230
230
}
231
231
232
232
// CHECK-LABEL: define internal swift{{(tail)?}}cc void @"$s28captured_dependent_out_paramTA"(
233
233
234
- sil @partial_apply_dynamic_with_out_param : $@async @convention(thin) <T> (Int32, @owned @async @callee_owned (Int32) -> @out T) -> @async @callee_owned () -> @out T {
235
- bb0(%x : $Int32, %f : $@async @callee_owned (Int32) -> @out T):
236
- %p = partial_apply %f(%x) : $@async @callee_owned (Int32) -> @out T
237
- return %p : $@async @callee_owned () -> @out T
234
+ sil @partial_apply_dynamic_with_out_param : $@async @convention(thin) <T> (Int32, @owned @async @callee_guaranteed (Int32) -> @out T) -> @async @callee_guaranteed () -> @out T {
235
+ bb0(%x : $Int32, %f : $@async @callee_guaranteed (Int32) -> @out T):
236
+ %p = partial_apply [callee_guaranteed] %f(%x) : $@async @callee_guaranteed (Int32) -> @out T
237
+ return %p : $@async @callee_guaranteed () -> @out T
238
238
}
239
239
240
240
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_dynamic_with_out_param(
@@ -254,17 +254,17 @@ bb0(%0 : $Base):
254
254
return %1 : $C
255
255
}
256
256
257
- sil public_external @receive_closure : $@async @convention(thin) <C where C : Base> (@owned @async @callee_owned () -> (@owned C)) -> ()
257
+ sil public_external @receive_closure : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed () -> (@owned C)) -> ()
258
258
259
259
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @test_partial_apply(
260
260
261
261
sil @test_partial_apply : $@async @convention(thin) (@owned Base) -> () {
262
262
bb0(%0 : $Base):
263
263
%1 = function_ref @parametric_casting_closure : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
264
- %6 = partial_apply %1<Sub>() : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
265
- %2 = partial_apply %1<Sub>(%0) : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
266
- %3 = function_ref @receive_closure : $@async @convention(thin) <C where C : Base> (@owned @async @callee_owned () -> (@owned C)) -> ()
267
- %4 = apply %3<Sub>(%2) : $@async @convention(thin) <C where C : Base> (@owned @async @callee_owned () -> (@owned C)) -> ()
264
+ %6 = partial_apply [callee_guaranteed] %1<Sub>() : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
265
+ %2 = partial_apply [callee_guaranteed] %1<Sub>(%0) : $@async @convention(thin) <C where C : Base> (@owned Base) -> @owned C
266
+ %3 = function_ref @receive_closure : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed () -> (@owned C)) -> ()
267
+ %4 = apply %3<Sub>(%2) : $@async @convention(thin) <C where C : Base> (@owned @async @callee_guaranteed () -> (@owned C)) -> ()
268
268
%5 = tuple ()
269
269
return %5 : $()
270
270
}
@@ -283,7 +283,7 @@ entry(%i : $Int):
283
283
sil @partial_apply_complex_generic_function : $@async @convention(thin) <T where T : P2, T.Y : P2> (Int) -> () {
284
284
bb0(%0 : $Int):
285
285
%fn = function_ref @complex_generic_function : $@async @convention(thin) <T where T : P2, T.Y : P2> (Int) -> ()
286
- %pa = partial_apply %fn <T>(%0) : $@async @convention(thin) <T where T : P2, T.Y : P1, T.Y : P2> (Int) -> ()
286
+ %pa = partial_apply [callee_guaranteed] %fn <T>(%0) : $@async @convention(thin) <T where T : P2, T.Y : P1, T.Y : P2> (Int) -> ()
287
287
%result = tuple ()
288
288
return %result : $()
289
289
}
@@ -300,7 +300,7 @@ sil hidden @generic_function : $@async @convention(thin) <T> () -> () {
300
300
sil @partial_apply_with_generic_type : $@async @convention(thin) <U: P2> () -> () {
301
301
bb0:
302
302
%fn = function_ref @generic_function : $@async @convention(thin) <T> () -> ()
303
- %pa = partial_apply %fn <ComplexBoundedType<U>>() : $@async @convention(thin) <T> () -> ()
303
+ %pa = partial_apply [callee_guaranteed] %fn <ComplexBoundedType<U>>() : $@async @convention(thin) <T> () -> ()
304
304
%result = tuple ()
305
305
return %result : $()
306
306
}
@@ -314,7 +314,7 @@ sil hidden_external @concrete_witness_method : $@async @convention(witness_metho
314
314
sil hidden @partial_apply_witness_method : $@async @convention(thin) (Int) -> () {
315
315
bb0(%0 : $Int):
316
316
%fn = function_ref @concrete_witness_method : $@async @convention(witness_method: P0) (Int, Int) -> ()
317
- %pa = partial_apply %fn (%0) : $@async @convention(witness_method: P0) (Int, Int) -> ()
317
+ %pa = partial_apply [callee_guaranteed] %fn (%0) : $@async @convention(witness_method: P0) (Int, Int) -> ()
318
318
%result = tuple ()
319
319
return %result : $()
320
320
}
@@ -332,11 +332,11 @@ entry(%i : $Int):
332
332
}
333
333
334
334
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_generic_indirect_return(
335
- sil @partial_apply_generic_indirect_return : $@async @convention(thin) (Int) -> @async @callee_owned () -> @owned GenericEnum<Int> {
335
+ sil @partial_apply_generic_indirect_return : $@async @convention(thin) (Int) -> @async @callee_guaranteed () -> @owned GenericEnum<Int> {
336
336
bb0(%0 : $Int):
337
337
%fn = function_ref @generic_indirect_return :$@async @convention(thin) <T> (Int) -> @owned GenericEnum<T>
338
- %pa = partial_apply %fn<Int> (%0) : $@async @convention(thin) <T> (Int) -> @owned GenericEnum<T>
339
- return %pa : $@async @callee_owned () -> @owned GenericEnum<Int>
338
+ %pa = partial_apply [callee_guaranteed] %fn<Int> (%0) : $@async @convention(thin) <T> (Int) -> @owned GenericEnum<T>
339
+ return %pa : $@async @callee_guaranteed () -> @owned GenericEnum<Int>
340
340
}
341
341
342
342
// Crash on partial apply of a generic enum.
@@ -351,11 +351,11 @@ entry(%i : $Int):
351
351
}
352
352
353
353
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_generic_indirect_return2(
354
- sil @partial_apply_generic_indirect_return2 : $@async @convention(thin) (Int) -> @async @callee_owned () -> @owned GenericEnum2<Int> {
354
+ sil @partial_apply_generic_indirect_return2 : $@async @convention(thin) (Int) -> @async @callee_guaranteed () -> @owned GenericEnum2<Int> {
355
355
bb0(%0 : $Int):
356
356
%fn = function_ref @generic_indirect_return2 :$@async @convention(thin) <T> (Int) -> @owned GenericEnum2<T>
357
- %pa = partial_apply %fn<Int> (%0) : $@async @convention(thin) <T> (Int) -> @owned GenericEnum2<T>
358
- return %pa : $@async @callee_owned () -> @owned GenericEnum2<Int>
357
+ %pa = partial_apply [callee_guaranteed] %fn<Int> (%0) : $@async @convention(thin) <T> (Int) -> @owned GenericEnum2<T>
358
+ return %pa : $@async @callee_guaranteed () -> @owned GenericEnum2<Int>
359
359
}
360
360
361
361
struct SwiftStruct {}
@@ -368,11 +368,11 @@ entry(%t : $@thin SwiftStruct.Type, %c : $SwiftClass):
368
368
369
369
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swift{{(tail)?}}cc void @partial_apply_thin_type(
370
370
371
- sil @partial_apply_thin_type : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> @async @callee_owned () -> () {
371
+ sil @partial_apply_thin_type : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> @async @callee_guaranteed () -> () {
372
372
entry(%0: $@thin SwiftStruct.Type, %1: $SwiftClass):
373
373
%fun = function_ref @fun : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> ()
374
- %closure = partial_apply %fun (%0, %1) : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> ()
375
- return %closure : $@async @callee_owned () -> ()
374
+ %closure = partial_apply [callee_guaranteed] %fun (%0, %1) : $@async @convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> ()
375
+ return %closure : $@async @callee_guaranteed () -> ()
376
376
}
377
377
378
378
sil @afun : $@async @convention(thin) (Int) -> @error Error
0 commit comments