diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-12-12 06:04:01 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-12-12 06:04:01 +0000 |
commit | c3b00e80400d27d5d6152374d87c0ad5866c780c (patch) | |
tree | 3adf92cdfd9478aae132d0d0d2ab5f25b57a79ed /lib/Support/Windows/Windows.h | |
parent | 1dd2ee7bf4d848e368829cb01033f297afb674ab (diff) |
Support/FileSystem: Implement canonicalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Windows.h')
-rw-r--r-- | lib/Support/Windows/Windows.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Support/Windows/Windows.h b/lib/Support/Windows/Windows.h index 5c1da0d617..2754075035 100644 --- a/lib/Support/Windows/Windows.h +++ b/lib/Support/Windows/Windows.h @@ -128,6 +128,24 @@ struct FindHandleTraits : CommonHandleTraits { } }; +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; @@ -135,6 +153,8 @@ typedef ScopedHandle<FileHandleTraits> ScopedFileHandle; 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> |