add a method to clear globals from a node
authorChris Lattner <sabre@nondot.org>
Sat, 19 Mar 2005 22:12:03 +0000 (22:12 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 19 Mar 2005 22:12:03 +0000 (22:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20693 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure/DSNode.h

index b6f343fe4f30ee27d33282eb673fd3945cc8f72d..beff5e40610eb656d8058d0201a9148f9a24367d 100644 (file)
@@ -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;