[PDB] Simplify symbol handling code, NFC
authorReid Kleckner <rnk@google.com>
Tue, 13 Nov 2018 23:44:39 +0000 (23:44 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 13 Nov 2018 23:44:39 +0000 (23:44 +0000)
commit944843c8802da1a7c07094b7e5af3416f0bba964
tree6ad6205da9133d9e61c2dae6e94d6ede571f4ec9
parent4e97ec94d9c13b14e76d3377b27c798436326737
[PDB] Simplify symbol handling code, NFC

- Make mergeSymbolRecords a method of PDBLinker to reduce the number of
parameters it needs.

- Remove a stale FIXME comment about error handling. We already drop
unknown symbol records, log them, and continue.

- Update a comment about why we're copying the symbol record. We do it
to realign the record. We can already mutate the symbol record memory,
it's memory allocated by relocateDebugChunk.

- Avoid the extra `CVSymbol NewSym` variable. We can mutate Sym in
place, which is best, since we're mutating the underlying record anyway.

llvm-svn: 346817
lld/COFF/PDB.cpp