[pdb] Refactor library to more clearly separate reading/writing

Reviewed By: amccarth, ruiu
Differential Revision: https://reviews.llvm.org/D22693

llvm-svn: 277019
This commit is contained in:
Zachary Turner
2016-07-28 19:12:28 +00:00
parent 199f48a5f0
commit d66889cbae
52 changed files with 964 additions and 864 deletions

View File

@@ -17,10 +17,12 @@ using namespace llvm::msf;
ModuleSubstream::ModuleSubstream() : Kind(ModuleSubstreamKind::None) {}
ModuleSubstream::ModuleSubstream(ModuleSubstreamKind Kind, StreamRef Data)
ModuleSubstream::ModuleSubstream(ModuleSubstreamKind Kind,
ReadableStreamRef Data)
: Kind(Kind), Data(Data) {}
Error ModuleSubstream::initialize(StreamRef Stream, ModuleSubstream &Info) {
Error ModuleSubstream::initialize(ReadableStreamRef Stream,
ModuleSubstream &Info) {
const ModuleSubsectionHeader *Header;
StreamReader Reader(Stream);
if (auto EC = Reader.readObject(Header))
@@ -40,4 +42,4 @@ uint32_t ModuleSubstream::getRecordLength() const {
ModuleSubstreamKind ModuleSubstream::getSubstreamKind() const { return Kind; }
StreamRef ModuleSubstream::getRecordData() const { return Data; }
ReadableStreamRef ModuleSubstream::getRecordData() const { return Data; }