git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187752
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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(makeArrayRef((uint8_t)'\0'));
}
// FIXME: These are copied and only slightly modified out of LEB128.h.