mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-12 14:41:05 +00:00
Implement two iterator remove method
llvm-svn: 2467
This commit is contained in:
parent
3b5ee47ef6
commit
1d4e297a65
@ -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…
x
Reference in New Issue
Block a user