Go to the documentation of this file.
21 #ifndef LLVM_SUPPORT_WINDOWSSUPPORT_H
22 #define LLVM_SUPPORT_WINDOWSSUPPORT_H
29 #define _WIN32_WINNT 0x0601
30 #define _WIN32_IE 0x0800 // MinGW at it again. FIXME: verify if still needed.
31 #define WIN32_LEAN_AND_MEAN
40 #include "llvm/Config/llvm-config.h"
48 #include <system_error>
68 bool MakeErrMsg(std::string *ErrMsg,
const std::string &prefix);
77 template <
typename HandleTraits>
79 typedef typename HandleTraits::handle_type handle_type;
86 : Handle(HandleTraits::GetInvalid()) {}
92 if (HandleTraits::IsValid(Handle))
93 HandleTraits::Close(Handle);
97 handle_type
t = Handle;
98 Handle = HandleTraits::GetInvalid();
103 if (HandleTraits::IsValid(Handle))
104 HandleTraits::Close(Handle);
110 explicit operator bool()
const {
111 return HandleTraits::IsValid(Handle) ?
true :
false;
114 operator handle_type()
const {
123 return INVALID_HANDLE_VALUE;
149 ::CryptReleaseContext(
h, 0);
202 ULARGE_INTEGER TimeInteger;
203 TimeInteger.LowPart = Time.dwLowDateTime;
204 TimeInteger.HighPart = Time.dwHighDateTime;
207 return std::chrono::nanoseconds(100 * TimeInteger.QuadPart);
211 ULARGE_INTEGER TimeInteger;
212 TimeInteger.LowPart = Time.dwLowDateTime;
213 TimeInteger.HighPart = Time.dwHighDateTime;
216 TimeInteger.QuadPart -= 11644473600
ll * 10000000;
219 return TimePoint<>(std::chrono::nanoseconds(100 * TimeInteger.QuadPart));
223 ULARGE_INTEGER TimeInteger;
224 TimeInteger.QuadPart = TP.time_since_epoch().count() / 100;
225 TimeInteger.QuadPart += 11644473600
ll * 10000000;
228 Time.dwLowDateTime = TimeInteger.LowPart;
229 Time.dwHighDateTime = TimeInteger.HighPart;
243 size_t MaxPathLen = MAX_PATH);
bool RunningWindows8OrGreater()
Determines if the program is running on Windows 8 or newer.
This is an optimization pass for GlobalISel generic memory operations.
llvm::VersionTuple GetWindowsOSVersion()
Returns the Windows version as Major.Minor.0.BuildNumber.
static void Close(handle_type h)
static void Close(handle_type h)
static handle_type GetInvalid()
ScopedHandle< FindHandleTraits > ScopedFindHandle
std::chrono::time_point< std::chrono::system_clock, D > TimePoint
A time point on the system clock.
ScopedHandle< RegTraits > ScopedRegHandle
bitcast float %x to i32 %s=and i32 %t, 2147483647 %d=bitcast i32 %s to float ret float %d } declare float @fabsf(float %n) define float @bar(float %x) nounwind { %d=call float @fabsf(float %x) ret float %d } This IR(from PR6194):target datalayout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple="x86_64-apple-darwin10.0.0" %0=type { double, double } %struct.float3=type { float, float, float } define void @test(%0, %struct.float3 *nocapture %res) nounwind noinline ssp { entry:%tmp18=extractvalue %0 %0, 0 t
static bool IsValid(handle_type h)
Analysis the ScalarEvolution expression for r is< loop > Outside the this could be evaluated simply however ScalarEvolution currently evaluates it it involves i65 which is very inefficient when expanded into code In formatValue in test CodeGen X86 lsr delayed fold ll
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
static handle_type GetInvalid()
Represents a version number in the form major[.minor[.subminor[.build]]].
std::error_code GetCommandLineArguments(SmallVectorImpl< const char * > &Args, BumpPtrAllocator &Alloc)
Allocate memory in an ever growing pool, as if by bump-pointer.
bool MakeErrMsg(std::string *ErrMsg, const std::string &prefix)
std::error_code widenPath(const Twine &Path8, SmallVectorImpl< wchar_t > &Path16, size_t MaxPathLen=MAX_PATH)
Convert UTF-8 path to a suitable UTF-16 path for use with the Win32 Unicode File API.
ScopedHandle< JobHandleTraits > ScopedJobHandle
static handle_type GetInvalid()
const CustomOperand< const MCSubtargetInfo & > Msg[]
static void Close(handle_type h)
ScopedHandle< CryptContextTraits > ScopedCryptContext
ScopedHandle(handle_type h)
static bool IsValid(handle_type h)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
ScopedHandle< FileHandleTraits > ScopedFileHandle
SmallVectorImpl< T >::const_pointer c_str(SmallVectorImpl< T > &str)
std::chrono::nanoseconds toDuration(FILETIME Time)
FILETIME toFILETIME(TimePoint<> TP)
ScopedHandle & operator=(handle_type h)
ScopedHandle< CommonHandleTraits > ScopedCommonHandle
static bool IsValid(handle_type h)
TimePoint< std::chrono::seconds > toTimePoint(std::time_t T)
Convert a std::time_t to a TimePoint.
static handle_type GetInvalid()
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
the multiplication has a latency of four as opposed to two cycles for the movl lea variant It appears gcc place string data with linkonce linkage in section coalesced instead of section coalesced Take a look at darwin h
static void Close(handle_type h)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
void ReportLastErrorFatal(const char *Msg)