Skip to content

Commit eaa2709

Browse files
authored
Merge pull request swiftlang#36639 from xymus/fix-ioi-suggestion
[Test] Fix implementation-only-import-suggestion for Apple Silicon
2 parents 2f56f29 + b31571b commit eaa2709

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public func foo() {}

test/Sema/Inputs/public-private-sdk/System/Library/Frameworks/PublicSwift.framework/Modules/PublicSwift.swiftmodule/x86_64-apple-macos.swiftinterface

Lines changed: 0 additions & 5 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public func foo() {}

test/Sema/Inputs/public-private-sdk/System/Library/PrivateFrameworks/PrivateSwift.framework/Modules/PrivateSwift.swiftmodule/x86_64-apple-macos.swiftinterface

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/Sema/implementation-only-import-suggestion.swift

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
// RUN: %empty-directory(%t)
22
// REQUIRES: VENDOR=apple
33

4+
/// Prepare the SDK.
5+
// RUN: cp -r %S/Inputs/public-private-sdk %t/sdk
6+
// RUN: %target-swift-frontend -emit-module -module-name PublicSwift \
7+
// RUN: %t/sdk/System/Library/Frameworks/PublicSwift.framework/Modules/PublicSwift.swiftmodule/source.swift \
8+
// RUN: -o %t/sdk/System/Library/Frameworks/PublicSwift.framework/Modules/PublicSwift.swiftmodule/%target-swiftmodule-name
9+
// RUN: %target-swift-frontend -emit-module -module-name PrivateSwift \
10+
// RUN: %t/sdk/System/Library/PrivateFrameworks/PrivateSwift.framework/Modules/PrivateSwift.swiftmodule/source.swift \
11+
// RUN: -o %t/sdk/System/Library/PrivateFrameworks/PrivateSwift.framework/Modules/PrivateSwift.swiftmodule/%target-swiftmodule-name
12+
413
/// Expect warnings when building a public client.
5-
// RUN: %target-swift-frontend -sdk %S/Inputs/public-private-sdk -typecheck -module-cache-path %t %s \
6-
// RUN: -F %S/Inputs/public-private-sdk/System/Library/PrivateFrameworks/ \
14+
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk -module-cache-path %t %s \
15+
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
716
// RUN: -library-level api -verify -D PUBLIC_IMPORTS
817

918
/// Expect no warnings when building an SPI client.
10-
// RUN: %target-swift-frontend -sdk %S/Inputs/public-private-sdk -typecheck -module-cache-path %t %s \
11-
// RUN: -F %S/Inputs/public-private-sdk/System/Library/PrivateFrameworks/ \
19+
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk -module-cache-path %t %s \
20+
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
1221
// RUN: -library-level spi -D PUBLIC_IMPORTS
1322

1423
/// Expect no warnings when building a client with some other library level.
15-
// RUN: %target-swift-frontend -sdk %S/Inputs/public-private-sdk -typecheck -module-cache-path %t %s \
16-
// RUN: -F %S/Inputs/public-private-sdk/System/Library/PrivateFrameworks/ \
24+
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk -module-cache-path %t %s \
25+
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
1726
// RUN: -D PUBLIC_IMPORTS
18-
// RUN: %target-swift-frontend -sdk %S/Inputs/public-private-sdk -typecheck -module-cache-path %t %s \
19-
// RUN: -F %S/Inputs/public-private-sdk/System/Library/PrivateFrameworks/ \
27+
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk -module-cache-path %t %s \
28+
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
2029
// RUN: -library-level other -D PUBLIC_IMPORTS
2130
#if PUBLIC_IMPORTS
2231
import PublicSwift
@@ -28,8 +37,8 @@ import FullyPrivateClang // expected-warning{{private module 'FullyPrivateClang'
2837
import main // expected-warning{{'implementation-only-import-suggestion.swift' is part of module 'main'; ignoring import}}
2938

3039
/// Expect no warnings with implementation-only imports.
31-
// RUN: %target-swift-frontend -sdk %S/Inputs/public-private-sdk -typecheck -module-cache-path %t %s \
32-
// RUN: -F %S/Inputs/public-private-sdk/System/Library/PrivateFrameworks/ \
40+
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk -module-cache-path %t %s \
41+
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
3342
// RUN: -library-level api -D IMPL_ONLY_IMPORTS
3443
#elseif IMPL_ONLY_IMPORTS
3544

0 commit comments

Comments
 (0)