@@ -53,8 +53,8 @@ Optional<PlatformKind> swift::platformFromString(StringRef Name) {
53
53
return llvm::StringSwitch<Optional<PlatformKind>>(Name)
54
54
#define AVAILABILITY_PLATFORM (X, PrettyName ) .Case(#X, PlatformKind::X)
55
55
#include " swift/AST/PlatformKinds.def"
56
- .Case (" macOS " , PlatformKind::OSX )
57
- .Case (" macOSApplicationExtension " , PlatformKind::OSXApplicationExtension )
56
+ .Case (" OSX " , PlatformKind::macOS )
57
+ .Case (" OSXApplicationExtension " , PlatformKind::macOSApplicationExtension )
58
58
.Default (Optional<PlatformKind>());
59
59
}
60
60
@@ -64,16 +64,16 @@ static bool isPlatformActiveForTarget(PlatformKind Platform,
64
64
if (Platform == PlatformKind::none)
65
65
return true ;
66
66
67
- if (Platform == PlatformKind::OSXApplicationExtension ||
67
+ if (Platform == PlatformKind::macOSApplicationExtension ||
68
68
Platform == PlatformKind::iOSApplicationExtension ||
69
69
Platform == PlatformKind::macCatalystApplicationExtension)
70
70
if (!EnableAppExtensionRestrictions)
71
71
return false ;
72
72
73
73
// FIXME: This is an awful way to get the current OS.
74
74
switch (Platform) {
75
- case PlatformKind::OSX :
76
- case PlatformKind::OSXApplicationExtension :
75
+ case PlatformKind::macOS :
76
+ case PlatformKind::macOSApplicationExtension :
77
77
return Target.isMacOSX ();
78
78
case PlatformKind::iOS:
79
79
case PlatformKind::iOSApplicationExtension:
@@ -109,8 +109,8 @@ bool swift::isPlatformActive(PlatformKind Platform, const LangOptions &LangOpts,
109
109
PlatformKind swift::targetPlatform (const LangOptions &LangOpts) {
110
110
if (LangOpts.Target .isMacOSX ()) {
111
111
return (LangOpts.EnableAppExtensionRestrictions
112
- ? PlatformKind::OSXApplicationExtension
113
- : PlatformKind::OSX );
112
+ ? PlatformKind::macOSApplicationExtension
113
+ : PlatformKind::macOS );
114
114
}
115
115
116
116
if (LangOpts.Target .isTvOS ()) {
@@ -162,8 +162,8 @@ llvm::VersionTuple swift::canonicalizePlatformVersion(
162
162
163
163
// Canonicalize macOS version for macOS Big Sur to treat
164
164
// 10.16 as 11.0.
165
- if (platform == PlatformKind::OSX ||
166
- platform == PlatformKind::OSXApplicationExtension ) {
165
+ if (platform == PlatformKind::macOS ||
166
+ platform == PlatformKind::macOSApplicationExtension ) {
167
167
return llvm::Triple::getCanonicalVersionForOS (llvm::Triple::MacOSX,
168
168
version);
169
169
}
0 commit comments