aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-20 18:11:52 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-20 18:11:52 +0000
commite4e20f43e45bf9e428ebdd81c2ff7b3826cd6c4e (patch)
treeb7db6eee5f9e587347ee351a76c4ceac063be3ac /llvm/lib/Support/APInt.cpp
parent6c3ad6528818d915a9622c65f1e5f3e3c6e50ca5 (diff)
downloadllvm-e4e20f43e45bf9e428ebdd81c2ff7b3826cd6c4e.zip
llvm-e4e20f43e45bf9e428ebdd81c2ff7b3826cd6c4e.tar.gz
llvm-e4e20f43e45bf9e428ebdd81c2ff7b3826cd6c4e.tar.bz2
Eliminate sign-comparison warnings in APInt
llvm-svn: 140158
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index d7291a1..931c885 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -54,12 +54,14 @@ inline static unsigned getDigit(char cdigit, uint8_t radix) {
return r;
r = cdigit - 'A';
- if (r <= radix - 11U)
+ if (r <= unsigned(radix - 11U))
return r + 10;
r = cdigit - 'a';
- if (r <= radix - 11U)
+ if (r <= unsigned(radix - 11U))
return r + 10;
+
+ radix = 10;
}
r = cdigit - '0';