[llvm] r304792 - Fix another ordering constraint with windows.h and comment about

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 05:43:20 PDT 2017


Author: chandlerc
Date: Tue Jun  6 07:43:20 2017
New Revision: 304792

URL: http://llvm.org/viewvc/llvm-project?rev=304792&view=rev
Log:
Fix another ordering constraint with windows.h and comment about
a revers constraint that we got right (by chance).

Modified:
    llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp
    llvm/trunk/lib/Support/Atomic.cpp

Modified: llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp?rev=304792&r1=304791&r2=304792&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp (original)
+++ llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp Tue Jun  6 07:43:20 2017
@@ -38,8 +38,10 @@
 #include <cstring>
 
 #if defined(_MSC_VER)
-#include <DbgHelp.h>
 #include <Windows.h>
+
+// This must be included after windows.h.
+#include <DbgHelp.h>
 #pragma comment(lib, "dbghelp.lib")
 
 // Windows.h conflicts with our COFF header definitions.

Modified: llvm/trunk/lib/Support/Atomic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Atomic.cpp?rev=304792&r1=304791&r2=304792&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Atomic.cpp (original)
+++ llvm/trunk/lib/Support/Atomic.cpp Tue Jun  6 07:43:20 2017
@@ -18,6 +18,8 @@ using namespace llvm;
 
 #if defined(_MSC_VER)
 #include <Intrin.h>
+
+// We must include windows.h after Intrin.h.
 #include <windows.h>
 #undef MemoryFence
 #endif




More information about the llvm-commits mailing list