mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Implement two iterator remove method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2467 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2077ffab85
commit
cb6d70c6e0
@ -96,6 +96,23 @@ ValueSubclass *ValueHolder<ValueSubclass,ItemParentType,SymTabType>
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
template<class ValueSubclass, class ItemParentType, class SymTabType>
|
||||
void ValueHolder<ValueSubclass,ItemParentType,SymTabType>
|
||||
::remove(iterator S, iterator E) {
|
||||
for (iterator I = S; I != E; ++I) {
|
||||
ValueSubclass *i = *I;
|
||||
i->setParent(0); // I don't own you anymore... byebye...
|
||||
|
||||
// You don't get to be in the symbol table anymore... byebye
|
||||
if (i->hasName() && Parent)
|
||||
Parent->getSymbolTable()->remove(i);
|
||||
}
|
||||
|
||||
ValueList.erase(S, E);
|
||||
}
|
||||
|
||||
|
||||
template<class ValueSubclass, class ItemParentType, class SymTabType>
|
||||
ValueSubclass *ValueHolder<ValueSubclass,ItemParentType,SymTabType>
|
||||
::replaceWith(iterator &DI, ValueSubclass *NewVal) {
|
||||
|
Loading…
Reference in New Issue
Block a user