llvm-project/llvm/lib/DebugInfo/PDB/Native
Zachary Turner 0c60f269fc [CodeView] Provide a common interface for type collections.
Right now we have multiple notions of things that represent collections of
types. Most commonly used are TypeDatabase, which is supposed to keep
mappings from TypeIndex to type name when reading a type stream, which
happens when reading PDBs. And also TypeTableBuilder, which is used to
build up a collection of types dynamically which we will later serialize
(i.e. when writing PDBs).

But often you just want to do some operation on a collection of types, and
you may want to do the same operation on any kind of collection. For
example, you might want to merge two TypeTableBuilders or you might want
to merge two type streams that you loaded from various files.

This dichotomy between reading and writing is responsible for a lot of the
existing code duplication and overlapping responsibilities in the existing
CodeView library classes. For example, after building up a
TypeTableBuilder with a bunch of type records, if we want to dump it we
have to re-invent a bunch of extra glue because our dumper takes a
TypeDatabase or a CVTypeArray, which are both incompatible with
TypeTableBuilder.

This patch introduces an abstract base class called TypeCollection which
is shared between the various type collection like things. Wherever we
previously stored a TypeDatabase& in some common class, we now store a
TypeCollection&.

The advantage of this is that all the details of how the collection are
implemented, such as lazy deserialization of partial type streams, is
completely transparent and you can just treat any collection of types the
same regardless of where it came from.

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

llvm-svn: 303388
2017-05-18 23:03:06 +00:00
..
DbiModuleDescriptor.cpp [llvm-pdbdump] Abstract some of the YAML/Raw printing code. 2017-04-29 01:13:21 +00:00
DbiModuleDescriptorBuilder.cpp Fix use after free in BinaryStream library. 2017-05-03 05:34:00 +00:00
DbiModuleList.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
DbiStream.cpp Fix some minor issues in PDB parsing library. 2017-05-18 15:14:44 +00:00
DbiStreamBuilder.cpp [CodeView] Write CodeView line information. 2017-05-01 23:27:42 +00:00
EnumTables.cpp
GSI.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
GSI.h [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
GlobalsStream.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
Hash.cpp
HashTable.cpp [PDB] Make streams carry their own endianness. 2017-02-28 00:04:07 +00:00
InfoStream.cpp Silence -Wcovered-switch-default warning. 2017-03-16 20:45:11 +00:00
InfoStreamBuilder.cpp [PDB] Add support for parsing Flags from PDB Stream. 2017-03-16 20:19:11 +00:00
ModuleDebugStream.cpp [PDB/CodeView] Rename some classes. 2017-05-01 16:46:39 +00:00
ModuleDebugStreamBuilder.cpp [CodeView] Write CodeView line information. 2017-05-01 23:27:42 +00:00
NamedStreamMap.cpp [llvm-pdbdump] Add support for diffing the PDB Stream. 2017-03-16 20:18:41 +00:00
NativeCompilandSymbol.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
NativeEnumModules.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
NativeExeSymbol.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
NativeRawSymbol.cpp [llvm-pdbdump] Re-write the record layout code to be more resilient. 2017-04-24 17:47:24 +00:00
NativeSession.cpp [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
PDBFile.cpp Resubmit r301986 and r301987 "Add codeview::StringTable" 2017-05-03 15:58:37 +00:00
PDBFileBuilder.cpp [llvm-pdbdump] in yaml2pdb, generate default output filename if none given 2017-05-17 20:46:48 +00:00
PDBStringTable.cpp [llvm-readobj] Update readobj to re-use parsing code. 2017-05-03 17:11:11 +00:00
PDBStringTableBuilder.cpp Resubmit r301986 and r301987 "Add codeview::StringTable" 2017-05-03 15:58:37 +00:00
PDBTypeServerHandler.cpp [CodeView] Provide a common interface for type collections. 2017-05-18 23:03:06 +00:00
PublicsStream.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
RawError.cpp [pdb] Write the module info and symbol record streams. 2017-03-15 22:18:53 +00:00
SymbolStream.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
TpiHashing.cpp
TpiStream.cpp [CodeView] Provide a common interface for type collections. 2017-05-18 23:03:06 +00:00
TpiStreamBuilder.cpp [CodeView] Add a random access type visitor. 2017-05-12 19:18:12 +00:00