[llvm-commits] [dragonegg] r153434 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Mon Mar 26 04:29:22 PDT 2012
Author: baldrick
Date: Mon Mar 26 06:29:22 2012
New Revision: 153434
URL: http://llvm.org/viewvc/llvm-project?rev=153434&view=rev
Log:
A type with zero bits can't occur here, but if it did it wouldn't be empty, it
would have 2^0 = 1 possible values, the value zero.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=153434&r1=153433&r2=153434&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Mon Mar 26 06:29:22 2012
@@ -293,7 +293,7 @@
unsigned ActiveBits = SmallTy->getIntegerBitWidth();
unsigned TotalBits = LargeTy->getIntegerBitWidth();
assert(ActiveBits < TotalBits && "Full range not allowed!");
- assert(ActiveBits > 0 && "Empty range not allowed!");
+ assert(ActiveBits > 0 && "Need at least one bit!");
APInt First, Last;
if (isSigned) {
Last = APInt::getOneBitSet(TotalBits, ActiveBits - 1);
More information about the llvm-commits
mailing list