[libcxx-commits] [PATCH] D69806: [libcxx] use __builtin_isnan in std::isnan.

Ilya Tokar via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 15 09:38:55 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG767eadd78229: [libcxx] use __builtin_isnan in std::isnan. (authored by TokarIP).
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69806/new/

https://reviews.llvm.org/D69806

Files:
  libcxx/include/math.h


Index: libcxx/include/math.h
===================================================================
--- libcxx/include/math.h
+++ libcxx/include/math.h
@@ -510,7 +510,11 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69806.229575.patch
Type: text/x-patch
Size: 357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191115/79509856/attachment-0001.bin>


More information about the libcxx-commits mailing list