|
134 | 134 | // CHECK-SAME: @"$s18runtime_attributes9OuterTypeV15outerMutatingFnSiycvpfaAA19FlagForInnerMethodsHF"
|
135 | 135 | // CHECK-SAME: section "__TEXT, __swift5_rattrs, regular"
|
136 | 136 |
|
| 137 | +// CHECK: @"$s3RAD8EnumFlagOHa" = internal constant |
| 138 | +// CHECK-SAME: i32 0 |
| 139 | +// CHECK-SAME: %swift.type_descriptor** @"got.$s3RAD8EnumFlagOMn" |
| 140 | +// CHECK-SAME: i32 5 |
| 141 | +// CHECK-SAME: @"$s18runtime_attributes14globalEnumTestSi_SaySSGtSgycvpfa3RAD0D4FlagHF" |
| 142 | +// CHECK-SAME: @"$s18runtime_attributes12EnumTypeTestV1xSivpfa3RAD0C4FlagHF" |
| 143 | +// CHECK-SAME: @"$s18runtime_attributes12EnumTypeTestV8testInstyycvpfa3RAD0C4FlagHF" |
| 144 | +// CHECK-SAME: @"$s18runtime_attributes12EnumTypeTestV10testStaticSiycvpZfa3RAD0C4FlagHF" |
| 145 | +// CHECK-SAME: @"$s18runtime_attributes12EnumTypeTestAaBVmvpfa3RAD0C4FlagHF" |
| 146 | +// CHECK-SAME: section "__TEXT, __swift5_rattrs, regular" |
| 147 | + |
137 | 148 | import RAD
|
138 | 149 |
|
139 | 150 | @runtimeMetadata
|
@@ -315,3 +326,18 @@ extension OuterType {
|
315 | 326 | // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes9OuterTypeV15outerMutatingFnSiycvpfaAA19FlagForInnerMethods"(%T18runtime_attributes19FlagForInnerMethodsVySiGSg* noalias nocapture sret(%T18runtime_attributes19FlagForInnerMethodsVySiGSg) %0)
|
316 | 327 | @FlagForInnerMethods mutating func outerMutatingFn() -> Int { 42 }
|
317 | 328 | }
|
| 329 | + |
| 330 | +// CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes14globalEnumTestSi_SaySSGtSgycvpfa3RAD0D4Flag"(%T3RAD8EnumFlagOyytSi_SaySSGtSgGSg* noalias nocapture sret(%T3RAD8EnumFlagOyytSi_SaySSGtSgGSg) %0) |
| 331 | +@EnumFlag func globalEnumTest() -> (Int, [String])? { |
| 332 | + nil |
| 333 | +} |
| 334 | + |
| 335 | +@EnumFlag struct EnumTypeTest { |
| 336 | + // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes12EnumTypeTestV1xSivpfa3RAD0C4Flag"(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVSiGSg* noalias nocapture sret(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVSiGSg) %0) |
| 337 | + @EnumFlag var x: Int = 42 |
| 338 | + // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes12EnumTypeTestV8testInstyycvpfa3RAD0C4Flag"(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVytGSg* noalias nocapture sret(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVytGSg) %0) |
| 339 | + @EnumFlag func testInst() {} |
| 340 | + // CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes12EnumTypeTestV10testStaticSiycvpZfa3RAD0C4Flag"(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVmSiGSg* noalias nocapture sret(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVmSiGSg) %0) |
| 341 | + @EnumFlag static func testStatic() -> Int { 42 } |
| 342 | +} |
| 343 | +// CHECK-LABEL: define hidden swiftcc void @"$s18runtime_attributes12EnumTypeTestAaBVmvpfa3RAD0C4Flag"(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVytGSg* noalias nocapture sret(%T3RAD8EnumFlagOy18runtime_attributes0B8TypeTestVytGSg) %0) |
0 commit comments