This is an archive of the discontinued LLVM Phabricator instance.

[Support] Remove HashString and replace it with djbHash. NFC.
ClosedPublic

Authored by JDevlieghere on Feb 22 2018, 3:30 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Feb 22 2018, 3:30 AM

The alternative is to keep HashString and just have it call djbHash.

Do we need to worry about performance on non-LTO builds because HashString won't be inlined any more?
I'm leaning towards no.

aprantl accepted this revision.Feb 22 2018, 8:10 AM
aprantl added a reviewer: dblaikie.

LGTM, thanks! Perhaps give it another 24 hours to see if anyone objects.

This revision is now accepted and ready to land.Feb 22 2018, 8:11 AM

Also please be sure to not land this before we fixed the implementation of llvm::djbHash() to use unsigned chars or else this isn't NFC.

Also please be sure to not land this before we fixed the implementation of llvm::djbHash() to use unsigned chars or else this isn't NFC.

Pavel already landed that change, so we should be good!

Also please be sure to not land this before we fixed the implementation of llvm::djbHash() to use unsigned chars or else this isn't NFC.

The HashString function used a different initial value (0 vs 5381), so this is still not fully NFC, but I hope that does not matter.

This revision was automatically updated to reflect the committed changes.