[PATCH] D40378: Add an F_Delete flag
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 23 13:50:50 PST 2017
rafael updated this revision to Diff 124108.
rafael added a comment.
rebasde
https://reviews.llvm.org/D40378
Files:
include/llvm/Support/FileSystem.h
lib/Support/Windows/Path.inc
Index: lib/Support/Windows/Path.inc
===================================================================
--- lib/Support/Windows/Path.inc
+++ lib/Support/Windows/Path.inc
@@ -1031,6 +1031,8 @@
DWORD Access = GENERIC_WRITE;
if (Flags & F_RW)
Access |= GENERIC_READ;
+ if (Flags & F_Delete)
+ Access |= DELETE;
HANDLE H =
::CreateFileW(PathUTF16.begin(), Access,
Index: include/llvm/Support/FileSystem.h
===================================================================
--- include/llvm/Support/FileSystem.h
+++ include/llvm/Support/FileSystem.h
@@ -683,7 +683,11 @@
F_Text = 4,
/// Open the file for read and write.
- F_RW = 8
+ F_RW = 8,
+
+ /// The returned handle can be used for deleting the file. Only makes a
+ /// difference on windows.
+ F_Delete = 16
};
/// @brief Create a uniquely named file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40378.124108.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171123/1939f988/attachment.bin>
More information about the llvm-commits
mailing list