Skip to content

Commit ceba366

Browse files
authored
Merge pull request #13305 from Dante-Broggi/master
2 parents b9f6405 + f360cc8 commit ceba366

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,9 @@ extension ${Self} : _ExpressibleByBuiltinIntegerLiteral, ExpressibleByIntegerLit
13541354
}
13551355
}
13561356

1357+
% if bits != 80:
13571358
#if !os(Windows) && (arch(i386) || arch(x86_64))
1359+
% end
13581360

13591361
% builtinFloatLiteralBits = 80
13601362
extension ${Self} : _ExpressibleByBuiltinFloatLiteral {
@@ -1373,6 +1375,7 @@ extension ${Self} : _ExpressibleByBuiltinFloatLiteral {
13731375
}
13741376
}
13751377

1378+
% if bits != 80:
13761379
#else
13771380

13781381
% builtinFloatLiteralBits = 64
@@ -1393,6 +1396,7 @@ extension ${Self} : _ExpressibleByBuiltinFloatLiteral {
13931396
}
13941397

13951398
#endif
1399+
% end
13961400

13971401
extension ${Self} : Hashable {
13981402
/// The number's hash value.
@@ -1519,7 +1523,7 @@ extension ${Self} {
15191523
% srcBits = src_type.bits
15201524
% That = src_type.stdlib_name
15211525

1522-
% if srcBits == 80:
1526+
% if (srcBits == 80) and (bits != 80):
15231527
#if !os(Windows) && (arch(i386) || arch(x86_64))
15241528
% end
15251529

@@ -1584,7 +1588,7 @@ extension ${Self} {
15841588
}
15851589
}
15861590

1587-
% if srcBits == 80:
1591+
% if (srcBits == 80) and (bits != 80):
15881592
#endif
15891593
% end
15901594
% end
@@ -1721,6 +1725,20 @@ extension ${Self} {
17211725
}
17221726

17231727
% if bits == 80:
1728+
#else
1729+
1730+
${SelfDocComment}
1731+
@_fixed_layout
1732+
@available(*, unavailable, message: "Float80 is only available on non-Windows x86 targets.")
1733+
public struct ${Self} {
1734+
/// Creates a value initialized to zero.
1735+
@_inlineable // FIXME(sil-serialize-all)
1736+
@_transparent
1737+
public init() {
1738+
fatalError("${Self} is not available")
1739+
}
1740+
}
1741+
17241742
#endif
17251743
% end
17261744
% end # for bits in all_floating_point_types

0 commit comments

Comments
 (0)