diff options
author | Eric Christopher <echristo@gmail.com> | 2013-08-05 22:00:50 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-08-05 22:00:50 +0000 |
commit | c222f671099ae5cc354a22078eeb405b5e02a91b (patch) | |
tree | 5a1a74df29723b9cc148f8aedb9dcf5aef6592f1 | |
parent | b30347e64e0bd2904a39cd72631b91900f46d601 (diff) | |
download | external_llvm-c222f671099ae5cc354a22078eeb405b5e02a91b.zip external_llvm-c222f671099ae5cc354a22078eeb405b5e02a91b.tar.gz external_llvm-c222f671099ae5cc354a22078eeb405b5e02a91b.tar.bz2 |
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
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b4bc61b..047627a 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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. |