[llvm] 090bdaa - [Support] Use std::shared_mutex when we're not on old MacOS
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 04:31:37 PDT 2022
Author: Benjamin Kramer
Date: 2022-08-08T13:31:05+02:00
New Revision: 090bdaad34867a4aafa750cbe5bdb0d24864a121
URL: https://github.com/llvm/llvm-project/commit/090bdaad34867a4aafa750cbe5bdb0d24864a121
DIFF: https://github.com/llvm/llvm-project/commit/090bdaad34867a4aafa750cbe5bdb0d24864a121.diff
LOG: [Support] Use std::shared_mutex when we're not on old MacOS
In C++17 mode this is always available.
Added:
Modified:
llvm/include/llvm/Support/RWMutex.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/RWMutex.h b/llvm/include/llvm/Support/RWMutex.h
index a06a5c3e064f..984487f94c69 100644
--- a/llvm/include/llvm/Support/RWMutex.h
+++ b/llvm/include/llvm/Support/RWMutex.h
@@ -92,14 +92,8 @@ class RWMutexImpl {
/// indicates whether this mutex should become a no-op when we're not
/// running in multithreaded mode.
template <bool mt_only> class SmartRWMutex {
- // shared_mutex (C++17) is more efficient than shared_timed_mutex (C++14)
- // on Windows and always available on MSVC except with libc++.
#if !defined(LLVM_USE_RW_MUTEX_IMPL)
-#if (defined(_MSC_VER) && !defined(_LIBCPP_VERSION)) || __cplusplus > 201402L
std::shared_mutex impl;
-#else
- std::shared_timed_mutex impl;
-#endif
#else
RWMutexImpl impl;
#endif
More information about the llvm-commits
mailing list