[PATCH] D120381: [SPARC] Add isSparc for SPARC

Xiaodong Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 22 22:11:24 PST 2022


XiaodongLoong updated this revision to Diff 410710.
XiaodongLoong added a comment.

rebase code


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120381/new/

https://reviews.llvm.org/D120381

Files:
  llvm/include/llvm/ADT/Triple.h


Index: llvm/include/llvm/ADT/Triple.h
===================================================================
--- llvm/include/llvm/ADT/Triple.h
+++ llvm/include/llvm/ADT/Triple.h
@@ -824,6 +824,12 @@
     return getArch() == Triple::riscv32 || getArch() == Triple::riscv64;
   }
 
+  /// Tests whether the target is Sparc.
+  bool isSparc() const {
+    return getArch() == Triple::sparc || getArch() == Triple::sparcv9 ||
+           getArch() == Triple::sparcel;
+  }
+
   /// Tests whether the target is SystemZ.
   bool isSystemZ() const {
     return getArch() == Triple::systemz;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120381.410710.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220223/4dbc20f9/attachment.bin>


More information about the llvm-commits mailing list