[patch][rfc] Add pwrite to raw_stream
Sean Silva
chisophugis at gmail.com
Wed Apr 8 18:06:23 PDT 2015
On Wed, Apr 8, 2015 at 5:35 PM, Rafael EspĂndola <rafael.espindola at gmail.com
> wrote:
> On 8 April 2015 at 20:25, Sean Silva <chisophugis at gmail.com> wrote:
> > It stops being a "stream" when you add the ability to write at a
> specified
> > offset. It's like adding operator+= to something with "outputiterator" in
> > the name. Is there a reason that this has to live inside raw_ostream?
>
> The object writer has to write to something. It can do it better if
> that something supports at least pwrite.
>
Well, it's not only that; it just seems to sort of violate the whole idea
of raw_ostream:
00035 /// raw_ostream - This class implements an extremely fast bulk
output stream00036 /// that can *only* output to a stream. It does
not support seeking, reopening,00037 /// rewinding, line buffered
disciplines etc. It is a simple buffer that outputs00038 /// a chunk
at a time.
I think it would be better to not tie this directly into raw_ostream.
-- Sean Silva
> We can rename it, but seems a bit heavy handed.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150408/002dbf38/attachment.html>
More information about the llvm-commits
mailing list