Skip to content

Commit 0d9f667

Browse files
committed
[test] Pass -enable-default-cmo in a couple of tests
CMO is enabled by default in the new driver, add `-enable-default-cmo` in a couple of places to make the behavior consistent across both the old and new driver.
1 parent 864e9e8 commit 0d9f667

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/SILOptimizer/cmo-with-package-decls.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// 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
44
// 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

6-
// 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
6+
// RUN: %target-build-swift -Xfrontend -enable-default-cmo -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
88

99
// REQUIRES: swift_in_compiler
@@ -12,7 +12,7 @@ import Module
1212
import ModuleTBD
1313

1414
// static ModuleStruct.privateFunctionPointer
15-
// CHECK-LABEL: sil_global public_external @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
15+
// CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
1616

1717
// static ModuleStruct.publicFunctionPointer
1818
// CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV21publicFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int

test/SILOptimizer/default-cmo.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
// 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
66
// 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
77

8-
// RUN: %target-build-swift -O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil | %FileCheck %s
8+
// RUN: %target-build-swift -Xfrontend -enable-default-cmo -O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil | %FileCheck %s
99

1010
// REQUIRES: swift_in_compiler
1111

1212
import Module
1313
import ModuleTBD
1414

15-
// CHECK-LABEL: sil_global public_external @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
15+
// CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
1616

1717
public func callPublicFunctionPointer(_ x: Int) -> Int {
1818
return Module.ModuleStruct.publicFunctionPointer(x)

0 commit comments

Comments
 (0)