[PDB] Avoid calling discoverTypeIndices for a known record kind
authorReid Kleckner <rnk@google.com>
Sat, 2 May 2020 22:48:31 +0000 (15:48 -0700)
committerReid Kleckner <rnk@google.com>
Sat, 2 May 2020 22:51:08 +0000 (15:51 -0700)
commitbd7ea8641e7667b109534ae06b33be7bc9b59821
tree32b5a443e6650bdac9db8ba532cd1489b76021d1
parent0b85ea85334daa050da01083543a02b4cfc4cc00
[PDB] Avoid calling discoverTypeIndices for a known record kind

This particular overload allocates memory, and we do this for every
S_[GL]PROC32_ID record. Instead, hardcode the offset of the typeindex
that we are looking for in the LF_[MEM]FUNC_ID record. We already
assumed that looking up the item index already found a record of this
kind.
lld/COFF/PDB.cpp