|
| 1 | +// REQUIRES: objc_interop |
| 2 | +// RUN: %empty-directory(%t) |
| 3 | +// RUN: %empty-directory(%t/inputs) |
| 4 | +// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm -Xcc -fobjc-disable-direct-methods-for-testing |
| 5 | +// RUN: echo "[{" > %/t/inputs/map.json |
| 6 | +// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json |
| 7 | +// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json |
| 8 | +// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json |
| 9 | +// RUN: echo "}," >> %/t/inputs/map.json |
| 10 | +// RUN: echo "{" >> %/t/inputs/map.json |
| 11 | +// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json |
| 12 | +// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json |
| 13 | +// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json |
| 14 | +// RUN: echo "}," >> %/t/inputs/map.json |
| 15 | +// RUN: echo "{" >> %/t/inputs/map.json |
| 16 | +// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json |
| 17 | +// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json |
| 18 | +// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json |
| 19 | +// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json |
| 20 | +// RUN: echo "}]" >> %/t/inputs/map.json |
| 21 | + |
| 22 | +// RUN: split-file %s %t |
| 23 | +// RUN: %target-swift-typecheck-module-from-interface(%t/inputs/Foo.swiftinterface) -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -disable-implicit-swift-modules -explicit-swift-module-map-file %t/inputs/map.json -explicit-interface-module-build -Xcc -fobjc-disable-direct-methods-for-testing |
| 24 | + |
| 25 | +//--- inputs/Foo.swiftinterface |
| 26 | +// swift-interface-format-version: 1.0 |
| 27 | +// swift-module-flags: -module-name Foo |
| 28 | +public func foo() {} |
0 commit comments