projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
709ee69
)
Special case some duration arithmetic for GCC and PPC because their long double const...
author
Marshall Clow
<mclow.lists@gmail.com>
Tue, 2 Apr 2019 14:46:36 +0000
(14:46 +0000)
committer
Marshall Clow
<mclow.lists@gmail.com>
Tue, 2 Apr 2019 14:46:36 +0000
(14:46 +0000)
llvm-svn: 357478
libcxx/include/thread
patch
|
blob
|
history
diff --git
a/libcxx/include/thread
b/libcxx/include/thread
index
df06ff7
..
400459a
100644
(file)
--- a/
libcxx/include/thread
+++ b/
libcxx/include/thread
@@
-434,7
+434,12
@@
sleep_for(const chrono::duration<_Rep, _Period>& __d)
using namespace chrono;
if (__d > duration<_Rep, _Period>::zero())
{
+#if defined(_LIBCPP_COMPILER_GCC) && (__powerpc__ || __POWERPC__)
+ // GCC's long double const folding is incomplete for IBM128 long doubles.
+ _LIBCPP_CONSTEXPR duration<long double> _Max = duration<long double>(ULLONG_MAX/1000000000ULL) ;
+#else
_LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max();
+#endif
nanoseconds __ns;
if (__d < _Max)
{