Skip to content

Commit 8d54d18

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents 7c8b085 + 741af6f commit 8d54d18

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

test/ParseableInterface/Inputs/enums-layout-helper.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ public enum FutureproofIndirectCaseEnum {
7676
case c
7777
}
7878

79+
// CHECK-LABEL: public enum FutureproofIndirectMultiCaseEnum
80+
public enum FutureproofIndirectMultiCaseEnum {
81+
// CHECK-SINGLE-FRONTEND-NEXT: {{^}} case a1, a2{{$}}
82+
// CHECK-MULTI-FILE-NEXT: {{^}} case a1{{$}}
83+
// CHECK-MULTI-FILE-NEXT: {{^}} case a2{{$}}
84+
case a1, a2
85+
// CHECK-SINGLE-FRONTEND-NEXT: indirect case b1(Swift.Int), b2(Swift.Int){{$}}
86+
// CHECK-MULTI-FILE-NEXT: indirect case b1(Swift.Int){{$}}
87+
// CHECK-MULTI-FILE-NEXT: indirect case b2(Swift.Int){{$}}
88+
indirect case b1(Int), b2(Int)
89+
// CHECK-NEXT: {{^}} case c{{$}}
90+
case c
91+
}
92+
7993
// CHECK-LABEL: public enum FrozenIndirectCaseEnum
8094
@_frozen public enum FrozenIndirectCaseEnum {
8195
// CHECK-NEXT: {{^}} case a{{$}}
@@ -85,3 +99,17 @@ public enum FutureproofIndirectCaseEnum {
8599
// CHECK-NEXT: {{^}} case c{{$}}
86100
case c
87101
}
102+
103+
// CHECK-LABEL: public enum FrozenIndirectMultiCaseEnum
104+
@_frozen public enum FrozenIndirectMultiCaseEnum {
105+
// CHECK-SINGLE-FRONTEND-NEXT: {{^}} case a1, a2{{$}}
106+
// CHECK-MULTI-FILE-NEXT: {{^}} case a1{{$}}
107+
// CHECK-MULTI-FILE-NEXT: {{^}} case a2{{$}}
108+
case a1, a2
109+
// CHECK-SINGLE-FRONTEND-NEXT: indirect case b1(Swift.Int), b2(Swift.Int){{$}}
110+
// CHECK-MULTI-FILE-NEXT: indirect case b1(Swift.Int){{$}}
111+
// CHECK-MULTI-FILE-NEXT: indirect case b2(Swift.Int){{$}}
112+
indirect case b1(Int), b2(Int)
113+
// CHECK-NEXT: {{^}} case c{{$}}
114+
case c
115+
}

test/ParseableInterface/enums-layout.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -emit-module-interface-path %t/Lib.swiftinterface -emit-module -o %t/unused.swiftmodule -enable-library-evolution -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module -swift-version 5 %S/Inputs/enums-layout-helper.swift -module-name Lib
3-
// RUN: %FileCheck %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
3+
// RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-MULTI-FILE %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
44
// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s
55

66
// Try again using a single-frontend build.
77
// RUN: %empty-directory(%t)
88
// RUN: %target-build-swift -force-single-frontend-invocation -emit-module-interface-path %t/Lib.swiftinterface -emit-module -o %t/unused.swiftmodule -enable-library-evolution -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module -swift-version 5 %S/Inputs/enums-layout-helper.swift -module-name Lib
9-
// RUN: %FileCheck %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
9+
// RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-SINGLE-FRONTEND %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
1010
// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s
1111

1212

0 commit comments

Comments
 (0)