[patch][rfc] Add pwrite to raw_stream

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Apr 9 05:57:18 PDT 2015


>> If being able to pass this thing to raw_ostream-accepting interfaces is
>> actually critical, sure.
>
> LLVMTargetMachine::addPassesToEmitFile, see above.
>

I have an idea that might solve the issue.

In the end, the object writers do want something like a raw_ostream.
In particular, the efficient non-virtual buffering is just perfect.

What can probably be done is pass a simple raw_ostream to
LLVMTargetMachine::addPassesToEmitFile and it is its job to wrap it in
a   formatted_raw_ostream for asm printing and in a
raw_svector_ostream if needed for object writing.

Trying it out.

Cheers,
Rafael



More information about the llvm-commits mailing list