aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-19 22:12:03 +0000
committerChris Lattner <sabre@nondot.org>2005-03-19 22:12:03 +0000
commitce325fdb87b029cdc6fc21088e40648cfb68ce54 (patch)
treec12710500342d75cfab7701385d6067665798684
parent1f377fefb745002a7aacb1ec87a4beb7bd87856e (diff)
add a method to clear globals from a node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20693 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/DataStructure/DSNode.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h
index b6f343fe4f..beff5e4061 100644
--- a/include/llvm/Analysis/DataStructure/DSNode.h
+++ b/include/llvm/Analysis/DataStructure/DSNode.h
@@ -284,6 +284,7 @@ public:
///
void addGlobal(GlobalValue *GV);
void mergeGlobals(const std::vector<GlobalValue*> &RHS);
+ void clearGlobals() { std::vector<GlobalValue*>().swap(Globals); }
const std::vector<GlobalValue*> &getGlobals() const { return Globals; }
typedef std::vector<GlobalValue*>::const_iterator global_iterator;