summaryrefslogtreecommitdiffstats
path: root/llvm
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
commitc354ebddd1948fb4fed56a4f85669aeaf2315a27 (patch)
tree29ded030a09f2bb54a43ae3fe6ea873cb8516451 /llvm
parentd3122cb83c561187d83a1eff3cb647e3064d3848 (diff)
downloadbcm5719-llvm-c354ebddd1948fb4fed56a4f85669aeaf2315a27.tar.gz
bcm5719-llvm-c354ebddd1948fb4fed56a4f85669aeaf2315a27.zip
Fix a warning about comparison between signed and unsigned,
being consistent with the rest of the APInt implementation. llvm-svn: 47138
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Support/APInt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index c8482e9c719..9886de83dc4 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/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]);
OpenPOWER on IntegriCloud