mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix up a bunch of filtering-by-decl-access-path.
Mostly cleanup, a few filled-in FIXMEs to filter out decls that don't match the access path name. Swift SVN r6850
This commit is contained in:
@@ -213,8 +213,11 @@ void SerializedModuleLoader::lookupValue(Module *module,
|
||||
Module::AccessPathTy accessPath,
|
||||
Identifier name, NLKind lookupKind,
|
||||
SmallVectorImpl<ValueDecl*> &results) {
|
||||
// FIXME: handle nested modules.
|
||||
if (!accessPath.empty())
|
||||
assert(accessPath.size() <= 1 && "can only refer to top-level decls");
|
||||
|
||||
// If this import is specific to some named type or decl ("import swift.int")
|
||||
// then filter out any lookups that don't match.
|
||||
if (accessPath.size() == 1 && accessPath.front().first != name)
|
||||
return;
|
||||
|
||||
ModuleFile *moduleFile = cast<SerializedModule>(module)->File;
|
||||
|
||||
Reference in New Issue
Block a user