[llvm] r202664 - Remove unnecessary copy ctors.
Benjamin Kramer
benny.kra at googlemail.com
Sun Mar 2 13:24:53 PST 2014
Author: d0k
Date: Sun Mar 2 15:24:52 2014
New Revision: 202664
URL: http://llvm.org/viewvc/llvm-project?rev=202664&view=rev
Log:
Remove unnecessary copy ctors.
They didn't provide any value over the default ones but blocked move semantics.
Modified:
llvm/trunk/include/llvm/ADT/DenseSet.h
llvm/trunk/include/llvm/ADT/SmallString.h
Modified: llvm/trunk/include/llvm/ADT/DenseSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=202664&r1=202663&r2=202664&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseSet.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseSet.h Sun Mar 2 15:24:52 2014
@@ -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 {
Modified: llvm/trunk/include/llvm/ADT/SmallString.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallString.h?rev=202664&r1=202663&r2=202664&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallString.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallString.h Sun Mar 2 15:24:52 2014
@@ -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.
More information about the llvm-commits
mailing list