[libc-commits] [libc] [libc] Fix missing LIBC_TYPES_HAS_FLOAT16 guard around DyadicFloat::generic_as() (PR #109697)
via libc-commits
libc-commits at lists.llvm.org
Mon Sep 23 10:56:32 PDT 2024
https://github.com/overmighty created https://github.com/llvm/llvm-project/pull/109697
See Buildbot failure: https://lab.llvm.org/buildbot/#/builders/93/builds/6872.
>From ecea769581176631b9393f32c9a64ebdf1c2750c Mon Sep 17 00:00:00 2001
From: OverMighty <its.overmighty at gmail.com>
Date: Mon, 23 Sep 2024 19:50:03 +0200
Subject: [PATCH] [libc] Fix missing LIBC_TYPES_HAS_FLOAT16 guard around
DyadicFloat::generic_as()
---
libc/src/__support/FPUtil/dyadic_float.h | 2 ++
1 file changed, 2 insertions(+)
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