r192292 - [Mips] Make the isMipsR2Arch() function simpler - remove checking for

Simon Atanasyan simon at atanasyan.com
Wed Oct 9 05:12:34 PDT 2013


Author: atanasyan
Date: Wed Oct  9 07:12:34 2013
New Revision: 192292

URL: http://llvm.org/viewvc/llvm-project?rev=192292&view=rev
Log:
[Mips] Make the isMipsR2Arch() function simpler - remove checking for
MIPS-arch.

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=192292&r1=192291&r2=192292&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Oct  9 07:12:34 2013
@@ -2174,12 +2174,7 @@ static void addPathIfExists(Twine Path,
   if (llvm::sys::fs::exists(Path)) Paths.push_back(Path.str());
 }
 
-static bool isMipsR2Arch(llvm::Triple::ArchType Arch,
-                         const ArgList &Args) {
-  if (Arch != llvm::Triple::mips &&
-      Arch != llvm::Triple::mipsel)
-    return false;
-
+static bool isMipsR2Arch(const ArgList &Args) {
   Arg *A = Args.getLastArg(options::OPT_march_EQ,
                            options::OPT_mcpu_EQ);
 
@@ -2281,7 +2276,7 @@ Linux::Linux(const Driver &D, const llvm
     // the parent prefix of the GCC installation.
     // FIXME: It would be cleaner to model this as a variant of multilib. IE,
     // instead of 'lib64' it would be 'lib/el'.
-    if (IsAndroid && isMipsR2Arch(Triple.getArch(), Args)) {
+    if (IsAndroid && IsMips && isMipsR2Arch(Args)) {
       assert(GCCInstallation.getBiarchSuffix().empty() &&
              "Unexpected bi-arch suffix");
       addPathIfExists(GCCInstallation.getInstallPath() + "/mips-r2", Paths);





More information about the cfe-commits mailing list