#define WIN32_LEAN_AND_MEAN
#include "llvm/Config/config.h" // Get build system configuration settings
+#include "llvm/Support/Compiler.h"
#include <windows.h>
#include <wincrypt.h>
#include <shlobj.h>
}
// True if Handle is valid.
- operator bool() const {
+ LLVM_EXPLICIT operator bool() const {
return HandleTraits::IsValid(Handle) ? true : false;
}
}
};
-struct FileMappingHandleTraits : CommonHandleTraits {
- static handle_type GetInvalid() {
- return 0;
- }
-};
-
-struct MappedViewOfFileHandleTraits : CommonHandleTraits {
- typedef LPVOID handle_type;
-
- static handle_type GetInvalid() {
- return 0;
- }
-
- static void Close(handle_type h) {
- ::UnmapViewOfFile(h);
- }
-};
-
struct FileHandleTraits : CommonHandleTraits {};
typedef ScopedHandle<CommonHandleTraits> ScopedCommonHandle;
typedef ScopedHandle<CryptContextTraits> ScopedCryptContext;
typedef ScopedHandle<FindHandleTraits> ScopedFindHandle;
typedef ScopedHandle<JobHandleTraits> ScopedJobHandle;
-typedef ScopedHandle<FileMappingHandleTraits> ScopedFileMappingHandle;
-typedef ScopedHandle<MappedViewOfFileHandleTraits> ScopedMappedViewOfFileHandle;
namespace llvm {
template <class T>