diff options
author | Zachary Turner <zturner@google.com> | 2018-09-18 16:35:05 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-09-18 16:35:05 +0000 |
commit | c41ce8355f88ce522dabde2b435bfe83d550a379 (patch) | |
tree | e3606b39394096113cd7d0e3c4b1c8ecd644b650 /llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp | |
parent | c1e2f39b3503869bd471a867c177f6486da5fee0 (diff) | |
download | bcm5719-llvm-c41ce8355f88ce522dabde2b435bfe83d550a379.tar.gz bcm5719-llvm-c41ce8355f88ce522dabde2b435bfe83d550a379.zip |
[PDB] Better support for enumerating pointer types.
There were several issues with the previous implementation.
1) There were no tests.
2) We didn't support creating PDBSymbolTypePointer records for
builtin types since those aren't described by LF_POINTER
records.
3) We didn't support a wide enough variety of builtin types even
ignoring pointers.
This patch fixes all of these issues. In order to add tests,
it's helpful to be able to ignore the symbol index id hierarchy
because it makes the golden output from the DIA version not match
our output, so I've extended the dumper to disable dumping of id
fields.
llvm-svn: 342493
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp index e36d5343a41..1a8c75db998 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp @@ -9,6 +9,7 @@ #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h" #include "llvm/DebugInfo/PDB/IPDBLineNumber.h" +#include "llvm/DebugInfo/PDB/Native/NativeSession.h" #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h" #include "llvm/Support/FormatVariadic.h" @@ -19,9 +20,13 @@ NativeRawSymbol::NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag, SymIndexId SymbolId) : Session(PDBSession), Tag(Tag), SymbolId(SymbolId) {} -void NativeRawSymbol::dump(raw_ostream &OS, int Indent) const { - dumpSymbolField(OS, "symIndexId", SymbolId, Indent); - dumpSymbolField(OS, "symTag", static_cast<uint32_t>(Tag), Indent); +void NativeRawSymbol::dump(raw_ostream &OS, int Indent, + PdbSymbolIdField ShowIdFields, + PdbSymbolIdField RecurseIdFields) const { + dumpSymbolIdField(OS, "symIndexId", SymbolId, Indent, Session, + PdbSymbolIdField::SymIndexId, ShowIdFields, + RecurseIdFields); + dumpSymbolField(OS, "symTag", Tag, Indent); } std::unique_ptr<IPDBEnumSymbols> |