[libc-commits] [libc] 808b7d2 - [libc][NFC] rename LONG_DOUBLE_IS_DOUBLE into LIBC_LONG_DOUBLE_IS_FLOAT64 (#73948)

via libc-commits libc-commits at lists.llvm.org
Fri Dec 1 04:55:38 PST 2023


Author: Guillaume Chatelet
Date: 2023-12-01T13:55:31+01:00
New Revision: 808b7d220309e279cf9c3d5762cb4c9120c0955f

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

LOG: [libc][NFC] rename LONG_DOUBLE_IS_DOUBLE into LIBC_LONG_DOUBLE_IS_FLOAT64 (#73948)

Added: 
    

Modified: 
    libc/src/__support/FPUtil/generic/sqrt.h
    libc/src/__support/FPUtil/x86_64/sqrt.h
    libc/src/__support/float_to_string.h
    libc/src/__support/macros/properties/float.h
    libc/src/__support/str_to_float.h
    libc/test/src/__support/FPUtil/fpbits_test.cpp
    libc/test/src/__support/str_to_float_test.cpp
    libc/test/src/stdio/sprintf_test.cpp
    libc/test/src/stdio/sscanf_test.cpp
    libc/test/src/stdlib/strtold_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/FPUtil/generic/sqrt.h b/libc/src/__support/FPUtil/generic/sqrt.h
index 63e8329b066074a..9c7e6a2f361c674 100644
--- a/libc/src/__support/FPUtil/generic/sqrt.h
+++ b/libc/src/__support/FPUtil/generic/sqrt.h
@@ -43,7 +43,7 @@ LIBC_INLINE void normalize(int &exponent,
   mantissa <<= shift;
 }
 
-#ifdef LONG_DOUBLE_IS_DOUBLE
+#ifdef LIBC_LONG_DOUBLE_IS_FLOAT64
 template <>
 LIBC_INLINE void normalize<long double>(int &exponent, uint64_t &mantissa) {
   normalize<double>(exponent, mantissa);

diff  --git a/libc/src/__support/FPUtil/x86_64/sqrt.h b/libc/src/__support/FPUtil/x86_64/sqrt.h
index 7edba5528d6a91e..cf3eb9b2f494cdd 100644
--- a/libc/src/__support/FPUtil/x86_64/sqrt.h
+++ b/libc/src/__support/FPUtil/x86_64/sqrt.h
@@ -33,7 +33,7 @@ template <> LIBC_INLINE double sqrt<double>(double x) {
   return result;
 }
 
-#ifdef LONG_DOUBLE_IS_DOUBLE
+#ifdef LIBC_LONG_DOUBLE_IS_FLOAT64
 template <> LIBC_INLINE long double sqrt<long double>(long double x) {
   long double result;
   __asm__ __volatile__("sqrtsd %x1, %x0" : "=x"(result) : "x"(x));

diff  --git a/libc/src/__support/float_to_string.h b/libc/src/__support/float_to_string.h
index eb06cd9c08af287..1bb4e5c5b9246a5 100644
--- a/libc/src/__support/float_to_string.h
+++ b/libc/src/__support/float_to_string.h
@@ -602,7 +602,7 @@ class FloatToString {
   }
 };
 
-#ifndef LONG_DOUBLE_IS_DOUBLE
+#ifndef LIBC_LONG_DOUBLE_IS_FLOAT64
 // --------------------------- LONG DOUBLE FUNCTIONS ---------------------------
 
 template <>
@@ -754,7 +754,7 @@ FloatToString<long double>::get_negative_block(int block_index) {
   }
 }
 
-#endif // LONG_DOUBLE_IS_DOUBLE
+#endif // LIBC_LONG_DOUBLE_IS_FLOAT64
 
 } // namespace LIBC_NAMESPACE
 

diff  --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index 4bafc3777a47146..f1679fe51113694 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -19,11 +19,9 @@
 #include <float.h> // LDBL_MANT_DIG
 
 // 'long double' properties.
-#if (LDBL_MANT_DIG == DBL_MANT_DIG)
-// TODO: Replace with LIBC_LONG_DOUBLE_IS_DOUBLE
-#define LONG_DOUBLE_IS_DOUBLE
-#endif
-#if (LDBL_MANT_DIG == 64)
+#if (LDBL_MANT_DIG == 53)
+#define LIBC_LONG_DOUBLE_IS_FLOAT64
+#elif (LDBL_MANT_DIG == 64)
 // TODO: Replace with LIBC_LONG_DOUBLE_IS_X86_BIN80
 #define SPECIAL_X86_LONG_DOUBLE
 #elif (LDBL_MANT_DIG == 113)

diff  --git a/libc/src/__support/str_to_float.h b/libc/src/__support/str_to_float.h
index 81ab36dbf9471fb..a92325730414262 100644
--- a/libc/src/__support/str_to_float.h
+++ b/libc/src/__support/str_to_float.h
@@ -221,7 +221,7 @@ eisel_lemire(ExpandedFloat<T> init_num,
   return output;
 }
 
-#if !defined(LONG_DOUBLE_IS_DOUBLE)
+#if !defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
 template <>
 LIBC_INLINE cpp::optional<ExpandedFloat<long double>>
 eisel_lemire<long double>(ExpandedFloat<long double> init_num,
@@ -516,7 +516,7 @@ template <> class ClingerConsts<double> {
   static constexpr double MAX_EXACT_INT = 9007199254740991.0;
 };
 
-#if defined(LONG_DOUBLE_IS_DOUBLE)
+#if defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
 template <> class ClingerConsts<long double> {
 public:
   static constexpr long double POWERS_OF_TEN_ARRAY[] = {

diff  --git a/libc/test/src/__support/FPUtil/fpbits_test.cpp b/libc/test/src/__support/FPUtil/fpbits_test.cpp
index 027db8807ab226a..52635cc2af09401 100644
--- a/libc/test/src/__support/FPUtil/fpbits_test.cpp
+++ b/libc/test/src/__support/FPUtil/fpbits_test.cpp
@@ -213,7 +213,7 @@ TEST(LlvmLibcFPBitsTest, X86LongDoubleType) {
 }
 #else
 TEST(LlvmLibcFPBitsTest, LongDoubleType) {
-#if defined(LONG_DOUBLE_IS_DOUBLE)
+#if defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   return; // The tests for the "double" type cover for this case.
 #else
   using LongDoubleBits = FPBits<long double>;

diff  --git a/libc/test/src/__support/str_to_float_test.cpp b/libc/test/src/__support/str_to_float_test.cpp
index ae729418ebe3639..c2643d9a764ee63 100644
--- a/libc/test/src/__support/str_to_float_test.cpp
+++ b/libc/test/src/__support/str_to_float_test.cpp
@@ -279,7 +279,7 @@ TEST(LlvmLibcStrToFloatTest, SimpleDecimalConversionExtraTypes) {
   EXPECT_EQ(double_result.error, 0);
 }
 
-#if defined(LONG_DOUBLE_IS_DOUBLE)
+#if defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
 TEST_F(LlvmLibcStrToFloatTest, EiselLemireFloat64AsLongDouble) {
   eisel_lemire_test<long double>(123, 0, 0x1EC00000000000, 1029);
 }

diff  --git a/libc/test/src/stdio/sprintf_test.cpp b/libc/test/src/stdio/sprintf_test.cpp
index e41579a20656b72..e2265f5efbc465c 100644
--- a/libc/test/src/stdio/sprintf_test.cpp
+++ b/libc/test/src/stdio/sprintf_test.cpp
@@ -644,7 +644,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatHexExpConv) {
   written = LIBC_NAMESPACE::sprintf(buff, "%La", 0.1L);
 #if defined(SPECIAL_X86_LONG_DOUBLE)
   ASSERT_STREQ_LEN(written, buff, "0xc.ccccccccccccccdp-7");
-#elif defined(LONG_DOUBLE_IS_DOUBLE)
+#elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   ASSERT_STREQ_LEN(written, buff, "0x1.999999999999ap-4");
 #else // 128 bit long double
   ASSERT_STREQ_LEN(written, buff, "0x1.999999999999999999999999999ap-4");
@@ -653,7 +653,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatHexExpConv) {
   written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e1000L);
 #if defined(SPECIAL_X86_LONG_DOUBLE)
   ASSERT_STREQ_LEN(written, buff, "0xf.38db1f9dd3dac05p+3318");
-#elif defined(LONG_DOUBLE_IS_DOUBLE)
+#elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   ASSERT_STREQ_LEN(written, buff, "inf");
 #else // 128 bit long double
   ASSERT_STREQ_LEN(written, buff, "0x1.e71b63f3ba7b580af1a52d2a7379p+3321");
@@ -662,7 +662,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatHexExpConv) {
   written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e-1000L);
 #if defined(SPECIAL_X86_LONG_DOUBLE)
   ASSERT_STREQ_LEN(written, buff, "0x8.68a9188a89e1467p-3325");
-#elif defined(LONG_DOUBLE_IS_DOUBLE)
+#elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   ASSERT_STREQ_LEN(written, buff, "0x0p+0");
 #else // 128 bit long double
   ASSERT_STREQ_LEN(written, buff, "0x1.0d152311513c28ce202627c06ec2p-3322");
@@ -768,7 +768,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatHexExpConv) {
   written = LIBC_NAMESPACE::sprintf(buff, "%.1La", 0.1L);
 #if defined(SPECIAL_X86_LONG_DOUBLE)
   ASSERT_STREQ_LEN(written, buff, "0xc.dp-7");
-#elif defined(LONG_DOUBLE_IS_DOUBLE)
+#elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
 #else // 128 bit long double
   ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
@@ -777,7 +777,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatHexExpConv) {
   written = LIBC_NAMESPACE::sprintf(buff, "%.1La", 0xf.fffffffffffffffp16380L);
 #if defined(SPECIAL_X86_LONG_DOUBLE)
   ASSERT_STREQ_LEN(written, buff, "0x1.0p+16384");
-#elif defined(LONG_DOUBLE_IS_DOUBLE)
+#elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   ASSERT_STREQ_LEN(written, buff, "inf");
 #else // 128 bit long double
   ASSERT_STREQ_LEN(written, buff, "0x2.0p+16383");
@@ -1024,14 +1024,14 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
 
 // Some float128 systems (specifically the ones used for aarch64 buildbots)
 // don't respect signs for long double NaNs.
-#if defined(SPECIAL_X86_LONG_DOUBLE) || defined(LONG_DOUBLE_IS_DOUBLE)
+#if defined(SPECIAL_X86_LONG_DOUBLE) || defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   written = LIBC_NAMESPACE::sprintf(buff, "%LF", -ld_nan);
   ASSERT_STREQ_LEN(written, buff, "-NAN");
 #endif
 
   // Length Modifier Tests.
 
-  // TODO(michaelrj): Add tests for LONG_DOUBLE_IS_DOUBLE and 128 bit long
+  // TODO(michaelrj): Add tests for LIBC_LONG_DOUBLE_IS_FLOAT64 and 128 bit long
   // double systems.
   // TODO(michaelrj): Fix the tests to only depend on the digits the long double
   // is accurate for.
@@ -1333,7 +1333,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 0.1L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xc.ccccccccccccccdp-7");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x1.999999999999ap-4");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.999999999999999999999999999ap-4");
@@ -1342,7 +1342,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e1000L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xf.38db1f9dd3dac05p+3318");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "inf");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.e71b63f3ba7b580af1a52d2a7379p+3321");
@@ -1351,7 +1351,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e-1000L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0x8.68a9188a89e1467p-3325");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x0p+0");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.0d152311513c28ce202627c06ec2p-3322");
@@ -1550,7 +1550,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%.1La", 0.1L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xc.dp-7");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
@@ -1559,7 +1559,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%.1La",
   0xf.fffffffffffffffp16380L); #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0x1.0p+16384");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "inf");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x2.0p+16383");
