Skip to content

Commit f8cbe89

Browse files
committed
s/warning/error
Update tests
1 parent 66b504a commit f8cbe89

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ ERROR(no_allocations_without_embedded,none,
576576
ERROR(no_swift_sources_with_embedded,none,
577577
"embedded swift cannot be enabled in a compiler built without Swift sources", ())
578578

579-
WARNING(package_cmo_requires_library_evolution, none,
579+
ERROR(package_cmo_requires_library_evolution, none,
580580
"Library evolution must be enabled for Package CMO", ())
581581

582582
ERROR(experimental_not_supported_in_production,none,

test/SILOptimizer/package-cmo-non-resilient-mode.swift renamed to test/SILOptimizer/cmo-with-package-decls.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -O -wmo -Xfrontend -experimental-package-cmo -Xfrontend -experimental-allow-non-resilient-access -parse-as-library -emit-module -emit-module-path=%t/Submodule.swiftmodule -module-name=Submodule -package-name Pkg %S/Inputs/cross-module/default-submodule.swift -c -o %t/submodule.o
3-
// RUN: %target-build-swift -O -wmo -Xfrontend -experimental-package-cmo -Xfrontend -experimental-allow-non-resilient-access -parse-as-library -emit-module -emit-module-path=%t/Module.swiftmodule -module-name=Module -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/module.o
4-
// RUN: %target-build-swift -O -wmo -Xfrontend -experimental-package-cmo -Xfrontend -experimental-allow-non-resilient-access -parse-as-library -emit-tbd -emit-tbd-path %t/ModuleTBD.tbd -emit-module -emit-module-path=%t/ModuleTBD.swiftmodule -module-name=ModuleTBD -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/moduletbd.o -Xfrontend -tbd-install_name -Xfrontend module
2+
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-module -emit-module-path=%t/Submodule.swiftmodule -module-name=Submodule -package-name Pkg %S/Inputs/cross-module/default-submodule.swift -c -o %t/submodule.o
3+
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-module -emit-module-path=%t/Module.swiftmodule -module-name=Module -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/module.o
4+
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-tbd -emit-tbd-path %t/ModuleTBD.tbd -emit-module -emit-module-path=%t/ModuleTBD.swiftmodule -module-name=ModuleTBD -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/moduletbd.o -Xfrontend -tbd-install_name -Xfrontend module
55

66
// RUN: %target-build-swift -O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil -o %t/Main.sil
77
// RUN: %FileCheck %s < %t/Main.sil

test/SILOptimizer/package-cmo-require-library-evolution.swift

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-build-swift %s \
3+
// RUN: not %target-build-swift %s \
44
// RUN: -module-name=Lib -package-name Pkg \
55
// RUN: -emit-module -o %t/Lib.swiftmodule -I%t \
66
// RUN: -Xfrontend -package-cmo \
77
// RUN: -Xfrontend -allow-non-resilient-access \
8-
// RUN: -O -wmo 2>&1 | %FileCheck %s --check-prefix CHECK-WARNING
9-
// CHECK-WARNING: warning: Library evolution must be enabled for Package CMO
10-
11-
// RUN: llvm-bcanalyzer %t/Lib.swiftmodule | %FileCheck %s -check-prefix=CHECK-BC
12-
// CHECK-BC-NOT: SERIALIZE_PACKAGE_ENABLED
13-
14-
// RUN: rm -rf %t/Lib.swiftmodule
8+
// RUN: -O -wmo 2>&1 | %FileCheck %s --check-prefix CHECK-DIAGS
9+
// CHECK-DIAGS: error: Library evolution must be enabled for Package CMO
1510

1611
// RUN: %target-build-swift %s \
1712
// RUN: -module-name=Lib -package-name Pkg \
@@ -21,8 +16,8 @@
2116
// RUN: -enable-library-evolution \
2217
// RUN: -O -wmo
2318

24-
// RUN: llvm-bcanalyzer %t/Lib.swiftmodule | %FileCheck %s -check-prefix=CHECK-OK
25-
// CHECK-OK: SERIALIZE_PACKAGE_ENABLED
19+
// RUN: llvm-bcanalyzer %t/Lib.swiftmodule | %FileCheck %s -check-prefix=CHECK-BC
20+
// CHECK-BC: SERIALIZE_PACKAGE_ENABLED
2621

2722
// REQUIRES: swift_in_compiler
2823

test/SILOptimizer/package-cmo-resilient-mode.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: split-file %s %t
33

4+
/// Enable Package CMO; conservative mode on resilient module.
45
// RUN: %target-build-swift %t/Lib.swift \
56
// RUN: -module-name=Lib -package-name Pkg \
67
// RUN: -parse-as-library -emit-module -emit-module-path %t/Lib.swiftmodule -I%t \
@@ -18,10 +19,12 @@
1819

1920
// RUN: rm -rf %t/Lib.swiftmodule
2021

22+
/// Enable non-package CMO; conservative mode on non-resilient module,
23+
/// and compare results with Package CMO.
2124
// RUN: %target-build-swift %t/Lib.swift \
2225
// RUN: -module-name=Lib -package-name Pkg \
2326
// RUN: -parse-as-library -emit-module -emit-module-path %t/Lib.swiftmodule -I%t \
24-
// RUN: -Xfrontend -experimental-package-cmo -Xfrontend -experimental-allow-non-resilient-access \
27+
// RUN: -Xfrontend -enable-default-cmo \
2528
// RUN: -O -wmo
2629

2730
// RUN: %target-sil-opt %t/Lib.swiftmodule -sil-verify-all -o %t/Lib-non-res.sil

0 commit comments

Comments
 (0)