This patch removes the manual byte counting in all internal Stream methods.
This is now done by the automatic byte counting provided by calling GetWrittenBytes()
before and after writing the data (which is automatically done for us by the ByteDelta
utility class).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
What would you say to moving this class to the header, so that it can be used in all the other byte-counting patches too?
Comment Actions
- Made ByteDelta public.
- Minor fixes.
@labath It sounds reasonable to make ByteDelta public. It certainly improves the byte-counting code outside of Stream, even though it hopefully doesn't encourage anyone to do even more byte-counting in LLDB. (Also thanks for reviewing!)