Fix apparent thinko in r209744: allocator stats can be zero

llvm-svn: 212071
This commit is contained in:
Alexey Samsonov 2014-06-30 22:40:58 +00:00
parent 38cae6330b
commit cffaa1c298
1 changed files with 2 additions and 2 deletions

View File

@ -273,9 +273,9 @@ class AllocatorGlobalStats : public AllocatorStats {
if (stats == this)
break;
}
// All stats must be positive.
// All stats must be non-negative.
for (int i = 0; i < AllocatorStatCount; i++)
s[i] = ((sptr)s[i]) > 0 ? s[i] : 1;
s[i] = ((sptr)s[i]) >= 0 ? s[i] : 0;
}
private: