[llvm-commits] CVS: llvm/lib/Analysis/ConstantRange.cpp

Reid Spencer reid at x10sys.com
Sun Jan 7 21:34:54 PST 2007



Changes in directory llvm/lib/Analysis:

ConstantRange.cpp updated: 1.24 -> 1.25
---
Log message:

Fix a bug in an assert that would never trigger.


---
Diffs of the changes:  (+1 -1)

 ConstantRange.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Analysis/ConstantRange.cpp
diff -u llvm/lib/Analysis/ConstantRange.cpp:1.24 llvm/lib/Analysis/ConstantRange.cpp:1.25
--- llvm/lib/Analysis/ConstantRange.cpp:1.24	Sun Jan  7 19:26:33 2007
+++ llvm/lib/Analysis/ConstantRange.cpp	Sun Jan  7 23:34:39 2007
@@ -355,7 +355,7 @@
 /// truncated to the specified type.
 ConstantRange ConstantRange::truncate(const Type *Ty) const {
   unsigned SrcTySize = getLower()->getType()->getPrimitiveSizeInBits();
-  assert(SrcTySize > Ty->getPrimitiveSize() && "Not a value truncation");
+  assert(SrcTySize > Ty->getPrimitiveSizeInBits() && "Not a value truncation");
   uint64_t Size = 1ULL << Ty->getPrimitiveSizeInBits();
   if (isFullSet() || getSetSize() >= Size)
     return ConstantRange(getType());






More information about the llvm-commits mailing list