summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-20 03:29:54 +0000
committerChris Lattner <sabre@nondot.org>2005-03-20 03:29:54 +0000
commit7cdf321256ef9e37146cceed67f76cd7e5c8c61d (patch)
tree435095b9c9af843fbbd3cd9c06095a58d13414d6 /lib/Analysis
parent3ee382c68f662c25329fc2b456ef6aaac79b80f1 (diff)
Add a new DSNode::removeGlobal method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20710 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 5cb6af6b194..416766b166c 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/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