Skip to content

Commit 89b5215

Browse files
Merge pull request #71864 from ian-twilightcoder/builtin-float-overlay-magic
[overlay] magic-symbols-for-install-name conflicts with @_originallyDefinedIn
2 parents 7ff06a7 + be413e9 commit 89b5215

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

stdlib/public/ClangOverlays/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ add_swift_target_library(swift_Builtin_float
22
${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
33
IS_SDK_OVERLAY
44

5-
"${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"
6-
75
GYB_SOURCES
86
float.swift.gyb
97

stdlib/public/ClangOverlays/float.swift.gyb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +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)
1618
public let FLT_RADIX = Double.radix
1719

1820
%for type, prefix in [('Float', 'FLT'), ('Double', 'DBL'), ('Float80', 'LDBL')]:
@@ -22,7 +24,7 @@ public let FLT_RADIX = Double.radix
2224
// Where does the 1 come from? C counts the usually-implicit leading
2325
// significand bit, but Swift does not. Neither is really right or wrong.
2426
@available(swift, deprecated: 3.0, message: "Please use '${type}.significandBitCount + 1'.")
25-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
27+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
2628
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
2729
public let ${prefix}_MANT_DIG = ${type}.significandBitCount + 1
2830

@@ -31,32 +33,32 @@ public let ${prefix}_MANT_DIG = ${type}.significandBitCount + 1
3133
// significand to be in [1, 2). This rationale applies to ${prefix}_MIN_EXP
3234
// as well.
3335
@available(swift, deprecated: 3.0, message: "Please use '${type}.greatestFiniteMagnitude.exponent + 1'.")
34-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
36+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
3537
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
3638
public let ${prefix}_MAX_EXP = ${type}.greatestFiniteMagnitude.exponent + 1
3739

3840
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNormalMagnitude.exponent + 1'.")
39-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
41+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
4042
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
4143
public let ${prefix}_MIN_EXP = ${type}.leastNormalMagnitude.exponent + 1
4244

4345
@available(swift, deprecated: 3.0, message: "Please use '${type}.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.")
44-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
46+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
4547
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
4648
public let ${prefix}_MAX = ${type}.greatestFiniteMagnitude
4749

4850
@available(swift, deprecated: 3.0, message: "Please use '${type}.ulpOfOne' or '.ulpOfOne'.")
49-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
51+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
5052
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
5153
public let ${prefix}_EPSILON = ${type}.ulpOfOne
5254

5355
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNormalMagnitude' or '.leastNormalMagnitude'.")
54-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
56+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
5557
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
5658
public let ${prefix}_MIN = ${type}.leastNormalMagnitude
5759

5860
@available(swift, deprecated: 3.0, message: "Please use '${type}.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.")
59-
@available(macOS 10.9, iOS 7.0, tvOS 7.0, watchOS 2.0, *)
61+
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
6062
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
6163
public let ${prefix}_TRUE_MIN = ${type}.leastNonzeroMagnitude
6264

0 commit comments

Comments
 (0)