diff --git a/libcxx/include/math.h b/libcxx/include/math.h --- a/libcxx/include/math.h +++ b/libcxx/include/math.h @@ -313,18 +313,12 @@ // signbit # ifdef signbit - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_signbit(_A1 __x) _NOEXCEPT { - return __builtin_signbit(__x); -} - # undef signbit template inline _LIBCPP_HIDE_FROM_ABI typename std::enable_if::value, bool>::type signbit(_A1 __x) _NOEXCEPT { - return __libcpp_signbit(__x); + return __builtin_signbit(__x); } template @@ -368,18 +362,12 @@ // fpclassify # ifdef fpclassify - -template -_LIBCPP_HIDE_FROM_ABI int __libcpp_fpclassify(_A1 __x) _NOEXCEPT { - return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); -} - # undef fpclassify template inline _LIBCPP_HIDE_FROM_ABI typename std::enable_if::value, int>::type fpclassify(_A1 __x) _NOEXCEPT { - return __libcpp_fpclassify(__x); + return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); } template @@ -407,19 +395,13 @@ // isfinite # ifdef isfinite - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isfinite(_A1 __x) _NOEXCEPT { - return __builtin_isfinite(__x); -} - # undef isfinite template inline _LIBCPP_HIDE_FROM_ABI typename std::enable_if< std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity, bool>::type isfinite(_A1 __x) _NOEXCEPT { - return __libcpp_isfinite((typename std::__promote<_A1>::type)__x); + return __builtin_isfinite((typename std::__promote<_A1>::type)__x); } template @@ -434,19 +416,13 @@ // isinf # ifdef isinf - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isinf(_A1 __x) _NOEXCEPT { - return __builtin_isinf(__x); -} - # undef isinf template inline _LIBCPP_HIDE_FROM_ABI typename std::enable_if< std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity, bool>::type isinf(_A1 __x) _NOEXCEPT { - return __libcpp_isinf((typename std::__promote<_A1>::type)__x); + return __builtin_isinf((typename std::__promote<_A1>::type)__x); } template @@ -457,11 +433,11 @@ } # ifdef _LIBCPP_PREFERRED_OVERLOAD -inline _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT { return __libcpp_isinf(__x); } +inline _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT { return __builtin_isinf(__x); } -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isinf(double __x) _NOEXCEPT { return __libcpp_isinf(__x); } +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isinf(double __x) _NOEXCEPT { return __builtin_isinf(__x); } -inline _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT { return __libcpp_isinf(__x); } +inline _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT { return __builtin_isinf(__x); } # endif # endif // isinf @@ -469,18 +445,12 @@ // isnan # ifdef isnan - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isnan(_A1 __x) _NOEXCEPT { - return __builtin_isnan(__x); -} - # undef isnan template inline _LIBCPP_HIDE_FROM_ABI typename std::enable_if::value, bool>::type isnan(_A1 __x) _NOEXCEPT { - return __libcpp_isnan(__x); + return __builtin_isnan(__x); } template @@ -489,11 +459,11 @@ } # ifdef _LIBCPP_PREFERRED_OVERLOAD -inline _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT { return __libcpp_isnan(__x); } +inline _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT { return __builtin_isnan(__x); } -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isnan(double __x) _NOEXCEPT { return __libcpp_isnan(__x); } +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isnan(double __x) _NOEXCEPT { return __builtin_isnan(__x); } -inline _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT { return __libcpp_isnan(__x); } +inline _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT { return __builtin_isnan(__x); } # endif # endif // isnan @@ -501,18 +471,12 @@ // isnormal # ifdef isnormal - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isnormal(_A1 __x) _NOEXCEPT { - return __builtin_isnormal(__x); -} - # undef isnormal template inline _LIBCPP_HIDE_FROM_ABI typename std::enable_if::value, bool>::type isnormal(_A1 __x) _NOEXCEPT { - return __libcpp_isnormal(__x); + return __builtin_isnormal(__x); } template @@ -526,12 +490,6 @@ // isgreater # ifdef isgreater - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isgreater(_A1 __x, _A2 __y) _NOEXCEPT { - return isgreater(__x, __y); -} - # undef isgreater template @@ -539,7 +497,7 @@ typename std::enable_if< std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, bool >::type isgreater(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename std::__promote<_A1, _A2>::type type; - return __libcpp_isgreater((type)__x, (type)__y); + return __builtin_isgreater((type)__x, (type)__y); } # endif // isgreater @@ -547,12 +505,6 @@ // isgreaterequal # ifdef isgreaterequal - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT { - return isgreaterequal(__x, __y); -} - # undef isgreaterequal template @@ -560,7 +512,7 @@ typename std::enable_if< std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, bool >::type isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename std::__promote<_A1, _A2>::type type; - return __libcpp_isgreaterequal((type)__x, (type)__y); + return __builtin_isgreaterequal((type)__x, (type)__y); } # endif // isgreaterequal @@ -568,12 +520,6 @@ // isless # ifdef isless - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isless(_A1 __x, _A2 __y) _NOEXCEPT { - return isless(__x, __y); -} - # undef isless template @@ -581,7 +527,7 @@ typename std::enable_if< std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, bool >::type isless(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename std::__promote<_A1, _A2>::type type; - return __libcpp_isless((type)__x, (type)__y); + return __builtin_isless((type)__x, (type)__y); } # endif // isless @@ -589,12 +535,6 @@ // islessequal # ifdef islessequal - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_islessequal(_A1 __x, _A2 __y) _NOEXCEPT { - return islessequal(__x, __y); -} - # undef islessequal template @@ -602,7 +542,7 @@ typename std::enable_if< std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, bool >::type islessequal(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename std::__promote<_A1, _A2>::type type; - return __libcpp_islessequal((type)__x, (type)__y); + return __builtin_islessequal((type)__x, (type)__y); } # endif // islessequal @@ -610,12 +550,6 @@ // islessgreater # ifdef islessgreater - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_islessgreater(_A1 __x, _A2 __y) _NOEXCEPT { - return islessgreater(__x, __y); -} - # undef islessgreater template @@ -623,7 +557,7 @@ typename std::enable_if< std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, bool >::type islessgreater(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename std::__promote<_A1, _A2>::type type; - return __libcpp_islessgreater((type)__x, (type)__y); + return __builtin_islessgreater((type)__x, (type)__y); } # endif // islessgreater @@ -631,12 +565,6 @@ // isunordered # ifdef isunordered - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isunordered(_A1 __x, _A2 __y) _NOEXCEPT { - return isunordered(__x, __y); -} - # undef isunordered template @@ -644,7 +572,7 @@ typename std::enable_if< std::is_arithmetic<_A1>::value && std::is_arithmetic<_A2>::value, bool >::type isunordered(_A1 __x, _A2 __y) _NOEXCEPT { typedef typename std::__promote<_A1, _A2>::type type; - return __libcpp_isunordered((type)__x, (type)__y); + return __builtin_isunordered((type)__x, (type)__y); } # endif // isunordered