[PATCH] D33293: Provide a common interface for all collections of types.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 12:38:11 PDT 2017


rnk added a comment.

Do you think all these TypeCollections should eventually just be the same thing? So, I could read a TypeCollection from a PDB, and then add more type records to it like I would with TypeTableBuilder. Then we would have a full read/write/edit API for types, which is something we seem to want for incremental PDB writing.



================
Comment at: llvm/include/llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h:48
+/// of O(N/M) and an amortized time of O(1).
+class LazyRandomTypeCollection : public TypeCollection {
+  typedef FixedStreamArray<TypeIndexOffset> PartialOffsetArray;
----------------
I feel like LazyRandom is really implementation-detail oriented. Basically, this is a TypeCollection that's efficient for PDBs. "Random" also suggests that it generates random results, which would be weird.

Maybe call it PDBTypeCollection? Or TypeStreamCollection? It seems awkward to have a class starting with PDB in DebugInfo/CodeView.


https://reviews.llvm.org/D33293





More information about the llvm-commits mailing list