Yaron Keren via llvm-dev
2016-Feb-22 19:01 UTC
[llvm-dev] raw_pwrite_stream to string or stdout?
Note that raw_fd_ostream is not seekable, and hence will not be suitable as addPassesToEmitFile output stream. 2016-02-22 18:27 GMT+02:00 Rafael Espíndola <llvm-dev at lists.llvm.org>:> On 22 February 2016 at 11:16, Frank Winter <fwinter at jlab.org> wrote: > > TargetMachine::CGFT_AssemblyFile is exactly what I am trying to write > out. > > I see. > > For that I think we should be able to just change outs() to return a > raw_fd_ostream. It is already implemented with one anyway. > > Cheers, > Rafael > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160222/6620c61e/attachment-0001.html>
Rafael Espíndola via llvm-dev
2016-Feb-22 19:08 UTC
[llvm-dev] raw_pwrite_stream to string or stdout?
On 22 February 2016 at 14:01, Yaron Keren <yaron.keren at gmail.com> wrote:> Note that raw_fd_ostream is not seekable, and hence will not be suitable as > addPassesToEmitFile output stream.It is: class raw_fd_ostream : public raw_pwrite_stream { ... bool addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out... Cheers, Rafael
Yaron Keren via llvm-dev
2016-Feb-22 19:26 UTC
[llvm-dev] raw_pwrite_stream to string or stdout?
Yes, you are correct. I had in mind the usual use of outs() for console or pipe, where raw_fd_ostream::SupportsSeeking will be false and actually not seekable. Looking at the code, shouldn't raw_fd_ostream::seek assert(SupportsSeeking)? 2016-02-22 21:08 GMT+02:00 Rafael Espíndola <rafael.espindola at gmail.com>:> On 22 February 2016 at 14:01, Yaron Keren <yaron.keren at gmail.com> wrote: > > Note that raw_fd_ostream is not seekable, and hence will not be suitable > as > > addPassesToEmitFile output stream. > > It is: > > class raw_fd_ostream : public raw_pwrite_stream { > > ... > bool addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out... > > Cheers, > Rafael >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160222/47244b53/attachment.html>