projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98a1a71
)
Fix an approximate calculation in an assertion not to give false negatives.
author
Reid Spencer
<rspencer@reidspencer.com>
Wed, 11 Apr 2007 13:00:04 +0000
(13:00 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Wed, 11 Apr 2007 13:00:04 +0000
(13:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35901
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/APInt.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/APInt.cpp
b/lib/Support/APInt.cpp
index 27d4741321ca0d3a6e4d6b8670ec3b425adb7c27..73ee3e18dc71d46adfcf918a9072eb5a256e6c0f 100644
(file)
--- a/
lib/Support/APInt.cpp
+++ b/
lib/Support/APInt.cpp
@@
-1726,7
+1726,7
@@
void APInt::fromString(uint32_t numbits, const char *str, uint32_t slen,
assert(slen <= numbits || radix != 2 && "Insufficient bit width");
assert(slen*3 <= numbits || radix != 8 && "Insufficient bit width");
assert(slen*4 <= numbits || radix != 16 && "Insufficient bit width");
- assert((slen*64)/2
0
<= numbits || radix != 10 && "Insufficient bit width");
+ assert((slen*64)/2
2
<= numbits || radix != 10 && "Insufficient bit width");
// Allocate memory
if (!isSingleWord())