summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2015-05-08 15:44:36 +0000
committerRenato Golin <renato.golin@linaro.org>2015-05-08 15:44:36 +0000
commit4045f661759bda787f9f5dbd95de08ff0f102b43 (patch)
tree2e0769a35658c625e39f527db89ed954d7423895 /clang/lib/Driver
parente44e5665d4a38aa7da6b3b500e6fc8c68c73285a (diff)
downloadbcm5719-llvm-4045f661759bda787f9f5dbd95de08ff0f102b43.tar.gz
bcm5719-llvm-4045f661759bda787f9f5dbd95de08ff0f102b43.zip
Revert "Allow case-insensitive values for -mcpu for ARM and AArch64"
This reverts commit r236859, as it broke multiple builds. I'll investigate and reapply when safe. llvm-svn: 236869
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/ToolChains.cpp2
-rw-r--r--clang/lib/Driver/Tools.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 151b51d9ff8..20a308dedf3 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -126,7 +126,7 @@ static const char *GetArmArchForMArch(StringRef Value) {
}
static const char *GetArmArchForMCpu(StringRef Value) {
- return llvm::StringSwitch<const char *>(Value.lower())
+ return llvm::StringSwitch<const char *>(Value)
.Cases("arm9e", "arm946e-s", "arm966e-s", "arm968e-s", "arm926ej-s","armv5")
.Cases("arm10e", "arm10tdmi", "armv5")
.Cases("arm1020t", "arm1020e", "arm1022e", "arm1026ej-s", "armv5")
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 951c6b8d570..88e42217102 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -902,7 +902,7 @@ static std::string getAArch64TargetCPU(const ArgList &Args) {
if ((A = Args.getLastArg(options::OPT_mtune_EQ))) {
CPU = A->getValue();
} else if ((A = Args.getLastArg(options::OPT_mcpu_EQ))) {
- StringRef Mcpu = StringRef(A->getValue()).lower();
+ StringRef Mcpu = A->getValue();
CPU = Mcpu.split("+").first;
}
@@ -1795,7 +1795,6 @@ static bool DecodeAArch64Features(const Driver &D, StringRef text,
// decode CPU and feature.
static bool DecodeAArch64Mcpu(const Driver &D, StringRef Mcpu, StringRef &CPU,
std::vector<const char *> &Features) {
- Mcpu = Mcpu.lower();
std::pair<StringRef, StringRef> Split = Mcpu.split("+");
CPU = Split.first;
if (CPU == "cyclone" || CPU == "cortex-a53" || CPU == "cortex-a57" || CPU == "cortex-a72") {
@@ -5642,7 +5641,7 @@ StringRef arm::getARMTargetCPU(const ArgList &Args,
// FIXME: Warn on inconsistent use of -mcpu and -march.
// If we have -mcpu=, use that.
if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) {
- StringRef MCPU = StringRef(A->getValue()).lower();
+ StringRef MCPU = A->getValue();
// Handle -mcpu=native.
if (MCPU == "native")
return llvm::sys::getHostCPUName();
@@ -7510,7 +7509,7 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
// march from being picked in the absence of a cpu flag.
Arg *A;
if ((A = Args.getLastArg(options::OPT_mcpu_EQ)) &&
- StringRef(A->getValue()).lower() == "krait")
+ StringRef(A->getValue()) == "krait")
CmdArgs.push_back("-march=armv7-a");
else
Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ);
OpenPOWER on IntegriCloud