@@ -666,3 +666,40 @@ sil_vtable SomeChildItem {
666
666
#SomeItem.init!initializer.1: @SomeChildItem_initializer
667
667
#SomeChildItem.deinit!deallocator: @SomeChildItem_destructor
668
668
}
669
+
670
+ public protocol PublicProtocol {
671
+ func foo()
672
+ }
673
+
674
+ struct SingleConformance : PublicProtocol {
675
+ func foo()
676
+ }
677
+
678
+ public func testit(p: PublicProtocol)
679
+
680
+ sil private [transparent] [thunk] @$foo_impl : $@convention(witness_method: PublicProtocol) (@in_guaranteed SingleConformance) -> () {
681
+ bb0(%0 : $*SingleConformance):
682
+ %4 = tuple ()
683
+ return %4 : $()
684
+ }
685
+
686
+ // CHECK: Function call site:
687
+ // CHECK: witness_method $@opened{{.*}} PublicProtocol
688
+ // CHECK: apply {{.*}} PublicProtocol
689
+ // CHECK-NOWMO: Incomplete callee list? : Yes
690
+ // CHECK-WMO: Incomplete callee list? : Yes
691
+ // CHECK: Known callees:
692
+ sil @$call_foo : $@convention(thin) (@in PublicProtocol) -> () {
693
+ bb0(%0 : $*PublicProtocol):
694
+ %5 = open_existential_addr immutable_access %0 : $*PublicProtocol to $*@opened("2226A1AC-2B95-11E8-BDF4-D0817AD3F637") PublicProtocol
695
+ %6 = witness_method $@opened("2226A1AC-2B95-11E8-BDF4-D0817AD3F637") PublicProtocol, #PublicProtocol.foo!1 : <Self where Self : PublicProtocol> (Self) -> () -> (), %5 : $*@opened("2226A1AC-2B95-11E8-BDF4-D0817AD3F637") PublicProtocol : $@convention(witness_method: PublicProtocol) <τ_0_0 where τ_0_0 : PublicProtocol> (@in_guaranteed τ_0_0) -> ()
696
+ %7 = apply %6<@opened("2226A1AC-2B95-11E8-BDF4-D0817AD3F637") PublicProtocol>(%5) : $@convention(witness_method: PublicProtocol) <τ_0_0 where τ_0_0 : PublicProtocol> (@in_guaranteed τ_0_0) -> ()
697
+ destroy_addr %0 : $*PublicProtocol
698
+ %10 = tuple ()
699
+ return %10 : $()
700
+ }
701
+
702
+ sil_witness_table hidden SingleConformance: PublicProtocol module nix {
703
+ method #PublicProtocol.foo!1: <Self where Self : PublicProtocol> (Self) -> () -> () : @$foo_impl
704
+ }
705
+
0 commit comments