@@ -115,6 +115,9 @@ swift::basePlatformForExtensionPlatform(PlatformKind Platform) {
115115 case PlatformKind::tvOS:
116116 case PlatformKind::watchOS:
117117 case PlatformKind::visionOS:
118+ case PlatformKind::DriverKit:
119+ case PlatformKind::Swift:
120+ case PlatformKind::anyAppleOS:
118121 case PlatformKind::FreeBSD:
119122 case PlatformKind::OpenBSD:
120123 case PlatformKind::Windows:
@@ -159,6 +162,11 @@ static bool isPlatformActiveForTarget(PlatformKind Platform,
159162 case PlatformKind::visionOS:
160163 case PlatformKind::visionOSApplicationExtension:
161164 return Target.isXROS ();
165+ case PlatformKind::DriverKit:
166+ return Target.isDriverKit ();
167+ case PlatformKind::Swift:
168+ case PlatformKind::anyAppleOS:
169+ return Target.isOSDarwin ();
162170 case PlatformKind::OpenBSD:
163171 return Target.isOSOpenBSD ();
164172 case PlatformKind::FreeBSD:
@@ -292,6 +300,11 @@ swift::tripleOSTypeForPlatform(PlatformKind platform) {
292300 case PlatformKind::visionOS:
293301 case PlatformKind::visionOSApplicationExtension:
294302 return llvm::Triple::XROS;
303+ case PlatformKind::DriverKit:
304+ return llvm::Triple::DriverKit;
305+ case PlatformKind::Swift:
306+ case PlatformKind::anyAppleOS:
307+ return std::nullopt ;
295308 case PlatformKind::FreeBSD:
296309 return llvm::Triple::FreeBSD;
297310 case PlatformKind::OpenBSD:
@@ -332,6 +345,9 @@ bool swift::isPlatformSPI(PlatformKind Platform) {
332345 case PlatformKind::watchOSApplicationExtension:
333346 case PlatformKind::visionOS:
334347 case PlatformKind::visionOSApplicationExtension:
348+ case PlatformKind::DriverKit:
349+ case PlatformKind::Swift:
350+ case PlatformKind::anyAppleOS:
335351 case PlatformKind::OpenBSD:
336352 case PlatformKind::FreeBSD:
337353 case PlatformKind::Windows:
0 commit comments