Files
swift-mirror/test/SILOptimizer/package-cmo-require-library-evolution.swift
elsh f8cbe8958d s/warning/error
Update tests
2024-09-05 16:43:31 -07:00

34 lines
944 B
Swift

// RUN: %empty-directory(%t)
// RUN: not %target-build-swift %s \
// RUN: -module-name=Lib -package-name Pkg \
// RUN: -emit-module -o %t/Lib.swiftmodule -I%t \
// RUN: -Xfrontend -package-cmo \
// RUN: -Xfrontend -allow-non-resilient-access \
// RUN: -O -wmo 2>&1 | %FileCheck %s --check-prefix CHECK-DIAGS
// CHECK-DIAGS: error: Library evolution must be enabled for Package CMO
// RUN: %target-build-swift %s \
// RUN: -module-name=Lib -package-name Pkg \
// RUN: -emit-module -o %t/Lib.swiftmodule -I%t \
// RUN: -Xfrontend -package-cmo \
// RUN: -Xfrontend -allow-non-resilient-access \
// RUN: -enable-library-evolution \
// RUN: -O -wmo
// RUN: llvm-bcanalyzer %t/Lib.swiftmodule | %FileCheck %s -check-prefix=CHECK-BC
// CHECK-BC: SERIALIZE_PACKAGE_ENABLED
// REQUIRES: swift_in_compiler
public struct S {
public init() {}
package var x: Int {
get { return 0 }
set {}
}
package func f() -> Int {
return 1
}
}