aboutsummaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorlntue <35648136+lntue@users.noreply.github.com>2024-04-08 19:26:12 -0400
committerGitHub <noreply@github.com>2024-04-08 19:26:12 -0400
commit22b1f1bc695b8fd3263b709ce9761bf3bb2f8ee9 (patch)
tree7417d9dd4cd9c0178643c5175626da507a3f5113 /libc/include
parent79343fa8c3575be12ec4d543f4aebebd1ba4f47f (diff)
downloadllvm-22b1f1bc695b8fd3263b709ce9761bf3bb2f8ee9.zip
llvm-22b1f1bc695b8fd3263b709ce9761bf3bb2f8ee9.tar.gz
llvm-22b1f1bc695b8fd3263b709ce9761bf3bb2f8ee9.tar.bz2
[libc] Remove `#ifdef __cplusplus` part from `include/llvm-libc-macros/math-macros.h`. (#87864)
Now with the proxy header `hdr/math_macros.h`, the header `include/llvm-libc-macros/math-macros.h` will not be included in overlay mode, and the extra definitions for `__cplusplus` mode is not needed any more.
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/llvm-libc-macros/math-macros.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index 1cbd166..4783896 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -51,33 +51,9 @@
#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
#endif
-// These must be type-generic functions. The C standard specifies them as
-// being macros rather than functions, in fact. However, in C++ it's important
-// that there be function declarations that don't interfere with other uses of
-// the identifier, even in places with parentheses where a function-like macro
-// will be expanded (such as a function declaration in a C++ namespace).
-
// TODO: Move generic functional math macros to a separate header file.
-#ifdef __cplusplus
-
-template <typename T> inline constexpr bool isfinite(T x) {
- return __builtin_isfinite(x);
-}
-
-template <typename T> inline constexpr bool isinf(T x) {
- return __builtin_isinf(x);
-}
-
-template <typename T> inline constexpr bool isnan(T x) {
- return __builtin_isnan(x);
-}
-
-#else
-
#define isfinite(x) __builtin_isfinite(x)
#define isinf(x) __builtin_isinf(x)
#define isnan(x) __builtin_isnan(x)
-#endif
-
#endif // LLVM_LIBC_MACROS_MATH_MACROS_H