[PATCH] D43615: [Support] Remove HashString and replace it with djbHash. NFC.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 07:21:47 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD326091: Re-land: "[Support] Replace HashString with djbHash." (authored by JDevlieghere, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43615?vs=135384&id=135899#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43615

Files:
  include/lld/Core/SymbolTable.h


Index: include/lld/Core/SymbolTable.h
===================================================================
--- include/lld/Core/SymbolTable.h
+++ include/lld/Core/SymbolTable.h
@@ -12,7 +12,7 @@
 
 #include "lld/Common/LLVM.h"
 #include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/DJB.h"
 #include <cstring>
 #include <map>
 #include <vector>
@@ -65,7 +65,7 @@
     static StringRef getEmptyKey() { return StringRef(); }
     static StringRef getTombstoneKey() { return StringRef(" ", 1); }
     static unsigned getHashValue(StringRef const val) {
-      return llvm::HashString(val);
+      return llvm::djbHash(val, 0);
     }
     static bool isEqual(StringRef const lhs, StringRef const rhs) {
       return lhs.equals(rhs);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43615.135899.patch
Type: text/x-patch
Size: 766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180226/f459df64/attachment.bin>


More information about the llvm-commits mailing list