mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Move several types/functions to Import.h
To help consolidate our various types describing imports, this commit moves the following types and methods to Import.h: * ImplicitImports * ImplicitStdlibKind * ImplicitImportInfo * ModuleDecl::ImportedModule * ModuleDecl::OrderImportedModules (as ImportedModule::Order) * ModuleDecl::removeDuplicateImports() (as ImportedModule::removeDuplicates()) * SourceFile::ImportFlags * SourceFile::ImportOptions * SourceFile::ImportedModuleDesc This commit is large and intentionally kept mechanical—nothing interesting to see here.
This commit is contained in:
@@ -354,7 +354,7 @@ ImportDepth::ImportDepth(ASTContext &context,
|
||||
// Private imports from this module.
|
||||
// FIXME: only the private imports from the current source file.
|
||||
// FIXME: ImportFilterKind::ShadowedByCrossImportOverlay?
|
||||
SmallVector<ModuleDecl::ImportedModule, 16> mainImports;
|
||||
SmallVector<ImportedModule, 16> mainImports;
|
||||
main->getImportedModules(mainImports,
|
||||
{ModuleDecl::ImportFilterKind::Default,
|
||||
ModuleDecl::ImportFilterKind::ImplementationOnly});
|
||||
@@ -384,7 +384,7 @@ ImportDepth::ImportDepth(ASTContext &context,
|
||||
}
|
||||
|
||||
// Add imports to the worklist.
|
||||
SmallVector<ModuleDecl::ImportedModule, 16> imports;
|
||||
SmallVector<ImportedModule, 16> imports;
|
||||
module->getImportedModules(imports);
|
||||
for (auto &import : imports) {
|
||||
uint8_t next = std::max(depth, uint8_t(depth + 1)); // unsigned wrap
|
||||
|
||||
Reference in New Issue
Block a user