summaryrefslogtreecommitdiff
path: root/lib/Support/Host.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-04-03 01:39:37 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-04-03 01:39:37 +0000
commit95a16c4dbb26ecf4e7477eb4bb00a24b34402731 (patch)
treecd16935ce8fd6a9e60bee8d78268562b69fc2968 /lib/Support/Host.cpp
parenta964ad5c34f11a907c35f437b6f321d11d92aeac (diff)
downloadllvm-95a16c4dbb26ecf4e7477eb4bb00a24b34402731.tar.gz
llvm-95a16c4dbb26ecf4e7477eb4bb00a24b34402731.tar.bz2
llvm-95a16c4dbb26ecf4e7477eb4bb00a24b34402731.tar.xz
Attempting to fix the build on older GCC versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Host.cpp')
-rw-r--r--lib/Support/Host.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp
index 372b7fcc6c..c353cc6887 100644
--- a/lib/Support/Host.cpp
+++ b/lib/Support/Host.cpp
@@ -113,7 +113,8 @@ static bool GetX86CpuIDAndInfo(unsigned value, unsigned *rEAX,
}
static bool OSHasAVXSupport() {
-#if defined(__GNUC__)
+#if defined( __GNUC__ ) && \
+ (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
int rEAX, rEDX;
__asm__ ("xgetbv" : "=a" (rEAX), "=d" (rEDX) : "c" (0));
#elif defined(_MSC_VER)