|
1 | | -// RUN: %empty-directory(%t) |
| 1 | +// (1) Onone, no evolution |
2 | 2 |
|
3 | | -// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -emit-clang-header-path %t/class.h |
| 3 | +// RUN: %empty-directory(%t-onone) |
4 | 4 |
|
5 | | -// RUN: %target-interop-build-clangxx -c %s -I %t -o %t/swift-class-execution.o |
6 | | -// RUN: %target-interop-build-swift %S/swift-class-in-cxx.swift -o %t/swift-class-execution -Xlinker %t/swift-class-execution.o -module-name Class -Xfrontend -entry-point-function-name -Xfrontend swiftMain |
| 5 | +// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -emit-clang-header-path %t-onone/class.h -Onone |
7 | 6 |
|
8 | | -// RUN: %target-codesign %t/swift-class-execution |
9 | | -// RUN: %target-run %t/swift-class-execution | %FileCheck %s |
| 7 | +// RUN: %target-interop-build-clangxx -c %s -I %t-onone -o %t-onone/swift-class-execution.o |
| 8 | +// RUN: %target-interop-build-swift %S/swift-class-in-cxx.swift -o %t-onone/swift-class-execution -Xlinker %t-onone/swift-class-execution.o -module-name Class -Xfrontend -entry-point-function-name -Xfrontend swiftMain -Onone |
10 | 9 |
|
11 | | -// RUN: %empty-directory(%t-evo) |
| 10 | +// RUN: %target-codesign %t-onone/swift-class-execution |
| 11 | +// RUN: %target-run %t-onone/swift-class-execution | %FileCheck %s --check-prefixes=CHECK,CHECK-ONONE |
12 | 12 |
|
13 | | -// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -enable-library-evolution -emit-clang-header-path %t-evo/class.h |
| 13 | +// (2) O, no evolution |
14 | 14 |
|
15 | | -// RUN: %target-interop-build-clangxx -c %s -I %t-evo -o %t-evo/swift-class-execution.o |
16 | | -// RUN: %target-interop-build-swift %S/swift-class-in-cxx.swift -o %t-evo/swift-class-execution-evo -Xlinker %t-evo/swift-class-execution.o -module-name Class -enable-library-evolution -Xfrontend -entry-point-function-name -Xfrontend swiftMain |
| 15 | +// RUN: %empty-directory(%t-ofast) |
17 | 16 |
|
18 | | -// RUN: %target-codesign %t-evo/swift-class-execution-evo |
19 | | -// RUN: %target-run %t-evo/swift-class-execution-evo | %FileCheck %s |
| 17 | +// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -emit-clang-header-path %t-ofast/class.h -O |
| 18 | + |
| 19 | +// RUN: %target-interop-build-clangxx -c %s -I %t-ofast -o %t-ofast/swift-class-execution.o |
| 20 | +// RUN: %target-interop-build-swift %S/swift-class-in-cxx.swift -o %t-ofast/swift-class-execution -Xlinker %t-ofast/swift-class-execution.o -module-name Class -Xfrontend -entry-point-function-name -Xfrontend swiftMain -O |
| 21 | + |
| 22 | +// RUN: %target-codesign %t-ofast/swift-class-execution |
| 23 | +// RUN: %target-run %t-ofast/swift-class-execution | %FileCheck %s --check-prefixes=CHECK,CHECK-OPT |
| 24 | + |
| 25 | +// (3) Onone, evolution |
| 26 | + |
| 27 | +// RUN: %empty-directory(%t-evo-onone) |
| 28 | + |
| 29 | +// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -enable-library-evolution -emit-clang-header-path %t-evo-onone/class.h -Onone |
| 30 | + |
| 31 | +// RUN: %target-interop-build-clangxx -c %s -I %t-evo-onone -o %t-evo-onone/swift-class-execution.o |
| 32 | +// RUN: %target-interop-build-swift %S/swift-class-in-cxx.swift -o %t-evo-onone/swift-class-execution-evo -Xlinker %t-evo-onone/swift-class-execution.o -module-name Class -enable-library-evolution -Xfrontend -entry-point-function-name -Xfrontend swiftMain -Onone |
| 33 | + |
| 34 | +// RUN: %target-codesign %t-evo-onone/swift-class-execution-evo |
| 35 | +// RUN: %target-run %t-evo-onone/swift-class-execution-evo | %FileCheck %s --check-prefixes=CHECK,CHECK-ONONE |
| 36 | + |
| 37 | +// (4) O, evolution |
| 38 | + |
| 39 | +// RUN: %empty-directory(%t-evo-ofast) |
| 40 | + |
| 41 | +// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -enable-library-evolution -emit-clang-header-path %t-evo-ofast/class.h -O |
| 42 | + |
| 43 | +// RUN: %target-interop-build-clangxx -c %s -I %t-evo-ofast -o %t-evo-ofast/swift-class-execution.o |
| 44 | +// RUN: %target-interop-build-swift %S/swift-class-in-cxx.swift -o %t-evo-ofast/swift-class-execution-evo -Xlinker %t-evo-ofast/swift-class-execution.o -module-name Class -enable-library-evolution -Xfrontend -entry-point-function-name -Xfrontend swiftMain -O |
| 45 | + |
| 46 | +// RUN: %target-codesign %t-evo-ofast/swift-class-execution-evo |
| 47 | +// RUN: %target-run %t-evo-ofast/swift-class-execution-evo | %FileCheck %s --check-prefixes=CHECK,CHECK-OPT |
20 | 48 |
|
21 | 49 | // REQUIRES: executable_test |
22 | 50 |
|
@@ -70,8 +98,10 @@ int main() { |
70 | 98 | takeClassWithIntField(x); |
71 | 99 | } |
72 | 100 | // CHECK-NEXT: init ClassWithIntField |
73 | | -// CHECK-NEXT: init ClassWithIntField |
74 | | -// CHECK-NEXT: destroy ClassWithIntField |
| 101 | +// CHECK-ONONE-NEXT: init ClassWithIntField |
| 102 | +// CHECK-ONONE-NEXT: destroy ClassWithIntField |
| 103 | +// CHECK-OPT-NEXT: destroy ClassWithIntField |
| 104 | +// CHECK-OPT-NEXT: init ClassWithIntField |
75 | 105 | // CHECK-NEXT: ClassWithIntField: -11; |
76 | 106 | // CHECK-NEXT: destroy ClassWithIntField |
77 | 107 |
|
|
0 commit comments