- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathemit-objc-header-single-vs-multi-file.swift
21 lines (17 loc) · 1.05 KB
/
emit-objc-header-single-vs-multi-file.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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
publicclassA:NSObject{
func foo(){}
@objcfunc bar(x:Int, baz y:Int)->Int{return1}
}
publicclassB:A{
func doSomething(){}
}