[PATCH] [ARM] Remove dead code for target architectures with a '-' in the name
Bradley Smith
bradley.smith at arm.com
Tue Sep 17 02:56:05 PDT 2013
There are a few places in the clang driver where architectures for the target triple contain a '-' in the name. Since any such architecture will always be parsed as two parts of the target triple by clang, these cases are redundant, hence should be removed to avoid confusion.
http://llvm-reviews.chandlerc.com/D1695
Files:
lib/Driver/ToolChain.cpp
lib/Driver/Tools.cpp
Index: lib/Driver/ToolChain.cpp
===================================================================
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -193,15 +193,15 @@
.Case("armv6j", "arm1136j-s")
.Cases("armv6z", "armv6zk", "arm1176jzf-s")
.Case("armv6t2", "arm1156t2-s")
- .Cases("armv6m", "armv6-m", "cortex-m0")
- .Cases("armv7", "armv7a", "armv7-a", "cortex-a8")
- .Cases("armv7l", "armv7-l", "cortex-a8")
- .Cases("armv7f", "armv7-f", "cortex-a9-mp")
- .Cases("armv7s", "armv7-s", "swift")
- .Cases("armv7r", "armv7-r", "cortex-r4")
- .Cases("armv7m", "armv7-m", "cortex-m3")
- .Cases("armv7em", "armv7e-m", "cortex-m4")
- .Cases("armv8", "armv8a", "armv8-a", "cortex-a53")
+ .Case("armv6m", "cortex-m0")
+ .Cases("armv7", "armv7a", "cortex-a8")
+ .Case("armv7l", "cortex-a8")
+ .Case("armv7f", "cortex-a9-mp")
+ .Case("armv7s", "swift")
+ .Case("armv7r", "cortex-r4")
+ .Case("armv7m", "cortex-m3")
+ .Case("armv7em", "cortex-m4")
+ .Cases("armv8", "armv8a", "cortex-a53")
.Case("ep9312", "ep9312")
.Case("iwmmxt", "iwmmxt")
.Case("xscale", "xscale")
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -520,14 +520,14 @@
.Case("armv6j", "arm1136j-s")
.Cases("armv6z", "armv6zk", "arm1176jzf-s")
.Case("armv6t2", "arm1156t2-s")
- .Cases("armv6m", "armv6-m", "cortex-m0")
- .Cases("armv7", "armv7a", "armv7-a", "cortex-a8")
- .Cases("armv7em", "armv7e-m", "cortex-m4")
- .Cases("armv7f", "armv7-f", "cortex-a9-mp")
- .Cases("armv7s", "armv7-s", "swift")
- .Cases("armv7r", "armv7-r", "cortex-r4")
- .Cases("armv7m", "armv7-m", "cortex-m3")
- .Cases("armv8", "armv8a", "armv8-a", "cortex-a53")
+ .Case("armv6m", "cortex-m0")
+ .Cases("armv7", "armv7a", "cortex-a8")
+ .Case("armv7em", "cortex-m4")
+ .Case("armv7f", "cortex-a9-mp")
+ .Case("armv7s", "swift")
+ .Case("armv7r", "cortex-r4")
+ .Case("armv7m", "cortex-m3")
+ .Cases("armv8", "armv8a", "cortex-a53")
.Case("ep9312", "ep9312")
.Case("iwmmxt", "iwmmxt")
.Case("xscale", "xscale")
@@ -5926,7 +5926,7 @@
CmdArgs.push_back("-many");
} else if (getToolChain().getArch() == llvm::Triple::arm) {
StringRef MArch = getToolChain().getArchName();
- if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a")
+ if (MArch == "armv7" || MArch == "armv7a")
CmdArgs.push_back("-mfpu=neon");
StringRef ARMFloatABI = getARMFloatABI(getToolChain().getDriver(), Args,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1695.1.patch
Type: text/x-patch
Size: 2627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130917/67acaae6/attachment.bin>
More information about the cfe-commits
mailing list