OSDN Git Service

Add unittests to {ARM | AArch64}TargetParser.
authorZijiao Ma <jojo.ma@linaro.org>
Thu, 28 Jul 2016 06:11:18 +0000 (06:11 +0000)
committerZijiao Ma <jojo.ma@linaro.org>
Thu, 28 Jul 2016 06:11:18 +0000 (06:11 +0000)
commitb87ab2ee2251d257c4c5d6da8a833cf6186a3538
tree0acbca0afbad814e2401f3a0c4b70f2e6f3ec345
parent556fadaadab856d270ae7ecd38e24475e210d4f6
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
include/llvm/Support/AArch64TargetParser.def
include/llvm/Support/TargetParser.h
lib/Support/TargetParser.cpp
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
unittests/Support/TargetParserTest.cpp