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

stephan.yichao.zhao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 17:00:45 PDT 2021


stephan.yichao.zhao added a comment.

In D112297#3091836 <https://reviews.llvm.org/D112297#3091836>, @MaskRay wrote:

> Before `openLTOOutputFile` is called, the output may be non-existent.
> Then `if (!sys::fs::is_regular_file(file))` will disable the D86905 <https://reviews.llvm.org/D86905> memory optimization.

The code eventually uses this check <https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/raw_ostream.cpp#L650-L652> to decide if a file is seekable.
The windows branch checks if a file is a regular file because of pipe. For non-linux, I guess the lseek(/dev/null, 0) does not return -1 for some reason. 
Is it possible to put the check here?


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

https://reviews.llvm.org/D112297



More information about the llvm-commits mailing list