mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Dependency Scanning] Keep track of whether a given Swift 'import' statement is '@_exported'
This commit is contained in:
@@ -276,6 +276,7 @@ SwiftModuleScanner::scanInterfaceFile(Twine moduleInterfacePath,
|
||||
auto &imInfo = mainMod->getImplicitImportInfo();
|
||||
for (auto import : imInfo.AdditionalUnloadedImports) {
|
||||
Result->addModuleImport(import.module.getModulePath(),
|
||||
import.options.contains(ImportFlags::Exported),
|
||||
&alreadyAddedModules, &Ctx.SourceMgr);
|
||||
}
|
||||
|
||||
@@ -301,8 +302,9 @@ SwiftModuleScanner::scanInterfaceFile(Twine moduleInterfacePath,
|
||||
return adjacentBinaryModulePackageOnlyImports.getError();
|
||||
|
||||
for (const auto &requiredImport : *adjacentBinaryModulePackageOnlyImports)
|
||||
if (!alreadyAddedModules.contains(requiredImport.getKey()))
|
||||
Result->addModuleImport(requiredImport.getKey(),
|
||||
if (!alreadyAddedModules.contains(requiredImport.importIdentifier))
|
||||
Result->addModuleImport(requiredImport.importIdentifier,
|
||||
requiredImport.isExported,
|
||||
&alreadyAddedModules);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user