|
1 | 1 | // RUN: %empty-directory(%t)
|
2 | 2 | // 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 | 3 | // RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-MULTI-FILE %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
|
| 4 | +// RUN: %target-swift-frontend -enable-objc-interop -compile-module-from-interface %t/Lib.swiftinterface -o %t/compiled-from-interface.swiftmodule -module-name Lib |
4 | 5 | // RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s
|
5 | 6 |
|
6 | 7 | // Try again using a single-frontend build.
|
7 | 8 | // RUN: %empty-directory(%t)
|
8 | 9 | // RUN: %target-build-swift -whole-module-optimization -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 | 10 | // RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-SINGLE-FRONTEND %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
|
| 11 | +// RUN: %target-swift-frontend -enable-objc-interop -compile-module-from-interface %t/Lib.swiftinterface -o %t/compiled-from-interface.swiftmodule -module-name Lib |
10 | 12 | // RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s
|
11 | 13 |
|
12 | 14 |
|
@@ -42,6 +44,16 @@ func testFrozenObjCEnum() -> FrozenObjCEnum {
|
42 | 44 | return .b
|
43 | 45 | } // CHECK-NEXT: {{^}$}}
|
44 | 46 |
|
| 47 | +// CHECK-LABEL: define{{.+}}testFutureproofUnicodeScalarEnum |
| 48 | +func testFutureproofUnicodeScalarEnum() -> FutureproofUnicodeScalarEnum { |
| 49 | + // CHECK: [[CASE:%.+]] = load i32, i32* @"$s3Lib28FutureproofUnicodeScalarEnumO1ayA2CmFWC" |
| 50 | + // CHECK: [[METADATA_RESPONSE:%.+]] = tail call swiftcc %swift.metadata_response @"$s3Lib28FutureproofUnicodeScalarEnumOMa" |
| 51 | + // CHECK: [[METADATA:%.+]] = extractvalue %swift.metadata_response [[METADATA_RESPONSE]], 0 |
| 52 | + // CHECK: call void {{%.+}}(%swift.opaque* noalias %0, i32 [[CASE]], %swift.type* [[METADATA]]) |
| 53 | + // CHECK-NEXT: ret void |
| 54 | + return .a |
| 55 | +} |
| 56 | + |
45 | 57 | // CHECK-LABEL: define{{.+}}testFutureproofIndirectEnum
|
46 | 58 | func testFutureproofIndirectEnum() -> FutureproofIndirectEnum {
|
47 | 59 | // CHECK: [[CASE:%.+]] = load i32, i32* @"$s3Lib23FutureproofIndirectEnumO1cyA2CmFWC"
|
|
0 commit comments