[PATCH] D28707: PDB: Add a class to create the /names stream contents.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 19:51:47 PST 2017


zturner accepted this revision.
zturner added a comment.
This revision is now accepted and ready to land.

lgtm aside from the mentioned changes



================
Comment at: llvm/include/llvm/DebugInfo/PDB/Raw/NameHashTableBuilder.h:38
+private:
+  DenseMap<StringRef, uint32_t> Strings;
+  uint32_t StringSize = 1;
----------------
How about `StringMap`, which is quite a bit more efficient than `DenseMap` when the keys are strings?


================
Comment at: llvm/lib/DebugInfo/PDB/Raw/NameHashTableBuilder.cpp:96
+
+  if (auto EC = Writer.writeArray(ArrayRef<ulittle32_t>(Buckets)))
+    return EC;
----------------
Is the conversion to `ArrayRef` necessary?  It should get converted implicitly I think.


https://reviews.llvm.org/D28707





More information about the llvm-commits mailing list