Skip to content

Commit ef0d621

Browse files
committed
[Test] Fixed some function conventions.
1 parent a67a9c3 commit ef0d621

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

test/SILOptimizer/inline_lifetime.sil

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ entry(%instance : $*S):
120120

121121
// declarations
122122

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 {
124124
bb0(%instance : @owned $C):
125125
%addr = alloc_stack $C
126126
store %instance to [init] %addr : $*C
@@ -136,7 +136,7 @@ bb2:
136136
unwind
137137
}
138138

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 {
140140
bb0(%instance : @guaranteed $C):
141141
%copy = copy_value %instance : $C
142142
%addr = alloc_stack $C
@@ -153,7 +153,7 @@ bb2:
153153
unwind
154154
}
155155

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 {
157157
bb0(%instance : $S):
158158
%addr = alloc_stack $S
159159
store %instance to [trivial] %addr : $*S
@@ -167,7 +167,7 @@ bb2:
167167
unwind
168168
}
169169

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 {
171171
bb0(%instance : $*S):
172172
yield %instance : $*S, resume bb1, unwind bb2
173173
bb1:
@@ -179,19 +179,19 @@ bb2:
179179

180180
// tests
181181

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) -> () {
183183
// CHECK-NOT: begin_borrow [lexical]
184184
// 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) -> () {
186186
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
189189
end_apply %continuation
190190
%retval = tuple ()
191191
return %retval : $()
192192
}
193193

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) -> () {
195195
// CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @owned $C):
196196
// CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
197197
// CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
@@ -209,30 +209,30 @@ bb0(%instance : @owned $C):
209209
// CHECK: dealloc_stack [[ADDR]]
210210
// CHECK: unreachable
211211
// 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) -> () {
213213
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
216216
end_apply %continuation
217217
destroy_value %instance : $C
218218
%retval = tuple ()
219219
return %retval : $()
220220
}
221221

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) -> () {
223223
// CHECK-NOT: begin_borrow [lexical]
224224
// 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) -> () {
226226
bb0(%instance : @guaranteed $C):
227227
%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
230230
end_apply %continuation
231231
%retval = tuple ()
232232
return %retval : $()
233233
}
234234

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) -> () {
236236
// CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @guaranteed $C):
237237
// CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
238238
// CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
@@ -249,16 +249,16 @@ bb0(%instance : @guaranteed $C):
249249
// CHECK: dealloc_stack [[ADDR]]
250250
// CHECK: unreachable
251251
// 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) -> () {
253253
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
256256
end_apply %continuation
257257
%retval = tuple ()
258258
return %retval : $()
259259
}
260260

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) -> () {
262262
// CHECK: {{bb[0-9]+}}([[REGISTER_0:%[^,]+]] : $S):
263263
// CHECK: [[REGISTER_1:%[^,]+]] = alloc_stack $S
264264
// CHECK: store [[REGISTER_0]] to [trivial] [[REGISTER_1]] : $*S
@@ -270,27 +270,27 @@ bb0(%instance : @guaranteed $C):
270270
// CHECK: dealloc_stack [[REGISTER_1]] : $*S
271271
// CHECK: unreachable
272272
// 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) -> () {
274274
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
277277
end_apply %continuation
278278
%retval = tuple ()
279279
return %retval : $()
280280
}
281281

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) -> () {
283283
// CHECK: {{bb[^,]+}}({{%[^,]+}} : $*S):
284284
// CHECK: {{%[^,]+}} = tuple ()
285285
// CHECK: [[RETVAL:%[^,]+]] = tuple ()
286286
// CHECK: return [[RETVAL]]
287287
// CHECK: {{bb[^,]+}}:
288288
// CHECK: unreachable
289289
// 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) -> () {
291291
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
294294
end_apply %continuation
295295
%retval = tuple ()
296296
return %retval : $()

0 commit comments

Comments
 (0)