Skip to content

Commit 84ee0af

Browse files
committed
CLongDouble should map to Float128 (which is yet supported) on arm64, and trivial copy ctor is yet available even on 14
1 parent 7bbafc5 commit 84ee0af

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

include/swift/AST/AutoDiff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ class DerivativeFunctionTypeError
422422
Kind kind;
423423

424424
/// The type and index of a differentiability parameter or result.
425-
/// std::pair does not have a trivial copy constructor on FreeBSD <= 14 for
425+
/// std::pair does not have a trivial copy constructor on FreeBSD for
426426
/// ABI reasons, so we have to define our own type here instead
427427
struct TypeAndIndex {
428428
Type first;

include/swift/SILOptimizer/Differentiation/DifferentiationInvoker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct DifferentiationInvoker {
7171

7272
/// The parent `apply` instruction and the witness associated with the
7373
/// `IndirectDifferentiation` case.
74-
/// Note: This used to be a std::pair, but on FreeBSD <= 14, libc++ is
74+
/// Note: This used to be a std::pair, but on FreeBSD, libc++ is
7575
/// configured with _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
7676
/// and hence does not have a trivial copy constructor
7777
struct IndirectDifferentiation {

stdlib/public/core/CTypes.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,10 @@ public typealias CLongDouble = Double
114114
#error("CLongDouble needs to be defined for this OpenBSD architecture")
115115
#endif
116116
#elseif os(FreeBSD)
117+
// On FreeBSD, long double is Float128 for arm64, which we don't have yet in
118+
// Swift
117119
#if arch(x86_64) || arch(i386)
118120
public typealias CLongDouble = Float80
119-
#elseif arch(arm64)
120-
public typealias CLongDouble = Double
121-
#else
122-
#error("CLongDouble needs to be defined for this FreeBSD architecture")
123121
#endif
124122
#elseif $Embedded
125123
#if arch(x86_64) || arch(i386)

0 commit comments

Comments
 (0)