diff --git a/libcxx/include/math.h b/libcxx/include/math.h --- a/libcxx/include/math.h +++ b/libcxx/include/math.h @@ -315,18 +315,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 @@ -370,18 +364,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 @@ -409,19 +397,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 @@ -436,19 +418,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 @@ -459,11 +435,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 @@ -471,18 +447,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 @@ -491,11 +461,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 @@ -503,18 +473,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 @@ -528,12 +492,6 @@ // isgreater # ifdef isgreater - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isgreater(_A1 __x, _A2 __y) _NOEXCEPT { - return isgreater(__x, __y); -} - # undef isgreater template @@ -541,7 +499,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 @@ -549,12 +507,6 @@ // isgreaterequal # ifdef isgreaterequal - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isgreaterequal(_A1 __x, _A2 __y) _NOEXCEPT { - return isgreaterequal(__x, __y); -} - # undef isgreaterequal template @@ -562,7 +514,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 @@ -570,12 +522,6 @@ // isless # ifdef isless - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isless(_A1 __x, _A2 __y) _NOEXCEPT { - return isless(__x, __y); -} - # undef isless template @@ -583,7 +529,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 @@ -591,12 +537,6 @@ // islessequal # ifdef islessequal - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_islessequal(_A1 __x, _A2 __y) _NOEXCEPT { - return islessequal(__x, __y); -} - # undef islessequal template @@ -604,7 +544,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 @@ -612,12 +552,6 @@ // islessgreater # ifdef islessgreater - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_islessgreater(_A1 __x, _A2 __y) _NOEXCEPT { - return islessgreater(__x, __y); -} - # undef islessgreater template @@ -625,7 +559,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 @@ -633,12 +567,6 @@ // isunordered # ifdef isunordered - -template -_LIBCPP_HIDE_FROM_ABI bool __libcpp_isunordered(_A1 __x, _A2 __y) _NOEXCEPT { - return isunordered(__x, __y); -} - # undef isunordered template @@ -646,7 +574,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