From 317ccafdbd0a10a57b9866c5bf3808b970ebb9ea Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 3 Mar 2015 21:18:16 +0000 Subject: [PATCH] Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default" Accidentally committed a few more of these cleanup changes than intended. Still breaking these out & tidying them up. This reverts commit r231135. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231136 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/CallGraph.h | 6 ---- include/llvm/Analysis/IntervalIterator.h | 2 -- include/llvm/Analysis/RegionIterator.h | 4 --- include/llvm/CodeGen/LiveInterval.h | 16 ++++++--- include/llvm/CodeGen/SelectionDAGNodes.h | 6 ++++ include/llvm/IR/CFG.h | 6 +--- include/llvm/IR/ValueHandle.h | 9 ++--- include/llvm/MC/MCContext.h | 8 ++--- include/llvm/Support/CommandLine.h | 36 ++++++------------- include/llvm/Support/Format.h | 1 - include/llvm/Support/YAMLParser.h | 6 ++-- lib/Analysis/CFLAliasAnalysis.cpp | 4 ++- lib/AsmParser/LLParser.cpp | 19 ++++------ lib/AsmParser/LLParser.h | 6 +++- lib/CodeGen/LiveInterval.cpp | 1 + lib/CodeGen/LiveStackAnalysis.cpp | 6 ++-- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 ++ lib/Target/AArch64/AArch64PBQPRegAlloc.cpp | 2 +- .../Scalar/RewriteStatepointsForGC.cpp | 1 - tools/llvm-diff/DiffLog.h | 2 -- unittests/ADT/DenseMapTest.cpp | 1 - unittests/ADT/ilistTest.cpp | 4 +-- utils/TableGen/AsmMatcherEmitter.cpp | 2 -- 23 files changed, 60 insertions(+), 91 deletions(-) diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 19bcf8e23e0..64d288a2bb5 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -104,12 +104,6 @@ class CallGraph { public: CallGraph(Module &M); - // Copyable for syntax's sake, but rely on RVO such that this is never called. - // Should really make this type legitimately movable instead, possibly my - // making FunctionMap values and the CallsExternalCode member unique_ptrs, - // then adding some internal helper objects that can call - // "allReferencesDropped" on those elements before their final destruction. - CallGraph(const CallGraph&); ~CallGraph(); void print(raw_ostream &OS) const; diff --git a/include/llvm/Analysis/IntervalIterator.h b/include/llvm/Analysis/IntervalIterator.h index 125195dde02..ab70ad91b84 100644 --- a/include/llvm/Analysis/IntervalIterator.h +++ b/include/llvm/Analysis/IntervalIterator.h @@ -104,8 +104,6 @@ public: llvm_unreachable("ProcessInterval should never fail for first interval!"); } } - // Declare but don't define, rely on RVO to optimize this away. - IntervalIterator(const IntervalIterator&); IntervalIterator(IntervalPartition &IP, bool OwnMemory) : IOwnMem(OwnMemory) { OrigContainer = &IP; diff --git a/include/llvm/Analysis/RegionIterator.h b/include/llvm/Analysis/RegionIterator.h index 220c6035568..0daff58475d 100644 --- a/include/llvm/Analysis/RegionIterator.h +++ b/include/llvm/Analysis/RegionIterator.h @@ -146,8 +146,6 @@ public: return tmp; } - RNSuccIterator(const RNSuccIterator&) = default; - inline const Self &operator=(const Self &I) { if (this != &I) { assert(getNode()->getParent() == I.getNode()->getParent() @@ -243,8 +241,6 @@ public: return tmp; } - RNSuccIterator(const RNSuccIterator&) = default; - inline const Self &operator=(const Self &I) { if (this != &I) { assert(Node->getParent() == I.Node->getParent() diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 9b8b91c9b80..21634cbd155 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -199,7 +199,7 @@ namespace llvm { // of live ranges of physical registers in computeRegUnitRange. // After that the set is flushed to the segment vector and deleted. typedef std::set SegmentSet; - std::unique_ptr segmentSet; + SegmentSet *segmentSet; typedef Segments::iterator iterator; iterator begin() { return segments.begin(); } @@ -218,13 +218,15 @@ namespace llvm { const_vni_iterator vni_end() const { return valnos.end(); } /// Constructs a new LiveRange object. - LiveRange(bool UseSegmentSet = false) - : segmentSet(UseSegmentSet ? llvm::make_unique() - : nullptr) {} + LiveRange(bool UseSegmentSet = false) : segmentSet(nullptr) { + if (UseSegmentSet) + segmentSet = new SegmentSet(); + } /// Constructs a new LiveRange object by copying segments and valnos from /// another LiveRange. - LiveRange(const LiveRange &Other, BumpPtrAllocator &Allocator) { + LiveRange(const LiveRange &Other, BumpPtrAllocator &Allocator) + : segmentSet(nullptr) { assert(Other.segmentSet == nullptr && "Copying of LiveRanges with active SegmentSets is not supported"); @@ -238,6 +240,8 @@ namespace llvm { } } + ~LiveRange() { delete segmentSet; } + /// advanceTo - Advance the specified iterator to point to the Segment /// containing the specified position, or end() if the position is past the /// end of the range. If no Segment contains this position, but the @@ -741,6 +745,8 @@ namespace llvm { #endif private: + LiveInterval& operator=(const LiveInterval& rhs) = delete; + /// Appends @p Range to SubRanges list. void appendSubRange(SubRange *Range) { Range->Next = SubRanges; diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 5ceeb74dbb2..0b6240f7904 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -2063,6 +2063,12 @@ public: } bool operator!=(const SDNodeIterator& x) const { return !operator==(x); } + const SDNodeIterator &operator=(const SDNodeIterator &I) { + assert(I.Node == Node && "Cannot assign iterators to two different nodes!"); + Operand = I.Operand; + return *this; + } + pointer operator*() const { return Node->getOperand(Operand).getNode(); } diff --git a/include/llvm/IR/CFG.h b/include/llvm/IR/CFG.h index 9d4ee83bc79..84764317633 100644 --- a/include/llvm/IR/CFG.h +++ b/include/llvm/IR/CFG.h @@ -132,13 +132,11 @@ private: /// \brief Proxy object to allow write access in operator[] class SuccessorProxy { Self it; - friend class SuccIterator; - SuccessorProxy(const SuccessorProxy&) = default; public: explicit SuccessorProxy(const Self &it) : it(it) {} - SuccessorProxy &operator=(const SuccessorProxy &r) { + SuccessorProxy &operator=(SuccessorProxy r) { *this = reference(r); return *this; } @@ -167,8 +165,6 @@ public: idx = 0; } - SuccIterator(const SuccIterator&) = default; - inline const Self &operator=(const Self &I) { assert(Term == I.Term &&"Cannot assign iterators to two different blocks!"); idx = I.idx; diff --git a/include/llvm/IR/ValueHandle.h b/include/llvm/IR/ValueHandle.h index e3c9d3e1e59..355748e0597 100644 --- a/include/llvm/IR/ValueHandle.h +++ b/include/llvm/IR/ValueHandle.h @@ -51,7 +51,6 @@ protected: Tracking, Weak }; - ValueHandleBase(const ValueHandleBase&) = default; private: PointerIntPair PrevPair; @@ -59,6 +58,7 @@ private: Value* V; + ValueHandleBase(const ValueHandleBase&) = delete; public: explicit ValueHandleBase(HandleBaseKind Kind) : PrevPair(nullptr, Kind), Next(nullptr), V(nullptr) {} @@ -144,10 +144,6 @@ public: WeakVH(Value *P) : ValueHandleBase(Weak, P) {} WeakVH(const WeakVH &RHS) : ValueHandleBase(Weak, RHS) {} - // Questionable - these are stored in a vector in AssumptionCache (perhaps - // other copies too) and need to be copied. When copied, how would they - // properly insert into the use list? - WeakVH&operator=(const WeakVH &RHS) = default; Value *operator=(Value *RHS) { return ValueHandleBase::operator=(RHS); @@ -349,8 +345,7 @@ protected: CallbackVH(const CallbackVH &RHS) : ValueHandleBase(Callback, RHS) {} - virtual ~CallbackVH() = default; - CallbackVH &operator=(const CallbackVH &) = default; + virtual ~CallbackVH() {} void setValPtr(Value *P) { ValueHandleBase::operator=(P); diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h index 13c6704d77c..0a977445925 100644 --- a/include/llvm/MC/MCContext.h +++ b/include/llvm/MC/MCContext.h @@ -477,7 +477,7 @@ namespace llvm { /// allocator supports it). /// @return The allocated memory. Could be NULL. inline void *operator new(size_t Bytes, llvm::MCContext &C, - size_t Alignment = 16) LLVM_NOEXCEPT { + size_t Alignment = 16) throw () { return C.Allocate(Bytes, Alignment); } /// @brief Placement delete companion to the new above. @@ -487,7 +487,7 @@ inline void *operator new(size_t Bytes, llvm::MCContext &C, /// is called implicitly by the compiler if a placement new expression using /// the MCContext throws in the object constructor. inline void operator delete(void *Ptr, llvm::MCContext &C, size_t) - LLVM_NOEXCEPT { + throw () { C.Deallocate(Ptr); } @@ -511,7 +511,7 @@ inline void operator delete(void *Ptr, llvm::MCContext &C, size_t) /// allocator supports it). /// @return The allocated memory. Could be NULL. inline void *operator new[](size_t Bytes, llvm::MCContext& C, - size_t Alignment = 16) LLVM_NOEXCEPT { + size_t Alignment = 16) throw () { return C.Allocate(Bytes, Alignment); } @@ -521,7 +521,7 @@ inline void *operator new[](size_t Bytes, llvm::MCContext& C, /// invoking it directly; see the new[] operator for more details. This operator /// is called implicitly by the compiler if a placement new[] expression using /// the MCContext throws in the object constructor. -inline void operator delete[](void *Ptr, llvm::MCContext &C) LLVM_NOEXCEPT { +inline void operator delete[](void *Ptr, llvm::MCContext &C) throw () { C.Deallocate(Ptr); } diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 797b30d33e3..64c5d963d2c 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -352,13 +352,9 @@ struct cat { // Support value comparison outside the template. struct GenericOptionValue { - virtual ~GenericOptionValue() = default; + virtual ~GenericOptionValue() {} virtual bool compare(const GenericOptionValue &V) const = 0; -protected: - GenericOptionValue() = default; - GenericOptionValue(const GenericOptionValue&) = default; - GenericOptionValue &operator=(const GenericOptionValue &) = default; private: virtual void anchor(); }; @@ -390,9 +386,6 @@ struct OptionValueBase : public GenericOptionValue { template class OptionValueCopy : public GenericOptionValue { DataType Value; bool Valid; -protected: - OptionValueCopy(const OptionValueCopy&) = default; - OptionValueCopy &operator=(const OptionValueCopy&) = default; public: OptionValueCopy() : Valid(false) {} @@ -424,10 +417,6 @@ public: template struct OptionValueBase : OptionValueCopy { typedef DataType WrapperType; -protected: - OptionValueBase() = default; - OptionValueBase(const OptionValueBase&) = default; - OptionValueBase &operator=(const OptionValueBase&) = default; }; // Top-level option class. @@ -732,8 +721,6 @@ public: virtual void anchor(); protected: - basic_parser_impl(const basic_parser_impl&) = default; - // A helper for basic_parser::printOptionDiff. void printOptionName(const Option &O, size_t GlobalWidth) const; }; @@ -742,9 +729,6 @@ protected: // a typedef for the provided data type. // template class basic_parser : public basic_parser_impl { -protected: - // Workaround PR22763 - basic_parser(const basic_parser& RHS) : basic_parser_impl(RHS) {} public: basic_parser(Option &O) : basic_parser_impl(O) {} typedef DataType parser_data_type; @@ -754,7 +738,7 @@ public: //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -781,7 +765,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -807,7 +791,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -829,7 +813,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -852,7 +836,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); // parser // template <> -class parser final : public basic_parser { +class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -875,7 +859,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -897,7 +881,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -919,7 +903,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} @@ -944,7 +928,7 @@ EXTERN_TEMPLATE_INSTANTIATION(class basic_parser); //-------------------------------------------------- // parser // -template <> class parser final : public basic_parser { +template <> class parser : public basic_parser { public: parser(Option &O) : basic_parser(O) {} diff --git a/include/llvm/Support/Format.h b/include/llvm/Support/Format.h index 0bb8cbbc6e6..682c5a99161 100644 --- a/include/llvm/Support/Format.h +++ b/include/llvm/Support/Format.h @@ -38,7 +38,6 @@ class format_object_base { protected: const char *Fmt; ~format_object_base() {} // Disallow polymorphic deletion. - format_object_base(const format_object_base&) = default; virtual void home(); // Out of line virtual method. /// Call snprintf() for this object, on the given buffer and size. diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h index 019ec7b2446..de6e6544e25 100644 --- a/include/llvm/Support/YAMLParser.h +++ b/include/llvm/Support/YAMLParser.h @@ -145,11 +145,11 @@ public: unsigned int getType() const { return TypeID; } void *operator new(size_t Size, BumpPtrAllocator &Alloc, - size_t Alignment = 16) LLVM_NOEXCEPT { + size_t Alignment = 16) throw() { return Alloc.Allocate(Size, Alignment); } - void operator delete(void *Ptr, BumpPtrAllocator &Alloc, size_t Size) LLVM_NOEXCEPT { + void operator delete(void *Ptr, BumpPtrAllocator &Alloc, size_t Size) throw() { Alloc.Deallocate(Ptr, Size); } @@ -157,7 +157,7 @@ protected: std::unique_ptr &Doc; SMRange SourceRange; - void operator delete(void *) LLVM_NOEXCEPT {} + void operator delete(void *) throw() {} virtual ~Node() {} diff --git a/lib/Analysis/CFLAliasAnalysis.cpp b/lib/Analysis/CFLAliasAnalysis.cpp index cf92bfeca10..82fbfe06aee 100644 --- a/lib/Analysis/CFLAliasAnalysis.cpp +++ b/lib/Analysis/CFLAliasAnalysis.cpp @@ -151,13 +151,15 @@ struct FunctionInfo { struct CFLAliasAnalysis; -struct FunctionHandle final : public CallbackVH { +struct FunctionHandle : public CallbackVH { FunctionHandle(Function *Fn, CFLAliasAnalysis *CFLAA) : CallbackVH(Fn), CFLAA(CFLAA) { assert(Fn != nullptr); assert(CFLAA != nullptr); } + virtual ~FunctionHandle() {} + void deleted() override { removeSelfFromCache(); } void allUsesReplacedWith(Value *) override { removeSelfFromCache(); } diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index eab00cbaaa4..925af4e17e1 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2365,9 +2365,9 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { ParseToken(lltok::rbrace, "expected end of struct constant")) return true; - ID.ConstantStructElts.reset(new Constant*[Elts.size()]); + ID.ConstantStructElts = new Constant*[Elts.size()]; ID.UIntVal = Elts.size(); - memcpy(ID.ConstantStructElts.get(), Elts.data(), Elts.size()*sizeof(Elts[0])); + memcpy(ID.ConstantStructElts, Elts.data(), Elts.size()*sizeof(Elts[0])); ID.Kind = ValID::t_ConstantStruct; return false; } @@ -2386,8 +2386,8 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { return true; if (isPackedStruct) { - ID.ConstantStructElts.reset(new Constant*[Elts.size()]); - memcpy(ID.ConstantStructElts.get(), Elts.data(), Elts.size()*sizeof(Elts[0])); + ID.ConstantStructElts = new Constant*[Elts.size()]; + memcpy(ID.ConstantStructElts, Elts.data(), Elts.size()*sizeof(Elts[0])); ID.UIntVal = Elts.size(); ID.Kind = ValID::t_PackedConstantStruct; return false; @@ -2512,12 +2512,7 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) { if (!F) { // Make a global variable as a placeholder for this reference. - GlobalValue *&FwdRef = - ForwardRefBlockAddresses.insert(std::make_pair( - std::move(Fn), - std::map())) - .first->second.insert(std::make_pair(std::move(Label), nullptr)) - .first->second; + GlobalValue *&FwdRef = ForwardRefBlockAddresses[Fn][Label]; if (!FwdRef) FwdRef = new GlobalVariable(*M, Type::getInt8Ty(Context), false, GlobalValue::InternalLinkage, nullptr, ""); @@ -3947,8 +3942,8 @@ bool LLParser::ConvertValIDToValue(Type *Ty, ValID &ID, Value *&V, return Error(ID.Loc, "element " + Twine(i) + " of struct initializer doesn't match struct element type"); - V = ConstantStruct::get( - ST, makeArrayRef(ID.ConstantStructElts.get(), ID.UIntVal)); + V = ConstantStruct::get(ST, makeArrayRef(ID.ConstantStructElts, + ID.UIntVal)); } else return Error(ID.Loc, "constant expression type mismatch"); return false; diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index 3675d958323..5e92e570e72 100644 --- a/lib/AsmParser/LLParser.h +++ b/lib/AsmParser/LLParser.h @@ -62,9 +62,13 @@ namespace llvm { APSInt APSIntVal; APFloat APFloatVal; Constant *ConstantVal; - std::unique_ptr ConstantStructElts; + Constant **ConstantStructElts; ValID() : Kind(t_LocalID), APFloatVal(0.0) {} + ~ValID() { + if (Kind == t_ConstantStruct || Kind == t_PackedConstantStruct) + delete [] ConstantStructElts; + } bool operator<(const ValID &RHS) const { if (Kind == t_LocalID || Kind == t_GlobalID) diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index e1aee4d898a..d60b0b1a504 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -743,6 +743,7 @@ void LiveRange::flushSegmentSet() { segments.empty() && "segment set can be used only initially before switching to the array"); segments.append(segmentSet->begin(), segmentSet->end()); + delete segmentSet; segmentSet = nullptr; verify(); } diff --git a/lib/CodeGen/LiveStackAnalysis.cpp b/lib/CodeGen/LiveStackAnalysis.cpp index 5c9c679e97b..8a6ac251ab2 100644 --- a/lib/CodeGen/LiveStackAnalysis.cpp +++ b/lib/CodeGen/LiveStackAnalysis.cpp @@ -61,10 +61,8 @@ LiveStacks::getOrCreateInterval(int Slot, const TargetRegisterClass *RC) { assert(Slot >= 0 && "Spill slot indice must be >= 0"); SS2IntervalMap::iterator I = S2IMap.find(Slot); if (I == S2IMap.end()) { - I = S2IMap.emplace(std::piecewise_construct, std::forward_as_tuple(Slot), - std::forward_as_tuple( - TargetRegisterInfo::index2StackSlot(Slot), 0.0F)) - .first; + I = S2IMap.insert(I, std::make_pair(Slot, + LiveInterval(TargetRegisterInfo::index2StackSlot(Slot), 0.0F))); S2RCMap.insert(std::make_pair(Slot, RC)); } else { // Use the largest common subclass register class. diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index c7a9df543a0..9e2b5afde1e 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -9115,6 +9115,9 @@ struct LoadedSlice { unsigned Shift = 0, SelectionDAG *DAG = nullptr) : Inst(Inst), Origin(Origin), Shift(Shift), DAG(DAG) {} + LoadedSlice(const LoadedSlice &LS) + : Inst(LS.Inst), Origin(LS.Origin), Shift(LS.Shift), DAG(LS.DAG) {} + /// \brief Get the bits used in a chunk of bits \p BitWidth large. /// \return Result is \p BitWidth and has used bits set to 1 and /// not used bits set to 0. diff --git a/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp b/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp index 5394875a6bc..4690177d029 100644 --- a/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp +++ b/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp @@ -319,7 +319,7 @@ void A57ChainingConstraint::addInterChainConstraint(PBQPRAGraph &G, unsigned Rd, static bool regJustKilledBefore(const LiveIntervals &LIs, unsigned reg, const MachineInstr &MI) { - const LiveInterval &LI = LIs.getInterval(reg); + LiveInterval LI = LIs.getInterval(reg); SlotIndex SI = LIs.getInstructionIndex(&MI); return LI.expiredAt(SI); } diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 7f2cdb02438..15f09a5fe4a 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -548,7 +548,6 @@ public: } PhiState(Value *b) : status(Base), base(b) {} PhiState() : status(Unknown), base(nullptr) {} - PhiState &operator=(const PhiState &) = default; PhiState(const PhiState &other) : status(other.status), base(other.base) { assert(status != Base || base); } diff --git a/tools/llvm-diff/DiffLog.h b/tools/llvm-diff/DiffLog.h index cfdeec89d9e..8eb53ffffcc 100644 --- a/tools/llvm-diff/DiffLog.h +++ b/tools/llvm-diff/DiffLog.h @@ -40,8 +40,6 @@ namespace llvm { public: LogBuilder(Consumer &c, StringRef Format) : consumer(c), Format(Format) {} - // Relying on RVO, not actually copyable. - LogBuilder(const LogBuilder&); LogBuilder &operator<<(Value *V) { Arguments.push_back(V); diff --git a/unittests/ADT/DenseMapTest.cpp b/unittests/ADT/DenseMapTest.cpp index 97807771725..f4979839c78 100644 --- a/unittests/ADT/DenseMapTest.cpp +++ b/unittests/ADT/DenseMapTest.cpp @@ -46,7 +46,6 @@ public: CtorTester(const CtorTester &Arg) : Value(Arg.Value) { EXPECT_TRUE(Constructed.insert(this).second); } - CtorTester &operator=(const CtorTester &) = default; ~CtorTester() { EXPECT_EQ(1u, Constructed.erase(this)); } diff --git a/unittests/ADT/ilistTest.cpp b/unittests/ADT/ilistTest.cpp index 40b44ce3ca9..44442ebf75a 100644 --- a/unittests/ADT/ilistTest.cpp +++ b/unittests/ADT/ilistTest.cpp @@ -21,9 +21,7 @@ struct Node : ilist_node { int Value; Node() {} - Node(int Value) : Value(Value) {} - Node(const Node&) = default; - Node(Node &&RHS) : Value(RHS.Value) { RHS.Value = -1; } + Node(int _Value) : Value(_Value) {} ~Node() { Value = -1; } }; diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 12bb075eec9..909ecd4665f 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -441,8 +441,6 @@ struct MatchableInfo { : AsmVariantID(0), AsmString(Alias->AsmString), TheDef(Alias->TheDef), DefRec(Alias.release()) { } - MatchableInfo(const MatchableInfo&) = default; - ~MatchableInfo() { delete DefRec.dyn_cast(); } -- 2.34.1