]> granicus.if.org Git - clang/commitdiff
[Mips] Call findMIPSABIDirSuffix() for MIPS targets only.
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 26 Nov 2013 11:57:09 +0000 (11:57 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 26 Nov 2013 11:57:09 +0000 (11:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195750 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp

index 09afc1e02ee2cf821546a9fdd9c9799462e772c5..b5f4c19b5c049f1a2318437910b29a7c6aa0a036 100644 (file)
@@ -1386,9 +1386,6 @@ static bool findTargetBiarchSuffix(std::string &Suffix, StringRef Path,
 void Generic_GCC::GCCInstallationDetector::findMIPSABIDirSuffix(
     std::string &Suffix, llvm::Triple::ArchType TargetArch, StringRef Path,
     const llvm::opt::ArgList &Args) {
-  if (!isMipsArch(TargetArch))
-    return;
-
   // Some MIPS toolchains put libraries and object files compiled
   // using different options in to the sub-directoris which names
   // reflects the flags used for compilation. For example sysroot
@@ -1523,7 +1520,8 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
         continue;
 
       std::string MIPSABIDirSuffix;
-      findMIPSABIDirSuffix(MIPSABIDirSuffix, TargetArch, LI->path(), Args);
+      if (isMipsArch(TargetArch))
+        findMIPSABIDirSuffix(MIPSABIDirSuffix, TargetArch, LI->path(), Args);
 
       // Some versions of SUSE and Fedora on ppc64 put 32-bit libs
       // in what would normally be GCCInstallPath and put the 64-bit