Enable the use of pwrite in the object writers.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Apr 10 14:35:23 PDT 2015


> * Have buffer_ostream contain a buffer. That is probably the best for
> the users, but requires changing raw_svector_ostream to have a
> protected init method since it would be constructed before the buffer.
> I might still give this one a try.

That was fairly easy. So patches with it are attached. I like it a bit better

Another possible variation that I forgot to mention on the original email:

Have LLVMTargetMachine::addPassesToEmitFile create the buffer stream
when seeking is not supported. The disadvantage is that it would
require a "supportsSeeking()" method in the base, so it looks like a
clumsy version of isa/dyn_cast. It would also not solve clang's other
uses of streams.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.patch
Type: text/x-patch
Size: 85045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150410/3f748948/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-patch
Size: 18615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150410/3f748948/attachment-0001.bin>


More information about the llvm-commits mailing list