summaryrefslogtreecommitdiff
path: root/data/_llvm10/mutex-availability.diff
diff options
context:
space:
mode:
Diffstat (limited to 'data/_llvm10/mutex-availability.diff')
-rw-r--r--data/_llvm10/mutex-availability.diff34
1 files changed, 34 insertions, 0 deletions
diff --git a/data/_llvm10/mutex-availability.diff b/data/_llvm10/mutex-availability.diff
new file mode 100644
index 000000000..f3fb57074
--- /dev/null
+++ b/data/_llvm10/mutex-availability.diff
@@ -0,0 +1,34 @@
+diff -ur llvm-project-apple-stable-20191106/llvm/include/llvm/Support/RWMutex.h llvm-project-apple-stable-20191106+iOS/llvm/include/llvm/Support/RWMutex.h
+--- llvm-project-apple-stable-20191106/llvm/include/llvm/Support/RWMutex.h 2019-12-03 19:28:47.000000000 -1000
++++ llvm-project-apple-stable-20191106+iOS/llvm/include/llvm/Support/RWMutex.h 2019-12-04 13:58:07.000000000 -1000
+@@ -19,12 +19,29 @@
+ #include <mutex>
+ #include <shared_mutex>
+
++#if defined(__APPLE__)
+ // std::shared_timed_mutex is only availble on macOS 10.12 and later.
+-#if defined(__APPLE__) && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
++#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200
+ #define LLVM_USE_RW_MUTEX_IMPL
+ #endif
++// std::shared_timed_mutex is only availble on iOS 10 and later.
++#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
++#if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000
++#define LLVM_USE_RW_MUTEX_IMPL
++#endif
++// std::shared_timed_mutex is only availble on tvOS 10 and later.
++#elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
++#if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000
++#define LLVM_USE_RW_MUTEX_IMPL
++#endif
++// std::shared_timed_mutex is only availble on watchOS 3 and later.
++#elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
++#if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000
++#define LLVM_USE_RW_MUTEX_IMPL
++#endif
+ #endif
++#endif // __APPLE__
+
+ namespace llvm {
+ namespace sys {