summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-06-06 12:43:20 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-06-06 12:43:20 +0000
commitaaeada6c755e64cd3611e4476a2f97fb81b7f3cb (patch)
tree139b9a7a5cfcfbf28b33199f36e738d91fe97d8e
parent384232766bb678254d5ad6b1ed909647c68b7eb9 (diff)
downloadbcm5719-llvm-aaeada6c755e64cd3611e4476a2f97fb81b7f3cb.tar.gz
bcm5719-llvm-aaeada6c755e64cd3611e4476a2f97fb81b7f3cb.zip
Fix another ordering constraint with windows.h and comment about
a revers constraint that we got right (by chance). llvm-svn: 304792
-rw-r--r--llvm/lib/DebugInfo/Symbolize/Symbolize.cpp4
-rw-r--r--llvm/lib/Support/Atomic.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
index 57c818f9d27..0561d6a4134 100644
--- a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
@@ -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.
diff --git a/llvm/lib/Support/Atomic.cpp b/llvm/lib/Support/Atomic.cpp
index 80550e2b46a..55910c489fa 100644
--- a/llvm/lib/Support/Atomic.cpp
+++ b/llvm/lib/Support/Atomic.cpp
@@ -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
OpenPOWER on IntegriCloud