mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -167,8 +167,8 @@ Status ModuleFile::associateWithFileContext(FileUnit *file, SourceLoc diagLoc) {
|
||||
return error(Status::FailedToLoadBridgingHeader);
|
||||
}
|
||||
ModuleDecl *importedHeaderModule = clangImporter->getImportedHeaderModule();
|
||||
dependency.Import = ModuleDecl::ImportedModule{ImportPath::Access(),
|
||||
importedHeaderModule};
|
||||
dependency.Import = ImportedModule{ImportPath::Access(),
|
||||
importedHeaderModule};
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ Status ModuleFile::associateWithFileContext(FileUnit *file, SourceLoc diagLoc) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dependency.Import = ModuleDecl::ImportedModule{accessPath, module};
|
||||
dependency.Import = ImportedModule{accessPath, module};
|
||||
|
||||
// SPI
|
||||
StringRef spisStr = dependency.Core.RawSPIs;
|
||||
@@ -420,9 +420,8 @@ PrecedenceGroupDecl *ModuleFile::lookupPrecedenceGroup(Identifier name) {
|
||||
return cast<PrecedenceGroupDecl>(getDecl(data[0].second));
|
||||
}
|
||||
|
||||
void ModuleFile::getImportedModules(
|
||||
SmallVectorImpl<ModuleDecl::ImportedModule> &results,
|
||||
ModuleDecl::ImportFilter filter) {
|
||||
void ModuleFile::getImportedModules(SmallVectorImpl<ImportedModule> &results,
|
||||
ModuleDecl::ImportFilter filter) {
|
||||
PrettyStackTraceModuleFile stackEntry(*this);
|
||||
|
||||
for (auto &dep : Dependencies) {
|
||||
|
||||
Reference in New Issue
Block a user