[compiler-rt] r265152 - Fix a load of -Wunknown-pragma warnings from clang-cl

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 10:09:08 PDT 2016


Author: rnk
Date: Fri Apr  1 12:09:08 2016
New Revision: 265152

URL: http://llvm.org/viewvc/llvm-project?rev=265152&view=rev
Log:
Fix a load of -Wunknown-pragma warnings from clang-cl

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=265152&r1=265151&r2=265152&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Fri Apr  1 12:09:08 2016
@@ -23,7 +23,7 @@
 #include "sanitizer_list.h"
 #include "sanitizer_mutex.h"
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && !defined(__clang__)
 extern "C" void _ReadWriteBarrier();
 #pragma intrinsic(_ReadWriteBarrier)
 #endif
@@ -753,7 +753,7 @@ void MaybeStartBackgroudThread();
 // compiler from recognising it and turning it into an actual call to
 // memset/memcpy/etc.
 static inline void SanitizerBreakOptimization(void *arg) {
-#if _MSC_VER && !defined(__clang__)
+#if defined(_MSC_VER) && !defined(__clang__)
   _ReadWriteBarrier();
 #else
   __asm__ __volatile__("" : : "r" (arg) : "memory");




More information about the llvm-commits mailing list