Tidied up target triple OS detection. NFC

Use Triple::isOS*() helper functions where possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222622 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Pilgrim
2014-11-22 19:12:10 +00:00
parent 2b76e1afc5
commit 53a43d38df
6 changed files with 25 additions and 14 deletions

View File

@ -364,10 +364,26 @@ public:
return isMacOSX() || isiOS();
}
bool isOSNetBSD() const {
return getOS() == Triple::NetBSD;
}
bool isOSOpenBSD() const {
return getOS() == Triple::OpenBSD;
}
bool isOSFreeBSD() const {
return getOS() == Triple::FreeBSD;
}
bool isOSSolaris() const {
return getOS() == Triple::Solaris;
}
bool isOSBitrig() const {
return getOS() == Triple::Bitrig;
}
bool isWindowsMSVCEnvironment() const {
return getOS() == Triple::Win32 &&
(getEnvironment() == Triple::UnknownEnvironment ||