summaryrefslogtreecommitdiff
path: root/llvm/lib/Support/AArch64TargetParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/AArch64TargetParser.cpp')
-rw-r--r--llvm/lib/Support/AArch64TargetParser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Support/AArch64TargetParser.cpp b/llvm/lib/Support/AArch64TargetParser.cpp
index b5cd4af0eb3de..a6de44605675a 100644
--- a/llvm/lib/Support/AArch64TargetParser.cpp
+++ b/llvm/lib/Support/AArch64TargetParser.cpp
@@ -12,8 +12,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/AArch64TargetParser.h"
-#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
+#include "llvm/ADT/Triple.h"
#include <cctype>
using namespace llvm;
@@ -116,6 +116,8 @@ bool AArch64::getArchFeatures(AArch64::ArchKind AK,
Features.push_back("+v8.4a");
if (AK == ArchKind::ARMV8_5A)
Features.push_back("+v8.5a");
+ if (AK == AArch64::ArchKind::ARMV8_6A)
+ Features.push_back("+v8.6a");
return AK != ArchKind::INVALID;
}
@@ -191,7 +193,7 @@ AArch64::ArchKind AArch64::parseArch(StringRef Arch) {
return ArchKind::INVALID;
StringRef Syn = ARM::getArchSynonym(Arch);
- for (const auto A : AArch64ARCHNames) {
+ for (const auto &A : AArch64ARCHNames) {
if (A.getName().endswith(Syn))
return A.ID;
}
@@ -199,7 +201,7 @@ AArch64::ArchKind AArch64::parseArch(StringRef Arch) {
}
AArch64::ArchExtKind AArch64::parseArchExt(StringRef ArchExt) {
- for (const auto A : AArch64ARCHExtNames) {
+ for (const auto &A : AArch64ARCHExtNames) {
if (ArchExt == A.getName())
return static_cast<ArchExtKind>(A.ID);
}
@@ -207,7 +209,7 @@ AArch64::ArchExtKind AArch64::parseArchExt(StringRef ArchExt) {
}
AArch64::ArchKind AArch64::parseCPUArch(StringRef CPU) {
- for (const auto C : AArch64CPUNames) {
+ for (const auto &C : AArch64CPUNames) {
if (CPU == C.getName())
return C.ArchID;
}