1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Add comments.

llvm-svn: 271967
This commit is contained in:
Rui Ueyama 2016-06-07 00:59:04 +00:00
parent faf70c1e23
commit 316237a8e0

View File

@ -18,6 +18,7 @@ using namespace llvm;
using namespace llvm::support; using namespace llvm::support;
using namespace llvm::pdb; using namespace llvm::pdb;
// Corresponds to `Hasher::lhashPbCb` in PDB/include/misc.h.
static inline uint32_t HashStringV1(StringRef Str) { static inline uint32_t HashStringV1(StringRef Str) {
uint32_t Result = 0; uint32_t Result = 0;
uint32_t Size = Str.size(); uint32_t Size = Str.size();
@ -52,6 +53,7 @@ static inline uint32_t HashStringV1(StringRef Str) {
return Result ^ (Result >> 16); return Result ^ (Result >> 16);
} }
// Corresponds to `HasherV2::HashULONG` in PDB/include/misc.h.
static inline uint32_t HashStringV2(StringRef Str) { static inline uint32_t HashStringV2(StringRef Str) {
uint32_t Hash = 0xb170a1bf; uint32_t Hash = 0xb170a1bf;