[libc-commits] [libc] 6267f12 - [libc] Fix missing LIBC_TYPES_HAS_FLOAT16 guard around DyadicFloat::generic_as() (#109697)
via libc-commits
libc-commits at lists.llvm.org
Mon Sep 23 11:01:57 PDT 2024
Author: OverMighty
Date: 2024-09-23T20:01:53+02:00
New Revision: 6267f121f510859f8722c34a4a8c75e4d93b0300
URL: https://github.com/llvm/llvm-project/commit/6267f121f510859f8722c34a4a8c75e4d93b0300
DIFF: https://github.com/llvm/llvm-project/commit/6267f121f510859f8722c34a4a8c75e4d93b0300.diff
LOG: [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.
Added:
Modified:
libc/src/__support/FPUtil/dyadic_float.h
Removed:
################################################################################
diff --git a/libc/src/__support/FPUtil/dyadic_float.h b/libc/src/__support/FPUtil/dyadic_float.h
index f2de70f344607a..165ffc7c922025 100644
--- a/libc/src/__support/FPUtil/dyadic_float.h
+++ b/libc/src/__support/FPUtil/dyadic_float.h
@@ -101,6 +101,7 @@ template <size_t Bits> struct DyadicFloat {
return exponent + (Bits - 1);
}
+#ifdef LIBC_TYPES_HAS_FLOAT16
template <typename T, bool ShouldSignalExceptions>
LIBC_INLINE constexpr cpp::enable_if_t<
cpp::is_floating_point_v<T> && (FPBits<T>::FRACTION_LEN < Bits), T>
@@ -207,6 +208,7 @@ template <size_t Bits> struct DyadicFloat {
return FPBits(result).get_val();
}
+#endif // LIBC_TYPES_HAS_FLOAT16
template <typename T, bool ShouldSignalExceptions,
typename = cpp::enable_if_t<cpp::is_floating_point_v<T> &&
More information about the libc-commits
mailing list