LLVM  6.0.0svn
Classes | Namespaces | Macros | Typedefs | Functions
WindowsSupport.h File Reference
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Config/config.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/Compiler.h"
#include <cassert>
#include <string>
#include <system_error>
#include <windows.h>
#include <wincrypt.h>
Include dependency graph for WindowsSupport.h:

Go to the source code of this file.

Classes

class  ScopedHandle< HandleTraits >
 
struct  CommonHandleTraits
 
struct  JobHandleTraits
 
struct  CryptContextTraits
 
struct  RegTraits
 
struct  FindHandleTraits
 
struct  FileHandleTraits
 
class  llvm::SmallVectorImpl< T >
 This class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter. More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 llvm::sys
 
 llvm::sys::path
 
 llvm::sys::windows
 

Macros

#define _WIN32_WINNT   0x0601
 
#define _WIN32_IE   0x0800
 
#define WIN32_LEAN_AND_MEAN
 
#define NOMINMAX
 

Typedefs

typedef ScopedHandle< CommonHandleTraitsScopedCommonHandle
 
typedef ScopedHandle< FileHandleTraitsScopedFileHandle
 
typedef ScopedHandle< CryptContextTraitsScopedCryptContext
 
typedef ScopedHandle< RegTraitsScopedRegHandle
 
typedef ScopedHandle< FindHandleTraitsScopedFindHandle
 
typedef ScopedHandle< JobHandleTraitsScopedJobHandle
 

Functions

bool RunningWindows8OrGreater ()
 Determines if the program is running on Windows 8 or newer. More...
 
bool MakeErrMsg (std::string *ErrMsg, const std::string &prefix)
 
template<class T >
SmallVectorImpl< T >::const_pointer llvm::c_str (SmallVectorImpl< T > &str)
 
std::chrono::nanoseconds llvm::sys::toDuration (FILETIME Time)
 
TimePoint llvm::sys::toTimePoint (FILETIME Time)
 
FILETIME llvm::sys::toFILETIME (TimePoint<> TP)
 
std::error_code llvm::sys::path::widenPath (const Twine &Path8, SmallVectorImpl< wchar_t > &Path16)
 
std::error_code llvm::sys::windows::UTF8ToUTF16 (StringRef utf8, SmallVectorImpl< wchar_t > &utf16)
 
std::error_code llvm::sys::windows::UTF16ToUTF8 (const wchar_t *utf16, size_t utf16_len, SmallVectorImpl< char > &utf8)
 
std::error_code llvm::sys::windows::UTF16ToCurCP (const wchar_t *utf16, size_t utf16_len, SmallVectorImpl< char > &utf8)
 Convert from UTF16 to the current code page used in the system. More...
 

Macro Definition Documentation

◆ _WIN32_IE

#define _WIN32_IE   0x0800

Definition at line 31 of file WindowsSupport.h.

◆ _WIN32_WINNT

#define _WIN32_WINNT   0x0601

Definition at line 30 of file WindowsSupport.h.

◆ NOMINMAX

#define NOMINMAX

Definition at line 34 of file WindowsSupport.h.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 32 of file WindowsSupport.h.

Typedef Documentation

◆ ScopedCommonHandle

Definition at line 197 of file WindowsSupport.h.

◆ ScopedCryptContext

Definition at line 199 of file WindowsSupport.h.

◆ ScopedFileHandle

Definition at line 198 of file WindowsSupport.h.

◆ ScopedFindHandle

Definition at line 201 of file WindowsSupport.h.

◆ ScopedJobHandle

Definition at line 202 of file WindowsSupport.h.

◆ ScopedRegHandle

Definition at line 200 of file WindowsSupport.h.

Function Documentation

◆ MakeErrMsg()

bool MakeErrMsg ( std::string *  ErrMsg,
const std::string &  prefix 
)
inline

◆ RunningWindows8OrGreater()

bool RunningWindows8OrGreater ( )
inline

Determines if the program is running on Windows 8 or newer.

This reimplements one of the helpers in the Windows 8.1 SDK, which are intended to supercede raw calls to GetVersionEx. Old SDKs, Cygwin, and MinGW don't yet have VersionHelpers.h, so we have our own helper.

Definition at line 56 of file WindowsSupport.h.

References llvm::BitmaskEnumDetail::Mask().

Referenced by llvm::raw_fd_ostream::~raw_fd_ostream().