diff options
Diffstat (limited to 'include/llvm-libc-macros/math-macros.h')
-rw-r--r-- | include/llvm-libc-macros/math-macros.h | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/include/llvm-libc-macros/math-macros.h b/include/llvm-libc-macros/math-macros.h index 6046ea98cb8a..47838969d59a 100644 --- a/include/llvm-libc-macros/math-macros.h +++ b/include/llvm-libc-macros/math-macros.h @@ -9,11 +9,6 @@ #ifndef LLVM_LIBC_MACROS_MATH_MACROS_H #define LLVM_LIBC_MACROS_MATH_MACROS_H -// TODO: Remove this. This is a temporary fix for a downstream problem. -// This cannot be left permanently since it would require downstream users to -// define this macro. -#ifdef LIBC_FULL_BUILD - #include "limits-macros.h" #define FP_NAN 0 @@ -56,38 +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). - -#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 - +// TODO: Move generic functional math macros to a separate header file. #define isfinite(x) __builtin_isfinite(x) #define isinf(x) __builtin_isinf(x) #define isnan(x) __builtin_isnan(x) -#endif - -#else // LIBC_FULL_BUILD - -#include <math.h> - -#endif // LIBC_FULL_BUILD - #endif // LLVM_LIBC_MACROS_MATH_MACROS_H |