1
1
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
2
+ // RUN: %target-swift-emit-silgen %s -enable-library-evolution
2
3
3
- protocol Foo {
4
+ public protocol Foo {
4
5
static var button : Self { get }
5
6
}
6
7
7
- enum Bar : Foo {
8
+ public enum Bar : Foo {
8
9
case button
9
10
}
10
11
11
- protocol AnotherFoo {
12
+ public protocol AnotherFoo {
12
13
static func bar( arg: Int ) -> Self
13
14
}
14
15
15
- enum AnotherBar : AnotherFoo {
16
+ public enum AnotherBar : AnotherFoo {
16
17
case bar( arg: Int )
17
18
}
18
19
19
- // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21protocol_enum_witness3BarOAA3FooA2aDP6buttonxvgZTW : $@convention(witness_method: Foo) (@thick Bar.Type) -> @out Bar {
20
+ // CHECK-LABEL: sil shared [transparent] [serialized ] [thunk] [ossa] @$s21protocol_enum_witness3BarOAA3FooA2aDP6buttonxvgZTW : $@convention(witness_method: Foo) (@thick Bar.Type) -> @out Bar {
20
21
// CHECK: bb0([[BAR:%.*]] : $*Bar, [[BAR_TYPE:%.*]] : $@thick Bar.Type):
21
22
// CHECK-NEXT: [[META_TYPE:%.*]] = metatype $@thin Bar.Type
22
23
// CHECK: [[REF:%.*]] = function_ref @$s21protocol_enum_witness3BarO6buttonyA2CmF : $@convention(method) (@thin Bar.Type) -> Bar
@@ -26,13 +27,13 @@ enum AnotherBar: AnotherFoo {
26
27
// CHECK-NEXT: return [[TUPLE]] : $()
27
28
// CHECK-END: }
28
29
29
- // CHECK-LABEL: sil shared [transparent] [ossa] @$s21protocol_enum_witness3BarO6buttonyA2CmF : $@convention(method) (@thin Bar.Type) -> Bar {
30
+ // CHECK-LABEL: sil shared [transparent] [serializable] [ ossa] @$s21protocol_enum_witness3BarO6buttonyA2CmF : $@convention(method) (@thin Bar.Type) -> Bar {
30
31
// CHECK: bb0({{%.*}} : $@thin Bar.Type):
31
32
// CHECK-NEXT: [[CASE:%.*]] = enum $Bar, #Bar.button!enumelt
32
33
// CHECK-NEXT: return [[CASE]] : $Bar
33
34
// CHECK-END: }
34
35
35
- // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21protocol_enum_witness10AnotherBarOAA0D3FooA2aDP3bar3argxSi_tFZTW : $@convention(witness_method: AnotherFoo) (Int, @thick AnotherBar.Type) -> @out AnotherBar {
36
+ // CHECK-LABEL: sil shared [transparent] [serialized ] [thunk] [ossa] @$s21protocol_enum_witness10AnotherBarOAA0D3FooA2aDP3bar3argxSi_tFZTW : $@convention(witness_method: AnotherFoo) (Int, @thick AnotherBar.Type) -> @out AnotherBar {
36
37
// CHECK: bb0([[ANOTHER_BAR:%.*]] : $*AnotherBar, [[INT_ARG:%.*]] : $Int, [[ANOTHER_BAR_TYPE:%.*]] : $@thick AnotherBar.Type):
37
38
// CHECK-NEXT: [[META_TYPE:%.*]] = metatype $@thin AnotherBar.Type
38
39
// CHECK: [[REF:%.*]] = function_ref @$s21protocol_enum_witness10AnotherBarO3baryACSi_tcACmF : $@convention(method) (Int, @thin AnotherBar.Type) -> AnotherBar
@@ -42,8 +43,8 @@ enum AnotherBar: AnotherFoo {
42
43
// CHECK-NEXT: return [[TUPLE]] : $()
43
44
// CHECK-END: }
44
45
45
- // CHECK-LABEL: sil_witness_table hidden Bar: Foo module protocol_enum_witness {
46
+ // CHECK-LABEL: sil_witness_table [serialized] Bar: Foo module protocol_enum_witness {
46
47
// CHECK: method #Foo.button!getter: <Self where Self : Foo> (Self.Type) -> () -> Self : @$s21protocol_enum_witness3BarOAA3FooA2aDP6buttonxvgZTW
47
48
48
- // CHECK-LABEL: sil_witness_table hidden AnotherBar: AnotherFoo module protocol_enum_witness {
49
+ // CHECK-LABEL: sil_witness_table [serialized] AnotherBar: AnotherFoo module protocol_enum_witness {
49
50
// CHECK: method #AnotherFoo.bar: <Self where Self : AnotherFoo> (Self.Type) -> (Int) -> Self : @$s21protocol_enum_witness10AnotherBarOAA0D3FooA2aDP3bar3argxSi_tFZTW
0 commit comments