[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
Tue Jun 7 05:53:25 PDT 2016


dsanders created this revision.
dsanders added a subscriber: llvm-commits.
dsanders added a dependency: D20916: [WIP][mips] Allow explicit ABI's in MIPS triples within LLVM..
Herald added subscribers: sdardis, dsanders.

This requires corresponding patches in the other projects that may pass a
non-empty string in MCTargetOptions::ABIName. A clang patch will follow.

Depends on D20916

http://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.59874.patch
Type: text/x-patch
Size: 1005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/930aea9b/attachment.bin>


More information about the llvm-commits mailing list