Skip to content

Commit 65bf2d0

Browse files
authored
Merge pull request #75646 from tshortli/zippered-os-version-at-least-or-variant-at-least
stdlib: Add runtime support for zippered availability checks
2 parents 3306ce6 + 41fad31 commit 65bf2d0

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

stdlib/public/core/Availability.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@ public func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(
109109
_ variantMinor: Builtin.Word,
110110
_ variantPatch: Builtin.Word
111111
) -> Builtin.Int1 {
112-
return _stdlib_isOSVersionAtLeast(major, minor, patch)
113-
114-
// FIXME: Enable when __isPlatformOrVariantPlatformVersionAtLeast() support
115-
// is added to compiler-rt.
116-
#if false
117112
if Int(major) == 9999 {
118113
return true._value
119114
}
@@ -136,7 +131,6 @@ public func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(
136131
variantMajor32._value, variantMinor32._value, variantPatch32._value))
137132

138133
return (result32 != (0 as UInt32))._value
139-
#endif
140134
}
141135
#endif
142136

test/SIL/availability_query_maccatalyst_zippered_inlined.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: rm %t/Library.swiftmodule
1010
// RUN: %target-swift-frontend -emit-sil %t/main.swift -target %target-cpu-apple-macosx13 -target-variant %target-cpu-apple-ios16-macabi -I %t | %FileCheck %t/main.swift
1111

12-
// REQUIRES: maccatalyst_support
12+
// REQUIRES: OS=macosx || OS=maccatalyst
1313

1414
//--- Library.swift
1515

0 commit comments

Comments
 (0)