[PDB] Better support for enumerating pointer types.
authorZachary Turner <zturner@google.com>
Tue, 18 Sep 2018 16:35:05 +0000 (16:35 +0000)
committerZachary Turner <zturner@google.com>
Tue, 18 Sep 2018 16:35:05 +0000 (16:35 +0000)
commitc41ce8355f88ce522dabde2b435bfe83d550a379
treee3606b39394096113cd7d0e3c4b1c8ecd644b650
parentc1e2f39b3503869bd471a867c177f6486da5fee0
[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
25 files changed:
llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h
llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeSymbolEnumerator.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h
llvm/include/llvm/DebugInfo/PDB/Native/NativeTypePointer.h
llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h
llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp
llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp
llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp
llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp
llvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp
llvm/lib/DebugInfo/PDB/PDBSymbol.cpp
llvm/test/DebugInfo/PDB/Inputs/every-pointer.cpp [new file with mode: 0644]
llvm/test/DebugInfo/PDB/Inputs/every-pointer.pdb [new file with mode: 0644]
llvm/test/DebugInfo/PDB/Native/pdb-native-compilands.test
llvm/test/DebugInfo/PDB/Native/pdb-native-enums.test
llvm/test/DebugInfo/PDB/Native/pdb-native-pointers.test [new file with mode: 0644]
llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp