[llvm] b273b5f - [docs] Fix PDB serialized hash table on-disk format description (#225889)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 00:02:10 PDT 2026
Author: Tim Misiak
Date: 2026-09-24T07:02:03Z
New Revision: b273b5fdc5c5360d6f1b3c6c7c22e44743d72a8e
URL: https://github.com/llvm/llvm-project/commit/b273b5fdc5c5360d6f1b3c6c7c22e44743d72a8e
DIFF: https://github.com/llvm/llvm-project/commit/b273b5fdc5c5360d6f1b3c6c7c22e44743d72a8e.diff
LOG: [docs] Fix PDB serialized hash table on-disk format description (#225889)
Fixes #76602
Updating HashTable.md to match how the PDB hash table format is
serialized according to the microsoft-pdb repository:
https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/PDB/include/map.h#L584
The key/value list contains Size entries rather than Capacity entries,
and the present bit vector identifies which bucket each pair belongs to.
Added:
Modified:
llvm/docs/PDB/HashTable.md
Removed:
################################################################################
diff --git a/llvm/docs/PDB/HashTable.md b/llvm/docs/PDB/HashTable.md
index f7b32163ef993..9f1ddb8be63a6 100644
--- a/llvm/docs/PDB/HashTable.md
+++ b/llvm/docs/PDB/HashTable.md
@@ -32,7 +32,7 @@ file hash table, the appropriate hash function is being used.
.--------------------.-- +M+4 │
| Value | │
.--------------------.-- +M+4+sizeof(Value) │
- ... ├─ |Capacity| Bucket entries
+ ... ├─ |Size| Bucket entries
.--------------------. │
| Key | │
.--------------------. │
@@ -51,10 +51,12 @@ file hash table, the appropriate hash function is being used.
- **Deleted Bit Vector** - A serialized bit vector which contains information
about which buckets have tombstone values. If the entry in this bucket is
deleted, the bit will be set, otherwise it will be unset.
-- **Keys and Values** - A list of `Capacity` hash buckets, where the first
+- **Keys and Values** - A list of `Size` key value pairs, where the first
entry is the key (always a uint32), and the second entry is the value. The
- state of each bucket (valid, empty, deleted) can be determined by examining
- the present and deleted bit vectors.
+ present bit vector can be examined to determine the bucket for the pair.
+ In other words, if size is 2 and the present bit vector has bits 4 and 9
+ set, then the first element is in bucket 4 and the second element is in
+ bucket 9.
(hash_bit_vectors)=
More information about the llvm-commits
mailing list