From 120faca41bddd3a5922bdefbeb7c68908fda9ab9 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 27 Feb 2017 22:11:43 +0000 Subject: [PDB] Partial resubmit of r296215, which improved PDB Stream Library. This was reverted because it was breaking some builds, and because of incorrect error code usage. Since the CL was large and contained many different things, I'm resubmitting it in pieces. This portion is NFC, and consists of: 1) Renaming classes to follow a consistent naming convention. 2) Fixing the const-ness of the interface methods. 3) Adding detailed doxygen comments. 4) Fixing a few instances of passing `const BinaryStream& X`. These are now passed as `BinaryStreamRef X`. llvm-svn: 296394 --- llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp') diff --git a/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp b/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp index 501188e96f6..5e229663844 100644 --- a/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/ModInfo.cpp @@ -16,7 +16,6 @@ #include using namespace llvm; -using namespace llvm::msf; using namespace llvm::pdb; using namespace llvm::support; @@ -26,15 +25,15 @@ ModInfo::ModInfo(const ModInfo &Info) = default; ModInfo::~ModInfo() = default; -Error ModInfo::initialize(ReadableStreamRef Stream, ModInfo &Info) { - StreamReader Reader(Stream); +Error ModInfo::initialize(BinaryStreamRef Stream, ModInfo &Info) { + BinaryStreamReader Reader(Stream); if (auto EC = Reader.readObject(Info.Layout)) return EC; - if (auto EC = Reader.readZeroString(Info.ModuleName)) + if (auto EC = Reader.readCString(Info.ModuleName)) return EC; - if (auto EC = Reader.readZeroString(Info.ObjFileName)) + if (auto EC = Reader.readCString(Info.ObjFileName)) return EC; return Error::success(); } -- cgit v1.2.3