forked from OSchip/llvm-project
[Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
options are aliases now. llvm-svn: 192290
This commit is contained in:
parent
3e570f3766
commit
e0cc7c72be
|
@ -2181,16 +2181,9 @@ static bool isMipsR2Arch(llvm::Triple::ArchType Arch,
|
|||
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,
|
||||
|
|
|
@ -846,20 +846,6 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
|
|||
}
|
||||
}
|
||||
|
||||
// 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 ArgList &Args,
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue