Replace MessageReader and MessageWriter with Message.

Change-Id: I4b23d5a1e0e39dc2487f252a0947f11328e33090
This commit is contained in:
Peter Johnson
2015-07-12 11:24:34 -07:00
parent 1760d32019
commit 2016bcb37a
12 changed files with 435 additions and 446 deletions

View File

@@ -50,6 +50,10 @@ class WireEncoder {
/* Returns number of bytes written to memory buffer. */
std::size_t size() const { return m_cur - m_start; }
llvm::StringRef ToStringRef() const {
return llvm::StringRef(m_start, m_cur - m_start);
}
/* Ensures the buffer has sufficient space to write len bytes. Reallocates
* the buffer if necessary.
*/