From 92ac9d3e1b32535062b985e5a868b16f154db6df Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Sun, 28 Jan 2018 11:05:10 +0000 Subject: [Support] Move DJB hash to support. NFC This patch moves the DJB hash to support. This is consistent with other hashing algorithms living there. The hash is used by the DWARF accelerator tables. We're doing this now because the hashing function is needed by dsymutil and we don't want to link against libBinaryFormat. Differential revision: https://reviews.llvm.org/D42594 llvm-svn: 323616 --- llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h index f56199dc8e7..36373076096 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h @@ -23,6 +23,7 @@ #include "llvm/CodeGen/DwarfStringPoolEntry.h" #include "llvm/MC/MCSymbol.h" #include "llvm/Support/Allocator.h" +#include "llvm/Support/DJB.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" @@ -192,7 +193,7 @@ private: HashData(StringRef S, DwarfAccelTable::DataArray &Data) : Str(S), Data(Data) { - HashValue = dwarf::djbHash(S); + HashValue = djbHash(S); } #ifndef NDEBUG -- cgit v1.2.3