1
1
// RUN: %target-swift-emit-silgen %s | %FileCheck --check-prefix=CHECK --check-prefix=NONRESILIENT %s
2
2
// RUN: %target-swift-emit-silgen -enable-library-evolution %s | %FileCheck --check-prefix=CHECK --check-prefix=RESILIENT %s
3
+ // RUN: %target-swift-emit-silgen -enable-private-imports %s | %FileCheck --check-prefix=PRIVATEIMPORTS %s
3
4
4
5
// TODO: globals should get descriptors
5
6
public var a : Int = 0
@@ -12,30 +13,38 @@ internal var c: Int = 0
12
13
13
14
// no descriptor
14
15
// CHECK-NOT: sil_property #d
16
+ // PRIVATEIMPORTS-NOT: sil_property #d
15
17
internal var d : Int = 0
16
18
// CHECK-NOT: sil_property #e
19
+ // PRIVATEIMPORTS-NOT: sil_property #e
17
20
private var e : Int = 0
18
21
19
22
public struct A {
20
23
// NONRESILIENT-LABEL: sil_property #A.a ()
21
24
// RESILIENT-LABEL: sil_property #A.a (stored_property
25
+ // PRIVATEIMPORTS-LABEL: sil_property #A.a ()
22
26
public var a : Int = 0
23
27
24
28
// CHECK-LABEL: sil_property #A.b ()
29
+ // PRIVATEIMPORTS-LABEL: sil_property #A.b ()
25
30
@inlinable
26
31
public var b : Int { return 0 }
27
32
28
33
// NONRESILIENT-LABEL: sil_property #A.c ()
29
34
// RESILIENT-LABEL: sil_property #A.c (stored_property
35
+ // PRIVATEIMPORTS-LABEL: sil_property #A.c ()
30
36
@usableFromInline
31
37
internal var c : Int = 0
32
38
33
39
// no descriptor
34
40
// CHECK-NOT: sil_property #A.d
41
+ // PRIVATEIMPORTS-LABEL: sil_property #A.d ()
35
42
internal var d : Int = 0
36
43
// CHECK-NOT: sil_property #A.e
44
+ // PRIVATEIMPORTS-LABEL: sil_property #A.e ()
37
45
fileprivate var e : Int = 0
38
46
// CHECK-NOT: sil_property #A.f
47
+ // PRIVATEIMPORTS-LABEL: sil_property #A.f ()
39
48
private var f : Int = 0
40
49
41
50
// TODO: static vars should get descriptors
@@ -99,19 +108,33 @@ public struct A {
99
108
private var _count : Int = 0
100
109
101
110
// NONRESILIENT-LABEL: sil_property #A.getSet ()
111
+ // PRIVATEIMPORTS-LABEL: sil_property #A.getSet ()
102
112
// RESILIENT-LABEL: sil_property #A.getSet (settable_property
103
113
public var getSet : Int {
104
114
get { return 0 }
105
115
set { }
106
116
}
107
117
108
118
// CHECK-LABEL: sil_property #A.hiddenSetter (settable_property
119
+ // PRIVATEIMPORTS-LABEL: sil_property #A.hiddenSetter (settable_property
109
120
public internal( set) var hiddenSetter : Int {
110
121
get { return 0 }
111
122
set { }
112
123
}
113
124
125
+ // PRIVATEIMPORTS-LABEL: sil_property #A.privateSetter (settable_property
126
+ public private( set) var privateSetter : Int {
127
+ get { return 0 }
128
+ set { }
129
+ }
130
+ // PRIVATEIMPORTS-LABEL: sil_property #A.fileprivateSetter (settable_property
131
+ public fileprivate( set) var fileprivateSetter : Int {
132
+ get { return 0 }
133
+ set { }
134
+ }
135
+
114
136
// NONRESILIENT-LABEL: sil_property #A.usableFromInlineSetter ()
137
+ // PRIVATEIMPORTS-LABEL: sil_property #A.usableFromInlineSetter ()
115
138
// RESILIENT-LABEL: sil_property #A.usableFromInlineSetter (settable_property
116
139
public internal( set) var usableFromInlineSetter : Int {
117
140
get { return 0 }
0 commit comments