[llvm] r188935 - ADT/Triple: Helper to determine if we are targeting the Windows CRT

David Majnemer david.majnemer at gmail.com
Wed Aug 21 14:53:33 PDT 2013


Author: majnemer
Date: Wed Aug 21 16:53:33 2013
New Revision: 188935

URL: http://llvm.org/viewvc/llvm-project?rev=188935&view=rev
Log:
ADT/Triple: Helper to determine if we are targeting the Windows CRT

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

Modified:
    llvm/trunk/include/llvm/ADT/Triple.h

Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=188935&r1=188934&r2=188935&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Wed Aug 21 16:53:33 2013
@@ -318,6 +318,11 @@ public:
     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();





More information about the llvm-commits mailing list