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

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 11:41:38 PST 2018


zturner added inline comments.


================
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
----------------
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.


https://reviews.llvm.org/D43326





More information about the llvm-commits mailing list