[PATCH] D36489: [pdb] Merge PublicsStreamBuilder and GlobalsStreamBuilder

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 14:38:16 PDT 2017


zturner created this revision.
Herald added subscribers: hiraditya, mgorny.

the publics stream and globals stream are very similar.  They both contain a list of hash buckets that refer into a single shared stream, the symbol record stream.  Because of the need for each builder to manage both an independent hash stream as well as a single shared record stream, making the two builders be independent entities is not the right design.  This patch merges them into a single class, of which only a single instance is needed to create all 3 streams.  `PublicsStreamBuilder` and `GlobalsStreamBuilder` are now merged into the single `GSIStreamBuilder` class, which writes all 3 streams at once.

Note that this patch does not contain any functionality change.  So we're still not yet writing any records to the globals stream.  All we're doing is making it so that when we do start writing records to the globals, this refactor won't have to be part of that patch.


https://reviews.llvm.org/D36489

Files:
  lld/COFF/PDB.cpp
  lld/test/COFF/pdb-diff.test
  llvm/include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
  llvm/include/llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h
  llvm/include/llvm/DebugInfo/PDB/Native/GlobalsStreamBuilder.h
  llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
  llvm/include/llvm/DebugInfo/PDB/Native/PublicsStreamBuilder.h
  llvm/lib/DebugInfo/PDB/CMakeLists.txt
  llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
  llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
  llvm/lib/DebugInfo/PDB/Native/GlobalsStreamBuilder.cpp
  llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
  llvm/lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36489.110282.patch
Type: text/x-patch
Size: 35688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170808/d928b11c/attachment-0001.bin>


More information about the llvm-commits mailing list