[lld] r299958 - [PDB] Emit index/offset pairs for TPI and IPI streams

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 09:26:15 PDT 2017


Author: rnk
Date: Tue Apr 11 11:26:15 2017
New Revision: 299958

URL: http://llvm.org/viewvc/llvm-project?rev=299958&view=rev
Log:
[PDB] Emit index/offset pairs for TPI and IPI streams

Summary:
This lets PDB readers lookup type record data by type index in O(log n)
time. It also enables makes `cvdump -t` work on PDBs produced by LLD.
cvdump will not dump a PDB that doesn't have an index-to-offset table.

The table is sorted by type index, and has an entry every 8KB. Looking
up a type record by index is a binary search of this table, followed by
a scan of at most 8KB.

Reviewers: ruiu, zturner, inglorion

Subscribers: llvm-commits

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

Modified:
    lld/trunk/test/COFF/pdb.test

Modified: lld/trunk/test/COFF/pdb.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb.test?rev=299958&r1=299957&r2=299958&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb.test (original)
+++ lld/trunk/test/COFF/pdb.test Tue Apr 11 11:26:15 2017
@@ -172,6 +172,7 @@
 # RAW-NEXT:       }
 # RAW-NEXT:     }
 # RAW-NEXT:     TypeIndexOffsets [
+# RAW-NEXT:       Index: 0x1000, Offset: 0
 # RAW-NEXT:     ]
 # RAW-NEXT:   ]
 # RAW-NEXT: }




More information about the llvm-commits mailing list