mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Allow some @_implementationOnly imports in stdlib modules.
The `_Concurrency` module imports a C module that is not available in the toolchain or SDK, which means that `@_implementationOnly` must be used to hide the dependency on this module from clients.
This commit is contained in:
@@ -797,6 +797,9 @@ void UnboundImport::validateInterfaceWithPackageName(ModuleDecl *topLevelModule,
|
||||
/// be hidden from clients.
|
||||
static bool shouldSuppressNonResilientImplementationOnlyImportDiagnostic(
|
||||
StringRef targetName, StringRef importerName) {
|
||||
if (targetName == "SwiftConcurrencyInternalShims")
|
||||
return importerName == "_Concurrency";
|
||||
|
||||
if (targetName == "CCryptoBoringSSL" || targetName == "CCryptoBoringSSLShims")
|
||||
return importerName == "Crypto" || importerName == "_CryptoExtras" ||
|
||||
importerName == "CryptoBoringWrapper";
|
||||
|
||||
Reference in New Issue
Block a user