From: Simon Atanasyan Date: Wed, 9 Oct 2013 12:12:24 +0000 (+0000) Subject: [Mips] Do not check for options from the OPT_mips_CPUs_Group. All these X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0cc7c72bee63a34426d5d441c06128dcdd4bab1;p=platform%2Fupstream%2Fllvm.git [Mips] Do not check for options from the OPT_mips_CPUs_Group. All these options are aliases now. llvm-svn: 192290 --- diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 378c3b6..4e68a87 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -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, diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 2f824cb..ad09b33 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -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();