[PATCH] D86913: Add raw_fd_stream that supports reading/seeking/writing
stephan.yichao.zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 17:24:20 PDT 2020
stephan.yichao.zhao marked 4 inline comments as done.
stephan.yichao.zhao added inline comments.
================
Comment at: llvm/lib/Support/raw_ostream.cpp:920
+ // Do not support STDOUT_FILENO and non-seekable files.
+ if (Filename == "-" || !supportsSeeking()) {
+ EC = std::make_error_code(std::errc::invalid_argument);
----------------
MaskRay wrote:
> JDevlieghere wrote:
> > nit: the llvm style guide says no braces around single-line statements. Same in `raw_fd_stream::read` below.
> If stdout happens to be seekable, can the `Filename == "-" ` restriction be lifted?
Thanks. Just learned that stdout is seekable if it is redirected to a normal file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86913/new/
https://reviews.llvm.org/D86913
More information about the llvm-commits
mailing list