X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FPDB%2FPDBSymbolExe.cpp;h=c9e34ea501dd7947f6ac1d2915f9061438ffd1ba;hb=65d7d51529323933ff89df088ea20e0c33043b71;hp=69f928415f1c52ce525136dc23610b3d393a7e5e;hpb=02d62886678db69e8cc86baec381c5d86517fb25;p=oota-llvm.git diff --git a/lib/DebugInfo/PDB/PDBSymbolExe.cpp b/lib/DebugInfo/PDB/PDBSymbolExe.cpp index 69f928415f1..c9e34ea501d 100644 --- a/lib/DebugInfo/PDB/PDBSymbolExe.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolExe.cpp @@ -7,13 +7,10 @@ // //===----------------------------------------------------------------------===// -#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" -#include "llvm/DebugInfo/PDB/PDBExtras.h" -#include "llvm/DebugInfo/PDB/PDBSymbol.h" #include "llvm/DebugInfo/PDB/PDBSymbolExe.h" -#include "llvm/Support/ConvertUTF.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/raw_ostream.h" + +#include "llvm/DebugInfo/PDB/PDBSymDumper.h" + #include using namespace llvm; @@ -22,32 +19,4 @@ PDBSymbolExe::PDBSymbolExe(const IPDBSession &PDBSession, std::unique_ptr Symbol) : PDBSymbol(PDBSession, std::move(Symbol)) {} -void PDBSymbolExe::dump(raw_ostream &OS, int Indent, - PDB_DumpLevel Level) const { - std::string FileName(getSymbolsFileName()); - - OS << stream_indent(Indent) << "Summary for " << FileName << "\n"; - - uint64_t FileSize = 0; - if (!llvm::sys::fs::file_size(FileName, FileSize)) - OS << stream_indent(Indent + 2) << "Size: " << FileSize << " bytes\n"; - else - OS << stream_indent(Indent + 2) << "Size: (Unable to obtain file size)\n"; - PDB_UniqueId Guid = getGuid(); - OS << stream_indent(Indent + 2) << "Guid: " << Guid << "\n"; - OS << stream_indent(Indent + 2) << "Age: " << getAge() << "\n"; - OS << stream_indent(Indent + 2) << "Attributes: "; - if (hasCTypes()) - OS << "HasCTypes "; - if (hasPrivateSymbols()) - OS << "HasPrivateSymbols "; - OS << "\n"; - - TagStats Stats; - auto ChildrenEnum = getChildStats(Stats); - OS << stream_indent(Indent + 2) << "Children: " << Stats << "\n"; - while (auto Child = ChildrenEnum->getNext()) { - Child->dump(OS, Indent + 4, PDB_DumpLevel::Normal); - OS << "\n"; - } -} +void PDBSymbolExe::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }