[libc-commits] [libc] d02c85a - [libc] Fix frexpf128 build failure. (#148332)

via libc-commits libc-commits at lists.llvm.org
Fri Jul 11 20:55:12 PDT 2025


Author: Muhammad Bassiouni
Date: 2025-07-11T23:55:09-04:00
New Revision: d02c85a29b12d10045a28d050e7f3a26fb4e5687

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

LOG: [libc] Fix frexpf128 build failure. (#148332)

Added: 
    

Modified: 
    libc/shared/math/frexpf128.h
    libc/src/__support/FPUtil/ManipulationFunctions.h

Removed: 
    


################################################################################
diff  --git a/libc/shared/math/frexpf128.h b/libc/shared/math/frexpf128.h
index 14554c7cb33a8..6b922bd731295 100644
--- a/libc/shared/math/frexpf128.h
+++ b/libc/shared/math/frexpf128.h
@@ -14,6 +14,7 @@
 #ifdef LIBC_TYPES_HAS_FLOAT128
 
 #include "shared/libc_common.h"
+#include "src/__support/math/frexpf128.h"
 
 namespace LIBC_NAMESPACE_DECL {
 namespace shared {

diff  --git a/libc/src/__support/FPUtil/ManipulationFunctions.h b/libc/src/__support/FPUtil/ManipulationFunctions.h
index 9c10011ccd203..ea9ee5a57c36d 100644
--- a/libc/src/__support/FPUtil/ManipulationFunctions.h
+++ b/libc/src/__support/FPUtil/ManipulationFunctions.h
@@ -29,7 +29,7 @@ namespace LIBC_NAMESPACE_DECL {
 namespace fputil {
 
 template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
-LIBC_INLINE T frexp(T x, int &exp) {
+LIBC_INLINE constexpr T frexp(T x, int &exp) {
   FPBits<T> bits(x);
   if (bits.is_inf_or_nan()) {
 #ifdef LIBC_FREXP_INF_NAN_EXPONENT


        


More information about the libc-commits mailing list