Blob Blame History Raw
From: Yi Kong <yikong@google.com>
Date: Thu, 28 Dec 2017 23:06:24 +0000
Subject: [PATCH] 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
---
 lib/tsan/rtl/tsan_libdispatch_mac.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/tsan/rtl/tsan_libdispatch_mac.cc b/lib/tsan/rtl/tsan_libdispatch_mac.cc
index eb22e4baa..d6c1ca662 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc
+++ b/compiler-rt/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 {