Skip to content

Commit 6267f12

Browse files
authored
[libc] Fix missing LIBC_TYPES_HAS_FLOAT16 guard around DyadicFloat::generic_as() (#109697)
See Buildbot failure: https://lab.llvm.org/buildbot/#/builders/93/builds/6872.
1 parent 3db0f8c commit 6267f12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libc/src/__support/FPUtil/dyadic_float.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ template <size_t Bits> struct DyadicFloat {
101101
return exponent + (Bits - 1);
102102
}
103103

104+
#ifdef LIBC_TYPES_HAS_FLOAT16
104105
template <typename T, bool ShouldSignalExceptions>
105106
LIBC_INLINE constexpr cpp::enable_if_t<
106107
cpp::is_floating_point_v<T> && (FPBits<T>::FRACTION_LEN < Bits), T>
@@ -207,6 +208,7 @@ template <size_t Bits> struct DyadicFloat {
207208

208209
return FPBits(result).get_val();
209210
}
211+
#endif // LIBC_TYPES_HAS_FLOAT16
210212

211213
template <typename T, bool ShouldSignalExceptions,
212214
typename = cpp::enable_if_t<cpp::is_floating_point_v<T> &&

0 commit comments

Comments
 (0)