1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/include/llvm/DebugInfo
Nico Weber eaef1427b6 [PDB] Fix hash function used to write /src/headerblock
lld-link used to write PDB files that DIA couldn't recover natvis
files from if:

- The global strings table was > 64kiB
- There were at least 3 natvis files

The cause was that the hash function for the /src/headerblock stream
was incorrect: It needs to be truncated to 16 bit.

If the global strings table was <= 64kiB, truncating to 16 bit is a
no-op, so this wasn't needed for small programs.

If there are only 1 or 2 natvis files, then the growth strategy in
HashTable::grow() would mean the hash table would have 2 buckets (for 1
natvis file) or 4 buckets (for 4 natvis files), and since the hash
function is used modulo number of buckets, and since 2 and 4 divide
0x10000, the missing `% 0x10000` is a no-op there too. For 3 natvis
files, the hash table grows to 6 buckets, which has a factor that's not
common with 0x10000 and the difference starts to matter.

Fixes PR41626.

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

llvm-svn: 359515
2019-04-29 23:09:35 +00:00
..
CodeView [codeview] Remove Type member from CVRecord 2019-04-04 00:28:48 +00:00
DWARF s/Dwarf 5/DWARF v5/ NFC 2019-04-26 13:41:19 +00:00
MSF Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDB [PDB] Fix hash function used to write /src/headerblock 2019-04-29 23:09:35 +00:00
Symbolize [llvm-symbolizer] Add --output-style switch. 2019-04-04 08:39:40 +00:00
DIContext.h [DebugInfo] add SectionedAddress to DebugInfo interfaces. 2019-02-27 13:17:36 +00:00