[PATCH] D131063: [llvm][macos] Fix usage of std::shared_mutex on old macOS SDK versions

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 12:45:35 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b8db17c32e0: [llvm][macos] Fix usage of std::shared_mutex on old macOS SDK versions (authored by thieta).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131063

Files:
  llvm/include/llvm/Support/RWMutex.h


Index: llvm/include/llvm/Support/RWMutex.h
===================================================================
--- llvm/include/llvm/Support/RWMutex.h
+++ llvm/include/llvm/Support/RWMutex.h
@@ -94,14 +94,14 @@
 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
-#if !defined(LLVM_USE_RW_MUTEX_IMPL)
   std::shared_timed_mutex impl;
+#endif
 #else
   RWMutexImpl impl;
-#endif
 #endif
   unsigned readers = 0;
   unsigned writers = 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131063.450360.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220805/4026e1fa/attachment.bin>


More information about the llvm-commits mailing list