summaryrefslogtreecommitdiff
path: root/lib/Support/Atomic.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-05-06 00:57:33 +0000
committerReid Kleckner <reid@kleckner.net>2014-05-06 00:57:33 +0000
commit9331beb9100842bfff92a21c2949c482c525617d (patch)
tree480ef1f65922154585147a6cdb0750d27d1482e4 /lib/Support/Atomic.cpp
parent6a914399c907624d1d9364dd06edb34c825375a4 (diff)
downloadllvm-9331beb9100842bfff92a21c2949c482c525617d.tar.gz
llvm-9331beb9100842bfff92a21c2949c482c525617d.tar.bz2
llvm-9331beb9100842bfff92a21c2949c482c525617d.tar.xz
Include intrin.h before windows.h as a workaround for the x64 self-host
On x64, windows.h doesn't include intrin.h for intrinsics. It just declares them in the global namespace and uses them, expecting the compiler to lower it as a builtin. We basically need to do this in clang, eventually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Atomic.cpp')
-rw-r--r--lib/Support/Atomic.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Support/Atomic.cpp b/lib/Support/Atomic.cpp
index 9559ad7295..2ef32b08ef 100644
--- a/lib/Support/Atomic.cpp
+++ b/lib/Support/Atomic.cpp
@@ -17,6 +17,7 @@
using namespace llvm;
#if defined(_MSC_VER)
+#include <Intrin.h>
#include <windows.h>
#undef MemoryFence
#endif