[libc-commits] [libc] [libc] Guard long double shared math functions against double-double. (PR #188909)
via libc-commits
libc-commits at lists.llvm.org
Thu Mar 26 22:03:33 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: lntue
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/188909.diff
31 Files Affected:
- (modified) libc/shared/math/bf16addl.h (+6)
- (modified) libc/shared/math/bf16divl.h (+6)
- (modified) libc/shared/math/bf16fmal.h (+6)
- (modified) libc/shared/math/bf16mull.h (+6)
- (modified) libc/shared/math/canonicalizel.h (+6)
- (modified) libc/shared/math/ceill.h (+6)
- (modified) libc/shared/math/daddl.h (+6)
- (modified) libc/shared/math/dfmal.h (+6)
- (modified) libc/shared/math/dsqrtl.h (+6)
- (modified) libc/shared/math/f16addl.h (+6)
- (modified) libc/shared/math/f16divl.h (+6)
- (modified) libc/shared/math/f16fmal.h (+6)
- (modified) libc/shared/math/f16mull.h (+6)
- (modified) libc/shared/math/f16sqrtl.h (+6)
- (modified) libc/shared/math/f16subl.h (+6)
- (modified) libc/shared/math/faddl.h (+6)
- (modified) libc/shared/math/fdiml.h (+6)
- (modified) libc/shared/math/ffmal.h (+6)
- (modified) libc/shared/math/floorl.h (+6)
- (modified) libc/shared/math/fmaxl.h (+6)
- (modified) libc/shared/math/fsqrtl.h (+6)
- (modified) libc/shared/math/getpayloadl.h (+6)
- (modified) libc/shared/math/ilogbl.h (+6)
- (modified) libc/shared/math/llogbl.h (+6)
- (modified) libc/shared/math/logbl.h (+6)
- (modified) libc/shared/math/nextafterl.h (+6)
- (modified) libc/shared/math/nextdownl.h (+6)
- (modified) libc/shared/math/nexttowardl.h (+6)
- (modified) libc/shared/math/nextupl.h (+6)
- (modified) libc/shared/math/setpayloadl.h (+6)
- (modified) libc/shared/math/setpayloadsigl.h (+6)
``````````diff
diff --git a/libc/shared/math/bf16addl.h b/libc/shared/math/bf16addl.h
index 66dccde75df38..29856ae583af6 100644
--- a/libc/shared/math/bf16addl.h
+++ b/libc/shared/math/bf16addl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_BF16ADDL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/bf16addl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::bf16addl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_BF16ADDL_H
diff --git a/libc/shared/math/bf16divl.h b/libc/shared/math/bf16divl.h
index f30cfaa012c4f..5d60eef06a762 100644
--- a/libc/shared/math/bf16divl.h
+++ b/libc/shared/math/bf16divl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_BF16DIVL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/bf16divl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::bf16divl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_BF16DIVL_H
diff --git a/libc/shared/math/bf16fmal.h b/libc/shared/math/bf16fmal.h
index 24aacc53c72a8..7bdf6abe89d9d 100644
--- a/libc/shared/math/bf16fmal.h
+++ b/libc/shared/math/bf16fmal.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_BF16FMAL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/bf16fmal.h"
namespace LIBC_NAMESPACE_DECL {
@@ -22,4 +26,6 @@ using math::bf16fmal;
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_BF16FMAL_H
diff --git a/libc/shared/math/bf16mull.h b/libc/shared/math/bf16mull.h
index 44dffff76b600..34b33a6aaae11 100644
--- a/libc/shared/math/bf16mull.h
+++ b/libc/shared/math/bf16mull.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_BF16MULL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/bf16mull.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::bf16mull;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_BF16MULL_H
diff --git a/libc/shared/math/canonicalizel.h b/libc/shared/math/canonicalizel.h
index 66e2ed9053dc2..cc2f0135826b9 100644
--- a/libc/shared/math/canonicalizel.h
+++ b/libc/shared/math/canonicalizel.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_CANONICALIZEL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/canonicalizel.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::canonicalizel;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_CANONICALIZEL_H
diff --git a/libc/shared/math/ceill.h b/libc/shared/math/ceill.h
index 1883dd7d5b479..b90aef5aeb160 100644
--- a/libc/shared/math/ceill.h
+++ b/libc/shared/math/ceill.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_CEILL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/ceill.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::ceill;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_CEILL_H
diff --git a/libc/shared/math/daddl.h b/libc/shared/math/daddl.h
index 4ad4444e06fbe..3ced53fb00812 100644
--- a/libc/shared/math/daddl.h
+++ b/libc/shared/math/daddl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_DADDL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/daddl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::daddl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_DADDL_H
diff --git a/libc/shared/math/dfmal.h b/libc/shared/math/dfmal.h
index 7c68d85e3cb2d..e92dcad25084f 100644
--- a/libc/shared/math/dfmal.h
+++ b/libc/shared/math/dfmal.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_DFMAL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/dfmal.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::dfmal;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_DFMAL_H
diff --git a/libc/shared/math/dsqrtl.h b/libc/shared/math/dsqrtl.h
index bf1d15f3e6549..11952404bdc05 100644
--- a/libc/shared/math/dsqrtl.h
+++ b/libc/shared/math/dsqrtl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_DSQRTL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/dsqrtl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::dsqrtl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_DSQRTL_H
diff --git a/libc/shared/math/f16addl.h b/libc/shared/math/f16addl.h
index 3406b0e65313a..9bcb51d3e752c 100644
--- a/libc/shared/math/f16addl.h
+++ b/libc/shared/math/f16addl.h
@@ -14,6 +14,10 @@
#ifdef LIBC_TYPES_HAS_FLOAT16
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/f16addl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -24,6 +28,8 @@ using math::f16addl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LLVM_LIBC_SHARED_MATH_F16ADDL_H
diff --git a/libc/shared/math/f16divl.h b/libc/shared/math/f16divl.h
index db731f07572c9..316031732dd99 100644
--- a/libc/shared/math/f16divl.h
+++ b/libc/shared/math/f16divl.h
@@ -14,6 +14,10 @@
#ifdef LIBC_TYPES_HAS_FLOAT16
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/f16divl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -24,6 +28,8 @@ using math::f16divl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LLVM_LIBC_SHARED_MATH_F16DIVL_H
diff --git a/libc/shared/math/f16fmal.h b/libc/shared/math/f16fmal.h
index fe6f46707d294..2c55e297c2c97 100644
--- a/libc/shared/math/f16fmal.h
+++ b/libc/shared/math/f16fmal.h
@@ -14,6 +14,10 @@
#ifdef LIBC_TYPES_HAS_FLOAT16
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/f16fmal.h"
namespace LIBC_NAMESPACE_DECL {
@@ -26,6 +30,8 @@ using math::f16fmal;
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LLVM_LIBC_SHARED_MATH_F16FMAL_H
diff --git a/libc/shared/math/f16mull.h b/libc/shared/math/f16mull.h
index 94cd01f0870cb..845885fe62556 100644
--- a/libc/shared/math/f16mull.h
+++ b/libc/shared/math/f16mull.h
@@ -14,6 +14,10 @@
#ifdef LIBC_TYPES_HAS_FLOAT16
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/f16mull.h"
namespace LIBC_NAMESPACE_DECL {
@@ -24,6 +28,8 @@ using math::f16mull;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LLVM_LIBC_SHARED_MATH_F16MULL_H
diff --git a/libc/shared/math/f16sqrtl.h b/libc/shared/math/f16sqrtl.h
index cd3ebf9750e64..6dafb299d0f3c 100644
--- a/libc/shared/math/f16sqrtl.h
+++ b/libc/shared/math/f16sqrtl.h
@@ -14,6 +14,10 @@
#ifdef LIBC_TYPES_HAS_FLOAT16
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/f16sqrtl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -24,5 +28,7 @@ using math::f16sqrtl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LLVM_LIBC_SHARED_MATH_F16SQRTL_H
diff --git a/libc/shared/math/f16subl.h b/libc/shared/math/f16subl.h
index 61ad299ec57e5..c12b2635bc286 100644
--- a/libc/shared/math/f16subl.h
+++ b/libc/shared/math/f16subl.h
@@ -14,6 +14,10 @@
#ifdef LIBC_TYPES_HAS_FLOAT16
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/f16subl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -24,6 +28,8 @@ using math::f16subl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LIBC_TYPES_HAS_FLOAT16
#endif // LLVM_LIBC_SHARED_MATH_F16SUBL_H
diff --git a/libc/shared/math/faddl.h b/libc/shared/math/faddl.h
index 193d2aaa3b9f8..3fe9296d0d1f7 100644
--- a/libc/shared/math/faddl.h
+++ b/libc/shared/math/faddl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_FADDL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/faddl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::faddl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_FADDL_H
diff --git a/libc/shared/math/fdiml.h b/libc/shared/math/fdiml.h
index 32c8e391736b0..20a43f6709a90 100644
--- a/libc/shared/math/fdiml.h
+++ b/libc/shared/math/fdiml.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_FDIML_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/fdiml.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::fdiml;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_FDIML_H
diff --git a/libc/shared/math/ffmal.h b/libc/shared/math/ffmal.h
index 51e20cbed70f5..0092980e9841d 100644
--- a/libc/shared/math/ffmal.h
+++ b/libc/shared/math/ffmal.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_FFMAL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/ffmal.h"
namespace LIBC_NAMESPACE_DECL {
@@ -22,4 +26,6 @@ using math::ffmal;
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_FFMAL_H
diff --git a/libc/shared/math/floorl.h b/libc/shared/math/floorl.h
index 563b971e884a1..e46afc375b55e 100644
--- a/libc/shared/math/floorl.h
+++ b/libc/shared/math/floorl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_FLOORL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/floorl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::floorl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_FLOORL_H
diff --git a/libc/shared/math/fmaxl.h b/libc/shared/math/fmaxl.h
index 74b868d27af1a..373eda5331710 100644
--- a/libc/shared/math/fmaxl.h
+++ b/libc/shared/math/fmaxl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_FMAXL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/fmaxl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::fmaxl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_FMAXL_H
diff --git a/libc/shared/math/fsqrtl.h b/libc/shared/math/fsqrtl.h
index 22044d733e4e7..3b0830aa27479 100644
--- a/libc/shared/math/fsqrtl.h
+++ b/libc/shared/math/fsqrtl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_FSQRTL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/fsqrtl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -21,4 +25,6 @@ using math::fsqrtl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_FSQRTL_H
diff --git a/libc/shared/math/getpayloadl.h b/libc/shared/math/getpayloadl.h
index 9e6451bae4531..9623dc1b6c1c7 100644
--- a/libc/shared/math/getpayloadl.h
+++ b/libc/shared/math/getpayloadl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_GETPAYLOADL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/getpayloadl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::getpayloadl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_GETPAYLOADL_H
diff --git a/libc/shared/math/ilogbl.h b/libc/shared/math/ilogbl.h
index c264f56c3dff2..c640666840fd9 100644
--- a/libc/shared/math/ilogbl.h
+++ b/libc/shared/math/ilogbl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_ILOGBL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/ilogbl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::ilogbl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_ILOGBL_H
diff --git a/libc/shared/math/llogbl.h b/libc/shared/math/llogbl.h
index 3135787e08d2f..b3b3958899a03 100644
--- a/libc/shared/math/llogbl.h
+++ b/libc/shared/math/llogbl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_LLOGBL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/llogbl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::llogbl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_LLOGBL_H
diff --git a/libc/shared/math/logbl.h b/libc/shared/math/logbl.h
index d2bee4afe4e76..471b88d4e4ad1 100644
--- a/libc/shared/math/logbl.h
+++ b/libc/shared/math/logbl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_LOGBL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/logbl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::logbl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_LOGBL_H
diff --git a/libc/shared/math/nextafterl.h b/libc/shared/math/nextafterl.h
index 4de0f1c25c02f..0c9561dcfbf36 100644
--- a/libc/shared/math/nextafterl.h
+++ b/libc/shared/math/nextafterl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_NEXTAFTERL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/nextafterl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::nextafterl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_NEXTAFTERL_H
diff --git a/libc/shared/math/nextdownl.h b/libc/shared/math/nextdownl.h
index f8d0a98e8e944..b420da954493f 100644
--- a/libc/shared/math/nextdownl.h
+++ b/libc/shared/math/nextdownl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_NEXTDOWNL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/nextdownl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::nextdownl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_NEXTDOWNL_H
diff --git a/libc/shared/math/nexttowardl.h b/libc/shared/math/nexttowardl.h
index ebb727f8418a7..2bbcfafdff86f 100644
--- a/libc/shared/math/nexttowardl.h
+++ b/libc/shared/math/nexttowardl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_NEXTTOWARDL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/nexttowardl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::nexttowardl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_NEXTTOWARDL_H
diff --git a/libc/shared/math/nextupl.h b/libc/shared/math/nextupl.h
index 8affa04feecad..15b2d97a7b6b5 100644
--- a/libc/shared/math/nextupl.h
+++ b/libc/shared/math/nextupl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_NEXTUPL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/nextupl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::nextupl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_NEXTUPL_H
diff --git a/libc/shared/math/setpayloadl.h b/libc/shared/math/setpayloadl.h
index d820a8c602cef..3814d67d079d6 100644
--- a/libc/shared/math/setpayloadl.h
+++ b/libc/shared/math/setpayloadl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_SETPAYLOADL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/setpayloadl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::setpayloadl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_SETPAYLOADL_H
diff --git a/libc/shared/math/setpayloadsigl.h b/libc/shared/math/setpayloadsigl.h
index b9e0557a56127..2433cd67af2df 100644
--- a/libc/shared/math/setpayloadsigl.h
+++ b/libc/shared/math/setpayloadsigl.h
@@ -10,6 +10,10 @@
#define LLVM_LIBC_SHARED_MATH_SETPAYLOADSIGL_H
#include "shared/libc_common.h"
+#include "src/__support/macros/properties/types.h"
+
+#ifndef LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#include "src/__support/math/setpayloadsigl.h"
namespace LIBC_NAMESPACE_DECL {
@@ -20,4 +24,6 @@ using math::setpayloadsigl;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+
#endif // LLVM_LIBC_SHARED_MATH_SETPAYLOADSIGL_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/188909
More information about the libc-commits
mailing list