diff options
author | Eric Christopher <echristo@gmail.com> | 2013-08-05 22:07:30 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-08-05 22:07:30 +0000 |
commit | 432c99af0b3abac46b2c2d5026faf0f489223ca5 (patch) | |
tree | 1c532fb846981c548d001b1a12aaf8fdc4ecb5bb /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 30448e607e89b92a22df6e1760a874f6067c820f (diff) | |
download | bcm5719-llvm-432c99af0b3abac46b2c2d5026faf0f489223ca5.tar.gz bcm5719-llvm-432c99af0b3abac46b2c2d5026faf0f489223ca5.zip |
Revert "Use existing builtin hashing functions to make this routine more"
This reverts commit r187745.
llvm-svn: 187747
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 047627a5ff6..b4bc61b7243 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -988,8 +988,11 @@ 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"); - Hash.update(Str); - Hash.update('\0'); + 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); } // FIXME: These are copied and only slightly modified out of LEB128.h. |