[PATCH] D43326: [PDB] Fix emission of PDB string table

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 11:36:06 PST 2018


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

LGTM.



================
Comment at: llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp:35
+    // HASH Hasher<ULONG*, USHORT*>::hashPbCb(PB pb, size_t cb, ULONG ulMod).
+    // Here, the type HASH is a typedef of unsigned short.
+    // ** It is not a bug that we truncate the result of hashStringV1, in fact
----------------
zturner wrote:
> amccarth wrote:
> > This sentence ("Here, ... unsigned short.") seems unnecessary.  The type is actually std::uint16_t, and it's just above.  Also, it detracts from the important comment that follows.
> It's `uint16_t` in my code, but it's only correct if it's also uint16 in the reference implementation.  But the signature in the reference implementation uses the type `HASH` for the return value, and it can be easily overlooked that that type is in fact also a uint16.  That was the purpose of the comment here.
Got it.


https://reviews.llvm.org/D43326





More information about the llvm-commits mailing list