mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rework getReexportedModules to optionally find all imported modules.
...instead of just those that are re-exported. This will be used for autolinking (and probably few other places). As part of this, we get two name changes: (1) Module::getReexportedModules -> getImportedModules (2) TranslationUnit::getImportedModules -> getImports The latter doesn't just get modules-plus-access-paths; it also includes whether or not the import is re-exported. Mainly, though, it just didn't seem like a good idea to overload this name when the two functions aren't really related. No tests yet, will come with autolinking. Swift SVN r7487
This commit is contained in:
@@ -238,15 +238,16 @@ OperatorDecl *SerializedModuleLoader::lookupOperator(Module *module,
|
||||
return moduleFile->lookupOperator(name, fixity);
|
||||
}
|
||||
|
||||
void SerializedModuleLoader::getReexportedModules(
|
||||
void SerializedModuleLoader::getImportedModules(
|
||||
const Module *module,
|
||||
SmallVectorImpl<Module::ImportedModule> &exports) {
|
||||
SmallVectorImpl<Module::ImportedModule> &imports,
|
||||
bool includePrivate) {
|
||||
|
||||
ModuleFile *moduleFile = cast<SerializedModule>(module)->File;
|
||||
if (!moduleFile)
|
||||
return;
|
||||
|
||||
moduleFile->getReexportedModules(exports);
|
||||
moduleFile->getImportedModules(imports, includePrivate);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user