forked from OSchip/llvm-project
[libcxx] use __builtin_isnan in std::isnan.
Summary: This allows std::isnan to be fully inlined, instead of generating calls. Reviewers: EricWF Reviewed By: EricWF Subscribers: christof, ldionne Differential Revision: https://reviews.llvm.org/D69806
This commit is contained in:
parent
3bc71193bd
commit
767eadd782
|
@ -510,7 +510,11 @@ _LIBCPP_INLINE_VISIBILITY
|
|||
bool
|
||||
__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
|
||||
{
|
||||
#if __has_builtin(__builtin_isnan)
|
||||
return __builtin_isnan(__lcpp_x);
|
||||
#else
|
||||
return isnan(__lcpp_x);
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef isnan
|
||||
|
|
Loading…
Reference in New Issue