mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Module::getImportedModules can now get public, private, or all imports.
...whereas before the only options were "public" and "all". No functionality change. Swift SVN r13849
This commit is contained in:
@@ -672,11 +672,12 @@ OperatorDecl *ModuleFile::lookupOperator(Identifier name, DeclKind fixity) {
|
||||
|
||||
void ModuleFile::getImportedModules(
|
||||
SmallVectorImpl<Module::ImportedModule> &results,
|
||||
bool includePrivate) {
|
||||
Module::ImportFilter filter) {
|
||||
PrettyModuleFileDeserialization stackEntry(*this);
|
||||
|
||||
for (auto &dep : Dependencies) {
|
||||
if (!includePrivate && !dep.IsExported)
|
||||
if (filter != Module::ImportFilter::All &&
|
||||
(filter == Module::ImportFilter::Public) ^ dep.IsExported)
|
||||
continue;
|
||||
assert(dep.isLoaded());
|
||||
results.push_back(dep.Import);
|
||||
|
||||
Reference in New Issue
Block a user