Unify approach to printing declaration names (#9320)

Printing a declaration's name using `<<` and `getBaseName()` is be
independent of the return type of `getBaseName()` which will change in
the future from `Identifier` to `DeclBaseName`
This commit is contained in:
Alex Hoppen
2017-05-29 02:25:20 +02:00
committed by Jordan Rose
parent e068bc39e6
commit f302afc97f
18 changed files with 44 additions and 35 deletions

View File

@@ -149,8 +149,9 @@ bool swift::emitReferenceDependencies(DiagnosticEngine &diags,
return true;
}
auto escape = [](Identifier name) -> std::string {
return llvm::yaml::escape(name.str());
auto escape = [](DeclBaseName name) -> std::string {
// TODO: Handle special names
return llvm::yaml::escape(name.getIdentifier().str());
};
out << "### Swift dependencies file v0 ###\n";