[PATCH] D85690: [split-file] Fix sys::fs::remove() on Solaris after D83834
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 08:06:24 PDT 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdbc468dc3199: [split-file] Fix sys::fs::remove() on Solaris after D83834 (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85690/new/
https://reviews.llvm.org/D85690
Files:
llvm/tools/split-file/split-file.cpp
Index: llvm/tools/split-file/split-file.cpp
===================================================================
--- llvm/tools/split-file/split-file.cpp
+++ llvm/tools/split-file/split-file.cpp
@@ -166,7 +166,8 @@
status.type() != sys::fs::file_type::regular_file)
fatal(output, "output cannot be a special file");
if (std::error_code ec = sys::fs::remove(output, /*IgnoreNonExisting=*/true))
- if (ec.value() != static_cast<int>(std::errc::directory_not_empty))
+ if (ec.value() != static_cast<int>(std::errc::directory_not_empty) &&
+ ec.value() != static_cast<int>(std::errc::file_exists))
fatal(output, ec.message());
return handle(**bufferOrErr, input);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85690.284734.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200811/98cd1851/attachment.bin>
More information about the llvm-commits
mailing list