Remove copy ctors that did the same thing as the default one.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 11 Mar 2014 11:32:49 +0000 (11:32 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 11 Mar 2014 11:32:49 +0000 (11:32 +0000)
The code added nothing but potentially disabled move semantics and made
types non-trivially copyable.

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

13 files changed:
include/llvm/ADT/EquivalenceClasses.h
include/llvm/ADT/STLExtras.h
include/llvm/ADT/SparseMultiSet.h
include/llvm/Analysis/Interval.h
include/llvm/IR/Attributes.h
include/llvm/IR/InlineAsm.h
include/llvm/IR/Metadata.h
include/llvm/Object/RelocVisitor.h
include/llvm/Support/TargetRegistry.h
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
lib/IR/InlineAsm.cpp
utils/TableGen/CodeGenRegisters.h

index 1d81772ee8ae8ea0f8ca246dc2b4eb0ac3555b1d..2256ee7ae4eb38d7329d380c27ca9a9c4b1a1dac 100644 (file)
@@ -249,7 +249,6 @@ public:
 
     explicit member_iterator() {}
     explicit member_iterator(const ECValue *N) : Node(N) {}
-    member_iterator(const member_iterator &I) : Node(I.Node) {}
 
     reference operator*() const {
       assert(Node != 0 && "Dereferencing end()!");
index 66221de2a48da48b0ab6d4659ce04276470389e6..ab6884ffb50df01e0c356e096e1b251609dd1728 100644 (file)
@@ -97,8 +97,6 @@ public:
 
   inline explicit mapped_iterator(const RootIt &I, UnaryFunc F)
     : current(I), Fn(F) {}
-  inline mapped_iterator(const mapped_iterator &It)
-    : current(It.current), Fn(It.Fn) {}
 
   inline value_type operator*() const {   // All this work to do this
     return Fn(*current);         // little change
index 7f2a6f7d0bacd14235a5c8c5481d0503cbe148cc..f80f6d7153fc3e4f57c47d5614da8ca601f203e3 100644 (file)
@@ -245,16 +245,6 @@ public:
     typedef typename super::pointer pointer;
     typedef typename super::reference reference;
 
-    iterator_base(const iterator_base &RHS)
-      : SMS(RHS.SMS), Idx(RHS.Idx), SparseIdx(RHS.SparseIdx) { }
-
-    const iterator_base &operator=(const iterator_base &RHS) {
-      SMS = RHS.SMS;
-      Idx = RHS.Idx;
-      SparseIdx = RHS.SparseIdx;
-      return *this;
-    }
-
     reference operator*() const {
       assert(isKeyed() && SMS->sparseIndex(SMS->Dense[Idx].Data) == SparseIdx &&
              "Dereferencing iterator of invalid key or index");
index 5ce1260eca1f93d9e4e4f5053452183ad71f0c52..01eba3f16c014f13e51335cfcfb2c262bfbb9bfe 100644 (file)
@@ -48,9 +48,6 @@ public:
     Nodes.push_back(Header);
   }
 
-  inline Interval(const Interval &I) // copy ctor
-    : HeaderNode(I.HeaderNode), Nodes(I.Nodes), Successors(I.Successors) {}
-
   inline BasicBlock *getHeaderNode() const { return HeaderNode; }
 
   /// Nodes - The basic blocks in this interval.
index f240211a5499a20c53c161a9536d03f609e86fda..9eccf40045bef4c10865781c05bcf1174503ef5d 100644 (file)
@@ -403,10 +403,6 @@ public:
     addAttribute(A);
   }
   AttrBuilder(AttributeSet AS, unsigned Idx);
-  AttrBuilder(const AttrBuilder &B)
-    : Attrs(B.Attrs),
-      TargetDepAttrs(B.TargetDepAttrs.begin(), B.TargetDepAttrs.end()),
-      Alignment(B.Alignment), StackAlignment(B.StackAlignment) {}
 
   void clear();
 
index 652d3710e7a6d9cc98412e75efdea015b4a68fcc..ac190892bab011f44c59c0b6532c2115306bea69 100644 (file)
@@ -164,9 +164,6 @@ public:
     ///Default constructor.
     ConstraintInfo();
     
-    /// Copy constructor.
-    ConstraintInfo(const ConstraintInfo &other);
-    
     /// Parse - Analyze the specified string (e.g. "=*&{eax}") and fill in the
     /// fields in this structure.  If the constraint string is not understood,
     /// return true, otherwise return false.
index 9b044a37298dbdb4576c029e4512268843893c84..d054fbba22ca9c4b627124a1fe88e1a3adcdf1e3 100644 (file)
@@ -219,7 +219,6 @@ class NamedMDNode : public ilist_node<NamedMDNode> {
 
   public:
     op_iterator_impl() : Node(0), Idx(0) { }
-    op_iterator_impl(const op_iterator_impl &o) : Node(o.Node), Idx(o.Idx) { }
 
     bool operator==(const op_iterator_impl &o) const { return Idx == o.Idx; }
     bool operator!=(const op_iterator_impl &o) const { return Idx != o.Idx; }
@@ -242,11 +241,6 @@ class NamedMDNode : public ilist_node<NamedMDNode> {
       return tmp;
     }
 
-    op_iterator_impl &operator=(const op_iterator_impl &o) {
-      Node = o.Node;
-      Idx = o.Idx;
-      return *this;
-    }
     T1 operator*() const { return Node->getOperand(Idx); }
   };
 
index 225b83eff3cf1868e602be6bb89f3f33e6bab5af..c72db2ce412918078952b73f6e1144239bb0c1f9 100644 (file)
@@ -33,7 +33,6 @@ struct RelocToApply {
   // The width of the value; how many bytes to touch when applying the
   // relocation.
   char Width;
-  RelocToApply(const RelocToApply &In) : Value(In.Value), Width(In.Width) {}
   RelocToApply(int64_t Value, char Width) : Value(Value), Width(Width) {}
   RelocToApply() : Value(0), Width(0) {}
 };
index f112fca6dfe7c622adf14c8c063652894a24bbf2..8e7478c1558adcbd1c74f84aeaf6a6f06e2d2370 100644 (file)
@@ -486,7 +486,6 @@ namespace llvm {
       explicit iterator(Target *T) : Current(T) {}
       friend struct TargetRegistry;
     public:
-      iterator(const iterator &I) : Current(I.Current) {}
       iterator() : Current(0) {}
 
       bool operator==(const iterator &x) const {
index 679c820e559bc5bbfbb50a7a515ceff7e229d384..8f00ac8fa336b32b5bd7861a73e01b222aa421fd 100644 (file)
@@ -2254,15 +2254,6 @@ public:
     /// operand it matches.
     unsigned getMatchedOperand() const;
 
-    /// Copy constructor for copying from an AsmOperandInfo.
-    AsmOperandInfo(const AsmOperandInfo &info)
-      : InlineAsm::ConstraintInfo(info),
-        ConstraintCode(info.ConstraintCode),
-        ConstraintType(info.ConstraintType),
-        CallOperandVal(info.CallOperandVal),
-        ConstraintVT(info.ConstraintVT) {
-    }
-
     /// Copy constructor for copying from a ConstraintInfo.
     AsmOperandInfo(const InlineAsm::ConstraintInfo &info)
       : InlineAsm::ConstraintInfo(info),
index 8932f15b3716020f56b2b17c7d7160d4384b296c..c28366456ac0d227b4c989c26e02042d77ff41ff 100644 (file)
@@ -1539,7 +1539,6 @@ template<class SF>
 struct reverse_sort : public queue_sort {
   SF &SortFunc;
   reverse_sort(SF &sf) : SortFunc(sf) {}
-  reverse_sort(const reverse_sort &RHS) : SortFunc(RHS.SortFunc) {}
 
   bool operator()(SUnit* left, SUnit* right) const {
     // reverse left/right rather than simply !SortFunc(left, right)
@@ -1559,7 +1558,6 @@ struct bu_ls_rr_sort : public queue_sort {
 
   RegReductionPQBase *SPQ;
   bu_ls_rr_sort(RegReductionPQBase *spq) : SPQ(spq) {}
-  bu_ls_rr_sort(const bu_ls_rr_sort &RHS) : SPQ(RHS.SPQ) {}
 
   bool operator()(SUnit* left, SUnit* right) const;
 };
@@ -1574,8 +1572,6 @@ struct src_ls_rr_sort : public queue_sort {
   RegReductionPQBase *SPQ;
   src_ls_rr_sort(RegReductionPQBase *spq)
     : SPQ(spq) {}
-  src_ls_rr_sort(const src_ls_rr_sort &RHS)
-    : SPQ(RHS.SPQ) {}
 
   bool operator()(SUnit* left, SUnit* right) const;
 };
@@ -1590,8 +1586,6 @@ struct hybrid_ls_rr_sort : public queue_sort {
   RegReductionPQBase *SPQ;
   hybrid_ls_rr_sort(RegReductionPQBase *spq)
     : SPQ(spq) {}
-  hybrid_ls_rr_sort(const hybrid_ls_rr_sort &RHS)
-    : SPQ(RHS.SPQ) {}
 
   bool isReady(SUnit *SU, unsigned CurCycle) const;
 
@@ -1609,8 +1603,6 @@ struct ilp_ls_rr_sort : public queue_sort {
   RegReductionPQBase *SPQ;
   ilp_ls_rr_sort(RegReductionPQBase *spq)
     : SPQ(spq) {}
-  ilp_ls_rr_sort(const ilp_ls_rr_sort &RHS)
-    : SPQ(RHS.SPQ) {}
 
   bool isReady(SUnit *SU, unsigned CurCycle) const;
 
index 9f2a9fea4b93b1bd6ff4f65d16f952caf4bbd5a5..62d191dbce396513eb00c5c952c56c6a9db026f6 100644 (file)
@@ -64,16 +64,6 @@ InlineAsm::ConstraintInfo::ConstraintInfo() :
   currentAlternativeIndex(0) {
 }
 
-/// Copy constructor.
-InlineAsm::ConstraintInfo::ConstraintInfo(const ConstraintInfo &other) :
-  Type(other.Type), isEarlyClobber(other.isEarlyClobber),
-  MatchingInput(other.MatchingInput), isCommutative(other.isCommutative),
-  isIndirect(other.isIndirect), Codes(other.Codes),
-  isMultipleAlternative(other.isMultipleAlternative),
-  multipleAlternatives(other.multipleAlternatives),
-  currentAlternativeIndex(other.currentAlternativeIndex) {
-}
-
 /// Parse - Analyze the specified string (e.g. "==&{eax}") and fill in the
 /// fields in this structure.  If the constraint string is not understood,
 /// return true, otherwise return false.
index a44d8b083e59094334f0e079eb1cc368d6c37b58..da52c164a0b2fce35f8a0fd9b657cb2fcddf67c0 100644 (file)
@@ -374,11 +374,6 @@ namespace llvm {
       unsigned SpillSize;
       unsigned SpillAlignment;
 
-      Key(const Key &O)
-        : Members(O.Members),
-          SpillSize(O.SpillSize),
-          SpillAlignment(O.SpillAlignment) {}
-
       Key(const CodeGenRegister::Set *M, unsigned S = 0, unsigned A = 0)
         : Members(M), SpillSize(S), SpillAlignment(A) {}