r212096 - [Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"

Simon Atanasyan simon at atanasyan.com
Tue Jul 1 03:59:10 PDT 2014


Author: atanasyan
Date: Tue Jul  1 05:59:09 2014
New Revision: 212096

URL: http://llvm.org/viewvc/llvm-project?rev=212096&view=rev
Log:
[Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"
command line option only. Internally we convert them to the "o32" and "n64"
respectively. So we do not need to refer them anywhere after that conversion.

No functional changes.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=212096&r1=212095&r2=212096&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Jul  1 05:59:09 2014
@@ -5524,10 +5524,6 @@ public:
       ABI = Name;
       return true;
     }
-    if (Name == "32") {
-      ABI = "o32";
-      return true;
-    }
     return false;
   }
   void getTargetDefines(const LangOptions &Opts,
@@ -5663,9 +5659,9 @@ public:
       ABI = Name;
       return true;
     }
-    if (Name == "n64" || Name == "64") {
+    if (Name == "n64") {
       setN64ABITypes();
-      ABI = "n64";
+      ABI = Name;
       return true;
     }
     return false;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=212096&r1=212095&r2=212096&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jul  1 05:59:09 2014
@@ -950,8 +950,8 @@ static void getMipsCPUAndABI(const ArgLi
   if (!ABIName.empty()) {
     // Deduce CPU name from ABI name.
     CPUName = llvm::StringSwitch<const char *>(ABIName)
-      .Cases("32", "o32", "eabi", DefMips32CPU)
-      .Cases("n32", "n64", "64", DefMips64CPU)
+      .Cases("o32", "eabi", DefMips32CPU)
+      .Cases("n32", "n64", DefMips64CPU)
       .Default("");
   }
   else if (!CPUName.empty()) {





More information about the cfe-commits mailing list