<p dir="ltr">OK. </p>
<br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 22, 2016, 5:05 PM Justin Lebar <<a href="mailto:jlebar@google.com">jlebar@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">jlebar created this revision.<br>
jlebar added a reviewer: tra.<br>
jlebar added subscribers: echristo, jhen, llvm-commits.<br>
<br>
Helper so we don't have to enumerate nvptx && nvptx64 everywhere.<br>
<br>
<a href="http://reviews.llvm.org/D16494" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16494</a><br>
<br>
Files:<br>
include/llvm/ADT/Triple.h<br>
<br>
Index: include/llvm/ADT/Triple.h<br>
===================================================================<br>
--- include/llvm/ADT/Triple.h<br>
+++ include/llvm/ADT/Triple.h<br>
@@ -546,6 +546,11 @@<br>
/// Tests whether the target is Android<br>
bool isAndroid() const { return getEnvironment() == Triple::Android; }<br>
<br>
+ /// Tests whether the target is NVPTX (32- or 64-bit).<br>
+ bool isNVPTX() const {<br>
+ return getArch() == Triple::nvptx || getArch() == Triple::nvptx64;<br>
+ }<br>
+<br>
/// @}<br>
/// @name Mutators<br>
/// @{<br>
<br>
<br>
</blockquote></div>