mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[driver] Allow -force-single-frontend-invocation and -emit-objc-header[-path] to be used together.
Added support in Driver which allows -force-single-frontend-invocation and -emit-objc-header[-path] to be used together in a single invocation. Added support in tools::Swift to pass -emit-objc-header-path if an Objective-C header was requested; this is only valid in OutputInfo::Mode::SingleCompile mode, and an assertion enforces this. Added a test which ensures that the same header is emitted in with -force-single-frontend-invocation and without it. Swift SVN r20185
This commit is contained in:
13
test/Driver/emit-objc-header.swift
Normal file
13
test/Driver/emit-objc-header.swift
Normal file
@@ -0,0 +1,13 @@
|
||||
// RUN: %swift_driver -Xfrontend %clang-importer-sdk -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
|
||||
// RUN: %swift_driver -Xfrontend %clang-importer-sdk -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 -force-single-frontend-invocation
|
||||
// RUN: diff %t.1.h %t.2.h
|
||||
|
||||
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() {}
|
||||
}
|
||||
Reference in New Issue
Block a user