zturner added a comment.

On second thought I actually think the strategy used here is fine.  But we have 
`llvm::WritableBinaryStream` which could server as a single base interface for 
a `mapped_file_region` based implementation as well as a malloc-based 
implementation.

For the malloc based implementation, we already have 
`WritableBinaryByteStream`, so you don't even need to implement that.

The nice thing about this is that it could later be improved to use the stream 
reader / stream writer idiom, which gets rid of a ton of manual pointer 
arithmetic and management.


https://reviews.llvm.org/D40079



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to