Add convenience accessor to Triple for OS == NaCl
authorEli Bendersky <eliben@google.com>
Fri, 7 Dec 2012 00:01:53 +0000 (00:01 +0000)
committerEli Bendersky <eliben@google.com>
Fri, 7 Dec 2012 00:01:53 +0000 (00:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169565 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h

index 57b2bb8c349233035a7b37088c08ea4e61052daa..49d9f6840412342ac9f1208848825d0f2703e2fa 100644 (file)
@@ -310,6 +310,11 @@ public:
     return getOS() == Triple::Win32 || isOSCygMing();
   }
 
+  /// \brief Tests whether the OS is NaCl (Native Client)
+  bool isOSNaCl() const {
+    return getOS() == Triple::NaCl;
+  }
+
   /// \brief Tests whether the OS uses the ELF binary format.
   bool isOSBinFormatELF() const {
     return !isOSDarwin() && !isOSWindows();