Remove unnecessary copy ctors.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 2 Mar 2014 21:24:52 +0000 (21:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 2 Mar 2014 21:24:52 +0000 (21:24 +0000)
They didn't provide any value over the default ones but blocked move semantics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202664 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/DenseSet.h
include/llvm/ADT/SmallString.h

index 6abcf6623eb5b5cd54264a75491efac50f81b941..1d8c39c1441be9ae868e0de0d3f46b28996e508f 100644 (file)
@@ -30,7 +30,6 @@ public:
   typedef ValueT key_type;
   typedef ValueT value_type;
 
-  DenseSet(const DenseSet &Other) : TheMap(Other.TheMap) {}
   explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {}
 
   bool empty() const { return TheMap.empty(); }
@@ -57,11 +56,6 @@ public:
     TheMap.swap(RHS.TheMap);
   }
 
-  DenseSet &operator=(const DenseSet &RHS) {
-    TheMap = RHS.TheMap;
-    return *this;
-  }
-
   // Iterators.
 
   class Iterator {
index 2cfb5b9f2a9d4b31b46d53b61b4654c2527ef85c..e569f54481a2bcd379e5a22e93c53d79e52145c3 100644 (file)
@@ -34,9 +34,6 @@ public:
   template<typename ItTy>
   SmallString(ItTy S, ItTy E) : SmallVector<char, InternalLen>(S, E) {}
 
-  /// Copy ctor.
-  SmallString(const SmallString &RHS) : SmallVector<char, InternalLen>(RHS) {}
-
   // Note that in order to add new overloads for append & assign, we have to
   // duplicate the inherited versions so as not to inadvertently hide them.