Excise "Accessibility" from the compiler (3/3)

"Accessibility" has a different meaning for app developers, so we've
already deliberately excised it from our diagnostics in favor of terms
like "access control" and "access level". Do the same in the compiler
now that we aren't constantly pulling things into the release branch.

Rename AccessibilityAttr to AccessControlAttr and
SetterAccessibilityAttr to SetterAccessAttr, then track down the last
few uses of "accessibility" that don't have to do with
NSAccessibility. (I left the SourceKit XPC API alone because that's
supposed to be more stable.)
This commit is contained in:
Jordan Rose
2017-08-28 13:27:59 -07:00
parent 1c651973c3
commit 449cd98997
44 changed files with 209 additions and 210 deletions

View File

@@ -337,7 +337,7 @@ bool DeclAttribute::printImpl(ASTPrinter &Printer, const PrintOptions &Options,
#define SIMPLE_DECL_ATTR(X, CLASS, ...) case DAK_##CLASS:
#include "swift/AST/Attr.def"
case DAK_Inline:
case DAK_Accessibility:
case DAK_AccessControl:
case DAK_Ownership:
case DAK_Effects:
if (DeclAttribute::isDeclModifier(getKind())) {
@@ -347,7 +347,7 @@ bool DeclAttribute::printImpl(ASTPrinter &Printer, const PrintOptions &Options,
}
return true;
case DAK_SetterAccessibility:
case DAK_SetterAccess:
Printer.printKeyword(getAttrName());
Printer << "(set)";
return true;
@@ -588,9 +588,9 @@ StringRef DeclAttribute::getAttrName() const {
case EffectsKind::Unspecified:
return "effects(unspecified)";
}
case DAK_Accessibility:
case DAK_SetterAccessibility:
switch (cast<AbstractAccessibilityAttr>(this)->getAccess()) {
case DAK_AccessControl:
case DAK_SetterAccess:
switch (cast<AbstractAccessControlAttr>(this)->getAccess()) {
case AccessLevel::Private:
return "private";
case AccessLevel::FilePrivate:
@@ -602,7 +602,7 @@ StringRef DeclAttribute::getAttrName() const {
case AccessLevel::Open:
return "open";
}
llvm_unreachable("bad accessibility kind");
llvm_unreachable("bad access level");
case DAK_Ownership:
switch (cast<OwnershipAttr>(this)->get()) {