From ee68e352a7952372256e4db997755b42b88f172e Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 2 Mar 2014 21:24:52 +0000 Subject: [PATCH] Remove unnecessary copy ctors. They didn't provide any value over the default ones but blocked move semantics. llvm-svn: 202664 --- llvm/include/llvm/ADT/DenseSet.h | 6 ------ llvm/include/llvm/ADT/SmallString.h | 3 --- 2 files changed, 9 deletions(-) diff --git a/llvm/include/llvm/ADT/DenseSet.h b/llvm/include/llvm/ADT/DenseSet.h index 6abcf6623eb5..1d8c39c1441b 100644 --- a/llvm/include/llvm/ADT/DenseSet.h +++ b/llvm/include/llvm/ADT/DenseSet.h @@ -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 { diff --git a/llvm/include/llvm/ADT/SmallString.h b/llvm/include/llvm/ADT/SmallString.h index 2cfb5b9f2a9d..e569f54481a2 100644 --- a/llvm/include/llvm/ADT/SmallString.h +++ b/llvm/include/llvm/ADT/SmallString.h @@ -34,9 +34,6 @@ public: template SmallString(ItTy S, ItTy E) : SmallVector(S, E) {} - /// Copy ctor. - SmallString(const SmallString &RHS) : SmallVector(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.