@@ -279,7 +279,6 @@ bb0(%0: $Optional<D>):
279
279
// Generated from:
280
280
// func archetype_member_ref<T:Runcible>(x:T) {
281
281
// x.free_method()
282
- // var u = x.associated_method()
283
282
// T.static_method()
284
283
// }
285
284
@@ -290,28 +289,20 @@ protocol Runcible {
290
289
static func static_method()
291
290
}
292
291
293
- /* SIL parsing of substitutions in apply insts is totally busted.
294
- // C/HECK: $@convention(thin) <T : Runcible> (@in T) -> ()
292
+ // CHECK: $@convention(thin) <T where T : Runcible> (@in T) -> ()
295
293
sil @_T4arch20archetype_member_refUS_8Runcible___FT1xQ__T_ : $@convention(thin) <T : Runcible> (@in T) -> () {
296
294
bb0(%0 : $*T):
297
- // C/HECK: witness_method $*T, #Runcible.free_method!1
298
- %1 = witness_method $*T, #Runcible.free_method!1 : $@cc(method) (@inout T) -> Int
299
- %2 = apply %1(%0) : $@cc(method) (@inout T) -> Int
300
- %3 = alloc_stack $@thick T.U.Type
301
- // C/HECK: witness_method $*T, #Runcible.associated_method!1
302
- %4 = witness_method $*T, #Runcible.associated_method!1 : $@cc(method) (@inout T) -> @thick T.U.Type
303
- %5 = apply %4(%0) : $@cc(method) (@inout T) -> @thick T.U.Type
304
- store %5 to %3 : $*@thick T.U.Type
305
- %7 = metatype $@thick T.Type
306
- // C/HECK: objc_method $*T, #Runcible.static_method!1
307
- %8 = objc_method $*T, #Runcible.static_method!1 : $(@thick T.Type) -> ()
308
- %9 = apply %8(%7) : $(@thick T.Type) -> ()
309
- dealloc_stack %3 : $*@thick T.U.Type
310
- %11 = tuple ()
295
+ // CHECK: witness_method $T, #Runcible.free_method!1
296
+ %1 = witness_method $T, #Runcible.free_method!1 : $@convention(witness_method: Runcible) <Self : Runcible> (@in Self) -> Int
297
+ %2 = apply %1<T>(%0) : $@convention(witness_method: Runcible) <Self : Runcible> (@in Self) -> Int
298
+ %3 = metatype $@thick T.Type
299
+ // CHECK: witness_method $T, #Runcible.static_method!1
300
+ %4 = witness_method $T, #Runcible.static_method!1 : $@convention(witness_method: Runcible) <Self : Runcible> (@thick T.Type) -> ()
301
+ %5 = apply %4<T>(%3) : $@convention(witness_method: Runcible) <Self : Runcible> (@thick T.Type) -> ()
302
+ %6 = tuple ()
311
303
destroy_addr %0 : $*T
312
- return %11 : $()
304
+ return %6 : $()
313
305
}
314
- */
315
306
316
307
protocol Bendable { }
317
308
0 commit comments