eliminate the add and remove methods, clients must use insert and erase directly.
authorChris Lattner <sabre@nondot.org>
Mon, 4 Feb 2002 16:33:18 +0000 (16:33 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 4 Feb 2002 16:33:18 +0000 (16:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1686 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LiveVar/ValueSet.h
include/llvm/CodeGen/ValueSet.h

index d17e0229a12f09795b75855aae41db3df9063d28..055eef332f164ae640b2d558a000c92968ef2ae7 100644 (file)
@@ -9,35 +9,19 @@
 #define VALUE_SET_H
 
 class Value;
-#include "Support/HashExtras.h"
-#include <ext/hash_set>
+#include <set>
 
 //------------------- Class Definition for ValueSet --------------------------
 
-void printValue( const Value *const v);  // func to print a Value 
-
-
-
-class ValueSet : public std::hash_set<const Value *> {
- public:
-  inline void add(const Value *const  val) 
-    { assert( val ); insert(val);}      // for adding a live variable to set
-
-  inline void remove(const Value *const  val) 
-    { assert( val ); erase(val); }      // for removing a live var from set
+void printValue( const Value *v);  // func to print a Value 
 
+struct ValueSet : public std::set<const Value*> {
   bool setUnion( const ValueSet *const set1);     // for performing set union
   void setSubtract( const ValueSet *const set1);  // for performing set diff
-
  
   void setDifference( const ValueSet *const set1, const ValueSet *const set2); 
  
   void printSet() const;                // for printing a live variable set
 };
 
-
-
-
-
-
 #endif
index d17e0229a12f09795b75855aae41db3df9063d28..055eef332f164ae640b2d558a000c92968ef2ae7 100644 (file)
@@ -9,35 +9,19 @@
 #define VALUE_SET_H
 
 class Value;
-#include "Support/HashExtras.h"
-#include <ext/hash_set>
+#include <set>
 
 //------------------- Class Definition for ValueSet --------------------------
 
-void printValue( const Value *const v);  // func to print a Value 
-
-
-
-class ValueSet : public std::hash_set<const Value *> {
- public:
-  inline void add(const Value *const  val) 
-    { assert( val ); insert(val);}      // for adding a live variable to set
-
-  inline void remove(const Value *const  val) 
-    { assert( val ); erase(val); }      // for removing a live var from set
+void printValue( const Value *v);  // func to print a Value 
 
+struct ValueSet : public std::set<const Value*> {
   bool setUnion( const ValueSet *const set1);     // for performing set union
   void setSubtract( const ValueSet *const set1);  // for performing set diff
-
  
   void setDifference( const ValueSet *const set1, const ValueSet *const set2); 
  
   void printSet() const;                // for printing a live variable set
 };
 
-
-
-
-
-
 #endif