Skip to content

Commit 8191585

Browse files
committed
[TSan] Don't guard #include <xpc/xpc.h>
The xpc_connection_* APIs that we are intercepting are available starting at macOS 10.7. This is old enough so that we don't need to guard them. llvm-svn: 369150
1 parent 2d957cf commit 8191585

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
#include <libkern/OSAtomic.h>
2525
#include <objc/objc-sync.h>
2626
#include <sys/ucontext.h>
27-
28-
#if defined(__has_include) && __has_include(<xpc/xpc.h>)
2927
#include <xpc/xpc.h>
30-
#endif // #if defined(__has_include) && __has_include(<xpc/xpc.h>)
3128

3229
typedef long long_t; // NOLINT
3330

@@ -246,8 +243,6 @@ TSAN_INTERCEPTOR(void, os_lock_unlock, void *lock) {
246243
REAL(os_lock_unlock)(lock);
247244
}
248245

249-
#if defined(__has_include) && __has_include(<xpc/xpc.h>)
250-
251246
TSAN_INTERCEPTOR(void, xpc_connection_set_event_handler,
252247
xpc_connection_t connection, xpc_handler_t handler) {
253248
SCOPED_TSAN_INTERCEPTOR(xpc_connection_set_event_handler, connection,
@@ -300,8 +295,6 @@ TSAN_INTERCEPTOR(void, xpc_connection_cancel, xpc_connection_t connection) {
300295
REAL(xpc_connection_cancel)(connection);
301296
}
302297

303-
#endif // #if defined(__has_include) && __has_include(<xpc/xpc.h>)
304-
305298
// Determines whether the Obj-C object pointer is a tagged pointer. Tagged
306299
// pointers encode the object data directly in their pointer bits and do not
307300
// have an associated memory allocation. The Obj-C runtime uses tagged pointers

0 commit comments

Comments
 (0)