Skip to content

Commit 05a3c00

Browse files
committed
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.
1 parent e5d7885 commit 05a3c00

File tree

137 files changed

+1338
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1338
-143
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ set(SWIFT_DARWIN_EMBEDDED_VARIANTS "^(iphoneos|iphonesimulator|appletvos|appletv
124124
# if("${SWIFT_HOST_VARIANT_SDK}" IN_LIST SWIFT_DARWIN_PLATFORMS)
125125
# ...
126126
# endif()
127-
set(SWIFT_DARWIN_PLATFORMS "IOS" "IOS_SIMULATOR" "TVOS" "TVOS_SIMULATOR" "WATCHOS" "WATCHOS_SIMULATOR" "OSX")
127+
set(SWIFT_DARWIN_PLATFORMS "IOS" "IOS_SIMULATOR" "TVOS" "TVOS_SIMULATOR" "WATCHOS" "WATCHOS_SIMULATOR" "OSX" "XROS" "XROS_SIMULATOR")
128128

129129
set(SWIFT_APPLE_PLATFORMS ${SWIFT_DARWIN_PLATFORMS})
130130
if(SWIFT_FREESTANDING_FLAVOR STREQUAL "apple")
@@ -543,6 +543,9 @@ set(SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS "11.0" CACHE STRING
543543
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS "4.0" CACHE STRING
544544
"Minimum deployment target version for watchOS")
545545

546+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_XROS "1.0" CACHE STRING
547+
"Minimum deployment target version for xrOS")
548+
546549
#
547550
# Compatibility library deployment versions
548551
#
@@ -551,6 +554,7 @@ set(COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX "10.9")
551554
set(COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS "7.0")
552555
set(COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_TVOS "9.0")
553556
set(COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_WATCHOS "2.0")
557+
set(COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_XROS "1.0")
554558
set(COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_MACCATALYST "13.1")
555559

556560
#
@@ -596,7 +600,7 @@ option(SWIFT_REPORT_STATISTICS
596600
FALSE)
597601

598602
# Only Darwin platforms enable ObjC interop by default.
599-
if("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*)")
603+
if("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*|XROS*)")
600604
set(SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default TRUE)
601605
else()
602606
set(SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default FALSE)
@@ -1136,7 +1140,7 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WASI")
11361140
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
11371141
set(SWIFT_PRIMARY_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")
11381142

1139-
elseif("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*)")
1143+
elseif("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*|XROS*)")
11401144

11411145
set(SWIFT_HOST_VARIANT "macosx" CACHE STRING
11421146
"Deployment OS for Swift host tools (the compiler) [macosx, iphoneos].")

cmake/modules/DarwinSDKs.cmake

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ set(SUPPORTED_TVOS_SIMULATOR_ARCHS "x86_64;arm64")
1515
set(SUPPORTED_WATCHOS_ARCHS "armv7k;arm64_32")
1616
set(SUPPORTED_WATCHOS_SIMULATOR_ARCHS "i386;x86_64;arm64")
1717
set(SUPPORTED_OSX_ARCHS "x86_64;arm64")
18+
set(SUPPORTED_XROS_ARCHS "arm64;arm64e")
19+
set(SUPPORTED_XROS_SIMULATOR_ARCHS "arm64")
1820

1921
is_sdk_requested(OSX swift_build_osx)
2022
if(swift_build_osx)
@@ -50,7 +52,8 @@ if(swift_build_freestanding AND (SWIFT_FREESTANDING_FLAVOR STREQUAL "apple"))
5052
endif()
5153

5254
# Compatible cross-compile SDKS for Darwin OSes: IOS, IOS_SIMULATOR, TVOS,
53-
# TVOS_SIMULATOR, WATCHOS, WATCHOS_SIMULATOR (archs hardcoded below).
55+
# TVOS_SIMULATOR, WATCHOS, WATCHOS_SIMULATOR, XROS, XROS_SIMULATOR
56+
# (archs hardcoded below).
5457

5558
is_sdk_requested(IOS swift_build_ios)
5659
if(swift_build_ios)
@@ -120,3 +123,28 @@ if(swift_build_watchos_simulator)
120123
configure_target_variant(WATCHOS_SIMULATOR-RA "watchOS Release+Asserts" WATCHOS_SIMULATOR RA "Release+Asserts")
121124
configure_target_variant(WATCHOS_SIMULATOR-R "watchOS Release" WATCHOS_SIMULATOR R "Release")
122125
endif()
126+
127+
is_sdk_requested(XROS swift_build_xros)
128+
if(swift_build_xros)
129+
configure_sdk_darwin(
130+
XROS "xrOS" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_XROS}"
131+
xros xros xros "${SUPPORTED_XROS_ARCHS}")
132+
configure_target_variant(XROS-DA "xrOS Debug+Asserts" XROS DA "Debug+Asserts")
133+
configure_target_variant(XROS-RA "xrOS Release+Asserts" XROS RA "Release+Asserts")
134+
configure_target_variant(XROS-R "xrOS Release" XROS R "Release")
135+
endif()
136+
137+
is_sdk_requested(XROS_SIMULATOR swift_build_xros_simulator)
138+
if(swift_build_xros_simulator)
139+
configure_sdk_darwin(
140+
XROS_SIMULATOR "xrOS Simulator" "${SWIFT_DARWIN_DEPLOYMENT_VERSION_XROS}"
141+
xrsimulator xros xros-simulator
142+
"${SUPPORTED_XROS_SIMULATOR_ARCHS}")
143+
144+
configure_target_variant(
145+
XROS_SIMULATOR-DA "xrOS Simulator Debug+Asserts" XROS_SIMULATOR DA "Debug+Asserts")
146+
configure_target_variant(
147+
XROS_SIMULATOR-RA "xrOS Simulator Release+Asserts" XROS_SIMULATOR RA "Release+Asserts")
148+
configure_target_variant(
149+
XROS_SIMULATOR-R "xrOS Simulator Release" XROS_SIMULATOR R "Release")
150+
endif()

