1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/tools/llvm-readobj
Zachary Turner fa65a3c140 [CodeView] Finish decoupling TypeDatabase from TypeDumper.
Previously the type dumper itself was passed around to a lot of different
places and manipulated in ways that were more appropriate on the type
database. For example, the entire TypeDumper was passed into the symbol
dumper, when all the symbol dumper wanted to do was lookup the name of a
TypeIndex so it could print it. That's what the TypeDatabase is for --
mapping type indices to names.

Another example is how if the user runs llvm-pdbdump with the option to
dump symbols but not types, we still have to visit all types so that we
can print minimal information about the type of a symbol, but just without
dumping full symbol records. The way we did this before is by hacking it
up so that we run everything through the type dumper with a null printer,
so that the output goes to /dev/null. But really, we don't need to dump
anything, all we want to do is build the type database. Since
TypeDatabaseVisitor now exists independently of TypeDumper, we can do
this. We just build a custom visitor callback pipeline that includes a
database visitor but not a dumper.

All the hackery around printers etc goes away. After this patch, we could
probably even delete the entire CVTypeDumper class since really all it is
at this point is a thin wrapper that hides the details of how to build a
useful visitation pipeline. It's not a priority though, so CVTypeDumper
remains for now.

After this patch we will be able to easily plug in a different style of
type dumper by only implementing the proper visitation methods to dump
one-line output and then sticking it on the pipeline.

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

llvm-svn: 291724
2017-01-11 23:24:22 +00:00
..
ARMAttributeParser.cpp Move llvm-readobj/StreamWriter to Support. 2016-05-03 00:28:04 +00:00
ARMAttributeParser.h Move llvm-readobj/StreamWriter to Support. 2016-05-03 00:28:04 +00:00
ARMEHABIPrinter.h [ELF] Convert ELF.h to Expected<T>. 2016-11-16 05:10:28 +00:00
ARMWinEHPrinter.cpp Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
ARMWinEHPrinter.h Move llvm-readobj/StreamWriter to Support. 2016-05-03 00:28:04 +00:00
CMakeLists.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
CodeView.h Silence gcc warning about ternary and enumerations 2016-01-28 23:59:35 +00:00
COFFDumper.cpp [CodeView] Finish decoupling TypeDatabase from TypeDumper. 2017-01-11 23:24:22 +00:00
COFFImportDumper.cpp llvm-readobj: Dump more info for COFF import libraries. 2015-08-28 10:27:50 +00:00
ELFDumper.cpp llvm-readobj: ELF: Make DT tags machine aware 2016-12-27 19:59:29 +00:00
Error.cpp Remove LLVM_NOEXCEPT and replace it with noexcept 2016-10-19 23:52:38 +00:00
Error.h
llvm-readobj.cpp llvm-readobj: remove leading dash in '-a' option (ARMAttributesShort) 2016-12-23 23:54:52 +00:00
llvm-readobj.h [CodeView] Decouple record deserialization from visitor dispatch. 2016-08-05 21:45:34 +00:00
LLVMBuild.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
MachODumper.cpp [Stackmap] Added callsite counts to emitted function information. 2016-09-14 20:22:03 +00:00
ObjDumper.cpp Move llvm-readobj/StreamWriter to Support. 2016-05-03 00:28:04 +00:00
ObjDumper.h AMDGPU: Emit runtime metadata version 2 as YAML 2016-12-14 17:16:52 +00:00
StackMapPrinter.h [Stackmap] Added callsite counts to emitted function information. 2016-09-14 20:22:03 +00:00
Win64EHDumper.cpp Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
Win64EHDumper.h Move llvm-readobj/StreamWriter to Support. 2016-05-03 00:28:04 +00:00