[llvm-commits] [llvm] r150897 - /llvm/trunk/lib/Support/Hashing.cpp

Ahmed Charles ace2001ac at gmail.com
Sat Feb 18 14:56:42 PST 2012


Author: ace2001ac
Date: Sat Feb 18 16:56:41 2012
New Revision: 150897

URL: http://llvm.org/viewvc/llvm-project?rev=150897&view=rev
Log:
Fix issue with bitwise and precedence.

Modified:
    llvm/trunk/lib/Support/Hashing.cpp

Modified: llvm/trunk/lib/Support/Hashing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Hashing.cpp?rev=150897&r1=150896&r2=150897&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Hashing.cpp (original)
+++ llvm/trunk/lib/Support/Hashing.cpp Sat Feb 18 16:56:41 2012
@@ -14,7 +14,7 @@
 // Add a possibly unaligned sequence of bytes.
 void GeneralHash::addUnaligned(const uint8_t *I, const uint8_t *E) {
   ptrdiff_t Length = E - I;
-  if (uintptr_t(I) & 3 == 0) {
+  if ((uintptr_t(I) & 3) == 0) {
     while (Length > 3) {
       mix(*reinterpret_cast<const uint32_t *>(I));
       I += 4;





More information about the llvm-commits mailing list