mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Honor [exported] or lack thereof for the imports of serialized modules.
This should complete support for Swift-side export control. Note that a TU's imports are still all "re-exported" (i.e. returned from getReexportedModules) whether they are marked [exported] or not. This is a convenient trick to get lookup in the main source file to look at all imported modules, but if we allow real multi-TU compilation we'll have to revisit this. Swift SVN r7052
This commit is contained in:
@@ -2206,8 +2206,9 @@ OperatorDecl *ModuleFile::lookupOperator(Identifier name, DeclKind fixity) {
|
||||
|
||||
void ModuleFile::getReexportedModules(
|
||||
SmallVectorImpl<Module::ImportedModule> &results) {
|
||||
// FIXME: Lock down on re-exports.
|
||||
for (auto &dep : Dependencies) {
|
||||
if (!dep.IsExported)
|
||||
continue;
|
||||
assert(dep.isLoaded());
|
||||
results.push_back(dep.Import);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user