Add convenience accessor to Triple for OS == NaCl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Bendersky 2012-12-07 00:01:53 +00:00
parent e40aecf037
commit 105fdbb131

View 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();