diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-03-20 03:29:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-03-20 03:29:54 +0000 |
| commit | 36a810ac402b1145fc816934549f7ced98effdef (patch) | |
| tree | edabeb401a9640ef55ab6128f02ede312571a221 /llvm/lib/Analysis/DataStructure/DataStructure.cpp | |
| parent | 0ebba657df046d3529729a2dfe2593cdda59fe88 (diff) | |
| download | bcm5719-llvm-36a810ac402b1145fc816934549f7ced98effdef.tar.gz bcm5719-llvm-36a810ac402b1145fc816934549f7ced98effdef.zip | |
Add a new DSNode::removeGlobal method.
llvm-svn: 20710
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp')
| -rw-r--r-- | llvm/lib/Analysis/DataStructure/DataStructure.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index 5cb6af6b194..416766b166c 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -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 |

