<div dir="rtl"><div dir="ltr">Hi Rafael,</div><div dir="ltr"><br></div><div dir="ltr">raw_string_ostream is seekable like raw_svector_ostream, should it also inherit from raw_pwrite_stream?</div><div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-04-09 18:40 GMT+03:00 Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 9 April 2015 at 09:48, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
>> I have an idea that might solve the issue.<br>
>><br>
>> In the end, the object writers do want something like a raw_ostream.<br>
>> In particular, the efficient non-virtual buffering is just perfect.<br>
>><br>
>> What can probably be done is pass a simple raw_ostream to<br>
>> LLVMTargetMachine::addPassesToEmitFile and it is its job to wrap it in<br>
>> a   formatted_raw_ostream for asm printing and in a<br>
>> raw_svector_ostream if needed for object writing.<br>
>><br>
>> Trying it out.<br>
><br>
> The part about creating formatted_raw_ostream seems to work OK. This<br>
> patch goes on top of the other two (sorry, odd but convenient for<br>
> prototyping).<br>
><br>
> With this I think I can now pass a stronger type to<br>
> addPassesToEmitFile and remove pwrite from the base class. Will try it<br>
> out.<br>
<br>
</div></div>That works. Now to see if I can remove classof.<br>
<br>
Cheers,<br>
Rafael<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>