[PATCH] D21069: [mips] Require that ABI's are passed in the triple within LLVM.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 06:42:44 PDT 2016


dsanders updated this revision to Diff 64873.
dsanders added a comment.
Herald added a subscriber: aemerson.

Refresh and ping


https://reviews.llvm.org/D21069

Files:
  lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp

Index: lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
===================================================================
--- lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
+++ lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
@@ -49,14 +49,9 @@
 
 MipsABIInfo MipsABIInfo::computeTargetABI(const Triple &TT, StringRef CPU,
                                           const MCTargetOptions &Options) {
-  if (Options.getABIName().startswith("o32"))
-    return MipsABIInfo::O32();
-  else if (Options.getABIName().startswith("n32"))
-    return MipsABIInfo::N32();
-  else if (Options.getABIName().startswith("n64"))
-    return MipsABIInfo::N64();
-  else if (!Options.getABIName().empty())
-    llvm_unreachable("Unknown ABI option for MIPS");
+  if (!Options.getABIName().empty())
+    llvm_unreachable(
+        "ABI name should be in triple. See Triple::getABIVariant()");
   else if (TT.getEnvironment() == Triple::ABI32 ||
            TT.getEnvironment() == Triple::GNUABI32)
     return MipsABIInfo::O32();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21069.64873.patch
Type: text/x-patch
Size: 1005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160721/71f07530/attachment.bin>


More information about the llvm-commits mailing list