summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Windows.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-12-12 06:04:01 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-12-12 06:04:01 +0000
commit32ef4d2e1bff1a23d42a7dfa0a5d248344b6c47e (patch)
tree20850c7aae0532cfbbb2f0cd69e7347bc2673002 /llvm/lib/Support/Windows/Windows.h
parent513f1b666f3b36bdcb5c3eed5061a19678f53e53 (diff)
downloadbcm5719-llvm-32ef4d2e1bff1a23d42a7dfa0a5d248344b6c47e.tar.gz
bcm5719-llvm-32ef4d2e1bff1a23d42a7dfa0a5d248344b6c47e.zip
Support/FileSystem: Implement canonicalize.
llvm-svn: 146363
Diffstat (limited to 'llvm/lib/Support/Windows/Windows.h')
-rw-r--r--llvm/lib/Support/Windows/Windows.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Windows.h b/llvm/lib/Support/Windows/Windows.h
index 5c1da0d617a..27540750355 100644
--- a/llvm/lib/Support/Windows/Windows.h
+++ b/llvm/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>
OpenPOWER on IntegriCloud