llvm-project/llvm/lib
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
..
Analysis [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
AsmParser [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
Bitcode [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
CodeGen [CodeView] Provide a common interface for type collections. 2017-05-18 23:03:06 +00:00
DebugInfo [CodeView] Provide a common interface for type collections. 2017-05-18 23:03:06 +00:00
Demangle Revert r303375 "LLVM_FALLTHROUGH instead of fall-through comment." 2017-05-18 20:18:24 +00:00
ExecutionEngine [RuntimeDyld] Fix debug section relocation (pr20457) 2017-05-17 08:47:28 +00:00
Fuzzer [libFuzzer] fix tests on Windows 2017-05-15 22:55:00 +00:00
IR [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [ThinLTO] Do not assert when adding a module with a different but 2017-05-18 03:52:29 +00:00
LineEditor
Linker [ThinLTO] Do not assert when adding a module with a different but 2017-05-18 03:52:29 +00:00
MC MCObjectStreamer : fail with a diagnostic when emitting an out of range value. 2017-05-15 08:43:27 +00:00
Object [lib/Object] - Minor API update for llvm::Decompressor. 2017-05-18 08:00:01 +00:00
ObjectYAML [WebAssembly] Fix build error in wasm YAML code 2017-05-10 00:14:04 +00:00
Option ArgList: cache index ranges containing arguments with each ID 2017-04-12 23:19:51 +00:00
Passes [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline. 2017-05-04 16:58:45 +00:00
ProfileData Change sample profile writer to make it deterministic. 2017-05-11 23:43:44 +00:00
Support [ThinLTO] Do not assert when adding a module with a different but 2017-05-18 03:52:29 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target Revert r302938 "Add LiveRangeShrink pass to shrink live range within BB." 2017-05-18 18:50:05 +00:00
ToolDrivers Add missing files 2017-05-13 22:10:13 +00:00
Transforms [NewGVN] Replace predicate info leftovers. 2017-05-18 21:43:23 +00:00
XRay [XRay][lib] Support and temporarily skip over CustomEvent records 2017-05-12 01:06:41 +00:00
CMakeLists.txt Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI. 2017-05-13 22:06:46 +00:00
LLVMBuild.txt Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI. 2017-05-13 22:06:46 +00:00