mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add methods to StringMap to erase entries by key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52640 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
99ec779a93
commit
84701836bf
@ -377,6 +377,20 @@ public:
|
||||
V.Destroy(Allocator);
|
||||
}
|
||||
|
||||
bool erase(const char *Key) {
|
||||
iterator I = find(Key);
|
||||
if (I == end()) return false;
|
||||
erase(I);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool erase(std::string Key) {
|
||||
iterator I = find(Key);
|
||||
if (I == end()) return false;
|
||||
erase(I);
|
||||
return true;
|
||||
}
|
||||
|
||||
~StringMap() {
|
||||
for (ItemBucket *I = TheTable, *E = TheTable+NumBuckets; I != E; ++I) {
|
||||
if (I->Item && I->Item != getTombstoneVal())
|
||||
|
Loading…
Reference in New Issue
Block a user