[PDB] Sort globals symbols by name in GSI hash buckets.
authorZachary Turner <zturner@google.com>
Fri, 6 Jul 2018 02:33:58 +0000 (02:33 +0000)
committerZachary Turner <zturner@google.com>
Fri, 6 Jul 2018 02:33:58 +0000 (02:33 +0000)
commit1f200adfa7c1a87ca8af43c4eb5f471379899d26
tree6af03a8a547785ba7fe84c06b6c5b47c7efcedfe
parent4832b9ea6b41ce854fe68ab1b632ab762fccb3c6
[PDB] Sort globals symbols by name in GSI hash buckets.

It seems like the debugger first computes a symbol's bucket,
and then does a binary search of entries in the bucket using the
symbol's name in order to find it.  If the bucket entries are not
in sorted order, this obviously won't work.  After this patch a
couple of simple test cases show that we generate an exactly
identical GSI hash stream, which is very nice.

llvm-svn: 336405
lld/test/COFF/Inputs/globals-dia-vfunc-collision.obj [new file with mode: 0644]
lld/test/COFF/Inputs/globals-dia-vfunc-collision2.obj [new file with mode: 0644]
lld/test/COFF/Inputs/globals-dia-vfunc-simple.obj [new file with mode: 0644]
lld/test/COFF/pdb-globals-dia-vfunc-collision.test [new file with mode: 0644]
lld/test/COFF/pdb-globals-dia-vfunc-collision2.test [new file with mode: 0644]
lld/test/COFF/pdb-globals-dia-vfunc-simple.test [new file with mode: 0644]
llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp