Changes to build successfully with GCC 3.02


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/LiveVar/ValueSet.cpp b/lib/Analysis/LiveVar/ValueSet.cpp
index 6806d1c..d176d9e 100644
--- a/lib/Analysis/LiveVar/ValueSet.cpp
+++ b/lib/Analysis/LiveVar/ValueSet.cpp
@@ -1,11 +1,14 @@
 
 #include "llvm/Analysis/LiveVar/ValueSet.h"
 #include "llvm/ConstantVals.h"
-
+#include <iostream>
+using std::cerr;
+using std::endl;
+using std::pair;
+using std::hash_set;
 
 void printValue( const Value *const v)  // func to print a Value 
 {
-  
   if (v->hasName())
     cerr << v << "(" << ((*v).getName()) << ") ";
   else if (Constant *C = dyn_cast<Constant>(v))
@@ -16,17 +19,13 @@
 
 
 //---------------- Method implementations --------------------------
-
-
-ValueSet:: ValueSet() : hash_set<const Value *,  hashFuncValue> () { }
-
                                              // for performing two set unions
 bool ValueSet::setUnion( const ValueSet *const set1) {   
   const_iterator set1it;
   pair<iterator, bool> result;
   bool changed = false;
 
-  for( set1it = set1->begin() ; set1it != set1->end(); set1it++) {  
+  for( set1it = set1->begin() ; set1it != set1->end(); ++set1it) {  
                                              // for all all elements in set1
     result = insert( *set1it );              // insert to this set
       if( result.second == true) changed = true;
@@ -41,7 +40,7 @@
 			      const ValueSet *const set2) { 
 
   const_iterator set1it, set2it;
-  for( set1it = set1->begin() ; set1it != set1->end(); set1it++) {  
+  for( set1it = set1->begin() ; set1it != set1->end(); ++set1it) {  
                                              // for all elements in set1
     iterator set2it = set2->find( *set1it ); // find wether the elem is in set2
     if( set2it == set2->end() )              // if the element is not in set2
@@ -53,7 +52,7 @@
                                         // for performing set subtraction
 void ValueSet::setSubtract( const ValueSet *const set1) { 
   const_iterator set1it;
-  for( set1it = set1->begin() ; set1it != set1->end(); set1it++)  
+  for( set1it = set1->begin() ; set1it != set1->end(); ++set1it)  
                                         // for all elements in set1
     erase( *set1it );                   // erase that element from this set
 }
@@ -62,7 +61,5 @@
 
 
 void ValueSet::printSet()  const {     // for printing a live variable set
-      const_iterator it;
-      for( it = begin() ; it != end(); it++) 
-	printValue( *it );
+  for_each(begin(), end(), printValue);
 }