From 38220af4dc50f723282e7b7bf592ad595468e0b9 Mon Sep 17 00:00:00 2001 From: Dave Watson Date: Thu, 29 Aug 2013 15:40:57 -0700 Subject: [PATCH] x86intrinsic seems to be problematic for clang Summary: fbinject (clang code parser) throws some errors when including the x86intrinsic header. Test Plan: D929356 compiles after this diff. It adds a dep on RWSpinLock. Reviewed By: beng@fb.com FB internal diff: D950285 --- folly/RWSpinLock.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/folly/RWSpinLock.h b/folly/RWSpinLock.h index ab467c5c..80777207 100644 --- a/folly/RWSpinLock.h +++ b/folly/RWSpinLock.h @@ -106,8 +106,9 @@ pthread_rwlock_t Read 728698 24us 101ns 7.28ms 194us */ -#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64__) || \ - defined(ARCH_K8)) +#if defined(__GNUC__) && !defined(__clang__) && \ + (defined(__i386) || defined(__x86_64__) || \ + defined(ARCH_K8)) #define RW_SPINLOCK_USE_X86_INTRINSIC_ #include #else -- 2.34.1