[PATCH] D16494: [CUDA] Add Target::isNVPTX().

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 13:16:28 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL258639: [CUDA] Add Target::isNVPTX(). (authored by jlebar).

Changed prior to commit:
  http://reviews.llvm.org/D16494?vs=45772&id=45807#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16494

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

Index: llvm/trunk/include/llvm/ADT/Triple.h
===================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h
+++ llvm/trunk/include/llvm/ADT/Triple.h
@@ -546,6 +546,11 @@
   /// Tests whether the target is Android
   bool isAndroid() const { return getEnvironment() == Triple::Android; }
 
+  /// Tests whether the target is NVPTX (32- or 64-bit).
+  bool isNVPTX() const {
+    return getArch() == Triple::nvptx || getArch() == Triple::nvptx64;
+  }
+
   /// @}
   /// @name Mutators
   /// @{


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16494.45807.patch
Type: text/x-patch
Size: 539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160123/9df5cb74/attachment.bin>


More information about the llvm-commits mailing list