From 5acb4ac6d7989e5f59dd6bc035cc1110b2c830dd Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 10 Jun 2016 05:09:12 +0000 Subject: Add support for writing through StreamInterface. This adds method and tests for writing to a PDB stream. With this, even a PDB stream which is discontiguous can be treated as a sequential stream of bytes for the purposes of writing. Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21157 llvm-svn: 272369 --- llvm/tools/llvm-readobj/COFFDumper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/tools/llvm-readobj/COFFDumper.cpp') diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index 79559b7f018..dc7fe0e33ec 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -969,7 +969,7 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection, SectionContents); CVSymbolDumper CVSD(W, CVTD, std::move(CODD), opts::CodeViewSubsectionBytes); - ByteStream Stream(BinaryData); + ByteStream<> Stream(BinaryData); CVSymbolArray Symbols; StreamReader Reader(Stream); if (auto EC = Reader.readArray(Symbols, Reader.getLength())) { @@ -1077,7 +1077,7 @@ void COFFDumper::mergeCodeViewTypes(MemoryTypeTableBuilder &CVTypes) { error(object_error::parse_failed); ArrayRef Bytes(reinterpret_cast(Data.data()), Data.size()); - ByteStream Stream(Bytes); + ByteStream<> Stream(Bytes); CVTypeArray Types; StreamReader Reader(Stream); if (auto EC = Reader.readArray(Types, Reader.getLength())) { -- cgit v1.2.3