@@ -1977,7 +1977,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatExponentConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 0.1L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xc.ccccccccccccccdp-7");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x1.999999999999ap-4");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.999999999999999999999999999ap-4");
@@ -1986,7 +1986,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatExponentConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e1000L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xf.38db1f9dd3dac05p+3318");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "inf");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.e71b63f3ba7b580af1a52d2a7379p+3321");
@@ -1995,7 +1995,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatExponentConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e-1000L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0x8.68a9188a89e1467p-3325");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x0p+0");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.0d152311513c28ce202627c06ec2p-3322");
@@ -2173,7 +2173,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatExponentConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%.1La", 0.1L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xc.dp-7");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
@@ -2182,7 +2182,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatExponentConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%.1La",
   0xf.fffffffffffffffp16380L); #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0x1.0p+16384");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "inf");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x2.0p+16383");
@@ -2616,7 +2616,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatAutoConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 0.1L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xc.ccccccccccccccdp-7");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x1.999999999999ap-4");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.999999999999999999999999999ap-4");
@@ -2625,7 +2625,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatAutoConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e1000L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xf.38db1f9dd3dac05p+3318");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "inf");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.e71b63f3ba7b580af1a52d2a7379p+3321");
@@ -2634,7 +2634,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatAutoConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%La", 1.0e-1000L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0x8.68a9188a89e1467p-3325");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x0p+0");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.0d152311513c28ce202627c06ec2p-3322");
@@ -2822,7 +2822,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatAutoConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%.1La", 0.1L);
   #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0xc.dp-7");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x1.ap-4");
