Skip to content

Commit cd7e4c3

Browse files
authored
Merge pull request #74486 from lorentey/more-9999s
[stdlib] _Builtin_float: More availability adjustments
2 parents 9b53e20 + 5bd05df commit cd7e4c3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

stdlib/public/ClangOverlays/float.swift.gyb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -13,8 +13,8 @@
1313
@_exported import _Builtin_float
1414

1515
@available(swift, deprecated: 3.0, message: "Please use 'T.radix' to get the radix of a FloatingPoint type 'T'.")
16-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
17-
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
16+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
17+
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
1818
public let FLT_RADIX = Double.radix
1919

2020
%for type, prefix in [('Float', 'FLT'), ('Double', 'DBL'), ('Float80', 'LDBL')]:
@@ -24,7 +24,7 @@ public let FLT_RADIX = Double.radix
2424
// Where does the 1 come from? C counts the usually-implicit leading
2525
// significand bit, but Swift does not. Neither is really right or wrong.
2626
@available(swift, deprecated: 3.0, message: "Please use '${type}.significandBitCount + 1'.")
27-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
27+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
2828
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
2929
public let ${prefix}_MANT_DIG = ${type}.significandBitCount + 1
3030

@@ -33,32 +33,32 @@ public let ${prefix}_MANT_DIG = ${type}.significandBitCount + 1
3333
// significand to be in [1, 2). This rationale applies to ${prefix}_MIN_EXP
3434
// as well.
3535
@available(swift, deprecated: 3.0, message: "Please use '${type}.greatestFiniteMagnitude.exponent + 1'.")
36-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
36+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
3737
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
3838
public let ${prefix}_MAX_EXP = ${type}.greatestFiniteMagnitude.exponent + 1
3939

4040
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNormalMagnitude.exponent + 1'.")
41-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
41+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
4242
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
4343
public let ${prefix}_MIN_EXP = ${type}.leastNormalMagnitude.exponent + 1
4444

4545
@available(swift, deprecated: 3.0, message: "Please use '${type}.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.")
46-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
46+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
4747
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
4848
public let ${prefix}_MAX = ${type}.greatestFiniteMagnitude
4949

5050
@available(swift, deprecated: 3.0, message: "Please use '${type}.ulpOfOne' or '.ulpOfOne'.")
51-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
51+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
5252
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
5353
public let ${prefix}_EPSILON = ${type}.ulpOfOne
5454

5555
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNormalMagnitude' or '.leastNormalMagnitude'.")
56-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
56+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
5757
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
5858
public let ${prefix}_MIN = ${type}.leastNormalMagnitude
5959

6060
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.")
61-
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
61+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, visionOS 1.0, *)
6262
@_originallyDefinedIn(module: "Darwin", macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0)
6363
public let ${prefix}_TRUE_MIN = ${type}.leastNonzeroMagnitude
6464

0 commit comments

Comments
 (0)