summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-08-16 22:58:13 +0000
committerJulian Lettner <jlettner@apple.com>2019-08-16 22:58:13 +0000
commit4854130c474e1891cffdd06435932fa60758ece9 (patch)
tree39218ff02f3f567b5bf265f36183ef75e9c417b1 /lib
parente78e56d063eb3183601031a6ea282efbd5ee02a9 (diff)
downloadcompiler-rt-4854130c474e1891cffdd06435932fa60758ece9.tar.gz
Revert "[TSan] Don't guard #include <xpc/xpc.h>"
This reverts commit 8191585b36eb4963002cce43fb2e79e7fb05c3d6. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@369165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/tsan/rtl/tsan_interceptors_mac.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_interceptors_mac.cpp b/lib/tsan/rtl/tsan_interceptors_mac.cpp
index 7b9173650..db7392796 100644
--- a/lib/tsan/rtl/tsan_interceptors_mac.cpp
+++ b/lib/tsan/rtl/tsan_interceptors_mac.cpp
@@ -24,7 +24,10 @@
#include <libkern/OSAtomic.h>
#include <objc/objc-sync.h>
#include <sys/ucontext.h>
+
+#if defined(__has_include) && __has_include(<xpc/xpc.h>)
#include <xpc/xpc.h>
+#endif // #if defined(__has_include) && __has_include(<xpc/xpc.h>)
typedef long long_t; // NOLINT
@@ -296,6 +299,8 @@ TSAN_INTERCEPTOR(void, os_unfair_lock_unlock, void *lock) {
REAL(os_unfair_lock_unlock)(lock);
}
+#if defined(__has_include) && __has_include(<xpc/xpc.h>)
+
TSAN_INTERCEPTOR(void, xpc_connection_set_event_handler,
xpc_connection_t connection, xpc_handler_t handler) {
SCOPED_TSAN_INTERCEPTOR(xpc_connection_set_event_handler, connection,
@@ -348,6 +353,8 @@ TSAN_INTERCEPTOR(void, xpc_connection_cancel, xpc_connection_t connection) {
REAL(xpc_connection_cancel)(connection);
}
+#endif // #if defined(__has_include) && __has_include(<xpc/xpc.h>)
+
// Determines whether the Obj-C object pointer is a tagged pointer. Tagged
// pointers encode the object data directly in their pointer bits and do not
// have an associated memory allocation. The Obj-C runtime uses tagged pointers