mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
* Added unittests for StringMap
* Fixed but in StringMap::clear() * Removed trailing whitespace Original patch by Talin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -336,7 +336,7 @@ public:
|
||||
// clear - Empties out the StringMap
|
||||
void clear() {
|
||||
if (empty()) return;
|
||||
|
||||
|
||||
// Zap all values, resetting the keys back to non-present (not tombstone),
|
||||
// which is safe because we're removing all elements.
|
||||
for (ItemBucket *I = TheTable, *E = TheTable+NumBuckets; I != E; ++I) {
|
||||
@@ -345,6 +345,8 @@ public:
|
||||
I->Item = 0;
|
||||
}
|
||||
}
|
||||
|
||||
NumItems = 0;
|
||||
}
|
||||
|
||||
/// GetOrCreateValue - Look up the specified key in the table. If a value
|
||||
@@ -421,7 +423,7 @@ protected:
|
||||
StringMapImpl::ItemBucket *Ptr;
|
||||
public:
|
||||
typedef StringMapEntry<ValueTy> value_type;
|
||||
|
||||
|
||||
explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
|
||||
bool NoAdvance = false)
|
||||
: Ptr(Bucket) {
|
||||
|
Reference in New Issue
Block a user