[LLD][COFF] Fix TypeServerSource matcher with more than one collision
authorTobias Hieta <tobias@hieta.se>
Wed, 6 Apr 2022 15:06:37 +0000 (17:06 +0200)
committerTobias Hieta <tobias@hieta.se>
Thu, 7 Apr 2022 07:33:46 +0000 (09:33 +0200)
commit0dfa8a019d9a64d7706eb82bdb083fd9b815e088
treeb7b7de6150250c1b5d2fdc453e10ab00cd664f00
parent78cb11c8e479800b38b47fc463b1e5176796c45d
[LLD][COFF] Fix TypeServerSource matcher with more than one collision

Follow-up from 98bc304e9faded44f1d8988ffa4c5d8b50c759ec - while that
commit fixed when you had two PDBs colliding on the same Guid it didn't
fix the case where you had more than two PDBs using the same Guid.

This commit fixes that and also tests much more carefully that all
the types are correct no matter the order.

Reviewed By: aganea, saudi

Differential Revision: https://reviews.llvm.org/D123185
lld/COFF/DebugTypes.cpp
lld/test/COFF/pdb-type-server-guid-collision-invalid.test
lld/test/COFF/pdb-type-server-guid-collision-valid.test