cmake/modules/StandaloneOverlay.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ set(CMAKE_INSTALL_PREFIX
100100

101101

102102
set(SWIFT_DARWIN_PLATFORMS
103-
OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR)
103+
OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR XROS XROS_SIMULATOR)
104104

105105
# Flags used to indicate we are building a standalone overlay.
106106
# FIXME: We should cut this down to a single flag.

include/swift/AST/ASTContext.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "swift/Basic/BlockList.h"
3535
#include "swift/SymbolGraphGen/SymbolGraphOptions.h"
3636
#include "clang/AST/DeclTemplate.h"
37+
#include "clang/Basic/DarwinSDKInfo.h"
3738
#include "llvm/ADT/ArrayRef.h"
3839
#include "llvm/ADT/DenseMap.h"
3940
#include "llvm/ADT/IntrusiveRefCntPtr.h"
@@ -948,6 +949,12 @@ class ASTContext final {
948949
return getMultiPayloadEnumTagSinglePayloadAvailability();
949950
}
950951

952+
/// Test support utility for loading a platform remap file
953+
/// in case an SDK is not specified to the compilation.
954+
const clang::DarwinSDKInfo::RelatedTargetVersionMapping *
955+
getAuxiliaryDarwinPlatformRemapInfo(
956+
clang::DarwinSDKInfo::OSEnvPair Kind) const;
957+
951958
//===--------------------------------------------------------------------===//
952959
// Diagnostics Helper functions
953960
//===--------------------------------------------------------------------===//
@@ -1511,6 +1518,9 @@ class ASTContext final {
15111518
/// Provide context-level uniquing for SIL lowered type layouts and boxes.
15121519
friend SILLayout;
15131520
friend SILBoxType;
1521+
1522+
public:
1523+
clang::DarwinSDKInfo *getDarwinSDKInfo() const;
15141524
};
15151525

15161526
} // end namespace swift

include/swift/AST/Availability.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
namespace swift {
2626
class ASTContext;
2727
class AvailableAttr;
28+
class BackDeployedAttr;
2829
class Decl;
2930

3031
/// A lattice of version ranges of the form [x.y.z, +Inf).
@@ -380,6 +381,39 @@ class AvailabilityInference {
380381

381382
static AvailabilityContext
382383
annotatedAvailableRangeForAttr(const SpecializeAttr *attr, ASTContext &ctx);
384+
385+
/// For the attribute's introduction version, update the platform and version
386+
/// values to the re-mapped platform's, if using a fallback platform.
387+
/// Returns `true` if a remap occured.
388+
static bool updateIntroducedPlatformForFallback(
389+
const AvailableAttr *attr, const ASTContext &Ctx,
390+
llvm::StringRef &Platform, llvm::VersionTuple &PlatformVer);
391+
392+
/// For the attribute's deprecation version, update the platform and version
393+
/// values to the re-mapped platform's, if using a fallback platform.
394+
/// Returns `true` if a remap occured.
395+
static bool updateDeprecatedPlatformForFallback(
396+
const AvailableAttr *attr, const ASTContext &Ctx,
397+
llvm::StringRef &Platform, llvm::VersionTuple &PlatformVer);
398+
399+
/// For the attribute's obsoletion version, update the platform and version
400+
/// values to the re-mapped platform's, if using a fallback platform.
401+
/// Returns `true` if a remap occured.
402+
static bool updateObsoletedPlatformForFallback(
403+
const AvailableAttr *attr, const ASTContext &Ctx,
404+
llvm::StringRef &Platform, llvm::VersionTuple &PlatformVer);
405+
406+
static bool updatePlatformStringForFallback(
407+
const AvailableAttr *attr, const ASTContext &Ctx,
408+
llvm::StringRef &Platform);
409+
410+
/// For the attribute's before version, update the platform and version
411+
/// values to the re-mapped platform's, if using a fallback platform.
412+
/// Returns `true` if a remap occured.
413+
static bool updateBeforePlatformForFallback(const BackDeployedAttr *attr,
414+
const ASTContext &Ctx,
415+
llvm::StringRef &Platform,
416+
llvm::VersionTuple &PlatformVer);
383417
};
384418

385419
/// Given a declaration upon which an availability attribute would appear in

include/swift/AST/PlatformKind.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ inline bool isApplicationExtensionPlatform(PlatformKind Platform) {
7878
/// triple will be used rather than the target to determine whether the
7979
/// platform is active.
8080
bool isPlatformActive(PlatformKind Platform, const LangOptions &LangOpts,
81-
bool ForTargetVariant = false);
81+
bool ForTargetVariant = false, bool ForRuntimeQuery = false);
8282

8383
/// Returns the target platform for the given language options.
8484
PlatformKind targetPlatform(const LangOptions &LangOpts);

include/swift/AST/PlatformKinds.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
AVAILABILITY_PLATFORM(iOS, "iOS")
2626
AVAILABILITY_PLATFORM(tvOS, "tvOS")
2727
AVAILABILITY_PLATFORM(watchOS, "watchOS")
28+
AVAILABILITY_PLATFORM(visionOS, "visionOS")
2829
AVAILABILITY_PLATFORM(macOS, "macOS")
2930
AVAILABILITY_PLATFORM(iOSApplicationExtension, "application extensions for iOS")
3031
AVAILABILITY_PLATFORM(tvOSApplicationExtension, "application extensions for tvOS")
3132
AVAILABILITY_PLATFORM(watchOSApplicationExtension, "application extensions for watchOS")
33+
AVAILABILITY_PLATFORM(visionOSApplicationExtension, "application extensions for visionOS")
3234
AVAILABILITY_PLATFORM(macOSApplicationExtension, "application extensions for macOS")
3335
AVAILABILITY_PLATFORM(macCatalyst, "Mac Catalyst")
3436
AVAILABILITY_PLATFORM(macCatalystApplicationExtension, "application extensions for Mac Catalyst")

include/swift/AST/RuntimeVersions.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ RUNTIME_VERSION(
135135
PLATFORM(macOS, (14, 4, 0))
136136
PLATFORM(iOS, (17, 4, 0))
137137
PLATFORM(watchOS, (10, 4, 0))
138+
PLATFORM(xrOS, (1, 0, 0))
138139
)
139140

140141
RUNTIME_VERSION(

include/swift/AST/SearchPathOptions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ class SearchPathOptions {
491491
/// A file containing a list of protocols whose conformances require const value extraction.
492492
std::string ConstGatherProtocolListFilePath;
493493

494+
/// Path to the file that defines platform mapping for availability
495+
/// version inheritance.
496+
std::optional<std::string> PlatformAvailabilityInheritanceMapPath;
497+
494498
/// Debug path mappings to apply to serialized search paths. These are
495499
/// specified in LLDB from the target.source-map entries.
496500
PathRemapper SearchPathRemapper;

include/swift/Basic/LangOptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ namespace swift {
627627
return Target.getiOSVersion();
628628
} else if (Target.isWatchOS()) {
629629
return Target.getOSVersion();
630+
} else if (Target.isXROS()) {
631+
return Target.getOSVersion();
630632
}
631633
return llvm::VersionTuple(/*Major=*/0, /*Minor=*/0, /*Subminor=*/0);
632634
}

include/swift/Basic/Platform.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ namespace swift {
3333
TvOS,
3434
TvOSSimulator,
3535
WatchOS,
36-
WatchOSSimulator
36+
WatchOSSimulator,
37+
VisionOS,
38+
VisionOSSimulator
3739
};
3840

3941
/// Returns true if the given triple represents iOS running in a simulator.
@@ -48,6 +50,9 @@ namespace swift {
4850
/// Returns true if the given triple represents a macCatalyst environment.
4951
bool tripleIsMacCatalystEnvironment(const llvm::Triple &triple);
5052

53+
/// Returns true if the given triple represents visionOS running in a simulator.
54+
bool tripleIsVisionSimulator(const llvm::Triple &triple);
55+
5156
/// Determine whether the triple infers the "simulator" environment.
5257
bool tripleInfersSimulatorEnvironment(const llvm::Triple &triple);
5358

include/swift/Frontend/Frontend.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ class CompilerInvocation {
233233

234234
void setRuntimeResourcePath(StringRef Path);
235235

236+
void setPlatformAvailabilityInheritanceMapPath(StringRef Path);
237+
236238
/// Compute the default prebuilt module cache path for a given resource path
237239
/// and SDK version. This function is also used by LLDB.
238240
static std::string

include/swift/Option/FrontendOptions.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,4 +1346,8 @@ def disable_experimental_parser_round_trip : Flag<["-"],
13461346
"disable-experimental-parser-round-trip">,
13471347
HelpText<"Disable round trip through the new swift parser">;
13481348

1349+
def platform_availability_inheritance_map_path
1350+
: Separate<["-"], "platform-availability-inheritance-map-path">, MetaVarName<"<path>">,
1351+
HelpText<"Path of the platform inheritance platform map">;
1352+
13491353
} // end let Flags = [FrontendOption, NoDriverOption, HelpHidden]

include/swift/RemoteInspection/RuntimeHeaders/llvm/BinaryFormat/MachO.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@ enum PlatformType {
508508
PLATFORM_TVOSSIMULATOR = 8,
509509
PLATFORM_WATCHOSSIMULATOR = 9,
510510
PLATFORM_DRIVERKIT = 10,
511+
PLATFORM_XROS = 11,
512+
PLATFORM_XROS_SIMULATOR = 12
511513
};
512514

513515
// Values for tools enum in build_tool_version.

lib/AST/ASTContext.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,8 @@ struct ASTContext::Implementation {
630630
/// The scratch context used to allocate intrinsic data on behalf of \c swift::IntrinsicInfo
631631
std::unique_ptr<llvm::LLVMContext> IntrinsicScratchContext;
632632

633+
mutable std::optional<std::unique_ptr<clang::DarwinSDKInfo>> SDKInfo;
634+
633635
/// Memory allocation arena for the term rewriting system.
634636
std::unique_ptr<rewriting::RewriteContext> TheRewriteContext;
635637

@@ -6383,6 +6385,44 @@ bool ASTContext::isASCIIString(StringRef s) const {
63836385
return true;
63846386
}
63856387

6388+
clang::DarwinSDKInfo *ASTContext::getDarwinSDKInfo() const {
6389+
if (!getImpl().SDKInfo) {
6390+
auto SDKInfoOrErr = clang::parseDarwinSDKInfo(
6391+
*llvm::vfs::getRealFileSystem(),
6392+
SearchPathOpts.SDKPath);
6393+
if (!SDKInfoOrErr) {
6394+
llvm::handleAllErrors(SDKInfoOrErr.takeError(),
6395+
[](const llvm::ErrorInfoBase &) {
6396+
// Ignore the error for now..
6397+
});
6398+
getImpl().SDKInfo.emplace();
6399+
} else if (!*SDKInfoOrErr) {
6400+
getImpl().SDKInfo.emplace();
6401+
} else {
6402+
getImpl().SDKInfo.emplace(std::make_unique<clang::DarwinSDKInfo>(**SDKInfoOrErr));
6403+
}
6404+
}
6405+
6406+
return getImpl().SDKInfo->get();
6407+
}
6408+
6409+
const clang::DarwinSDKInfo::RelatedTargetVersionMapping
6410+
*ASTContext::getAuxiliaryDarwinPlatformRemapInfo(clang::DarwinSDKInfo::OSEnvPair Kind) const {
6411+
if (SearchPathOpts.PlatformAvailabilityInheritanceMapPath) {
6412+
auto SDKInfoOrErr = clang::parseDarwinSDKInfo(
6413+
*llvm::vfs::getRealFileSystem(),
6414+
*SearchPathOpts.PlatformAvailabilityInheritanceMapPath);
6415+
if (!SDKInfoOrErr || !*SDKInfoOrErr) {
6416+
llvm::handleAllErrors(SDKInfoOrErr.takeError(),
6417+
[](const llvm::ErrorInfoBase &) {
6418+
// Ignore the error for now..
6419+
});
6420+
}
6421+
return (*SDKInfoOrErr)->getVersionMapping(Kind);
6422+
}
6423+
return nullptr;
6424+
}
6425+
63866426
/// The special Builtin.TheTupleType, which parents tuple extensions and
63876427
/// conformances.
63886428
BuiltinTupleDecl *ASTContext::getBuiltinTupleDecl() {

lib/AST/Attr.cpp

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,13 @@ DeclAttributes::getDeprecated(const ASTContext &ctx) const {
497497
return AvAttr;
498498

499499
std::optional<llvm::VersionTuple> DeprecatedVersion = AvAttr->Deprecated;
500+
501+
StringRef DeprecatedPlatform = AvAttr->prettyPlatformString();
502+
llvm::VersionTuple RemappedDeprecatedVersion;
503+
if (AvailabilityInference::updateDeprecatedPlatformForFallback(
504+
AvAttr, ctx, DeprecatedPlatform, RemappedDeprecatedVersion))
505+
DeprecatedVersion = RemappedDeprecatedVersion;
506+
500507
if (!DeprecatedVersion.has_value())
501508
continue;
502509

@@ -2335,18 +2342,32 @@ AvailableVersionComparison AvailableAttr::getVersionAvailability(
23352342
return AvailableVersionComparison::Unavailable;
23362343

23372344
llvm::VersionTuple queryVersion = getActiveVersion(ctx);
2345+
std::optional<llvm::VersionTuple> ObsoletedVersion = Obsoleted;
2346+
2347+
StringRef ObsoletedPlatform = prettyPlatformString();
2348+
llvm::VersionTuple RemappedObsoletedVersion;
2349+
if (AvailabilityInference::updateObsoletedPlatformForFallback(
2350+
this, ctx, ObsoletedPlatform, RemappedObsoletedVersion))
2351+
ObsoletedVersion = RemappedObsoletedVersion;
23382352

23392353
// If this entity was obsoleted before or at the query platform version,
23402354
// consider it obsolete.
2341-
if (Obsoleted && *Obsoleted <= queryVersion)
2355+
if (ObsoletedVersion && *ObsoletedVersion <= queryVersion)
23422356
return AvailableVersionComparison::Obsoleted;
23432357

2358+
std::optional<llvm::VersionTuple> IntroducedVersion = Introduced;
2359+
StringRef IntroducedPlatform = prettyPlatformString();
2360+
llvm::VersionTuple RemappedIntroducedVersion;
2361+
if (AvailabilityInference::updateIntroducedPlatformForFallback(
2362+
this, ctx, IntroducedPlatform, RemappedIntroducedVersion))
2363+
IntroducedVersion = RemappedIntroducedVersion;
2364+
23442365
// If this entity was introduced after the query version and we're doing a
23452366
// platform comparison, true availability can only be determined dynamically;
23462367
// if we're doing a _language_ version check, the query version is a
23472368
// static requirement, so we treat "introduced later" as just plain
23482369
// unavailable.
2349-
if (Introduced && *Introduced > queryVersion) {
2370+
if (IntroducedVersion && *IntroducedVersion > queryVersion) {
23502371
if (isLanguageVersionSpecific() || isPackageDescriptionVersionSpecific())
23512372
return AvailableVersionComparison::Unavailable;
23522373
else

0 commit comments

Comments
 (0)