mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Give OptionSet an initializer_list constructor.
This makes it easier to specify OptionSet arguments. Also modify appropriate uses of ModuleDecl::ImportFilter to take advantage of the new constructor.
This commit is contained in:
@@ -355,12 +355,11 @@ ImportDepth::ImportDepth(ASTContext &context,
|
||||
|
||||
// Private imports from this module.
|
||||
// FIXME: only the private imports from the current source file.
|
||||
ModuleDecl::ImportFilter importFilter;
|
||||
importFilter |= ModuleDecl::ImportFilterKind::Private;
|
||||
importFilter |= ModuleDecl::ImportFilterKind::ImplementationOnly;
|
||||
// FIXME: ImportFilterKind::ShadowedBySeparateOverlay?
|
||||
SmallVector<ModuleDecl::ImportedModule, 16> mainImports;
|
||||
main->getImportedModules(mainImports, importFilter);
|
||||
main->getImportedModules(mainImports,
|
||||
{ModuleDecl::ImportFilterKind::Private,
|
||||
ModuleDecl::ImportFilterKind::ImplementationOnly});
|
||||
for (auto &import : mainImports) {
|
||||
uint8_t depth = 1;
|
||||
if (auxImports.count(import.importedModule->getName().str()))
|
||||
|
||||
Reference in New Issue
Block a user