File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ public func _stdlib_isOSVersionAtLeast(
2525 _ patch: Builtin . Word
2626) -> Builtin . Int1 {
2727#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
28+ if Int ( major) == 9999 {
29+ return true . _value
30+ }
2831 // The call to _swift_stdlib_operatingSystemVersion is used as an indicator
2932 // that this function was called by a compiler optimization pass. If it is
3033 // replaced that pass needs to be updated.
Original file line number Diff line number Diff line change @@ -766,6 +766,9 @@ AvailabilityVersionsTestSuite.test("_stdlib_isOSVersionAtLeast") {
766766 expectFalse(isAtLeastOS(1066, 0, 0))
767767 expectTrue(isAtLeastOS(0, 1066, 0))
768768 expectTrue(isAtLeastOS(0, 0, 1066))
769+
770+ // 9999 is a special version that's always available
771+ expectTrue(isAtLeastOS(9999, 0, 0))
769772#endif
770773}
771774
You can’t perform that action at this time.
0 commit comments