mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Use existing builtin hashing functions to make this routine more
simple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187745 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b30347e64e
commit
c222f67109
@ -988,11 +988,8 @@ static StringRef getDIEStringAttr(DIE *Die, unsigned Attr) {
|
|||||||
/// a trailing NULL with the string.
|
/// a trailing NULL with the string.
|
||||||
static void addStringToHash(MD5 &Hash, StringRef Str) {
|
static void addStringToHash(MD5 &Hash, StringRef Str) {
|
||||||
DEBUG(dbgs() << "Adding string " << Str << " to hash.\n");
|
DEBUG(dbgs() << "Adding string " << Str << " to hash.\n");
|
||||||
HashValue SVal((const uint8_t *)Str.data(), Str.size());
|
Hash.update(Str);
|
||||||
const uint8_t NB = '\0';
|
Hash.update('\0');
|
||||||
HashValue NBVal((const uint8_t *)&NB, 1);
|
|
||||||
Hash.update(SVal);
|
|
||||||
Hash.update(NBVal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: These are copied and only slightly modified out of LEB128.h.
|
// FIXME: These are copied and only slightly modified out of LEB128.h.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user