[PATCH] D35515: [PDB] Finish and simplify TPI hashing

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 16:43:55 PDT 2017


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

LGTM



================
Comment at: llvm/lib/DebugInfo/PDB/Native/TpiHashing.cpp:31-33
+  bool ForwardRef = bool(Opts & ClassOptions::ForwardReference);
+  bool Scoped = bool(Opts & ClassOptions::Scoped);
+  bool HasUniqueName = bool(Opts & ClassOptions::HasUniqueName);
----------------
Do you need these casts to bool?


================
Comment at: llvm/lib/DebugInfo/PDB/Native/TpiHashing.cpp:83-88
+  // Run CRC32 over the bytes. This corresponds to `hashBufv8`.
+  JamCRC JC(/*Init=*/0U);
+  ArrayRef<char> Bytes(reinterpret_cast<const char *>(Rec.data().data()),
+                       Rec.data().size());
+  JC.update(Bytes);
+  return JC.getCRC();
----------------
You can make this as `default:` for the above switch.


https://reviews.llvm.org/D35515





More information about the llvm-commits mailing list