Introduce special decl names

Special DeclNames represent names that do not have an identifier in the
surface language. This implies serializing the information about whether
a name is special together with its identifier (if it is not special)
in both the module file and the swift lookup table.
This commit is contained in:
Alex Hoppen
2017-05-30 19:43:28 +02:00
parent 2e512cb7fe
commit f8c2692f79
29 changed files with 424 additions and 151 deletions

View File

@@ -237,10 +237,13 @@ static void printValueDecl(ValueDecl *Decl, raw_ostream &OS) {
printFullContext(Decl->getDeclContext(), OS);
assert(Decl->hasName());
if (Decl->isOperator())
if (Decl->isOperator()) {
OS << '"' << Decl->getBaseName() << '"';
else
} else if (Decl->getBaseName() == "subscript") {
OS << '`' << Decl->getBaseName() << '`';
} else {
OS << Decl->getBaseName();
}
}
/// SILDeclRef uses sigil "#" and prints the fully qualified dotted path.