[PATCH] D61639: Add Triple::isSPIR() to simplify code
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 9 03:14:20 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL360323: [SPIR] Simplified target checking. (authored by stulova, committed by ).
Herald added a subscriber: kristina.
Changed prior to commit:
https://reviews.llvm.org/D61639?vs=198429&id=198780#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61639/new/
https://reviews.llvm.org/D61639
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
@@ -671,6 +671,11 @@
getEnvironment() == Triple::MuslEABIHF;
}
+ /// Tests whether the target is SPIR (32- or 64-bit).
+ bool isSPIR() const {
+ return getArch() == Triple::spir || getArch() == Triple::spir64;
+ }
+
/// Tests whether the target is NVPTX (32- or 64-bit).
bool isNVPTX() const {
return getArch() == Triple::nvptx || getArch() == Triple::nvptx64;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61639.198780.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190509/c191589a/attachment.bin>
More information about the cfe-commits
mailing list