[Lldb-commits] [lldb] r326082 - Revert "[Support] Replace HashString with djbHash."

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 26 04:05:18 PST 2018


Author: jdevlieghere
Date: Mon Feb 26 04:05:18 2018
New Revision: 326082

URL: http://llvm.org/viewvc/llvm-project?rev=326082&view=rev
Log:
Revert "[Support] Replace HashString with djbHash."

It looks like some of our tests depend on the ordering of hashed values.
I'm reverting my changes while I try to reproduce and fix this locally.

Failing builds:

  lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/18388
  lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/6743
  lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/15607

Modified:
    lldb/trunk/source/Utility/ConstString.cpp

Modified: lldb/trunk/source/Utility/ConstString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ConstString.cpp?rev=326082&r1=326081&r2=326082&view=diff
==============================================================================
--- lldb/trunk/source/Utility/ConstString.cpp (original)
+++ lldb/trunk/source/Utility/ConstString.cpp Mon Feb 26 04:05:18 2018
@@ -11,10 +11,10 @@
 
 #include "lldb/Utility/Stream.h"
 
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/iterator.h"            // for iterator_facade_base
 #include "llvm/Support/Allocator.h"       // for BumpPtrAllocator
-#include "llvm/Support/DJB.h"             // for djbHash
 #include "llvm/Support/FormatProviders.h" // for format_provider
 #include "llvm/Support/RWMutex.h"
 #include "llvm/Support/Threading.h"
@@ -171,7 +171,7 @@ public:
 
 protected:
   uint8_t hash(const llvm::StringRef &s) const {
-    uint32_t h = llvm::djbHash(s);
+    uint32_t h = llvm::HashString(s);
     return ((h >> 24) ^ (h >> 16) ^ (h >> 8) ^ h) & 0xff;
   }
 




More information about the lldb-commits mailing list