mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Adopt new ImportPath types and terminology
# Conflicts: # lib/IDE/CodeCompletion.cpp
This commit is contained in:
@@ -52,7 +52,7 @@ public:
|
||||
/// The results are appended to \p decls.
|
||||
void lookupInModule(SmallVectorImpl<ValueDecl *> &decls,
|
||||
const DeclContext *moduleOrFile,
|
||||
ModuleDecl::AccessPathTy accessPath,
|
||||
ImportPath::Access accessPath,
|
||||
const DeclContext *moduleScopeContext);
|
||||
};
|
||||
|
||||
@@ -79,11 +79,11 @@ private:
|
||||
return true;
|
||||
}
|
||||
|
||||
void doLocalLookup(ModuleDecl *module, ModuleDecl::AccessPathTy path,
|
||||
void doLocalLookup(ModuleDecl *module, ImportPath::Access path,
|
||||
SmallVectorImpl<ValueDecl *> &localDecls) {
|
||||
// If this import is specific to some named decl ("import Swift.Int")
|
||||
// then filter out any lookups that don't match.
|
||||
if (!ModuleDecl::matchesAccessPath(path, name))
|
||||
if (!path.matches(name))
|
||||
return;
|
||||
module->lookupValue(name, lookupKind, localDecls);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
void doLocalLookup(ModuleDecl *module, ModuleDecl::AccessPathTy path,
|
||||
void doLocalLookup(ModuleDecl *module, ImportPath::Access path,
|
||||
SmallVectorImpl<ValueDecl *> &localDecls) {
|
||||
VectorDeclConsumer consumer(localDecls);
|
||||
module->lookupVisibleDecls(path, consumer, lookupKind);
|
||||
@@ -123,7 +123,7 @@ template <typename LookupStrategy>
|
||||
void ModuleNameLookup<LookupStrategy>::lookupInModule(
|
||||
SmallVectorImpl<ValueDecl *> &decls,
|
||||
const DeclContext *moduleOrFile,
|
||||
ModuleDecl::AccessPathTy accessPath,
|
||||
ImportPath::Access accessPath,
|
||||
const DeclContext *moduleScopeContext) {
|
||||
assert(moduleOrFile->isModuleScopeContext());
|
||||
|
||||
@@ -187,7 +187,7 @@ void ModuleNameLookup<LookupStrategy>::lookupInModule(
|
||||
if (import.accessPath.empty())
|
||||
import.accessPath = accessPath;
|
||||
else if (!accessPath.empty() &&
|
||||
!ModuleDecl::isSameAccessPath(import.accessPath, accessPath))
|
||||
!import.accessPath.isSameAs(accessPath))
|
||||
return;
|
||||
|
||||
getDerived()->doLocalLookup(import.importedModule, import.accessPath,
|
||||
@@ -202,7 +202,7 @@ void ModuleNameLookup<LookupStrategy>::lookupInModule(
|
||||
if (auto *loader = ctx.getClangModuleLoader()) {
|
||||
headerImportModule = loader->getImportedHeaderModule();
|
||||
if (headerImportModule) {
|
||||
ModuleDecl::ImportedModule import{ModuleDecl::AccessPathTy(),
|
||||
ModuleDecl::ImportedModule import{ImportPath::Access(),
|
||||
headerImportModule};
|
||||
visitImport(import, nullptr);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ void namelookup::lookupInModule(const DeclContext *moduleOrFile,
|
||||
|
||||
void namelookup::lookupVisibleDeclsInModule(
|
||||
const DeclContext *moduleOrFile,
|
||||
ModuleDecl::AccessPathTy accessPath,
|
||||
ImportPath::Access accessPath,
|
||||
SmallVectorImpl<ValueDecl *> &decls,
|
||||
NLKind lookupKind,
|
||||
ResolutionKind resolutionKind,
|
||||
|
||||
Reference in New Issue
Block a user