Don't wipe out global variables that are probably storing pointers to heap
[oota-llvm.git] / lib / Support / StringMap.cpp
index c131fe07f48d6695cd9442b9d09aaef70c726bd7..c2fc261df3a66a3d771b7a8b9588aa9109f5b62f 100644 (file)
@@ -189,7 +189,7 @@ void StringMapImpl::RehashTable() {
   // grow/rehash the table.
   if (NumItems*4 > NumBuckets*3) {
     NewSize = NumBuckets*2;
-  } else if (NumBuckets-(NumItems+NumTombstones) < NumBuckets/8) {
+  } else if (NumBuckets-(NumItems+NumTombstones) <= NumBuckets/8) {
     NewSize = NumBuckets;
   } else {
     return;