[PDB] Make our PDBs look more like MS PDBs.
authorZachary Turner <zturner@google.com>
Fri, 23 Mar 2018 18:43:39 +0000 (18:43 +0000)
committerZachary Turner <zturner@google.com>
Fri, 23 Mar 2018 18:43:39 +0000 (18:43 +0000)
commita6fb536e5b5c98d3ca46fbd7ea21893f633d21d8
tree22feb2546ff1053532b77fcb19a75f1aeab58d00
parent1a3f3a2d14946b41d176454a4f1843ef8e914a9e
[PDB] Make our PDBs look more like MS PDBs.

When investigating bugs in PDB generation, the first step is
often to do the same link with link.exe and then compare PDBs.

But comparing PDBs is hard because two completely different byte
sequences can both be correct, so it hampers the investigation when
you also have to spend time figuring out not just which bytes are
different, but also if the difference is meaningful.

This patch fixes a couple of cases related to string table emission,
hash table emission, and the order in which we emit strings that
makes more of our bytes the same as the bytes generated by MS PDBs.

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

llvm-svn: 328348
22 files changed:
lld/COFF/PDB.cpp
lld/test/COFF/pdb-diff.test [deleted file]
lld/test/COFF/pdb-file-static.test
lld/test/COFF/pdb-lib.s
lld/test/COFF/pdb-linker-module.test
lld/test/COFF/pdb-same-name.test
lld/test/COFF/pdb.test
llvm/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h
llvm/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h
llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp
llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp
llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
llvm/tools/llvm-pdbutil/DumpOutputStyle.h
llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
llvm/tools/llvm-pdbutil/llvm-pdbutil.h