@@ -75,20 +75,6 @@ class PlatformVersionConstraintAvailabilitySpec : public AvailabilitySpec {
7575
7676 llvm::VersionTuple Version;
7777
78- // For macOS Big Sur, we canonicalize 10.16 to 11.0 for compile-time
79- // checking since clang canonicalizes availability markup. However, to
80- // support Beta versions of macOS Big Sur where the OS
81- // reports 10.16 at run time, we need to compare against 10.16,
82- //
83- // This means for:
84- //
85- // if #available(macOS 10.16, *) { ... }
86- //
87- // we need to keep around both a canonical version for use in compile-time
88- // checks and an uncanonicalized version for the version to actually codegen
89- // with.
90- llvm::VersionTuple RuntimeVersion;
91-
9278 SourceRange VersionSrcRange;
9379
9480 // Location of the macro expanded to create this spec.
@@ -98,13 +84,10 @@ class PlatformVersionConstraintAvailabilitySpec : public AvailabilitySpec {
9884 PlatformVersionConstraintAvailabilitySpec (PlatformKind Platform,
9985 SourceLoc PlatformLoc,
10086 llvm::VersionTuple Version,
101- llvm::VersionTuple RuntimeVersion,
10287 SourceRange VersionSrcRange)
103- : AvailabilitySpec(AvailabilitySpecKind::PlatformVersionConstraint),
104- Platform (Platform),
105- PlatformLoc(PlatformLoc), Version(Version),
106- RuntimeVersion(RuntimeVersion),
107- VersionSrcRange(VersionSrcRange) {}
88+ : AvailabilitySpec(AvailabilitySpecKind::PlatformVersionConstraint),
89+ Platform (Platform), PlatformLoc(PlatformLoc), Version(Version),
90+ VersionSrcRange(VersionSrcRange) {}
10891
10992 // / The required platform.
11093 PlatformKind getPlatform () const { return Platform; }
@@ -116,13 +99,13 @@ class PlatformVersionConstraintAvailabilitySpec : public AvailabilitySpec {
11699 bool isUnrecognizedPlatform () const { return Platform == PlatformKind::none; }
117100
118101 // The platform version to compare against.
119- llvm::VersionTuple getVersion () const { return Version; }
102+ llvm::VersionTuple getVersion () const ;
120103 SourceRange getVersionSrcRange () const { return VersionSrcRange; }
121104
122105 // The version to be used in codegen for version comparisons at run time.
123106 // This is required to support beta versions of macOS Big Sur that
124107 // report 10.16 at run time.
125- llvm::VersionTuple getRuntimeVersion () const { return RuntimeVersion; }
108+ llvm::VersionTuple getRuntimeVersion () const ;
126109
127110 SourceRange getSourceRange () const ;
128111
0 commit comments