[PATCH] D112297: [LTO] Fix assertion failed when flushing bitcode incrementally for LTO output.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 14:07:33 PDT 2021


dexonsmith added inline comments.


================
Comment at: llvm/lib/Support/raw_ostream.cpp:918
+  sys::fs::file_status Status;
+  EC = status(get_fd(), Status);
+  if (EC || Status.type() != sys::fs::file_type::regular_file)
----------------
steven_wu wrote:
> Would it be better to cache the result in the constructor for raw_fd_ostream? Adding another `status` call might not be optimal. 
> 
> @dexonsmith Do you have any concerns over this?
Agreed that adding a stat is potentially expensive; is there already one in the other `raw_fd_ostream` constructor? Why not reuse it?



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

https://reviews.llvm.org/D112297



More information about the llvm-commits mailing list