[llvm] r187752 - Recommit previous cleanup with a fix for c++98 ambiguity.

Eric Christopher echristo at gmail.com
Mon Aug 5 15:32:28 PDT 2013


Author: echristo
Date: Mon Aug  5 17:32:28 2013
New Revision: 187752

URL: http://llvm.org/viewvc/llvm-project?rev=187752&view=rev
Log:
Recommit previous cleanup with a fix for c++98 ambiguity.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=187752&r1=187751&r2=187752&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Aug  5 17:32:28 2013
@@ -988,11 +988,8 @@ static StringRef getDIEStringAttr(DIE *D
 /// 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.





More information about the llvm-commits mailing list