@@ -2831,7 +2831,7 @@ TEST_F(LlvmLibcSPrintfTest, FloatAutoConv) {
     written = LIBC_NAMESPACE::sprintf(buff, "%.1La",
   0xf.fffffffffffffffp16380L); #if defined(SPECIAL_X86_LONG_DOUBLE)
     ASSERT_STREQ_LEN(written, buff, "0x1.0p+16384");
-  #elif defined(LONG_DOUBLE_IS_DOUBLE)
+  #elif defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
     ASSERT_STREQ_LEN(written, buff, "inf");
   #else // 128 bit long double
     ASSERT_STREQ_LEN(written, buff, "0x2.0p+16383");

diff  --git a/libc/test/src/stdio/sscanf_test.cpp b/libc/test/src/stdio/sscanf_test.cpp
index ec53c08bd9d41bf..db3c48cdbf7a2d5 100644
--- a/libc/test/src/stdio/sscanf_test.cpp
+++ b/libc/test/src/stdio/sscanf_test.cpp
@@ -322,7 +322,7 @@ TEST(LlvmLibcSScanfTest, FloatConvLengthModifier) {
   EXPECT_EQ(ret_val, 1);
 // 1e600 may be larger than the maximum long double (if long double is double).
 // In that case both of these should be evaluated as inf.
-#ifdef LONG_DOUBLE_IS_DOUBLE
+#ifdef LIBC_LONG_DOUBLE_IS_FLOAT64
   EXPECT_FP_EQ(ld_result, d_inf);
 #else
   EXPECT_FP_EQ(ld_result, 1.0e600L);

diff  --git a/libc/test/src/stdlib/strtold_test.cpp b/libc/test/src/stdlib/strtold_test.cpp
index 680a93188c76d1d..1ddf729689ff6c1 100644
--- a/libc/test/src/stdlib/strtold_test.cpp
+++ b/libc/test/src/stdlib/strtold_test.cpp
@@ -16,7 +16,7 @@
 #include <limits.h>
 #include <stddef.h>
 
-#if defined(LONG_DOUBLE_IS_DOUBLE)
+#if defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
 #define SELECT_CONST(val, _, __) val
 #elif defined(SPECIAL_X86_LONG_DOUBLE)
 #define SELECT_CONST(_, val, __) val
@@ -26,7 +26,7 @@
 
 class LlvmLibcStrToLDTest : public LIBC_NAMESPACE::testing::Test {
 public:
-#if defined(LONG_DOUBLE_IS_DOUBLE)
+#if defined(LIBC_LONG_DOUBLE_IS_FLOAT64)
   void run_test(const char *inputString, const ptr
diff _t expectedStrLen,
                 const uint64_t expectedRawData, const int expectedErrno = 0)
 #else


        


More information about the libc-commits mailing list