ADT/Triple: Helper to determine if we are targeting the Windows CRT
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 21 Aug 2013 21:53:33 +0000 (21:53 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 21 Aug 2013 21:53:33 +0000 (21:53 +0000)
Summary:
This support will be utilized in things like clang to help check printf
format specifiers that are only valid when using the VSCRT.

Reviewers: rnk, asl, chandlerc

Reviewed By: chandlerc

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188935 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h

index 8d968e8fa3aa38c6ba294465d08164602f8805d4..4b53ad2f68919b153c8ac32b7c71df91f294ee9b 100644 (file)
@@ -318,6 +318,11 @@ public:
     return getOS() == Triple::Cygwin || getOS() == Triple::MinGW32;
   }
 
     return getOS() == Triple::Cygwin || getOS() == Triple::MinGW32;
   }
 
+  /// \brief Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
+  bool isOSMSVCRT() const {
+    return getOS() == Triple::Win32 || getOS() == Triple::MinGW32;
+  }
+
   /// isOSWindows - Is this a "Windows" OS.
   bool isOSWindows() const {
     return getOS() == Triple::Win32 || isOSCygMing();
   /// isOSWindows - Is this a "Windows" OS.
   bool isOSWindows() const {
     return getOS() == Triple::Win32 || isOSCygMing();