static void dumpNamedStream(ScopedPrinter &P, PDBFile &File, StringRef Stream) { InfoStream &IS = File.getPDBInfoStream(); uint32_t NameStreamIndex = IS.getNamedStreamIndex(Stream); if (NameStreamIndex != 0) { std::string Name("Stream '"); Name += Stream; Name += "'"; DictScope D(P, Name); P.printNumber("Index", NameStreamIndex); MappedBlockStream NameStream(NameStreamIndex, File); StreamReader Reader(NameStream); NameHashTable NameTable; NameTable.load(Reader); P.printHex("Signature", NameTable.getSignature()); P.printNumber("Version", NameTable.getHashVersion()); P.printNumber("Name Count", NameTable.getNameCount()); ListScope L(P, "Names"); for (uint32_t ID : NameTable.name_ids()) { StringRef Str = NameTable.getStringForID(ID); if (!Str.empty()) P.printString(Str); } } }
static void dumpInfoStream(ScopedPrinter &P, PDBFile &File) { InfoStream &IS = File.getPDBInfoStream(); DictScope D(P, "PDB Stream"); P.printNumber("Version", IS.getVersion()); P.printHex("Signature", IS.getSignature()); P.printNumber("Age", IS.getAge()); P.printObject("Guid", IS.getGuid()); }