[libc-commits] [libc] 44582c9 - [libc] Fix DyadicFloat::generic_as() requiring LIBC_TYPES_HAS_FLOAT16 (#147811)

via libc-commits libc-commits at lists.llvm.org
Wed Jul 9 12:47:17 PDT 2025


Author: OverMighty
Date: 2025-07-09T21:47:14+02:00
New Revision: 44582c9f088c17f75d0b728e4b410e661b608359

URL: https://github.com/llvm/llvm-project/commit/44582c9f088c17f75d0b728e4b410e661b608359
DIFF: https://github.com/llvm/llvm-project/commit/44582c9f088c17f75d0b728e4b410e661b608359.diff

LOG: [libc] Fix DyadicFloat::generic_as() requiring LIBC_TYPES_HAS_FLOAT16 (#147811)

See https://lab.llvm.org/buildbot/#/builders/215/builds/710.

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 85355b78d35b8..3464e4aa9423f 100644
--- a/libc/src/__support/FPUtil/dyadic_float.h
+++ b/libc/src/__support/FPUtil/dyadic_float.h
@@ -170,7 +170,6 @@ template <size_t Bits> struct DyadicFloat {
     return DyadicFloat(result_sign, result_exponent, result_mantissa);
   }
 
-#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>
@@ -277,7 +276,6 @@ 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