@@ -120,7 +120,7 @@ entry(%instance : $*S):
120
120
121
121
// declarations
122
122
123
- sil [ossa] [always_inline] @callee_coro_owned : $@yield_once @convention(method ) (@owned C) -> @yields @inout C {
123
+ sil [ossa] [always_inline] @callee_coro_owned : $@yield_once @convention(thin ) (@owned C) -> @yields @inout C {
124
124
bb0(%instance : @owned $C):
125
125
%addr = alloc_stack $C
126
126
store %instance to [init] %addr : $*C
136
136
unwind
137
137
}
138
138
139
- sil [ossa] [always_inline] @callee_coro_guaranteed : $@yield_once @convention(method ) (@guaranteed C) -> @yields @inout C {
139
+ sil [ossa] [always_inline] @callee_coro_guaranteed : $@yield_once @convention(thin ) (@guaranteed C) -> @yields @inout C {
140
140
bb0(%instance : @guaranteed $C):
141
141
%copy = copy_value %instance : $C
142
142
%addr = alloc_stack $C
153
153
unwind
154
154
}
155
155
156
- sil hidden [ossa] [always_inline] @callee_coro_trivial : $@yield_once @convention(method ) (S) -> @yields @inout S {
156
+ sil hidden [ossa] [always_inline] @callee_coro_trivial : $@yield_once @convention(thin ) (S) -> @yields @inout S {
157
157
bb0(%instance : $S):
158
158
%addr = alloc_stack $S
159
159
store %instance to [trivial] %addr : $*S
167
167
unwind
168
168
}
169
169
170
- sil hidden [ossa] [always_inline] @callee_coro_address : $@yield_once @convention(method ) (@in S) -> @yields @inout S {
170
+ sil hidden [ossa] [always_inline] @callee_coro_address : $@yield_once @convention(thin ) (@in S) -> @yields @inout S {
171
171
bb0(%instance : $*S):
172
172
yield %instance : $*S, resume bb1, unwind bb2
173
173
bb1:
@@ -179,19 +179,19 @@ bb2:
179
179
180
180
// tests
181
181
182
- // CHECK-LABEL: sil [ossa] @caller_owned_callee_coro_owned : $@convention(method ) (@owned C) -> () {
182
+ // CHECK-LABEL: sil [ossa] @caller_owned_callee_coro_owned : $@convention(thin ) (@owned C) -> () {
183
183
// CHECK-NOT: begin_borrow [lexical]
184
184
// CHECK-LABEL: } // end sil function 'caller_owned_callee_coro_owned'
185
- sil [ossa] @caller_owned_callee_coro_owned : $@convention(method ) (@owned C) -> () {
185
+ sil [ossa] @caller_owned_callee_coro_owned : $@convention(thin ) (@owned C) -> () {
186
186
bb0(%instance : @owned $C):
187
- %callee_coro_owned = function_ref @callee_coro_owned : $@yield_once @convention(method ) (@owned C) -> @yields @inout C
188
- (%addr, %continuation) = begin_apply %callee_coro_owned(%instance) : $@yield_once @convention(method ) (@owned C) -> @yields @inout C
187
+ %callee_coro_owned = function_ref @callee_coro_owned : $@yield_once @convention(thin ) (@owned C) -> @yields @inout C
188
+ (%addr, %continuation) = begin_apply %callee_coro_owned(%instance) : $@yield_once @convention(thin ) (@owned C) -> @yields @inout C
189
189
end_apply %continuation
190
190
%retval = tuple ()
191
191
return %retval : $()
192
192
}
193
193
194
- // CHECK-LABEL: sil [ossa] @caller_owned_callee_coro_guaranteed : $@convention(method ) (@owned C) -> () {
194
+ // CHECK-LABEL: sil [ossa] @caller_owned_callee_coro_guaranteed : $@convention(thin ) (@owned C) -> () {
195
195
// CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @owned $C):
196
196
// CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
197
197
// CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
@@ -209,30 +209,30 @@ bb0(%instance : @owned $C):
209
209
// CHECK: dealloc_stack [[ADDR]]
210
210
// CHECK: unreachable
211
211
// CHECK-LABEL: } // end sil function 'caller_owned_callee_coro_guaranteed'
212
- sil [ossa] @caller_owned_callee_coro_guaranteed : $@convention(method ) (@owned C) -> () {
212
+ sil [ossa] @caller_owned_callee_coro_guaranteed : $@convention(thin ) (@owned C) -> () {
213
213
bb0(%instance : @owned $C):
214
- %callee_coro_guaranteed = function_ref @callee_coro_guaranteed : $@yield_once @convention(method ) (@guaranteed C) -> @yields @inout C
215
- (%addr, %continuation) = begin_apply %callee_coro_guaranteed(%instance) : $@yield_once @convention(method ) (@guaranteed C) -> @yields @inout C
214
+ %callee_coro_guaranteed = function_ref @callee_coro_guaranteed : $@yield_once @convention(thin ) (@guaranteed C) -> @yields @inout C
215
+ (%addr, %continuation) = begin_apply %callee_coro_guaranteed(%instance) : $@yield_once @convention(thin ) (@guaranteed C) -> @yields @inout C
216
216
end_apply %continuation
217
217
destroy_value %instance : $C
218
218
%retval = tuple ()
219
219
return %retval : $()
220
220
}
221
221
222
- // CHECK-LABEL: sil [ossa] @caller_guaranteed_callee_coro_owned : $@convention(method ) (@guaranteed C) -> () {
222
+ // CHECK-LABEL: sil [ossa] @caller_guaranteed_callee_coro_owned : $@convention(thin ) (@guaranteed C) -> () {
223
223
// CHECK-NOT: begin_borrow [lexical]
224
224
// CHECK-LABEL: } // end sil function 'caller_guaranteed_callee_coro_owned'
225
- sil [ossa] @caller_guaranteed_callee_coro_owned : $@convention(method ) (@guaranteed C) -> () {
225
+ sil [ossa] @caller_guaranteed_callee_coro_owned : $@convention(thin ) (@guaranteed C) -> () {
226
226
bb0(%instance : @guaranteed $C):
227
227
%copy = copy_value %instance : $C
228
- %callee_coro_owned = function_ref @callee_coro_owned : $@yield_once @convention(method ) (@owned C) -> @yields @inout C
229
- (%addr, %continuation) = begin_apply %callee_coro_owned(%copy) : $@yield_once @convention(method ) (@owned C) -> @yields @inout C
228
+ %callee_coro_owned = function_ref @callee_coro_owned : $@yield_once @convention(thin ) (@owned C) -> @yields @inout C
229
+ (%addr, %continuation) = begin_apply %callee_coro_owned(%copy) : $@yield_once @convention(thin ) (@owned C) -> @yields @inout C
230
230
end_apply %continuation
231
231
%retval = tuple ()
232
232
return %retval : $()
233
233
}
234
234
235
- // CHECK-LABEL: sil [ossa] @caller_guaranteed_callee_coro_guaranteed : $@convention(method ) (@guaranteed C) -> () {
235
+ // CHECK-LABEL: sil [ossa] @caller_guaranteed_callee_coro_guaranteed : $@convention(thin ) (@guaranteed C) -> () {
236
236
// CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @guaranteed $C):
237
237
// CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
238
238
// CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
@@ -249,16 +249,16 @@ bb0(%instance : @guaranteed $C):
249
249
// CHECK: dealloc_stack [[ADDR]]
250
250
// CHECK: unreachable
251
251
// CHECK-LABEL: } // end sil function 'caller_guaranteed_callee_coro_guaranteed'
252
- sil [ossa] @caller_guaranteed_callee_coro_guaranteed : $@convention(method ) (@guaranteed C) -> () {
252
+ sil [ossa] @caller_guaranteed_callee_coro_guaranteed : $@convention(thin ) (@guaranteed C) -> () {
253
253
bb0(%instance : @guaranteed $C):
254
- %callee_coro_guaranteed = function_ref @callee_coro_guaranteed : $@yield_once @convention(method ) (@guaranteed C) -> @yields @inout C
255
- (%addr, %continuation) = begin_apply %callee_coro_guaranteed(%instance) : $@yield_once @convention(method ) (@guaranteed C) -> @yields @inout C
254
+ %callee_coro_guaranteed = function_ref @callee_coro_guaranteed : $@yield_once @convention(thin ) (@guaranteed C) -> @yields @inout C
255
+ (%addr, %continuation) = begin_apply %callee_coro_guaranteed(%instance) : $@yield_once @convention(thin ) (@guaranteed C) -> @yields @inout C
256
256
end_apply %continuation
257
257
%retval = tuple ()
258
258
return %retval : $()
259
259
}
260
260
261
- // CHECK-LABEL: sil hidden [ossa] @caller_trivial_callee_coro_trivial : $@convention(method ) (S) -> () {
261
+ // CHECK-LABEL: sil hidden [ossa] @caller_trivial_callee_coro_trivial : $@convention(thin ) (S) -> () {
262
262
// CHECK: {{bb[0-9]+}}([[REGISTER_0:%[^,]+]] : $S):
263
263
// CHECK: [[REGISTER_1:%[^,]+]] = alloc_stack $S
264
264
// CHECK: store [[REGISTER_0]] to [trivial] [[REGISTER_1]] : $*S
@@ -270,27 +270,27 @@ bb0(%instance : @guaranteed $C):
270
270
// CHECK: dealloc_stack [[REGISTER_1]] : $*S
271
271
// CHECK: unreachable
272
272
// CHECK-LABEL: } // end sil function 'caller_trivial_callee_coro_trivial'
273
- sil hidden [ossa] @caller_trivial_callee_coro_trivial : $@convention(method ) (S) -> () {
273
+ sil hidden [ossa] @caller_trivial_callee_coro_trivial : $@convention(thin ) (S) -> () {
274
274
bb0(%instance : $S):
275
- %callee_coro_trivial = function_ref @callee_coro_trivial : $@yield_once @convention(method ) (S) -> @yields @inout S
276
- (%addr, %continuation) = begin_apply %callee_coro_trivial(%instance) : $@yield_once @convention(method ) (S) -> @yields @inout S
275
+ %callee_coro_trivial = function_ref @callee_coro_trivial : $@yield_once @convention(thin ) (S) -> @yields @inout S
276
+ (%addr, %continuation) = begin_apply %callee_coro_trivial(%instance) : $@yield_once @convention(thin ) (S) -> @yields @inout S
277
277
end_apply %continuation
278
278
%retval = tuple ()
279
279
return %retval : $()
280
280
}
281
281
282
- // CHECK-LABEL: sil hidden [ossa] @caller_address_callee_coro_address : $@convention(method ) (@in S) -> () {
282
+ // CHECK-LABEL: sil hidden [ossa] @caller_address_callee_coro_address : $@convention(thin ) (@in S) -> () {
283
283
// CHECK: {{bb[^,]+}}({{%[^,]+}} : $*S):
284
284
// CHECK: {{%[^,]+}} = tuple ()
285
285
// CHECK: [[RETVAL:%[^,]+]] = tuple ()
286
286
// CHECK: return [[RETVAL]]
287
287
// CHECK: {{bb[^,]+}}:
288
288
// CHECK: unreachable
289
289
// CHECK-LABEL: } // end sil function 'caller_address_callee_coro_address'
290
- sil hidden [ossa] @caller_address_callee_coro_address : $@convention(method ) (@in S) -> () {
290
+ sil hidden [ossa] @caller_address_callee_coro_address : $@convention(thin ) (@in S) -> () {
291
291
bb0(%instance : $*S):
292
- %callee_coro_address = function_ref @callee_coro_address : $@yield_once @convention(method ) (@in S) -> @yields @inout S
293
- (%addr, %continuation) = begin_apply %callee_coro_address(%instance) : $@yield_once @convention(method ) (@in S) -> @yields @inout S
292
+ %callee_coro_address = function_ref @callee_coro_address : $@yield_once @convention(thin ) (@in S) -> @yields @inout S
293
+ (%addr, %continuation) = begin_apply %callee_coro_address(%instance) : $@yield_once @convention(thin ) (@in S) -> @yields @inout S
294
294
end_apply %continuation
295
295
%retval = tuple ()
296
296
return %retval : $()
0 commit comments