mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The `-force-single-frontend-invocation` flag predates WMO and is now an alias for `-whole-module-optimization`. We should use the latter and let the former fade into history.
22 lines
1.0 KiB
Swift
22 lines
1.0 KiB
Swift
// FIXME: BEGIN -enable-source-import hackaround
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Darwin.swift
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift
|
|
// FIXME: END -enable-source-import hackaround
|
|
|
|
// RUN: %target-swiftc_driver %clang-importer-sdk-nosource -emit-module -o %t.1.swiftmodule -emit-objc-header -emit-objc-header-path %t.1.h -module-name ThisModule %s %S/Inputs/main.swift %S/Inputs/lib.swift -I %t
|
|
// RUN: %target-swiftc_driver %clang-importer-sdk-nosource -emit-module -o %t.2.swiftmodule -emit-objc-header -emit-objc-header-path %t.2.h -module-name ThisModule %s %S/Inputs/main.swift %S/Inputs/lib.swift -whole-module-optimization -I %t
|
|
// RUN: diff %t.1.h %t.2.h
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
public class A: NSObject {
|
|
func foo() {}
|
|
@objc func bar(x: Int, baz y: Int) -> Int { return 1 }
|
|
}
|
|
public class B: A {
|
|
func doSomething() {}
|
|
}
|