summaryrefslogtreecommitdiff
path: root/data/_llvm10/mutex-availability.diff
blob: f3fb570741a7dab5602d64b77172fbc1fb6385a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 {