summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-08-05 22:00:50 +0000
committerEric Christopher <echristo@gmail.com>2013-08-05 22:00:50 +0000
commitd728355a1c32c846e0125b84d7a25bca8b89698c (patch)
tree507d0c5eeaff4d8d570b9e6eddeae887808053b4 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent0369ad7053e1aea76184069e8ed81e3e3776503f (diff)
downloadbcm5719-llvm-d728355a1c32c846e0125b84d7a25bca8b89698c.tar.gz
bcm5719-llvm-d728355a1c32c846e0125b84d7a25bca8b89698c.zip
Use existing builtin hashing functions to make this routine more
simple. llvm-svn: 187745
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b4bc61b7243..047627a5ff6 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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.
OpenPOWER on IntegriCloud