summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-02-14 22:38:45 +0000
committerDan Gohman <gohman@apple.com>2008-02-14 22:38:45 +0000
commit5a0e7b41c1b6cb2d9b4d877996c09f0ad7235572 (patch)
tree7d6dd054e68ca3ab2890ed746d296f0c0e606803 /lib/Support
parent8c5c22f610f21dbf10e83be360b8fbeb247a0fe1 (diff)
downloadllvm-5a0e7b41c1b6cb2d9b4d877996c09f0ad7235572.tar.gz
llvm-5a0e7b41c1b6cb2d9b4d877996c09f0ad7235572.tar.bz2
llvm-5a0e7b41c1b6cb2d9b4d877996c09f0ad7235572.tar.xz
Fix a warning about comparison between signed and unsigned,
being consistent with the rest of the APInt implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/APInt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index c8482e9c71..9886de83dc 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -818,7 +818,7 @@ uint32_t APInt::countTrailingOnes() const {
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]);