diff options
| author | Brad Smith <brad@comstyle.com> | 2016-11-02 01:39:01 +0000 |
|---|---|---|
| committer | Brad Smith <brad@comstyle.com> | 2016-11-02 01:39:01 +0000 |
| commit | b4f6ebf80695ee4aeefe4184728a1b3379b54baa (patch) | |
| tree | 4b1c593e615dfeb9ce3bedbdd60dba0d0315732b | |
| parent | c76c3f2f9191b923103a0113fe60358b618f13f8 (diff) | |
| download | bcm5719-llvm-b4f6ebf80695ee4aeefe4184728a1b3379b54baa.tar.gz bcm5719-llvm-b4f6ebf80695ee4aeefe4184728a1b3379b54baa.zip | |
Disable the use of std::call_once on OpenBSD with libstdc++.
It was noticed this caused performance regressions and deadlocks. PR30768.
Reorder the code to make it clearer what is tested.
PPC now disables the use of std::call_once only with libstdc++ with
the reordering of the code, as was the original intent.
llvm-svn: 285782
| -rw-r--r-- | llvm/include/llvm/Support/Threading.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/Threading.h b/llvm/include/llvm/Support/Threading.h index 0e9b88e69fb..4bef7ec8dd3 100644 --- a/llvm/include/llvm/Support/Threading.h +++ b/llvm/include/llvm/Support/Threading.h @@ -20,11 +20,11 @@ #include <ciso646> // So we can check the C++ standard lib macros. #include <functional> -// We use std::call_once on all Unix platforms except for NetBSD with -// libstdc++. That platform has a bug they are working to fix, and they'll -// remove the NetBSD checks once fixed. -#if defined(LLVM_ON_UNIX) && \ - !(defined(__NetBSD__) && !defined(_LIBCPP_VERSION)) && !defined(__ppc__) +// std::call_once from libc++ is used on all Unix platforms. Other +// implementations like libstdc++ are known to have problems on NetBSD, +// OpenBSD and PowerPC. +#if defined(LLVM_ON_UNIX) && (defined(_LIBCPP_VERSION) || \ + !(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__ppc__))) #define LLVM_THREADING_USE_STD_CALL_ONCE 1 #else #define LLVM_THREADING_USE_STD_CALL_ONCE 0 |

