aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorArtyom Skrobov <Artyom.Skrobov@arm.com>2015-06-04 21:26:58 +0000
committerArtyom Skrobov <Artyom.Skrobov@arm.com>2015-06-04 21:26:58 +0000
commit85aebc8c019bae882534790d960b24f5c27051ba (patch)
tree302a61ef42a84301eb0f62c2a311762874347d57 /llvm/lib/Support/Triple.cpp
parentc925a905f7c73899bb17405a3a9f04b681a96cf8 (diff)
downloadllvm-85aebc8c019bae882534790d960b24f5c27051ba.zip
llvm-85aebc8c019bae882534790d960b24f5c27051ba.tar.gz
llvm-85aebc8c019bae882534790d960b24f5c27051ba.tar.bz2
Simplify ARMTargetParser::getArchSynonym
Summary: 1) The only caller, ARMTargetParser::parseArch, uses the results for an "endswith" test; so, including the "arm" prefix into the result is unnecessary. 2) Most ARMTargetParser::parseArch callers pass it the output from ARMTargetParser::getCanonicalArchName; so, make this behaviour the default. Then, including the "arm" prefix into the cases is unnecessary. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10249 llvm-svn: 239099
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index e8163c0..9312f4c 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -1147,12 +1147,12 @@ Triple Triple::get64BitArchVariant() const {
const char *Triple::getARMCPUForArch(StringRef MArch) const {
if (MArch.empty())
MArch = getArchName();
+ MArch = ARMTargetParser::getCanonicalArchName(MArch);
// Some defaults are forced.
switch (getOS()) {
case llvm::Triple::FreeBSD:
case llvm::Triple::NetBSD:
- MArch = ARMTargetParser::getCanonicalArchName(MArch);
if (!MArch.empty() && MArch == "v6")
return "arm1176jzf-s";
break;
@@ -1163,7 +1163,6 @@ const char *Triple::getARMCPUForArch(StringRef MArch) const {
break;
}
- MArch = ARMTargetParser::getCanonicalArchName(MArch);
if (MArch.empty())
return nullptr;