[PATCH] D98426: [llvm-objcopy][Support] move writeToStream helper function to Support.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 23 09:13:55 PDT 2023


avl added inline comments.


================
Comment at: llvm/lib/Support/raw_ostream.cpp:1003
+
+  unsigned Mode = sys::fs::all_read | sys::fs::all_write | sys::fs::all_exe;
+  Expected<sys::fs::TempFile> Temp =
----------------
hokein wrote:
> is the all_exe mode intended here? (the clang-include-cleaner tool is using this API, I was debugging an issue where the file type of the modified file was changed executable).
yep, It looks incorrectly to set it by default. It would be better to remove it or make configurable.

there is similar API llvm::writeFileAtomically. probably it would be better to unite both of this APIs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98426/new/

https://reviews.llvm.org/D98426



More information about the llvm-commits mailing list