[PDB] Don't use the long type
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 18 Dec 2016 20:10:50 +0000 (20:10 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 18 Dec 2016 20:10:50 +0000 (20:10 +0000)
Long is not the same size across a number of the platforms we support.
Use unsigned int here instead, it is more appropriate because
overflow/wrap-around is possible and, in this case, expected.

llvm-svn: 290068

llvm/lib/DebugInfo/PDB/Raw/Hash.cpp

index 2920124..b9f685e 100644 (file)
@@ -74,7 +74,7 @@ uint32_t pdb::hashStringV2(StringRef Str) {
     Hash ^= (Hash >> 6);
   }
 
-  return Hash * 1664525L + 1013904223L;
+  return Hash * 1664525U + 1013904223U;
 }
 
 // Corresponds to `SigForPbCb` in langapi/shared/crc32.h.