summaryrefslogtreecommitdiffstats
path: root/llvm/lib/BinaryFormat/Dwarf.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-01-28 11:05:10 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-01-28 11:05:10 +0000
commit92ac9d3e1b32535062b985e5a868b16f154db6df (patch)
tree37d387c15d80a31e545483e700f909c158ba2dd6 /llvm/lib/BinaryFormat/Dwarf.cpp
parent05e6f62f1235d2b23d52d136c575b370c1e3cb6f (diff)
downloadbcm5719-llvm-92ac9d3e1b32535062b985e5a868b16f154db6df.tar.gz
bcm5719-llvm-92ac9d3e1b32535062b985e5a868b16f154db6df.zip
[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
Diffstat (limited to 'llvm/lib/BinaryFormat/Dwarf.cpp')
-rw-r--r--llvm/lib/BinaryFormat/Dwarf.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 0ec57870f65..169e50e8d14 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -589,9 +589,3 @@ bool llvm::dwarf::isValidFormForVersion(Form F, unsigned Version,
}
return ExtensionsOk;
}
-
-uint32_t llvm::dwarf::djbHash(StringRef Buffer, uint32_t H) {
- for (char C : Buffer.bytes())
- H = ((H << 5) + H) + C;
- return H;
-}
OpenPOWER on IntegriCloud