diff options
author | Cameron Esfahani <dirty@apple.com> | 2013-08-29 20:23:14 +0000 |
---|---|---|
committer | Cameron Esfahani <dirty@apple.com> | 2013-08-29 20:23:14 +0000 |
commit | 441c557708b5dbe91f1799baf790ad418c23ea70 (patch) | |
tree | 07017978679109c2e45a6669ff163cf87ee1c609 /include | |
parent | 9071f68fd2b18abaee614e07ae6da6d8bc34426e (diff) | |
download | external_llvm-441c557708b5dbe91f1799baf790ad418c23ea70.zip external_llvm-441c557708b5dbe91f1799baf790ad418c23ea70.tar.gz external_llvm-441c557708b5dbe91f1799baf790ad418c23ea70.tar.bz2 |
Clean up some usage of Triple. The base class has methods for determining if the target is iOS and Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/Triple.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 4b53ad2..3fccf41 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -323,7 +323,7 @@ public: return getOS() == Triple::Win32 || getOS() == Triple::MinGW32; } - /// isOSWindows - Is this a "Windows" OS. + /// \brief Tests whether the OS is Windows. bool isOSWindows() const { return getOS() == Triple::Win32 || isOSCygMing(); } @@ -333,6 +333,11 @@ public: return getOS() == Triple::NaCl; } + /// \brief Tests whether the OS is Linux. + bool isOSLinux() const { + return getOS() == Triple::Linux; + } + /// \brief Tests whether the OS uses the ELF binary format. bool isOSBinFormatELF() const { return !isOSDarwin() && !isOSWindows(); |