mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-15 01:37:53 +00:00
make DenseMap::clear() early exit if there is nothing to do.
llvm-svn: 80480
This commit is contained in:
parent
c3deceaf81
commit
0ba5632cf6
@ -93,6 +93,8 @@ public:
|
||||
void resize(size_t Size) { grow(Size); }
|
||||
|
||||
void clear() {
|
||||
if (NumEntries == 0 && NumTombstones == 0) return;
|
||||
|
||||
// If the capacity of the array is huge, and the # elements used is small,
|
||||
// shrink the array.
|
||||
if (NumEntries * 4 < NumBuckets && NumBuckets > 64) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user