Skip to content

Commit

Permalink
PDBFileBuilder: Switch to xxh3_64bits
Browse files Browse the repository at this point in the history
Following recent changes switching from xxh64 to xxh32 for better
hashing performance (e.g., D154813). I am not familiar with this use
case, but this change will ensure that the lld executable doesn't need
xxHash64 after wasm-ld migrates.
  • Loading branch information
MaskRay committed Jul 19, 2023
1 parent b2eda85 commit 52eab34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
Expand Up @@ -76,7 +76,7 @@ struct llvm::pdb::SymbolDenseMapInfo {
return Tombstone;
}
static unsigned getHashValue(const CVSymbol &Val) {
return xxHash64(Val.RecordData);
return xxh3_64bits(Val.RecordData);
}
static bool isEqual(const CVSymbol &LHS, const CVSymbol &RHS) {
return LHS.RecordData == RHS.RecordData;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
Expand Up @@ -340,7 +340,7 @@ Error PDBFileBuilder::commit(StringRef Filename, codeview::GUID *Guid) {
if (Info->hashPDBContentsToGUID()) {
// Compute a hash of all sections of the output file.
uint64_t Digest =
xxHash64({Buffer.getBufferStart(), Buffer.getBufferEnd()});
xxh3_64bits({Buffer.getBufferStart(), Buffer.getBufferEnd()});

H->Age = 1;

Expand Down

0 comments on commit 52eab34

Please sign in to comment.