[Lldb-commits] [PATCH] D40079: Make sure DataBufferLLVM contents are writable
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 15 16:36:23 PST 2017
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.
More information about the lldb-commits