9
9
// - accessible function records for each generator
10
10
// - runtime attribute records with correct number of trailing objects
11
11
12
- // CHECK: @"$s18runtime_attributes9gloabalFnyycvpfaAA4FlagHF "
12
+ // CHECK: @"$s18runtime_attributes8globalFnyycvpfaAA4FlagHF "
13
13
// CHECK: @"$s18runtime_attributes1AV2v1SSvpfaAA4FlagHF"
14
14
// CHECK: @"$s18runtime_attributes1AV4compSivpfaAA4FlagHF"
15
15
// CHECK: @"$s18runtime_attributes1AV5test1SiycvpZfaAA4FlagHF"
@@ -75,121 +75,121 @@ struct OnlyPropsTest<B, V> {
75
75
76
76
// - Check that all of the generator functions have been emitted
77
77
78
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes9gloabalFnyycvpfaAA4Flag"( )
79
- @Flag ( " global " ) func gloabalFn ( ) { }
78
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes8globalFnyycvpfaAA4Flag"(%T18runtime_attributes4FlagVyytGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyytGSg) %0 )
79
+ @Flag ( " global " ) func globalFn ( ) { }
80
80
81
81
@Flag
82
82
struct A {
83
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV2v1SSvpfaAA4Flag"()
83
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV2v1SSvpfaAA4Flag"(%T18runtime_attributes4FlagVySSGSg* noalias nocapture sret(%T18runtime_attributes4FlagVySSGSg) %0 )
84
84
@Flag ( " v1 " ) var v1 : String = " "
85
85
86
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV4compSivpfaAA4Flag"()
86
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV4compSivpfaAA4Flag"(%T18runtime_attributes4FlagVySiGSg* noalias nocapture sret(%T18runtime_attributes4FlagVySiGSg) %0 )
87
87
@Flag var comp : Int {
88
88
get { 42 }
89
89
}
90
90
91
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5test1SiycvpZfaAA4Flag"()
91
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5test1SiycvpZfaAA4Flag"(%T18runtime_attributes4FlagVySiGSg* noalias nocapture sret(%T18runtime_attributes4FlagVySiGSg) %0 )
92
92
@Flag static func test1( ) -> Int { 42 }
93
93
94
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5test2yycvpfaAA4Flag"()
94
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5test2yycvpfaAA4Flag"(%T18runtime_attributes4FlagVyyycGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyyycGSg) %0 )
95
95
@Flag ( " test2 " ) func test2( ) { } // Ok
96
96
97
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV1xSaySiGSgvpfaAA4Flag"()
98
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV1xSaySiGSgvpfaAA13OnlyPropsTest"()
97
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV1xSaySiGSgvpfaAA4Flag"(%T18runtime_attributes4FlagVySaySiGSgGSg* noalias nocapture sret(%T18runtime_attributes4FlagVySaySiGSgGSg) %0 )
98
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV1xSaySiGSgvpfaAA13OnlyPropsTest"(%T18runtime_attributes13OnlyPropsTestVyAA1AVSaySiGSgGSg* noalias nocapture sret(%T18runtime_attributes13OnlyPropsTestVyAA1AVSaySiGSgGSg) %0 )
99
99
@OnlyPropsTest @Flag ( " x " ) var x : [ Int ] ? = [ ] // Ok
100
100
101
101
@Flag ( " Inner type " ) class Inner {
102
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC4testSaySiGSgvpfaAA4Flag"()
103
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC4testSaySiGSgvpfaAA13OnlyPropsTest"()
102
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC4testSaySiGSgvpfaAA4Flag"(%T18runtime_attributes4FlagVySaySiGSgGSg* noalias nocapture sret(%T18runtime_attributes4FlagVySaySiGSgGSg) %0 )
103
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC4testSaySiGSgvpfaAA13OnlyPropsTest"(%T18runtime_attributes13OnlyPropsTestVyAA1AV5InnerCSaySiGSgGSg* noalias nocapture sret(%T18runtime_attributes13OnlyPropsTestVyAA1AV5InnerCSaySiGSgGSg) %0 )
104
104
@OnlyPropsTest @Flag ( " test property " ) var test : [ Int ] ? = nil // Ok
105
105
}
106
106
}
107
107
108
108
// The generator for `struct A` is emitted last.
109
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AAaBVmvpfaAA4Flag"()
109
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AAaBVmvpfaAA4Flag"(%T18runtime_attributes4FlagVyAA1AVGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyAA1AVGSg) %0 )
110
110
111
111
extension A . Inner {
112
112
@Flag ( " B type " ) struct B {
113
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC1BV03extC10StaticTestyycvpZfaAA4Flag"()
113
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC1BV03extC10StaticTestyycvpZfaAA4Flag"(%T18runtime_attributes4FlagVyytGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyytGSg) %0 )
114
114
@Flag static func extInnerStaticTest( ) { }
115
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC1BV03extC4TestyycvpZfaAA4Flag"()
115
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC1BV03extC4TestyycvpZfaAA4Flag"(%T18runtime_attributes4FlagVyytGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyytGSg) %0 )
116
116
@Flag static func extInnerTest( ) { }
117
117
118
118
@Flag ( " stored prop " ) @OnlyPropsTest let stored : Int = 42
119
- } // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC1BAeFVmvpfaAA4Flag"()
119
+ } // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC1BAeFVmvpfaAA4Flag"(%T18runtime_attributes4FlagVyAA1AV5InnerC1BVGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyAA1AV5InnerC1BVGSg) %0
120
120
121
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC13extStaticTestyycvpZfaAA4Flag"()
121
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC13extStaticTestyycvpZfaAA4Flag"(%T18runtime_attributes4FlagVyytGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyytGSg) %0 )
122
122
@Flag static func extStaticTest( ) { }
123
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes1AV5InnerC7extTestyycvpZfaAA4Flag"()
123
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes1AV5InnerC7extTestyycvpZfaAA4Flag"(%T18runtime_attributes4FlagVyytGSg* noalias nocapture sret(%T18runtime_attributes4FlagVyytGSg) %0 )
124
124
@Flag static func extTest( ) { }
125
125
126
126
@OnlyPropsTest @Flag @Ignore var extComputed : Int {
127
127
get { 42 }
128
128
}
129
129
}
130
130
131
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes16WithExternalAttrAaBVmvpfa3RAD6Ignore"()
131
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes16WithExternalAttrAaBVmvpfa3RAD6Ignore"(%T3RAD6IgnoreVy18runtime_attributes16WithExternalAttrVmGSg* noalias nocapture sret(%T3RAD6IgnoreVy18runtime_attributes16WithExternalAttrVmGSg) %0 )
132
132
@Ignore struct WithExternalAttr { }
133
133
134
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes4testyySicvpfa3RAD13TestAmbiguity"()
134
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes4testyySicvpfa3RAD13TestAmbiguity"(%T3RAD13TestAmbiguityVSg* noalias nocapture sret(%T3RAD13TestAmbiguityVSg) %0 )
135
135
@TestAmbiguity public func test( _: Int ) { }
136
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes4testyySScvpfa3RAD13TestAmbiguity"()
136
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes4testyySScvpfa3RAD13TestAmbiguity"(%T3RAD13TestAmbiguityVSg* noalias nocapture sret(%T3RAD13TestAmbiguityVSg) %0 )
137
137
@TestAmbiguity public func test( _: String ) { }
138
138
139
139
public struct TestNoAmbiguity {
140
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes15TestNoAmbiguityV10testStaticSiycvpZfa3RAD0cE0"()
140
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes15TestNoAmbiguityV10testStaticSiycvpZfa3RAD0cE0"(%T3RAD13TestAmbiguityVSg* noalias nocapture sret(%T3RAD13TestAmbiguityVSg) %0 )
141
141
@TestAmbiguity static func testStatic( ) -> Int { 42 }
142
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes15TestNoAmbiguityV10testStaticyycvpZfa3RAD0cE0"()
142
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes15TestNoAmbiguityV10testStaticyycvpZfa3RAD0cE0"(%T3RAD13TestAmbiguityVSg* noalias nocapture sret(%T3RAD13TestAmbiguityVSg) %0 )
143
143
@TestAmbiguity static func testStatic( ) { }
144
144
145
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes15TestNoAmbiguityV8testInstyySi_SStcvpfa3RAD0cE0"()
145
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes15TestNoAmbiguityV8testInstyySi_SStcvpfa3RAD0cE0"(%T3RAD13TestAmbiguityVSg* noalias nocapture sret(%T3RAD13TestAmbiguityVSg) %0 )
146
146
@TestAmbiguity func testInst( _: Int , _: String ) { }
147
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes15TestNoAmbiguityV8testInstyySi_Sitcvpfa3RAD0cE0"()
147
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes15TestNoAmbiguityV8testInstyySi_Sitcvpfa3RAD0cE0"(%T3RAD13TestAmbiguityVSg* noalias nocapture sret(%T3RAD13TestAmbiguityVSg) %0 )
148
148
@TestAmbiguity func testInst( _: Int , _: Int ) { }
149
149
}
150
150
151
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes14TestInference1AaBVmvpfa3RAD6Ignore"()
151
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes14TestInference1AaBVmvpfa3RAD6Ignore"(%T3RAD6IgnoreVy18runtime_attributes14TestInference1VmGSg* noalias nocapture sret(%T3RAD6IgnoreVy18runtime_attributes14TestInference1VmGSg) %0 )
152
152
public struct TestInference1 : Ignored { }
153
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes14TestInference2AaBCmvpfa3RAD6Ignore"()
153
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes14TestInference2AaBCmvpfa3RAD6Ignore"(%T3RAD6IgnoreVy18runtime_attributes14TestInference2CmGSg* noalias nocapture sret(%T3RAD6IgnoreVy18runtime_attributes14TestInference2CmGSg) %0 )
154
154
public class TestInference2 : Ignored { }
155
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes14TestInference3AaBOmvpfa3RAD6Ignore"()
155
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes14TestInference3AaBOmvpfa3RAD6Ignore"(%T3RAD6IgnoreVy18runtime_attributes14TestInference3OmGSg* noalias nocapture sret(%T3RAD6IgnoreVy18runtime_attributes14TestInference3OmGSg) %0 )
156
156
public enum TestInference3 : Ignored { }
157
157
158
158
@runtimeMetadata
159
159
struct AvailabilityTests {
160
160
init ( attachedTo: Any ) { }
161
161
}
162
162
163
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes20testWithAvailabilityyySicvpfaAA0E5Tests"()
163
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes20testWithAvailabilityyySicvpfaAA0E5Tests"(%T18runtime_attributes17AvailabilityTestsVSg* noalias nocapture sret(%T18runtime_attributes17AvailabilityTestsVSg) %0 )
164
164
// CHECK: entry:
165
165
// CHECK: {{.*}} = call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(i64 42, i64 0, i64 0)
166
166
@available ( macOS, introduced: 42.0 )
167
167
@AvailabilityTests
168
168
func testWithAvailability( _: Int ) { }
169
169
170
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes20TypeWithAvailabilityAaBCmvpfaAA0E5Tests"()
170
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes20TypeWithAvailabilityAaBCmvpfaAA0E5Tests"(%T18runtime_attributes17AvailabilityTestsVSg* noalias nocapture sret(%T18runtime_attributes17AvailabilityTestsVSg) %0 )
171
171
// CHECK: entry:
172
172
// CHECK: {{.*}} = call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(i64 100, i64 0, i64 0)
173
173
@available ( macOS, introduced: 100.0 )
174
174
@AvailabilityTests
175
175
class TypeWithAvailability { }
176
176
177
177
class MembersWithAvailability {
178
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes23MembersWithAvailabilityC8staticFnyycvpZfaAA0E5Tests"()
178
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes23MembersWithAvailabilityC8staticFnyycvpZfaAA0E5Tests"(%T18runtime_attributes17AvailabilityTestsVSg* noalias nocapture sret(%T18runtime_attributes17AvailabilityTestsVSg) %0 )
179
179
// CHECK: entry:
180
180
// CHECK: {{.*}} = call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(i64 201, i64 0, i64 0)
181
181
@AvailabilityTests
182
182
@available ( macOS, introduced: 201.0 )
183
183
static func staticFn( ) { }
184
184
185
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes23MembersWithAvailabilityC6instFnyycvpfaAA0E5Tests"()
185
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes23MembersWithAvailabilityC6instFnyycvpfaAA0E5Tests"(%T18runtime_attributes17AvailabilityTestsVSg* noalias nocapture sret(%T18runtime_attributes17AvailabilityTestsVSg) %0 )
186
186
// CHECK: entry:
187
187
// CHECK: {{.*}} = call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(i64 202, i64 0, i64 0)
188
188
@AvailabilityTests
189
189
@available ( macOS, introduced: 202.0 )
190
190
func instFn( ) { }
191
191
192
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes23MembersWithAvailabilityC4propSivpfaAA0E5Tests"()
192
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes23MembersWithAvailabilityC4propSivpfaAA0E5Tests"(%T18runtime_attributes17AvailabilityTestsVSg* noalias nocapture sret(%T18runtime_attributes17AvailabilityTestsVSg) %0 )
193
193
// CHECK: entry:
194
194
// CHECK: {{.*}} = call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(i64 203, i64 0, i64 0)
195
195
@AvailabilityTests
@@ -203,7 +203,7 @@ struct FlagWithAvail {
203
203
init ( attachedTo: Any ) { }
204
204
}
205
205
206
- // CHECK-LABEL: define hidden swiftcc i8 @"$s18runtime_attributes20attrIsHigherThanFuncyycvpfaAA13FlagWithAvail"()
206
+ // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes20attrIsHigherThanFuncyycvpfaAA13FlagWithAvail"(%T18runtime_attributes13FlagWithAvailVSg* noalias nocapture sret(%T18runtime_attributes13FlagWithAvailVSg) %0 )
207
207
// CHECK: entry:
208
208
// CHECK: {{.*}} = call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(i64 110, i64 0, i64 0)
209
209
@FlagWithAvail
0 commit comments