[PATCH] getStreamedBitcodeModule: take StreamingMemoryObject instead of DataStreamer

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Apr 24 06:02:50 PDT 2014


On 18 April 2014 14:14, Jan Voung <jvoung at chromium.org> wrote:
> jvoung added you to the CC list for the revision "getStreamedBitcodeModule: take StreamingMemoryObject instead of DataStreamer".
>
> Currently, getStreamedBitcodeModule takes a DataStreamer and then
> creates a StreamingMemoryObject for the BitcodeReader. That allows
> flexibility in the supplied DataStreamer implementation but does
> not allow flexibility in the StreamingMemoryObject implementation.
>
> For example, the StreamingMemoryObject might want to cache bytes
> in a thread-local way.
>

Do you have an example where that would not be the case? That is, why
not just add the features you need to DatStreamer?

In general having an interface with just one implementation is undesirable.

Cheers,
Rafael



More information about the llvm-commits mailing list