File tree Expand file tree Collapse file tree 2 files changed +25
-19
lines changed Expand file tree Collapse file tree 2 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,6 @@ import resilient_struct
22
22
// ENUM_NOT_RES-NOT: @"$S14resilient_enum6MediumO6CanvasyA2CmFWC" =
23
23
24
24
// CHECK: %T15enum_resilience5ClassC = type <{ %swift.refcounted }>
25
-
26
- // Because the enum is resilient we cannot pack the tag into the pointer inside of the resilient payload.
27
- // CHECK: %T15enum_resilience9ContainerC5Multi33_59077B69D65A4A3BEE0C93708067D5F0LLO.0 = type <{ [{{(8|4)}} x i8], [1 x i8] }>
28
-
29
25
// CHECK: %T15enum_resilience9ReferenceV = type <{ %T15enum_resilience5ClassC* }>
30
26
31
27
// Public fixed layout struct contains a public resilient struct,
@@ -330,18 +326,3 @@ private enum ProtGenEnumWithSize<T: Prot> {
330
326
331
327
// CHECK-LABEL: define linkonce_odr hidden %T15enum_resilience19ProtGenEnumWithSize33_59077B69D65A4A3BEE0C93708067D5F0LLO* @"$S15enum_resilience19ProtGenEnumWithSize33_59077B69D65A4A3BEE0C93708067D5F0LLOyxGAA0C0RzlWOh"(%T15enum_resilience19ProtGenEnumWithSize
332
328
// CHECK: ret %T15enum_resilience19ProtGenEnumWithSize33_59077B69D65A4A3BEE0C93708067D5F0LLO* %0
333
-
334
-
335
- public class Container {
336
- private enum Multi {
337
- case none
338
- case some( Container )
339
- case data( ResilientRef )
340
- }
341
- private var e : Multi
342
- var i : Int
343
- init ( ) {
344
- e = . none
345
- i = 0
346
- }
347
- }
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
3
+ // RUN: %target-swift-frontend -module-name enum_resilience -I %t -emit-ir -enable-resilience %s | %FileCheck %s -DINT=i%target-ptrsize
4
+ // RUN: %target-swift-frontend -module-name enum_resilience -I %t -emit-ir -enable-resilience -O %s
5
+
6
+ // REQUIRES: objc_interop
7
+
8
+ // Because the enum is resilient we cannot pack the tag into the pointer inside of the resilient payload.
9
+ // CHECK: %T15enum_resilience9ContainerC5Multi33_59077B69D65A4A3BEE0C93708067D5F0LLO.0 = type <{ [{{(8|4)}} x i8], [1 x i8] }>
10
+
11
+ import resilient_struct
12
+
13
+ public class Container {
14
+ private enum Multi {
15
+ case none
16
+ case some( Container )
17
+ case data( ResilientRef )
18
+ }
19
+ private var e : Multi
20
+ var i : Int
21
+ init ( ) {
22
+ e = . none
23
+ i = 0
24
+ }
25
+ }
You can’t perform that action at this time.
0 commit comments