Renovate name lookup to prepare for compound name lookup.

Make the name lookup interfaces all take DeclNames instead of identifiers, and update the lookup caches of the various file units to index their members by both compound name and simple name. Serialized modules are keyed by identifiers, so as a transitional hack, do simple name lookup then filter the results by compound name.

Swift SVN r14768
This commit is contained in:
Joe Groff
2014-03-07 03:21:29 +00:00
parent e60c59892b
commit 96c09d7179
17 changed files with 253 additions and 110 deletions

View File

@@ -148,7 +148,7 @@ public:
virtual bool isSystemModule() const override;
virtual void lookupValue(Module::AccessPathTy accessPath,
Identifier name, NLKind lookupKind,
DeclName name, NLKind lookupKind,
SmallVectorImpl<ValueDecl*> &results) const override;
virtual OperatorDecl *lookupOperator(Identifier name,
@@ -162,7 +162,7 @@ public:
VisibleDeclConsumer &consumer) const override;
virtual void
lookupClassMember(Module::AccessPathTy accessPath, Identifier name,
lookupClassMember(Module::AccessPathTy accessPath, DeclName name,
SmallVectorImpl<ValueDecl*> &decls) const override;
virtual void getTopLevelDecls(SmallVectorImpl<Decl*> &results) const override;