[llvm-commits] [llvm] r47138 - /llvm/trunk/lib/Support/APInt.cpp
Dan Gohman
gohman at apple.com
Thu Feb 14 14:38:46 PST 2008
Author: djg
Date: Thu Feb 14 16:38:45 2008
New Revision: 47138
URL: http://llvm.org/viewvc/llvm-project?rev=47138&view=rev
Log:
Fix a warning about comparison between signed and unsigned,
being consistent with the rest of the APInt implementation.
Modified:
llvm/trunk/lib/Support/APInt.cpp
Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=47138&r1=47137&r2=47138&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Thu Feb 14 16:38:45 2008
@@ -818,7 +818,7 @@
return std::min(uint32_t(CountTrailingOnes_64(VAL)), BitWidth);
uint32_t Count = 0;
uint32_t i = 0;
- for (; i < getNumWords() && pVal[i] == -1; ++i)
+ for (; i < getNumWords() && pVal[i] == -1ULL; ++i)
Count += APINT_BITS_PER_WORD;
if (i < getNumWords())
Count += CountTrailingOnes_64(pVal[i]);
More information about the llvm-commits
mailing list