Change DeclName over to basename(arg1:arg2:...argN:).

Swift will use the basename + argument names formulation for
names. Update the DeclName interfaces, printing, and __FUNCTION__ to
use the method syntax.

We'll still need to rework the "x.foo:bar:wibble:" syntax; that will
come (significantly) later.

Swift SVN r15763
This commit is contained in:
Doug Gregor
2014-04-02 00:00:03 +00:00
parent 2dcc1e7a8e
commit 9189145cc5
17 changed files with 142 additions and 151 deletions

View File

@@ -815,7 +815,7 @@ void ModuleFile::lookupValue(DeclName name,
// FIXME: As a bit of a hack, do lookup by the simple name, then filter
// compound decls, to avoid having to completely redo how modules are
// serialized.
auto iter = TopLevelDecls->find(name.getSimpleName());
auto iter = TopLevelDecls->find(name.getBaseName());
if (iter != TopLevelDecls->end()) {
if (name.isSimpleName()) {
for (auto item : *iter) {
@@ -834,7 +834,7 @@ void ModuleFile::lookupValue(DeclName name,
// If the name is an operator name, also look for operator methods.
if (name.isOperator() && OperatorMethodDecls) {
auto iter = OperatorMethodDecls->find(name.getSimpleName());
auto iter = OperatorMethodDecls->find(name.getBaseName());
if (iter != OperatorMethodDecls->end()) {
for (auto item : *iter) {
auto VD = cast<ValueDecl>(getDecl(item.second));
@@ -1002,7 +1002,7 @@ void ModuleFile::lookupClassMember(Module::AccessPathTy accessPath,
if (!ClassMembersByName)
return;
auto iter = ClassMembersByName->find(name.getSimpleName());
auto iter = ClassMembersByName->find(name.getBaseName());
if (iter == ClassMembersByName->end())
return;