mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Use existing builtin hashing functions to make this routine more
simple. llvm-svn: 187745
This commit is contained in:
parent
57a9194e5f
commit
8884e7fbaa
@ -988,11 +988,8 @@ static StringRef getDIEStringAttr(DIE *Die, unsigned Attr) {
|
||||
/// a trailing NULL with the string.
|
||||
static void addStringToHash(MD5 &Hash, StringRef Str) {
|
||||
DEBUG(dbgs() << "Adding string " << Str << " to hash.\n");
|
||||
HashValue SVal((const uint8_t *)Str.data(), Str.size());
|
||||
const uint8_t NB = '\0';
|
||||
HashValue NBVal((const uint8_t *)&NB, 1);
|
||||
Hash.update(SVal);
|
||||
Hash.update(NBVal);
|
||||
Hash.update(Str);
|
||||
Hash.update('\0');
|
||||
}
|
||||
|
||||
// FIXME: These are copied and only slightly modified out of LEB128.h.
|
||||
|
Loading…
Reference in New Issue
Block a user