aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorZijiao Ma <jojo.ma@linaro.org>2016-07-28 06:11:18 +0000
committerStephen Hines <srhines@google.com>2018-07-11 18:57:45 -0700
commit1d7a9aa3e7337d76fde37e8b50371bb9b1050665 (patch)
treebb579243098ca54754d2c5f661f080857c5ba711 /lib/Target
parentebb0b5abae2699e8a2cc0f0251621fd9ee57e7a2 (diff)
downloadllvm-1d7a9aa3e7337d76fde37e8b50371bb9b1050665.tar.gz
Add unittests to {ARM | AArch64}TargetParser.
Add unittest to {ARM | AArch64}TargetParser,and by the way correct problems as below: 1.Correct a incorrect indexing problem in AArch64TargetParser. The architecture enumeration is shared across ARM and AArch64 in original implementation.But In the code,I just used the index which was offset by the ARM, and this would index into the array incorrectly. To make AArch64 has its own arch enum,or we will do a lot of slowly iterating. 2.Correct a spelling error. The parameter of llvm::AArch64::getArchExtName. 3.Correct a writing mistake, in llvm::ARM::parseArchISA. Differential Revision: https://reviews.llvm.org/D21785 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index aebc370333e3..25c2c958358c 100644
--- a/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -4212,7 +4212,7 @@ bool AArch64AsmParser::parseDirectiveArch(SMLoc L) {
getParser().parseStringToEndOfStatement().trim().split('+');
unsigned ID = AArch64::parseArch(Arch);
- if (ID == ARM::AK_INVALID) {
+ if (ID == static_cast<unsigned>(AArch64::ArchKind::AK_INVALID)) {
Error(ArchLoc, "unknown arch name");
return false;
}