aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/Triple.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/Triple.h')
-rw-r--r--include/llvm/ADT/Triple.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
index 8d968e8..84e0b29 100644
--- a/include/llvm/ADT/Triple.h
+++ b/include/llvm/ADT/Triple.h
@@ -14,6 +14,7 @@
// Some system headers or GCC predefined macros conflict with identifiers in
// this file. Undefine them here.
+#undef NetBSD
#undef mips
#undef sparc
@@ -318,7 +319,12 @@ public:
return getOS() == Triple::Cygwin || getOS() == Triple::MinGW32;
}
- /// isOSWindows - Is this a "Windows" OS.
+ /// \brief Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
+ bool isOSMSVCRT() const {
+ return getOS() == Triple::Win32 || getOS() == Triple::MinGW32;
+ }
+
+ /// \brief Tests whether the OS is Windows.
bool isOSWindows() const {
return getOS() == Triple::Win32 || isOSCygMing();
}
@@ -328,6 +334,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();