mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Move access-path filtering into ModuleNameLookup (out of lookupValue) (#27097)
Removes duplicated logic from the implementations of FileUnit::lookupValue, and simplifies the interface to ModuleDecl::lookupValue, where everyone was passing an empty (non-filtering) access path anyway /except/ during actual lookup from source code. No functionality change.
This commit is contained in:
@@ -126,9 +126,8 @@ struct GenGlobalAccessors : public PatternVisitor<GenGlobalAccessors>
|
||||
// Find Builtin.once.
|
||||
auto &C = SGM.M.getASTContext();
|
||||
SmallVector<ValueDecl*, 2> found;
|
||||
C.TheBuiltinModule
|
||||
->lookupValue({}, C.getIdentifier("once"),
|
||||
NLKind::QualifiedLookup, found);
|
||||
C.TheBuiltinModule->lookupValue(C.getIdentifier("once"),
|
||||
NLKind::QualifiedLookup, found);
|
||||
|
||||
assert(found.size() == 1 && "didn't find Builtin.once?!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user