r192290 - [Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
Simon Atanasyan
simon at atanasyan.com
Wed Oct 9 05:12:25 PDT 2013
Author: atanasyan
Date: Wed Oct 9 07:12:24 2013
New Revision: 192290
URL: http://llvm.org/viewvc/llvm-project?rev=192290&view=rev
Log:
[Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
options are aliases now.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=192290&r1=192289&r2=192290&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Oct 9 07:12:24 2013
@@ -2181,16 +2181,9 @@ static bool isMipsR2Arch(llvm::Triple::A
return false;
Arg *A = Args.getLastArg(options::OPT_march_EQ,
- options::OPT_mcpu_EQ,
- options::OPT_mips_CPUs_Group);
+ options::OPT_mcpu_EQ);
- if (!A)
- return false;
-
- if (A->getOption().matches(options::OPT_mips_CPUs_Group))
- return A->getOption().matches(options::OPT_mips32r2);
-
- return A->getValue() == StringRef("mips32r2");
+ return A && A->getValue() == StringRef("mips32r2");
}
static StringRef getMultilibDir(const llvm::Triple &Triple,
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=192290&r1=192289&r2=192290&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Oct 9 07:12:24 2013
@@ -846,20 +846,6 @@ void Clang::AddARMTargetArgs(const ArgLi
}
}
-// Translate MIPS CPU name alias option to CPU name.
-static StringRef getMipsCPUFromAlias(const Arg &A) {
- if (A.getOption().matches(options::OPT_mips32))
- return "mips32";
- if (A.getOption().matches(options::OPT_mips32r2))
- return "mips32r2";
- if (A.getOption().matches(options::OPT_mips64))
- return "mips64";
- if (A.getOption().matches(options::OPT_mips64r2))
- return "mips64r2";
- llvm_unreachable("Unexpected option");
- return "";
-}
-
// Get CPU and ABI names. They are not independent
// so we have to calculate them together.
static void getMipsCPUAndABI(const ArgList &Args,
@@ -870,13 +856,8 @@ static void getMipsCPUAndABI(const ArgLi
const char *DefMips64CPU = "mips64";
if (Arg *A = Args.getLastArg(options::OPT_march_EQ,
- options::OPT_mcpu_EQ,
- options::OPT_mips_CPUs_Group)) {
- if (A->getOption().matches(options::OPT_mips_CPUs_Group))
- CPUName = getMipsCPUFromAlias(*A);
- else
- CPUName = A->getValue();
- }
+ options::OPT_mcpu_EQ))
+ CPUName = A->getValue();
if (Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) {
ABIName = A->getValue();
More information about the cfe-commits
mailing list