ABI Checker: use lower-cased decl keywords to be consistent with source. NFC

This commit is contained in:
Xi Ge
2020-09-11 23:30:26 -07:00
parent 7dcb0ea31a
commit 950eb74e67
7 changed files with 42 additions and 19 deletions

View File

@@ -419,10 +419,12 @@ StringRef SDKNodeDecl::getScreenInfo() const {
if (auto *TD = dyn_cast<SDKNodeDeclType>(this)) {
IsExtension = TD->isExternal();
}
if (IsExtension)
OS << "Extension";
else
OS << getDeclKind();
// There is no particular reasons why we don't use lower-cased keyword names
// in non-CompilerStyle mode. This is to be backward compatible so clients
// don't need to update existing known breakages.
OS << getDeclKindStr(IsExtension? DeclKind::Extension : getDeclKind(),
getSDKContext().getOpts().CompilerStyle);
OS << " " << getFullyQualifiedName();
return Ctx.buffer(OS.str());
}