[llvm] r295014 - Undef MemoryFence, which is defined to _mm_mfence by winnt.h

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 17:38:15 PST 2017


Author: rnk
Date: Mon Feb 13 19:38:14 2017
New Revision: 295014

URL: http://llvm.org/viewvc/llvm-project?rev=295014&view=rev
Log:
Undef MemoryFence, which is defined to _mm_mfence by winnt.h

Modified:
    llvm/trunk/include/llvm/Support/Atomic.h

Modified: llvm/trunk/include/llvm/Support/Atomic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Atomic.h?rev=295014&r1=295013&r2=295014&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Atomic.h (original)
+++ llvm/trunk/include/llvm/Support/Atomic.h Mon Feb 13 19:38:14 2017
@@ -20,6 +20,11 @@
 
 #include "llvm/Support/DataTypes.h"
 
+// Windows will at times define MemoryFence.
+#ifdef MemoryFence
+#undef MemoryFence
+#endif
+
 namespace llvm {
   namespace sys {
     void MemoryFence();




More information about the llvm-commits mailing list