From bac69d33d013a86277cf2acb9809819e1623c732 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 22 Jul 2016 19:56:05 +0000 Subject: [msf] Create LLVMDebugInfoMsf This provides a better layering of responsibilities among different aspects of PDB writing code. Some of the MSF related code was contained in CodeView, and some was in PDB prior to this. Further, we were often saying PDB when we meant MSF, and the two are actually independent of each other since in theory you can have other types of data besides PDB data in an MSF. So, this patch separates the MSF specific code into its own library, with no dependencies on anything else, and DebugInfoCodeView and DebugInfoPDB take dependencies on DebugInfoMsf. llvm-svn: 276458 --- llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp') diff --git a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp index 6d94295d126..428df0630a0 100644 --- a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp +++ b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp @@ -13,11 +13,13 @@ #include "llvm/DebugInfo/CodeView/EnumTables.h" #include "llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h" #include "llvm/DebugInfo/CodeView/SymbolDumper.h" +#include "llvm/DebugInfo/Msf/IndexedStreamData.h" +#include "llvm/DebugInfo/Msf/MappedBlockStream.h" +#include "llvm/DebugInfo/Msf/StreamReader.h" #include "llvm/DebugInfo/PDB/PDBExtras.h" #include "llvm/DebugInfo/PDB/Raw/DbiStream.h" #include "llvm/DebugInfo/PDB/Raw/EnumTables.h" #include "llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h" -#include "llvm/DebugInfo/PDB/Raw/IndexedStreamData.h" #include "llvm/DebugInfo/PDB/Raw/InfoStream.h" #include "llvm/DebugInfo/PDB/Raw/ModInfo.h" #include "llvm/DebugInfo/PDB/Raw/ModStream.h" @@ -31,6 +33,7 @@ using namespace llvm; using namespace llvm::codeview; +using namespace llvm::msf; using namespace llvm::pdb; static void printSectionOffset(llvm::raw_ostream &OS, @@ -260,7 +263,7 @@ Error LLVMOutputStyle::dumpStreamData() { auto S = MappedBlockStream::createIndexedStream(DumpStreamNum, File); if (!S) return S.takeError(); - codeview::StreamReader R(**S); + StreamReader R(**S); while (R.bytesRemaining() > 0) { ArrayRef Data; uint32_t BytesToReadInBlock = std::min( @@ -313,7 +316,7 @@ Error LLVMOutputStyle::dumpNamedStream() { MappedBlockStream::createIndexedStream(NameStreamIndex, File); if (!NameStream) return NameStream.takeError(); - codeview::StreamReader Reader(**NameStream); + StreamReader Reader(**NameStream); NameHashTable NameTable; if (auto EC = NameTable.load(Reader)) -- cgit v1.2.3