[llvm-commits] [poolalloc] r115329 - /poolalloc/trunk/lib/DSA/DataStructure.cpp
John Criswell
criswell at uiuc.edu
Fri Oct 1 12:26:50 PDT 2010
Author: criswell
Date: Fri Oct 1 14:26:50 2010
New Revision: 115329
URL: http://llvm.org/viewvc/llvm-project?rev=115329&view=rev
Log:
Fixed assertion so that it is only triggered when we are about to divide by
zero.
Modified:
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=115329&r1=115328&r2=115329&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Fri Oct 1 14:26:50 2010
@@ -332,8 +332,10 @@
if (!NewTy || NewTy->isVoidTy()) return;
if (isCollapsedNode()) return;
- assert (getSize() && "DSNode size is zero!\n");
- if (isArrayNode()) Offset %= getSize();
+ if (isArrayNode()) {
+ assert (getSize() && "array node has size of zero!\n");
+ Offset %= getSize();
+ }
if (Offset >= getSize()) growSize(Offset+1);
More information about the llvm-commits
mailing list