[llvm] r271563 - Fix the use of sys::MemoryFence after including WindowsSupport.h that

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 11:42:24 PDT 2016


Author: chandlerc
Date: Thu Jun  2 13:42:23 2016
New Revision: 271563

URL: http://llvm.org/viewvc/llvm-project?rev=271563&view=rev
Log:
Fix the use of sys::MemoryFence after including WindowsSupport.h that
r271558 introduced.

Modified:
    llvm/trunk/lib/Support/Threading.cpp

Modified: llvm/trunk/lib/Support/Threading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Threading.cpp?rev=271563&r1=271562&r2=271563&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Threading.cpp (original)
+++ llvm/trunk/lib/Support/Threading.cpp Thu Jun  2 13:42:23 2016
@@ -72,6 +72,11 @@ void llvm::llvm_execute_on_thread(void (
 #include "Windows/WindowsSupport.h"
 #include <process.h>
 
+// Windows will at times define MemoryFence.
+#ifdef MemoryFence
+#undef MemoryFence
+#endif
+
 struct ThreadInfo {
   void (*func)(void*);
   void *param;




More information about the llvm-commits mailing list