summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2017-12-28 23:06:24 +0000
committerYi Kong <yikong@google.com>2017-12-28 23:06:24 +0000
commitb2e492beb7dee6983578da79ad2b79f102826ed2 (patch)
tree003b2092dcfd7a2c42f2a40ef23bbf10bcdc940b
parentc4cfd9451c04abf2130819a91fd5f1965c8468f1 (diff)
Ignore the DISPATCH_NOESCAPE if not defined
This macro is only defined after XCode 8, causing build breakage for build systems with prior versions. Ignore DISPATCH_NOESCAPE if not defined. Differential Revision: https://reviews.llvm.org/D41601 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321543 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/tsan/rtl/tsan_libdispatch_mac.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_libdispatch_mac.cc b/lib/tsan/rtl/tsan_libdispatch_mac.cc
index eb22e4baa..d6c1ca662 100644
--- a/lib/tsan/rtl/tsan_libdispatch_mac.cc
+++ b/lib/tsan/rtl/tsan_libdispatch_mac.cc
@@ -25,6 +25,11 @@
#include <dispatch/dispatch.h>
#include <pthread.h>
+// DISPATCH_NOESCAPE is not defined prior to XCode 8.
+#ifndef DISPATCH_NOESCAPE
+#define DISPATCH_NOESCAPE
+#endif
+
typedef long long_t; // NOLINT
namespace __tsan {