Extend StringRef's edit-distance algorithm to permit an upper bound on the allowed...
[oota-llvm.git] / include / llvm / ADT / ValueMap.h
index f7560681097812cc2d1da1fe99cf84039785f01a..ded17fc32223b76f18d80ba473f32fd6f2d1836a 100644 (file)
@@ -82,18 +82,13 @@ class ValueMap {
   typedef typename Config::ExtraData ExtraData;
   MapT Map;
   ExtraData Data;
+  ValueMap(const ValueMap&); // DO NOT IMPLEMENT
+  ValueMap& operator=(const ValueMap&); // DO NOT IMPLEMENT
 public:
   typedef KeyT key_type;
   typedef ValueT mapped_type;
   typedef std::pair<KeyT, ValueT> value_type;
 
-  ValueMap(const ValueMap& Other) : Map(Other.Map), Data(Other.Data) {
-    // Each ValueMapCVH key contains a pointer to the containing ValueMap.
-    // The keys in the new map need to point to the new map, not Other.
-    for (typename MapT::iterator I = Map.begin(), E = Map.end(); I != E; ++I)
-      I->first.Map = this;
-  }
-
   explicit ValueMap(unsigned NumInitBuckets = 64)
     : Map(NumInitBuckets), Data() {}
   explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
@@ -154,7 +149,7 @@ public:
   bool erase(const KeyT &Val) {
     return Map.erase(Wrap(Val));
   }
-  bool erase(iterator I) {
+  void erase(iterator I) {
     return Map.erase(I.base());
   }
 
@@ -166,12 +161,6 @@ public:
     return Map[Wrap(Key)];
   }
 
-  ValueMap& operator=(const ValueMap& Other) {
-    Map = Other.Map;
-    Data = Other.Data;
-    return *this;
-  }
-
   /// isPointerIntoBucketsArray - Return true if the specified pointer points
   /// somewhere into the ValueMap's array of buckets (i.e. either to a key or
   /// value in the ValueMap).