4
4
5
5
import Swift
6
6
7
+ // CHECK-NO-SKIP: sil_global private @$s4Test17internalGlobalVar_Wz : $Builtin.Word
8
+ // CHECK-SKIP-NOT: s4Test17internalGlobalVar_Wz
9
+
10
+ // CHECK-NO-SKIP: sil_global hidden @$s4Test17internalGlobalVarSivp : $Int
11
+ // CHECK-SKIP-NOT: s4Test17internalGlobalVarSivp
12
+
13
+ // CHECK-NO-SKIP: sil_global private @$s4Test15publicGlobalVar_Wz : $Builtin.Word
14
+ // CHECK-SKIP-NOT: s4Test15publicGlobalVar_Wz
15
+
16
+ // CHECK: sil_global @$s4Test15publicGlobalVarSivp : $Int
17
+
7
18
// CHECK-NO-SKIP: sil private{{.*}} @$s4Test11privateFunc33_E3F0E1C7B46D05C8067CB98677DE566CLLyyF : $@convention(thin) () -> () {
8
19
// CHECK-SKIP-NOT: s4Test11privateFunc33_E3F0E1C7B46D05C8067CB98677DE566CLLyyF
9
20
private func privateFunc( ) { }
@@ -36,6 +47,20 @@ public func publicFuncWithNestedFuncs() {
36
47
// CHECK: sil [serialized]{{.*}} @$s4Test13inlinableFuncyyF : $@convention(thin) () -> () {
37
48
@inlinable internal func inlinableFunc( ) { }
38
49
50
+ // CHECK-NO-SKIP: sil private [global_init_once_fn]{{.*}} @$s4Test17internalGlobalVar_WZ : $@convention(c) (Builtin.RawPointer) -> () {
51
+ // CHECK-SKIP-NOT: s4Test17internalGlobalVar_WZ
52
+
53
+ // CHECK-NO-SKIP: sil hidden [global_init]{{.*}} @$s4Test17internalGlobalVarSivau : $@convention(thin) () -> Builtin.RawPointer {
54
+ // CHECK-SKIP-NOT: s4Test17internalGlobalVarSivau
55
+ internal var internalGlobalVar = 1
56
+
57
+ // CHECK-NO-SKIP: sil private [global_init_once_fn]{{.*}} @$s4Test15publicGlobalVar_WZ : $@convention(c) (Builtin.RawPointer) -> () {
58
+ // CHECK-SKIP-NOT: s4Test15publicGlobalVar_WZ
59
+
60
+ // CHECK-NO-SKIP: sil [global_init]{{.*}} @$s4Test15publicGlobalVarSivau : $@convention(thin) () -> Builtin.RawPointer {
61
+ // CHECK-SKIP-NOT: s4Test15publicGlobalVarSivau
62
+ public var publicGlobalVar = 1
63
+
39
64
// CHECK: sil [serialized]{{.*}} @$s4Test023inlinableFuncWithNestedC0yyF : $@convention(thin) () -> () {
40
65
@inlinable internal func inlinableFuncWithNestedFunc( ) {
41
66
defer { publicFunc ( ) }
@@ -60,6 +85,23 @@ private class PrivateClass {
60
85
}
61
86
62
87
public class PublicClass {
88
+ // CHECK-NO-SKIP: sil [transparent]{{.*}} @$s4Test11PublicClassC11internalVarSivpfi : $@convention(thin) () -> Int {
89
+ // CHECK-SKIP-NOT: s4Test11PublicClassC11internalVarSivpfi
90
+ // CHECK-NO-SKIP: sil hidden [transparent]{{.*}} @$s4Test11PublicClassC11internalVarSivg : $@convention(method) (@guaranteed PublicClass) -> Int {
91
+ // CHECK-SKIP-NOT: s4Test11PublicClassC11internalVarSivg
92
+ // CHECK-NO-SKIP: sil hidden [transparent]{{.*}} @$s4Test11PublicClassC11internalVarSivs : $@convention(method) (Int, @guaranteed PublicClass) -> () {
93
+ // CHECK-SKIP-NOT: s4Test11PublicClassC11internalVarSivs
94
+ // CHECK-NO-SKIP: sil hidden [transparent]{{.*}} @$s4Test11PublicClassC11internalVarSivM : $@yield_once @convention(method) (@guaranteed PublicClass) -> @yields @inout Int {
95
+ // CHECK-SKIP-NOT: s4Test11PublicClassC11internalVarSivM
96
+ var internalVar = 1
97
+
98
+ // CHECK-NO-SKIP: sil [transparent]{{.*}} @$s4Test11PublicClassC9publicVarSivpfi : $@convention(thin) () -> Int {
99
+ // CHECK-SKIP-NOT: s4Test11PublicClassC9publicVarSivpfi
100
+ // CHECK: sil [transparent] [serialized]{{.*}} @$s4Test11PublicClassC9publicVarSivg : $@convention(method) (@guaranteed PublicClass) -> Int {
101
+ // CHECK: sil [transparent] [serialized]{{.*}} @$s4Test11PublicClassC9publicVarSivs : $@convention(method) (Int, @guaranteed PublicClass) -> () {
102
+ // CHECK: sil [transparent] [serialized]{{.*}} @$s4Test11PublicClassC9publicVarSivM : $@yield_once @convention(method) (@guaranteed PublicClass) -> @yields @inout Int {
103
+ public var publicVar = 1
104
+
63
105
// CHECK-NO-SKIP: sil hidden{{.*}} @$s4Test11PublicClassC14internalMethodyyF : $@convention(method) (@guaranteed PublicClass) -> () {
64
106
// CHECK-SKIP-NOT: s4Test11PublicClassC14internalMethodyyF
65
107
internal func internalMethod( ) { }
@@ -81,16 +123,32 @@ extension PublicClass {
81
123
internal func internalMethodInExtension( ) { }
82
124
}
83
125
126
+ @frozen public struct FrozenPublicStruct {
127
+ // CHECK: sil non_abi [transparent] [serialized]{{.*}} @$s4Test18FrozenPublicStructV11internalVarSivpfi : $@convention(thin) () -> Int {
128
+ var internalVar = 1
129
+ }
130
+
84
131
// CHECK-NO-SKIP-LABEL: sil_vtable PrivateClass {
85
132
// CHECK-NO-SKIP-NEXT: #PrivateClass.init!allocator
86
133
// CHECK-NO-SKIP-NEXT: #PrivateClass.deinit!deallocator
87
134
// CHECK-NO-SKIP-NEXT: }
88
135
// CHECK-SKIP-NOT: sil_vtable PrivateClass
89
136
90
137
// CHECK-LABEL: sil_vtable [serialized] PublicClass {
138
+ // CHECK-NO-SKIP-NEXT: #PublicClass.internalVar!getter
139
+ // CHECK-SKIP-NOT: #PublicClass.internalVar!getter
140
+ // CHECK-NO-SKIP-NEXT: #PublicClass.internalVar!setter
141
+ // CHECK-SKIP-NOT: #PublicClass.internalVar!setter
142
+ // CHECK-NO-SKIP-NEXT: #PublicClass.internalVar!modify
143
+ // CHECK-SKIP-NOT: #PublicClass.internalVar!modify
144
+ // CHECK-NEXT: #PublicClass.publicVar!getter
145
+ // CHECK-NEXT: #PublicClass.publicVar!setter
146
+ // CHECK-NEXT: #PublicClass.publicVar!modify
91
147
// CHECK-NO-SKIP-NEXT: #PublicClass.internalMethod
92
148
// CHECK-SKIP-NOT: #PublicClass.internalMethod
93
149
// CHECK-NO-SKIP-NEXT: #PublicClass.init!allocator
94
150
// CHECK-SKIP-NOT: #PublicClass.init!allocator
95
151
// CHECK-NEXT: #PublicClass.deinit!deallocator
96
152
// CHECK-NEXT: }
153
+
154
+ // CHECK: sil_property #PublicClass.publicVar ()
0 commit comments