mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS. - Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target. - Addition of the new platform kind definition. - Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries. - Utilities to read out Darwin platform SDK info containing platform mapping data. - Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback'). - Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path. - Changes to existing test suite to accomodate the new platform.
This commit is contained in:
@@ -852,6 +852,8 @@ getOSAndVersionForDiagnostics(const llvm::Triple &triple) {
|
||||
osName = swift::prettyPlatformString(PlatformKind::tvOS);
|
||||
} else if (triple.isiOS()) {
|
||||
osName = swift::prettyPlatformString(PlatformKind::iOS);
|
||||
} else if (triple.isXROS()) {
|
||||
osName = swift::prettyPlatformString(PlatformKind::visionOS);
|
||||
} else {
|
||||
assert(!triple.isOSDarwin() && "unknown Apple OS");
|
||||
// Fallback to the LLVM triple name. This isn't great (it won't be
|
||||
|
||||
Reference in New Issue
Block a user