mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Upstream the necessary changes to compile `if #available` queries correctly when a `macabi` target triple or a `-target-variant` is specified.
34 lines
595 B
Swift
34 lines
595 B
Swift
|
|
|
|
public func isMacOSAfterFarFutureOriOSAfterFarFuture() -> Bool {
|
|
if #available(macOS 10.50, iOS 50.0, *) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
public func isMacOSAfterFarFutureOriOSAfterDistantPast() -> Bool {
|
|
if #available(macOS 10.50, iOS 1.0, *) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
public func isMacOSAfterDistantPastOriOSAfterFarFuture() -> Bool {
|
|
if #available(macOS 1.0, iOS 50.0, *) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
public func isMacOSAfterDistantPastOriOSAfterDistantPast() -> Bool {
|
|
if #available(macOS 1.0, iOS 1.0, *) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|