@@ -75,20 +75,6 @@ class PlatformVersionConstraintAvailabilitySpec : public AvailabilitySpec {
75
75
76
76
llvm::VersionTuple Version;
77
77
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
-
92
78
SourceRange VersionSrcRange;
93
79
94
80
// Location of the macro expanded to create this spec.
@@ -98,13 +84,10 @@ class PlatformVersionConstraintAvailabilitySpec : public AvailabilitySpec {
98
84
PlatformVersionConstraintAvailabilitySpec (PlatformKind Platform,
99
85
SourceLoc PlatformLoc,
100
86
llvm::VersionTuple Version,
101
- llvm::VersionTuple RuntimeVersion,
102
87
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) {}
108
91
109
92
// / The required platform.
110
93
PlatformKind getPlatform () const { return Platform; }
@@ -116,13 +99,13 @@ class PlatformVersionConstraintAvailabilitySpec : public AvailabilitySpec {
116
99
bool isUnrecognizedPlatform () const { return Platform == PlatformKind::none; }
117
100
118
101
// The platform version to compare against.
119
- llvm::VersionTuple getVersion () const { return Version; }
102
+ llvm::VersionTuple getVersion () const ;
120
103
SourceRange getVersionSrcRange () const { return VersionSrcRange; }
121
104
122
105
// The version to be used in codegen for version comparisons at run time.
123
106
// This is required to support beta versions of macOS Big Sur that
124
107
// report 10.16 at run time.
125
- llvm::VersionTuple getRuntimeVersion () const { return RuntimeVersion; }
108
+ llvm::VersionTuple getRuntimeVersion () const ;
126
109
127
110
SourceRange getSourceRange () const ;
128
111
0 commit comments