@@ -1559,7 +1559,7 @@ static void extractDirectlyReferencedNominalTypes(
1559
1559
}
1560
1560
1561
1561
bool DeclContext::lookupQualified (Type type,
1562
- DeclName member,
1562
+ DeclNameRef member,
1563
1563
NLOptions options,
1564
1564
SmallVectorImpl<ValueDecl *> &decls) const {
1565
1565
using namespace namelookup ;
@@ -1584,7 +1584,7 @@ bool DeclContext::lookupQualified(Type type,
1584
1584
}
1585
1585
1586
1586
bool DeclContext::lookupQualified (ArrayRef<NominalTypeDecl *> typeDecls,
1587
- DeclName member,
1587
+ DeclNameRef member,
1588
1588
NLOptions options,
1589
1589
SmallVectorImpl<ValueDecl *> &decls) const {
1590
1590
using namespace namelookup ;
@@ -1639,7 +1639,7 @@ bool DeclContext::lookupQualified(ArrayRef<NominalTypeDecl *> typeDecls,
1639
1639
auto flags = OptionSet<NominalTypeDecl::LookupDirectFlags>();
1640
1640
if (options & NL_IncludeAttributeImplements)
1641
1641
flags |= NominalTypeDecl::LookupDirectFlags::IncludeAttrImplements;
1642
- for (auto decl : current->lookupDirect (member, flags)) {
1642
+ for (auto decl : current->lookupDirect (member. getFullName () , flags)) {
1643
1643
// If we're performing a type lookup, don't even attempt to validate
1644
1644
// the decl if its not a type.
1645
1645
if ((options & NL_OnlyTypes) && !isa<TypeDecl>(decl))
@@ -1708,14 +1708,14 @@ bool DeclContext::lookupQualified(ArrayRef<NominalTypeDecl *> typeDecls,
1708
1708
1709
1709
pruneLookupResultSet (this , options, decls);
1710
1710
if (auto *debugClient = this ->getParentModule ()->getDebugClient ()) {
1711
- debugClient->finishLookupInNominals (this , typeDecls, member, options ,
1712
- decls);
1711
+ debugClient->finishLookupInNominals (this , typeDecls, member. getFullName () ,
1712
+ options, decls);
1713
1713
}
1714
1714
// We're done. Report success/failure.
1715
1715
return !decls.empty ();
1716
1716
}
1717
1717
1718
- bool DeclContext::lookupQualified (ModuleDecl *module , DeclName member,
1718
+ bool DeclContext::lookupQualified (ModuleDecl *module , DeclNameRef member,
1719
1719
NLOptions options,
1720
1720
SmallVectorImpl<ValueDecl *> &decls) const {
1721
1721
using namespace namelookup ;
@@ -1736,9 +1736,10 @@ bool DeclContext::lookupQualified(ModuleDecl *module, DeclName member,
1736
1736
auto topLevelScope = getModuleScopeContext ();
1737
1737
if (module == topLevelScope->getParentModule ()) {
1738
1738
if (tracker) {
1739
- recordLookupOfTopLevelName (topLevelScope, member, isLookupCascading);
1739
+ recordLookupOfTopLevelName (topLevelScope, member.getFullName (),
1740
+ isLookupCascading);
1740
1741
}
1741
- lookupInModule (module , member, decls,
1742
+ lookupInModule (module , member. getFullName () , decls,
1742
1743
NLKind::QualifiedLookup, kind, topLevelScope);
1743
1744
} else {
1744
1745
// Note: This is a lookup into another module. Unless we're compiling
@@ -1751,25 +1752,27 @@ bool DeclContext::lookupQualified(ModuleDecl *module, DeclName member,
1751
1752
module , topLevelScope);
1752
1753
if (llvm::any_of (accessPaths,
1753
1754
[&](ModuleDecl::AccessPathTy accessPath) {
1754
- return ModuleDecl::matchesAccessPath (accessPath, member);
1755
+ return ModuleDecl::matchesAccessPath (accessPath,
1756
+ member.getFullName ());
1755
1757
})) {
1756
- lookupInModule (module , member, decls,
1758
+ lookupInModule (module , member. getFullName () , decls,
1757
1759
NLKind::QualifiedLookup, kind, topLevelScope);
1758
1760
}
1759
1761
}
1760
1762
1761
1763
pruneLookupResultSet (this , options, decls);
1762
1764
1763
1765
if (auto *debugClient = this ->getParentModule ()->getDebugClient ()) {
1764
- debugClient->finishLookupInModule (this , module , member, options, decls);
1766
+ debugClient->finishLookupInModule (this , module , member.getFullName (),
1767
+ options, decls);
1765
1768
}
1766
1769
// We're done. Report success/failure.
1767
1770
return !decls.empty ();
1768
1771
}
1769
1772
1770
1773
llvm::Expected<QualifiedLookupResult>
1771
1774
AnyObjectLookupRequest::evaluate (Evaluator &evaluator, const DeclContext *dc,
1772
- DeclName member, NLOptions options) const {
1775
+ DeclNameRef member, NLOptions options) const {
1773
1776
using namespace namelookup ;
1774
1777
QualifiedLookupResult decls;
1775
1778
@@ -1789,7 +1792,8 @@ AnyObjectLookupRequest::evaluate(Evaluator &evaluator, const DeclContext *dc,
1789
1792
// Collect all of the visible declarations.
1790
1793
SmallVector<ValueDecl *, 4 > allDecls;
1791
1794
for (auto import : namelookup::getAllImports (dc)) {
1792
- import .second ->lookupClassMember (import .first , member, allDecls);
1795
+ import .second ->lookupClassMember (import .first , member.getFullName (),
1796
+ allDecls);
1793
1797
}
1794
1798
1795
1799
// For each declaration whose context is not something we've
@@ -1820,7 +1824,8 @@ AnyObjectLookupRequest::evaluate(Evaluator &evaluator, const DeclContext *dc,
1820
1824
1821
1825
pruneLookupResultSet (dc, options, decls);
1822
1826
if (auto *debugClient = dc->getParentModule ()->getDebugClient ()) {
1823
- debugClient->finishLookupInAnyObject (dc, member, options, decls);
1827
+ debugClient->finishLookupInAnyObject (dc, member.getFullName (), options,
1828
+ decls);
1824
1829
}
1825
1830
return decls;
1826
1831
}
@@ -1934,7 +1939,7 @@ resolveTypeDeclsToNominal(Evaluator &evaluator,
1934
1939
1935
1940
// / Perform unqualified name lookup for types at the given location.
1936
1941
static DirectlyReferencedTypeDecls
1937
- directReferencesForUnqualifiedTypeLookup (DeclName name,
1942
+ directReferencesForUnqualifiedTypeLookup (DeclNameRef name,
1938
1943
SourceLoc loc, DeclContext *dc,
1939
1944
LookupOuterResults lookupOuter) {
1940
1945
DirectlyReferencedTypeDecls results;
@@ -1961,7 +1966,7 @@ static DirectlyReferencedTypeDecls
1961
1966
directReferencesForQualifiedTypeLookup (Evaluator &evaluator,
1962
1967
ASTContext &ctx,
1963
1968
ArrayRef<TypeDecl *> baseTypes,
1964
- DeclName name,
1969
+ DeclNameRef name,
1965
1970
DeclContext *dc) {
1966
1971
DirectlyReferencedTypeDecls result;
1967
1972
auto addResults = [&result](ArrayRef<ValueDecl *> found){
0 commit comments