mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This does several different things to improve how platforms are described in availability diagnostics: • Mentions the platform in diagnostics for platform-specific @available(unavailable) attributes. • Replaces “OS X” with “macOS”. • Replaces “fooOS application extension” with “application extensions for fooOS”. • Replaces “on fooOS” with “in fooOS”. Fixes <rdar://problem/49963341>.
35 lines
1.5 KiB
C++
35 lines
1.5 KiB
C++
//===--- PlatformKinds.def - Swift PlatformKind Metaprogramming -*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines macros used for macro-metaprogramming with platform kinds.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// AVAILABILITY_PLATFORM(X, PrettyName)
|
|
/// X - The name of the platform
|
|
/// PrettyName - A string with the platform name for pretty printing
|
|
#ifndef AVAILABILITY_PLATFORM
|
|
#define AVAILABILITY_PLATFORM(X, PrettyName)
|
|
#endif
|
|
|
|
// Reordering these platforms will break serialization.
|
|
AVAILABILITY_PLATFORM(iOS, "iOS")
|
|
AVAILABILITY_PLATFORM(tvOS, "tvOS")
|
|
AVAILABILITY_PLATFORM(watchOS, "watchOS")
|
|
AVAILABILITY_PLATFORM(OSX, "macOS")
|
|
AVAILABILITY_PLATFORM(iOSApplicationExtension, "application extensions for iOS")
|
|
AVAILABILITY_PLATFORM(tvOSApplicationExtension, "application extensions for tvOS")
|
|
AVAILABILITY_PLATFORM(watchOSApplicationExtension, "application extensions for watchOS")
|
|
AVAILABILITY_PLATFORM(OSXApplicationExtension, "application extensions for macOS")
|
|
|
|
#undef AVAILABILITY_PLATFORM
|