mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[embedded] Add -wmo to a number of tests after rebase.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %target-swift-emit-ir -parse-stdlib %s -enable-experimental-feature Embedded -verify
|
// RUN: %target-swift-emit-ir -parse-stdlib %s -enable-experimental-feature Embedded -verify -wmo
|
||||||
|
|
||||||
public enum Never {}
|
public enum Never {}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
// - (2) unavailable function bodies is removed in embedded Swift,
|
// - (2) unavailable function bodies is removed in embedded Swift,
|
||||||
// - (3) the test() function is not reported by the existential checker.
|
// - (3) the test() function is not reported by the existential checker.
|
||||||
|
|
||||||
// RUN: %target-swift-frontend -emit-ir %s -parse-stdlib | %FileCheck %s --check-prefix CHECK-A
|
// RUN: %target-swift-frontend -emit-ir %s -parse-stdlib -wmo | %FileCheck %s --check-prefix CHECK-A
|
||||||
// RUN: %target-swift-frontend -emit-ir %s -parse-stdlib -enable-experimental-feature Embedded | %FileCheck %s --check-prefix CHECK-B
|
// RUN: %target-swift-frontend -emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -wmo | %FileCheck %s --check-prefix CHECK-B
|
||||||
|
|
||||||
public protocol Player {}
|
public protocol Player {}
|
||||||
struct Concrete: Player {}
|
struct Concrete: Player {}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Building with regular Swift should succeed
|
// Building with regular Swift should succeed
|
||||||
// RUN: %target-swift-emit-ir %s -parse-stdlib
|
// RUN: %target-swift-emit-ir %s -parse-stdlib -wmo
|
||||||
|
|
||||||
// Building with embedded Swift should produce unavailability errors
|
// Building with embedded Swift should produce unavailability errors
|
||||||
// RUN: %target-typecheck-verify-swift -parse-stdlib -enable-experimental-feature Embedded
|
// RUN: %target-typecheck-verify-swift -parse-stdlib -enable-experimental-feature Embedded -wmo
|
||||||
|
|
||||||
@_unavailableInEmbedded
|
@_unavailableInEmbedded
|
||||||
public func embedded() { }
|
public func embedded() { }
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// RUN: %empty-directory(%t)
|
// RUN: %empty-directory(%t)
|
||||||
// RUN: %{python} %utils/split_file.py -o %t %s
|
// RUN: %{python} %utils/split_file.py -o %t %s
|
||||||
|
|
||||||
// RUN: %target-swift-frontend -swift-version 5 -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -enable-experimental-feature Embedded
|
// RUN: %target-swift-frontend -swift-version 5 -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -enable-experimental-feature Embedded -wmo
|
||||||
// RUN: %target-swift-frontend -swift-version 5 -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded | %FileCheck %s
|
// RUN: %target-swift-frontend -swift-version 5 -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded -wmo | %FileCheck %s
|
||||||
|
|
||||||
// REQUIRES: swift_in_compiler
|
// REQUIRES: swift_in_compiler
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
// RUN: %{python} %utils/split_file.py -o %t %s
|
// RUN: %{python} %utils/split_file.py -o %t %s
|
||||||
|
|
||||||
// both modules are embedded - ok
|
// both modules are embedded - ok
|
||||||
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -enable-experimental-feature Embedded
|
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -enable-experimental-feature Embedded -wmo
|
||||||
// RUN: %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded
|
// RUN: %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded -wmo
|
||||||
|
|
||||||
// MyModule is not embedded - error
|
// MyModule is not embedded - error
|
||||||
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib
|
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -wmo
|
||||||
// RUN: not %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded 2>&1 | %FileCheck %s --check-prefix CHECK-A
|
// RUN: not %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -enable-experimental-feature Embedded -wmo 2>&1 | %FileCheck %s --check-prefix CHECK-A
|
||||||
|
|
||||||
// main module is not embedded - error
|
// main module is not embedded - error
|
||||||
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -enable-experimental-feature Embedded
|
// RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -parse-stdlib -enable-experimental-feature Embedded -wmo
|
||||||
// RUN: not %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib 2>&1 | %FileCheck %s --check-prefix CHECK-B
|
// RUN: not %target-swift-frontend -emit-ir -I %t %t/Main.swift -parse-stdlib -wmo 2>&1 | %FileCheck %s --check-prefix CHECK-B
|
||||||
|
|
||||||
// BEGIN MyModule.swift
|
// BEGIN MyModule.swift
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// RUN: %target-swift-emit-sil %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none | %FileCheck %s --check-prefix CHECK-SIL
|
// RUN: %target-swift-emit-sil %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s --check-prefix CHECK-SIL
|
||||||
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none | %FileCheck %s --check-prefix CHECK-IR
|
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s --check-prefix CHECK-IR
|
||||||
|
|
||||||
// REQUIRES: swift_in_compiler
|
// REQUIRES: swift_in_compiler
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none | %FileCheck %s
|
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s
|
||||||
|
|
||||||
public class MyClass {
|
public class MyClass {
|
||||||
func foo() { }
|
func foo() { }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none | %FileCheck %s
|
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo | %FileCheck %s
|
||||||
|
|
||||||
public class MyClass {}
|
public class MyClass {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// RUN: %target-swift-emit-ir -verify %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none
|
// RUN: %target-swift-emit-ir -verify %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none -wmo
|
||||||
|
|
||||||
public class MyClass {
|
public class MyClass {
|
||||||
func foo<T>(t: T) { } // expected-error {{classes cannot have non-final generic fuctions in embedded Swift}}
|
func foo<T>(t: T) { } // expected-error {{classes cannot have non-final generic fuctions in embedded Swift}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This test checks that embedded Swift doesn't mark public functions/symbols as llvm.used / llvm.compiler.used
|
// This test checks that embedded Swift doesn't mark public functions/symbols as llvm.used / llvm.compiler.used
|
||||||
|
|
||||||
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none-elf | %FileCheck %s --check-prefix CHECK-ELF
|
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none-elf -wmo | %FileCheck %s --check-prefix CHECK-ELF
|
||||||
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none-macho | %FileCheck %s --check-prefix CHECK-MACHO
|
// RUN: %target-swift-emit-ir %s -parse-stdlib -enable-experimental-feature Embedded -target arm64e-apple-none-macho -wmo | %FileCheck %s --check-prefix CHECK-MACHO
|
||||||
|
|
||||||
// REQUIRES: swift_in_compiler
|
// REQUIRES: swift_in_compiler
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user