summaryrefslogtreecommitdiff
path: root/lib/Support/Host.cpp
diff options
context:
space:
mode:
authorBradley Smith <bradley.smith@arm.com>2014-05-23 10:14:13 +0000
committerBradley Smith <bradley.smith@arm.com>2014-05-23 10:14:13 +0000
commitfa16c880f2a4c579bc8e297846945fdefa8ce7ca (patch)
tree6388814bee054e613bf1ec7cfbd6012410dd52dd /lib/Support/Host.cpp
parent84a0dc323d90f86e899519b31b789ed5c0a0ec9a (diff)
downloadllvm-fa16c880f2a4c579bc8e297846945fdefa8ce7ca.tar.gz
llvm-fa16c880f2a4c579bc8e297846945fdefa8ce7ca.tar.bz2
llvm-fa16c880f2a4c579bc8e297846945fdefa8ce7ca.tar.xz
Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Host.cpp')
-rw-r--r--lib/Support/Host.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp
index 7e86e2ffcf..fd0472ee2f 100644
--- a/lib/Support/Host.cpp
+++ b/lib/Support/Host.cpp
@@ -718,10 +718,10 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
#if defined(__aarch64__)
// Keep track of which crypto features we have seen
enum {
- HWCAP_AES = 0x1,
- HWCAP_PMULL = 0x2,
- HWCAP_SHA1 = 0x4,
- HWCAP_SHA2 = 0x8
+ CAP_AES = 0x1,
+ CAP_PMULL = 0x2,
+ CAP_SHA1 = 0x4,
+ CAP_SHA2 = 0x8
};
uint32_t crypto = 0;
#endif
@@ -747,13 +747,13 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
// We need to check crypto seperately since we need all of the crypto
// extensions to enable the subtarget feature
if (CPUFeatures[I] == "aes")
- crypto |= HWCAP_AES;
+ crypto |= CAP_AES;
else if (CPUFeatures[I] == "pmull")
- crypto |= HWCAP_PMULL;
+ crypto |= CAP_PMULL;
else if (CPUFeatures[I] == "sha1")
- crypto |= HWCAP_SHA1;
+ crypto |= CAP_SHA1;
else if (CPUFeatures[I] == "sha2")
- crypto |= HWCAP_SHA2;
+ crypto |= CAP_SHA2;
#endif
if (LLVMFeatureStr != "")
@@ -762,7 +762,7 @@ bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
#if defined(__aarch64__)
// If we have all crypto bits we can add the feature
- if (crypto == (HWCAP_AES | HWCAP_PMULL | HWCAP_SHA1 | HWCAP_SHA2))
+ if (crypto == (CAP_AES | CAP_PMULL | CAP_SHA1 | CAP_SHA2))
Features.GetOrCreateValue("crypto").setValue(true);
#endif