From: David Majnemer Date: Wed, 21 Aug 2013 21:53:33 +0000 (+0000) Subject: ADT/Triple: Helper to determine if we are targeting the Windows CRT X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=79ef34d1802eeea48aa4e9346abecbf8ceb2e8eb 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188935 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 8d968e8fa3a..4b53ad2f689 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -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();