Add a new DSNode::removeGlobal method.

llvm-svn: 20710
This commit is contained in:
Chris Lattner 2005-03-20 03:29:54 +00:00
parent 0ebba657df
commit 36a810ac40
1 changed files with 9 additions and 0 deletions

View File

@ -157,6 +157,15 @@ void DSNode::addGlobal(GlobalValue *GV) {
}
}
// removeGlobal - Remove the specified global that is explicitly in the globals
// list.
void DSNode::removeGlobal(GlobalValue *GV) {
std::vector<GlobalValue*>::iterator I =
std::lower_bound(Globals.begin(), Globals.end(), GV);
assert(I != Globals.end() && *I == GV && "Global not in node!");
Globals.erase(I);
}
/// foldNodeCompletely - If we determine that this node has some funny
/// behavior happening to it that we cannot represent, we fold it down to a
/// single, completely pessimistic, node. This node is represented as a