OSDN Git Service

[PDB] Merge Global and Publics Builders.
authorZachary Turner <zturner@google.com>
Wed, 9 Aug 2017 04:23:25 +0000 (04:23 +0000)
committerZachary Turner <zturner@google.com>
Wed, 9 Aug 2017 04:23:25 +0000 (04:23 +0000)
commit3be08b1e5e1d5f97c68347bef921e7fb07620926
treebfb8983bb36925b78addc56baf4bef3bdec83b2b
parent94b1780d8ae1fa3ad5b8e48f31b6f7a3c64f6982
[PDB] Merge Global and Publics Builders.

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.

Differential Revision: https://reviews.llvm.org/D36489

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310438 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
include/llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h [moved from include/llvm/DebugInfo/PDB/Native/PublicsStreamBuilder.h with 56% similarity]
include/llvm/DebugInfo/PDB/Native/GlobalsStreamBuilder.h [deleted file]
include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
lib/DebugInfo/PDB/CMakeLists.txt
lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp [new file with mode: 0644]
lib/DebugInfo/PDB/Native/GlobalsStreamBuilder.cpp [deleted file]
lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
lib/DebugInfo/PDB/Native/PublicsStreamBuilder.cpp [deleted file]