[BinaryStream] Support growable streams.
authorZachary Turner <zturner@google.com>
Mon, 27 Nov 2017 18:48:37 +0000 (18:48 +0000)
committerZachary Turner <zturner@google.com>
Mon, 27 Nov 2017 18:48:37 +0000 (18:48 +0000)
commit96c6985b5327845be772c2bc13567c2967969cc7
tree630b1fba2331a97d751864515dfa76eb6f168d15
parentec6e21427275ce1cdb2580aaa4167b143aab049c
[BinaryStream] Support growable streams.

The existing library assumed that a stream's length would never
change.  This makes some things simpler, but it's not flexible
enough for what we need, especially for writable streams where
what you really want is for each call to write to actually append.

llvm-svn: 319070
llvm/include/llvm/ADT/StringExtras.h
llvm/include/llvm/Support/BinaryByteStream.h
llvm/include/llvm/Support/BinaryItemStream.h
llvm/include/llvm/Support/BinaryStream.h
llvm/include/llvm/Support/BinaryStreamRef.h
llvm/lib/DebugInfo/MSF/MappedBlockStream.cpp
llvm/lib/Support/BinaryStreamRef.cpp
llvm/lib/Support/BinaryStreamWriter.cpp
llvm/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
llvm/unittests/Support/BinaryStreamTest.cpp