[llvm-commits] [llvm] r60311 - /llvm/trunk/include/llvm/ADT/APInt.h
Eli Friedman
eli.friedman at gmail.com
Sun Nov 30 16:43:48 PST 2008
Author: efriedma
Date: Sun Nov 30 18:43:48 2008
New Revision: 60311
URL: http://llvm.org/viewvc/llvm-project?rev=60311&view=rev
Log:
Fix bogus assertion using getSExtValue for legitimate values, like -1 in
an 128-bit-wide integer. No testcase; the issue I ran into depends on
local changes.
Modified:
llvm/trunk/include/llvm/ADT/APInt.h
Modified: llvm/trunk/include/llvm/ADT/APInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=60311&r1=60310&r2=60311&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APInt.h Sun Nov 30 18:43:48 2008
@@ -1046,7 +1046,7 @@
if (isSingleWord())
return int64_t(VAL << (APINT_BITS_PER_WORD - BitWidth)) >>
(APINT_BITS_PER_WORD - BitWidth);
- assert(getActiveBits() <= 64 && "Too many bits for int64_t");
+ assert(getMinSignedBits() <= 64 && "Too many bits for int64_t");
return int64_t(pVal[0]);
}
More information about the llvm-commits
mailing list