summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse.llvm@gmail.com>2018-08-03 10:13:35 +0000
committerJeremy Morse <jeremy.morse.llvm@gmail.com>2018-08-03 10:13:35 +0000
commit019406554b285f3f084bf2a82b4fe22108114fa4 (patch)
treeeaa59e11a53a13b1d8897a6fe283c3936f38c6ac /llvm/lib/Support/Windows
parentcb4dfaef471d9ff1990fe955a37a1696cd5995ad (diff)
downloadbcm5719-llvm-019406554b285f3f084bf2a82b4fe22108114fa4.tar.gz
bcm5719-llvm-019406554b285f3f084bf2a82b4fe22108114fa4.zip
[Windows FS] Allow moving files in TempFile::keep
In r338216 / D49860 TempFile::keep was extended to allow keeping across filesystems. The aim on Windows was to have this happen in rename_internal using the existing system API. However, to fix an issue and preserve the idea of "renaming" not being a move, put Windows keep-across-filesystem in TempFile::keep. Differential Revision: https://reviews.llvm.org/D50048 llvm-svn: 338841
Diffstat (limited to 'llvm/lib/Support/Windows')
-rw-r--r--llvm/lib/Support/Windows/Path.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index b64b013d740..f425d607af4 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -450,7 +450,7 @@ static std::error_code rename_handle(HANDLE FromHandle, const Twine &To) {
if (std::error_code EC2 = realPathFromHandle(FromHandle, WideFrom))
return EC2;
if (::MoveFileExW(WideFrom.begin(), WideTo.begin(),
- MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED))
+ MOVEFILE_REPLACE_EXISTING))
return std::error_code();
return mapWindowsError(GetLastError());
}
OpenPOWER on IntegriCloud