[compiler-rt] r369150 - [TSan] Don't guard #include <xpc/xpc.h>

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 13:43:09 PDT 2019


Author: yln
Date: Fri Aug 16 13:43:09 2019
New Revision: 369150

URL: http://llvm.org/viewvc/llvm-project?rev=369150&view=rev
Log:
[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.

Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cpp

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cpp?rev=369150&r1=369149&r2=369150&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cpp (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cpp Fri Aug 16 13:43:09 2019
@@ -24,10 +24,7 @@
 #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
 
@@ -246,8 +243,6 @@ TSAN_INTERCEPTOR(void, os_lock_unlock, v
   REAL(os_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,
@@ -300,8 +295,6 @@ TSAN_INTERCEPTOR(void, xpc_connection_ca
   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




More information about the llvm-commits mailing list