[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:
Brent Royal-Gordon
2020-09-25 13:48:30 -07:00
parent a26fc5516d
commit b440ab7331
31 changed files with 350 additions and 357 deletions

View File

@@ -1109,14 +1109,14 @@ void SerializedModuleLoaderBase::verifyAllModules() {
//-----------------------------------------------------------------------------
void SerializedASTFile::getImportedModules(
SmallVectorImpl<ModuleDecl::ImportedModule> &imports,
SmallVectorImpl<ImportedModule> &imports,
ModuleDecl::ImportFilter filter) const {
File.getImportedModules(imports, filter);
}
void SerializedASTFile::collectLinkLibrariesFromImports(
ModuleDecl::LinkLibraryCallback callback) const {
llvm::SmallVector<ModuleDecl::ImportedModule, 8> Imports;
llvm::SmallVector<ImportedModule, 8> Imports;
File.getImportedModules(Imports, {ModuleDecl::ImportFilterKind::Exported,
ModuleDecl::ImportFilterKind::Default});