Index: examples/Kaleidoscope/Chapter2/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter2/toy.cpp +++ examples/Kaleidoscope/Chapter2/toy.cpp @@ -84,7 +84,7 @@ /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; }; /// NumberExprAST - Expression class for numeric literals like "1.0". Index: examples/Kaleidoscope/Chapter3/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter3/toy.cpp +++ examples/Kaleidoscope/Chapter3/toy.cpp @@ -90,7 +90,7 @@ /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *codegen() = 0; }; Index: examples/Kaleidoscope/Chapter4/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter4/toy.cpp +++ examples/Kaleidoscope/Chapter4/toy.cpp @@ -96,7 +96,7 @@ /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *codegen() = 0; }; Index: examples/Kaleidoscope/Chapter5/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter5/toy.cpp +++ examples/Kaleidoscope/Chapter5/toy.cpp @@ -113,7 +113,7 @@ /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *codegen() = 0; }; Index: examples/Kaleidoscope/Chapter6/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter6/toy.cpp +++ examples/Kaleidoscope/Chapter6/toy.cpp @@ -121,7 +121,7 @@ /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *codegen() = 0; }; Index: examples/Kaleidoscope/Chapter7/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter7/toy.cpp +++ examples/Kaleidoscope/Chapter7/toy.cpp @@ -126,7 +126,7 @@ /// ExprAST - Base class for all expression nodes. class ExprAST { public: - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *codegen() = 0; }; Index: examples/Kaleidoscope/Chapter8/toy.cpp =================================================================== --- examples/Kaleidoscope/Chapter8/toy.cpp +++ examples/Kaleidoscope/Chapter8/toy.cpp @@ -202,7 +202,7 @@ public: ExprAST(SourceLocation Loc = CurLoc) : Loc(Loc) {} - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *codegen() = 0; int getLine() const { return Loc.Line; } int getCol() const { return Loc.Col; } Index: examples/Kaleidoscope/Orc/fully_lazy/toy.cpp =================================================================== --- examples/Kaleidoscope/Orc/fully_lazy/toy.cpp +++ examples/Kaleidoscope/Orc/fully_lazy/toy.cpp @@ -118,7 +118,7 @@ /// ExprAST - Base class for all expression nodes. struct ExprAST { - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *IRGen(IRGenContext &C) const = 0; }; Index: examples/Kaleidoscope/Orc/initial/toy.cpp =================================================================== --- examples/Kaleidoscope/Orc/initial/toy.cpp +++ examples/Kaleidoscope/Orc/initial/toy.cpp @@ -117,7 +117,7 @@ /// ExprAST - Base class for all expression nodes. struct ExprAST { - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *IRGen(IRGenContext &C) const = 0; }; Index: examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp =================================================================== --- examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp +++ examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp @@ -117,7 +117,7 @@ /// ExprAST - Base class for all expression nodes. struct ExprAST { - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *IRGen(IRGenContext &C) const = 0; }; Index: examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp =================================================================== --- examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp +++ examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp @@ -117,7 +117,7 @@ /// ExprAST - Base class for all expression nodes. struct ExprAST { - virtual ~ExprAST() {} + virtual ~ExprAST() = default; virtual Value *IRGen(IRGenContext &C) const = 0; }; Index: include/llvm/ADT/DAGDeltaAlgorithm.h =================================================================== --- include/llvm/ADT/DAGDeltaAlgorithm.h +++ include/llvm/ADT/DAGDeltaAlgorithm.h @@ -46,7 +46,7 @@ typedef std::vector changesetlist_ty; public: - virtual ~DAGDeltaAlgorithm() {} + virtual ~DAGDeltaAlgorithm() = default; /// Run - Minimize the DAG formed by the \p Changes vertices and the /// \p Dependencies edges by executing \see ExecuteOneTest() on subsets of Index: include/llvm/ADT/DepthFirstIterator.h =================================================================== --- include/llvm/ADT/DepthFirstIterator.h +++ include/llvm/ADT/DepthFirstIterator.h @@ -83,9 +83,7 @@ VisitStack.push_back( std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node))); } - inline df_iterator() { - // End is when stack is empty - } + inline df_iterator() = default; inline df_iterator(NodeType *Node, SetType &S) : df_iterator_storage(S) { if (!S.count(Node)) { Index: include/llvm/ADT/EquivalenceClasses.h =================================================================== --- include/llvm/ADT/EquivalenceClasses.h +++ include/llvm/ADT/EquivalenceClasses.h @@ -115,7 +115,7 @@ std::set TheMapping; public: - EquivalenceClasses() {} + EquivalenceClasses() = default; EquivalenceClasses(const EquivalenceClasses &RHS) { operator=(RHS); } @@ -248,7 +248,7 @@ typedef typename super::pointer pointer; typedef typename super::reference reference; - explicit member_iterator() {} + explicit member_iterator() = default; explicit member_iterator(const ECValue *N) : Node(N) {} reference operator*() const { Index: include/llvm/ADT/ImmutableSet.h =================================================================== --- include/llvm/ADT/ImmutableSet.h +++ include/llvm/ADT/ImmutableSet.h @@ -655,7 +655,7 @@ typedef ImutAVLTree TreeTy; - ImutAVLTreeGenericIterator() {} + ImutAVLTreeGenericIterator() = default; ImutAVLTreeGenericIterator(const TreeTy *Root) { if (Root) stack.push_back(reinterpret_cast(Root)); } Index: include/llvm/ADT/IntervalMap.h =================================================================== --- include/llvm/ADT/IntervalMap.h +++ include/llvm/ADT/IntervalMap.h @@ -1523,7 +1523,7 @@ public: /// iterator - Create null iterator. - iterator() {} + iterator() = default; /// setStart - Move the start of the current interval. /// This may cause coalescing with the previous interval. Index: include/llvm/ADT/IntrusiveRefCntPtr.h =================================================================== --- include/llvm/ADT/IntrusiveRefCntPtr.h +++ include/llvm/ADT/IntrusiveRefCntPtr.h @@ -71,7 +71,7 @@ RefCountedBaseVPTR() : ref_cnt(0) {} RefCountedBaseVPTR(const RefCountedBaseVPTR &) : ref_cnt(0) {} - virtual ~RefCountedBaseVPTR() {} + virtual ~RefCountedBaseVPTR() = default; void Retain() const { ++ref_cnt; } void Release() const { Index: include/llvm/ADT/PointerUnion.h =================================================================== --- include/llvm/ADT/PointerUnion.h +++ include/llvm/ADT/PointerUnion.h @@ -95,7 +95,7 @@ struct UNION_DOESNT_CONTAIN_TYPE { }; public: - PointerUnion() {} + PointerUnion() = default; PointerUnion(PT1 V) : Val( const_cast(PointerLikeTypeTraits::getAsVoidPointer(V))) { @@ -262,7 +262,7 @@ }; public: - PointerUnion3() {} + PointerUnion3() = default; PointerUnion3(PT1 V) { Val = InnerUnion(V); @@ -373,7 +373,7 @@ private: ValTy Val; public: - PointerUnion4() {} + PointerUnion4() = default; PointerUnion4(PT1 V) { Val = InnerUnion1(V); Index: include/llvm/ADT/PostOrderIterator.h =================================================================== --- include/llvm/ADT/PostOrderIterator.h +++ include/llvm/ADT/PostOrderIterator.h @@ -117,7 +117,7 @@ VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB))); traverseChild(); } - po_iterator() {} // End is when stack is empty. + po_iterator() = default; // End is when stack is empty. po_iterator(NodeType *BB, SetType &S) : po_iterator_storage(S) { Index: include/llvm/ADT/SCCIterator.h =================================================================== --- include/llvm/ADT/SCCIterator.h +++ include/llvm/ADT/SCCIterator.h @@ -94,7 +94,7 @@ } /// End is when the DFS stack is empty. - scc_iterator() {} + scc_iterator() = default; public: static scc_iterator begin(const GraphT &G) { Index: include/llvm/ADT/SetVector.h =================================================================== --- include/llvm/ADT/SetVector.h +++ include/llvm/ADT/SetVector.h @@ -49,7 +49,7 @@ typedef typename vector_type::size_type size_type; /// \brief Construct an empty SetVector - SetVector() {} + SetVector() = default; /// \brief Initialize a SetVector with a range of elements template @@ -237,7 +237,7 @@ template class SmallSetVector : public SetVector, SmallSet > { public: - SmallSetVector() {} + SmallSetVector() = default; /// \brief Initialize a SmallSetVector with a range of elements template Index: include/llvm/ADT/SmallSet.h =================================================================== --- include/llvm/ADT/SmallSet.h +++ include/llvm/ADT/SmallSet.h @@ -40,7 +40,7 @@ public: typedef size_t size_type; - SmallSet() {} + SmallSet() = default; bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { return Vector.empty() && Set.empty(); Index: include/llvm/ADT/SmallString.h =================================================================== --- include/llvm/ADT/SmallString.h +++ include/llvm/ADT/SmallString.h @@ -25,7 +25,7 @@ class SmallString : public SmallVector { public: /// Default ctor - Initialize to empty. - SmallString() {} + SmallString() = default; /// Initialize from a StringRef. SmallString(StringRef S) : SmallVector(S.begin(), S.end()) {} Index: include/llvm/ADT/SparseBitVector.h =================================================================== --- include/llvm/ADT/SparseBitVector.h +++ include/llvm/ADT/SparseBitVector.h @@ -434,8 +434,7 @@ CurrElementIter = Elements.begin (); } - ~SparseBitVector() { - } + ~SparseBitVector() = default; // SparseBitVector copy ctor. SparseBitVector(const SparseBitVector &RHS) { Index: include/llvm/ADT/StringMap.h =================================================================== --- include/llvm/ADT/StringMap.h +++ include/llvm/ADT/StringMap.h @@ -439,7 +439,7 @@ template class StringMapIterator : public StringMapConstIterator { public: - StringMapIterator() {} + StringMapIterator() = default; explicit StringMapIterator(StringMapEntryBase **Bucket, bool NoAdvance = false) : StringMapConstIterator(Bucket, NoAdvance) { Index: include/llvm/ADT/TinyPtrVector.h =================================================================== --- include/llvm/ADT/TinyPtrVector.h +++ include/llvm/ADT/TinyPtrVector.h @@ -33,7 +33,7 @@ PtrUnion Val; public: - TinyPtrVector() {} + TinyPtrVector() = default; ~TinyPtrVector() { if (VecTy *V = Val.template dyn_cast()) delete V; Index: include/llvm/ADT/ilist.h =================================================================== --- include/llvm/ADT/ilist.h +++ include/llvm/ADT/ilist.h @@ -695,7 +695,7 @@ typedef typename iplist::size_type size_type; typedef typename iplist::iterator iterator; - ilist() {} + ilist() = default; ilist(const ilist &right) { insert(this->begin(), right.begin(), right.end()); } Index: include/llvm/Analysis/AliasAnalysis.h =================================================================== --- include/llvm/Analysis/AliasAnalysis.h +++ include/llvm/Analysis/AliasAnalysis.h @@ -619,7 +619,7 @@ explicit Model(AAResultT &Result, AAResults &AAR) : Result(Result) { Result.setAAResults(&AAR); } - ~Model() override {} + ~Model() override = default; void setAAResults(AAResults *NewAAR) override { Result.setAAResults(NewAAR); } Index: include/llvm/Analysis/AssumptionCache.h =================================================================== --- include/llvm/Analysis/AssumptionCache.h +++ include/llvm/Analysis/AssumptionCache.h @@ -109,7 +109,7 @@ /// \brief Provide a name for the analysis for debugging and logging. static StringRef name() { return "AssumptionAnalysis"; } - AssumptionAnalysis() {} + AssumptionAnalysis() = default; AssumptionAnalysis(const AssumptionAnalysis &Arg) {} AssumptionAnalysis(AssumptionAnalysis &&Arg) {} AssumptionAnalysis &operator=(const AssumptionAnalysis &RHS) { return *this; } Index: include/llvm/Analysis/BlockFrequencyInfoImpl.h =================================================================== --- include/llvm/Analysis/BlockFrequencyInfoImpl.h +++ include/llvm/Analysis/BlockFrequencyInfoImpl.h @@ -491,7 +491,7 @@ /// /// Need a virtual destructor to mask the compiler warning about /// getBlockName(). - virtual ~BlockFrequencyInfoImplBase() {} + virtual ~BlockFrequencyInfoImplBase() = default; }; namespace bfi_detail { Index: include/llvm/Analysis/DependenceAnalysis.h =================================================================== --- include/llvm/Analysis/DependenceAnalysis.h +++ include/llvm/Analysis/DependenceAnalysis.h @@ -85,7 +85,7 @@ Dst(Destination), NextPredecessor(nullptr), NextSuccessor(nullptr) {} - virtual ~Dependence() {} + virtual ~Dependence() = default; /// Dependence::DVEntry - Each level in the distance/direction vector /// has a direction (or perhaps a union of several directions), and Index: include/llvm/Analysis/IntervalIterator.h =================================================================== --- include/llvm/Analysis/IntervalIterator.h +++ include/llvm/Analysis/IntervalIterator.h @@ -96,7 +96,7 @@ public: typedef std::forward_iterator_tag iterator_category; - IntervalIterator() {} // End iterator, empty stack + IntervalIterator() = default; // End iterator, empty stack IntervalIterator(Function *M, bool OwnMemory) : IOwnMem(OwnMemory) { OrigContainer = M; if (!ProcessInterval(&M->front())) { Index: include/llvm/Analysis/LoopInfo.h =================================================================== --- include/llvm/Analysis/LoopInfo.h +++ include/llvm/Analysis/LoopInfo.h @@ -498,7 +498,7 @@ void operator=(const LoopInfoBase &) = delete; LoopInfoBase(const LoopInfoBase &) = delete; public: - LoopInfoBase() { } + LoopInfoBase() = default; ~LoopInfoBase() { releaseMemory(); } LoopInfoBase(LoopInfoBase &&Arg) Index: include/llvm/Analysis/TargetTransformInfo.h =================================================================== --- include/llvm/Analysis/TargetTransformInfo.h +++ include/llvm/Analysis/TargetTransformInfo.h @@ -639,7 +639,7 @@ public: Model(T Impl) : Impl(std::move(Impl)) {} - ~Model() override {} + ~Model() override = default; const DataLayout &getDataLayout() const override { return Impl.getDataLayout(); Index: include/llvm/CodeGen/GCStrategy.h =================================================================== --- include/llvm/CodeGen/GCStrategy.h +++ include/llvm/CodeGen/GCStrategy.h @@ -94,7 +94,7 @@ public: GCStrategy(); - virtual ~GCStrategy() {} + virtual ~GCStrategy() = default; /// Return the name of the GC strategy. This is the value of the collector /// name string specified on functions which use this strategy. Index: include/llvm/CodeGen/LiveRangeEdit.h =================================================================== --- include/llvm/CodeGen/LiveRangeEdit.h +++ include/llvm/CodeGen/LiveRangeEdit.h @@ -54,7 +54,7 @@ /// This is used for new registers representing connected components of Old. virtual void LRE_DidCloneVirtReg(unsigned New, unsigned Old) {} - virtual ~Delegate() {} + virtual ~Delegate() = default; }; private: Index: include/llvm/CodeGen/MachineConstantPool.h =================================================================== --- include/llvm/CodeGen/MachineConstantPool.h +++ include/llvm/CodeGen/MachineConstantPool.h @@ -40,7 +40,7 @@ public: explicit MachineConstantPoolValue(Type *ty) : Ty(ty) {} - virtual ~MachineConstantPoolValue() {} + virtual ~MachineConstantPoolValue() = default; /// getType - get type of this MachineConstantPoolValue. /// Index: include/llvm/CodeGen/MachineFunctionInitializer.h =================================================================== --- include/llvm/CodeGen/MachineFunctionInitializer.h +++ include/llvm/CodeGen/MachineFunctionInitializer.h @@ -25,7 +25,7 @@ virtual void anchor(); public: - virtual ~MachineFunctionInitializer() {} + virtual ~MachineFunctionInitializer() = default; /// Initialize the machine function. /// Index: include/llvm/CodeGen/MachinePassRegistry.h =================================================================== --- include/llvm/CodeGen/MachinePassRegistry.h +++ include/llvm/CodeGen/MachinePassRegistry.h @@ -35,8 +35,8 @@ class MachinePassRegistryListener { virtual void anchor(); public: - MachinePassRegistryListener() {} - virtual ~MachinePassRegistryListener() {} + MachinePassRegistryListener() = default; + virtual ~MachinePassRegistryListener() = default; virtual void NotifyAdd(const char *N, MachinePassCtor C, const char *D) = 0; virtual void NotifyRemove(const char *N) = 0; }; Index: include/llvm/CodeGen/MachineRegisterInfo.h =================================================================== --- include/llvm/CodeGen/MachineRegisterInfo.h +++ include/llvm/CodeGen/MachineRegisterInfo.h @@ -36,7 +36,7 @@ public: virtual void MRI_NoteNewVirtualRegister(unsigned Reg) = 0; - virtual ~Delegate() {} + virtual ~Delegate() = default; }; private: Index: include/llvm/CodeGen/MachineScheduler.h =================================================================== --- include/llvm/CodeGen/MachineScheduler.h +++ include/llvm/CodeGen/MachineScheduler.h @@ -168,7 +168,7 @@ class MachineSchedStrategy { virtual void anchor(); public: - virtual ~MachineSchedStrategy() {} + virtual ~MachineSchedStrategy() = default; /// Optionally override the per-region scheduling policy. virtual void initPolicy(MachineBasicBlock::iterator Begin, @@ -212,7 +212,7 @@ class ScheduleDAGMutation { virtual void anchor(); public: - virtual ~ScheduleDAGMutation() {} + virtual ~ScheduleDAGMutation() = default; virtual void apply(ScheduleDAGMI *DAG) = 0; }; @@ -913,7 +913,7 @@ PostGenericScheduler(const MachineSchedContext *C): GenericSchedulerBase(C), Top(SchedBoundary::TopQID, "TopQ") {} - ~PostGenericScheduler() override {} + ~PostGenericScheduler() override = default; void initPolicy(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, Index: include/llvm/CodeGen/ScheduleDAG.h =================================================================== --- include/llvm/CodeGen/ScheduleDAG.h +++ include/llvm/CodeGen/ScheduleDAG.h @@ -505,7 +505,7 @@ public: SchedulingPriorityQueue(bool rf = false): CurCycle(0), HasReadyFilter(rf) {} - virtual ~SchedulingPriorityQueue() {} + virtual ~SchedulingPriorityQueue() = default; virtual bool isBottomUp() const = 0; Index: include/llvm/CodeGen/ScheduleDAGInstrs.h =================================================================== --- include/llvm/CodeGen/ScheduleDAGInstrs.h +++ include/llvm/CodeGen/ScheduleDAGInstrs.h @@ -158,7 +158,7 @@ bool RemoveKillFlags = false, LiveIntervals *LIS = nullptr); - ~ScheduleDAGInstrs() override {} + ~ScheduleDAGInstrs() override = default; bool isPostRA() const { return IsPostRA; } Index: include/llvm/CodeGen/TargetLoweringObjectFileImpl.h =================================================================== --- include/llvm/CodeGen/TargetLoweringObjectFileImpl.h +++ include/llvm/CodeGen/TargetLoweringObjectFileImpl.h @@ -39,7 +39,7 @@ public: TargetLoweringObjectFileELF() : UseInitArray(false) {} - ~TargetLoweringObjectFileELF() override {} + ~TargetLoweringObjectFileELF() override = default; void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const override; @@ -87,7 +87,7 @@ class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile { public: - ~TargetLoweringObjectFileMachO() override {} + ~TargetLoweringObjectFileMachO() override = default; TargetLoweringObjectFileMachO(); /// Emit the module flags that specify the garbage collection information. @@ -129,7 +129,7 @@ class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile { public: - ~TargetLoweringObjectFileCOFF() override {} + ~TargetLoweringObjectFileCOFF() override = default; MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang, Index: include/llvm/DebugInfo/DIContext.h =================================================================== --- include/llvm/DebugInfo/DIContext.h +++ include/llvm/DebugInfo/DIContext.h @@ -122,7 +122,7 @@ DIContextKind getKind() const { return Kind; } DIContext(DIContextKind K) : Kind(K) {} - virtual ~DIContext() {} + virtual ~DIContext() = default; virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All) = 0; Index: include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h =================================================================== --- include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h +++ include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h @@ -22,7 +22,7 @@ ConcreteSymbolEnumerator(std::unique_ptr SymbolEnumerator) : Enumerator(std::move(SymbolEnumerator)) {} - ~ConcreteSymbolEnumerator() override {} + ~ConcreteSymbolEnumerator() override = default; uint32_t getChildCount() const override { return Enumerator->getChildCount(); Index: include/llvm/DebugInfo/PDB/IPDBEnumChildren.h =================================================================== --- include/llvm/DebugInfo/PDB/IPDBEnumChildren.h +++ include/llvm/DebugInfo/PDB/IPDBEnumChildren.h @@ -20,7 +20,7 @@ typedef std::unique_ptr ChildTypePtr; typedef IPDBEnumChildren MyType; - virtual ~IPDBEnumChildren() {} + virtual ~IPDBEnumChildren() = default; virtual uint32_t getChildCount() const = 0; virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0; Index: include/llvm/ExecutionEngine/JITEventListener.h =================================================================== --- include/llvm/ExecutionEngine/JITEventListener.h +++ include/llvm/ExecutionEngine/JITEventListener.h @@ -60,8 +60,8 @@ typedef JITEvent_EmittedFunctionDetails EmittedFunctionDetails; public: - JITEventListener() {} - virtual ~JITEventListener() {} + JITEventListener() = default; + virtual ~JITEventListener() = default; /// NotifyObjectEmitted - Called after an object has been successfully /// emitted to memory. NotifyFunctionEmitted will not be called for Index: include/llvm/ExecutionEngine/ObjectCache.h =================================================================== --- include/llvm/ExecutionEngine/ObjectCache.h +++ include/llvm/ExecutionEngine/ObjectCache.h @@ -22,9 +22,9 @@ class ObjectCache { virtual void anchor(); public: - ObjectCache() { } + ObjectCache() = default; - virtual ~ObjectCache() { } + virtual ~ObjectCache() = default; /// notifyObjectCompiled - Provides a pointer to compiled code for Module M. virtual void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj) = 0; Index: include/llvm/ExecutionEngine/Orc/IndirectionUtils.h =================================================================== --- include/llvm/ExecutionEngine/Orc/IndirectionUtils.h +++ include/llvm/ExecutionEngine/Orc/IndirectionUtils.h @@ -62,7 +62,7 @@ : ErrorHandlerAddress(ErrorHandlerAddress), NumTrampolinesPerBlock(NumTrampolinesPerBlock) {} - virtual ~JITCompileCallbackManagerBase() {} + virtual ~JITCompileCallbackManagerBase() = default; /// @brief Execute the callback for the given trampoline id. Called by the JIT /// to compile functions on demand. Index: include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h =================================================================== --- include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h +++ include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h @@ -40,7 +40,7 @@ class EmissionDeferredSet { public: EmissionDeferredSet() : EmitState(NotEmitted) {} - virtual ~EmissionDeferredSet() {} + virtual ~EmissionDeferredSet() = default; JITSymbol find(StringRef Name, bool ExportedSymbolsOnly, BaseLayerT &B) { switch (EmitState) { Index: include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h =================================================================== --- include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h +++ include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h @@ -43,7 +43,7 @@ : RTDyld(llvm::make_unique(MemMgr, Resolver)), State(Raw) {} - virtual ~LinkedObjectSet() {} + virtual ~LinkedObjectSet() = default; std::unique_ptr addObject(const object::ObjectFile &Obj) { Index: include/llvm/ExecutionEngine/RuntimeDyld.h =================================================================== --- include/llvm/ExecutionEngine/RuntimeDyld.h +++ include/llvm/ExecutionEngine/RuntimeDyld.h @@ -96,7 +96,7 @@ /// \brief Memory Management. class MemoryManager { public: - virtual ~MemoryManager() {} + virtual ~MemoryManager() = default; /// Allocate a memory block of (at least) the given size suitable for /// executable code. The SectionID is a unique identifier assigned by the @@ -158,7 +158,7 @@ /// \brief Symbol resolution. class SymbolResolver { public: - virtual ~SymbolResolver() {} + virtual ~SymbolResolver() = default; /// This method returns the address of the specified function or variable. /// It is used to resolve symbols during module linking. Index: include/llvm/IR/CFG.h =================================================================== --- include/llvm/IR/CFG.h +++ include/llvm/IR/CFG.h @@ -44,7 +44,7 @@ typedef typename super::pointer pointer; typedef typename super::reference reference; - PredIterator() {} + PredIterator() = default; explicit inline PredIterator(Ptr *bb) : It(bb->user_begin()) { advancePastNonTerminators(); } Index: include/llvm/IR/ConstantFolder.h =================================================================== --- include/llvm/IR/ConstantFolder.h +++ include/llvm/IR/ConstantFolder.h @@ -25,7 +25,7 @@ /// ConstantFolder - Create constants with minimum, target independent, folding. class ConstantFolder { public: - explicit ConstantFolder() {} + explicit ConstantFolder() = default; //===--------------------------------------------------------------------===// // Binary Operators Index: include/llvm/IR/DebugInfoMetadata.h =================================================================== --- include/llvm/IR/DebugInfoMetadata.h +++ include/llvm/IR/DebugInfoMetadata.h @@ -1586,7 +1586,7 @@ DIModule(LLVMContext &Context, StorageType Storage, ArrayRef Ops) : DIScope(Context, DIModuleKind, Storage, dwarf::DW_TAG_module, Ops) {} - ~DIModule() {} + ~DIModule() = default; static DIModule *getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, Index: include/llvm/IR/DiagnosticInfo.h =================================================================== --- include/llvm/IR/DiagnosticInfo.h +++ include/llvm/IR/DiagnosticInfo.h @@ -89,7 +89,7 @@ DiagnosticInfo(/* DiagnosticKind */ int Kind, DiagnosticSeverity Severity) : Kind(Kind), Severity(Severity) {} - virtual ~DiagnosticInfo() {} + virtual ~DiagnosticInfo() = default; /* DiagnosticKind */ int getKind() const { return Kind; } DiagnosticSeverity getSeverity() const { return Severity; } Index: include/llvm/IR/DiagnosticPrinter.h =================================================================== --- include/llvm/IR/DiagnosticPrinter.h +++ include/llvm/IR/DiagnosticPrinter.h @@ -30,7 +30,7 @@ /// \brief Interface for custom diagnostic printing. class DiagnosticPrinter { public: - virtual ~DiagnosticPrinter() {} + virtual ~DiagnosticPrinter() = default; // Simple types. virtual DiagnosticPrinter &operator<<(char C) = 0; Index: include/llvm/IR/GVMaterializer.h =================================================================== --- include/llvm/IR/GVMaterializer.h +++ include/llvm/IR/GVMaterializer.h @@ -29,7 +29,7 @@ class GVMaterializer { protected: - GVMaterializer() {} + GVMaterializer() = default; public: virtual ~GVMaterializer(); Index: include/llvm/IR/GetElementPtrTypeIterator.h =================================================================== --- include/llvm/IR/GetElementPtrTypeIterator.h +++ include/llvm/IR/GetElementPtrTypeIterator.h @@ -30,7 +30,7 @@ ItTy OpIt; PointerIntPair CurTy; unsigned AddrSpace; - generic_gep_type_iterator() {} + generic_gep_type_iterator() = default; public: static generic_gep_type_iterator begin(Type *Ty, ItTy It) { Index: include/llvm/IR/InstIterator.h =================================================================== --- include/llvm/IR/InstIterator.h +++ include/llvm/IR/InstIterator.h @@ -43,7 +43,7 @@ typedef IIty& reference; // Default constructor - InstIterator() {} + InstIterator() = default; // Copy constructor... template Index: include/llvm/IR/InstrTypes.h =================================================================== --- include/llvm/IR/InstrTypes.h +++ include/llvm/IR/InstrTypes.h @@ -1118,7 +1118,7 @@ std::string Tag; std::vector Inputs; - OperandBundleDefT() {} + OperandBundleDefT() = default; explicit OperandBundleDefT(StringRef Tag, const std::vector &Inputs) : Tag(Tag), Inputs(Inputs) {} }; Index: include/llvm/IR/NoFolder.h =================================================================== --- include/llvm/IR/NoFolder.h +++ include/llvm/IR/NoFolder.h @@ -31,7 +31,7 @@ /// NoFolder - Create "constants" (actually, instructions) with no folding. class NoFolder { public: - explicit NoFolder() {} + explicit NoFolder() = default; //===--------------------------------------------------------------------===// // Binary Operators Index: include/llvm/IR/PassManager.h =================================================================== --- include/llvm/IR/PassManager.h +++ include/llvm/IR/PassManager.h @@ -295,7 +295,7 @@ // We have to explicitly define all the special member functions because MSVC // refuses to generate them. - AnalysisManagerBase() {} + AnalysisManagerBase() = default; AnalysisManagerBase(AnalysisManagerBase &&Arg) : AnalysisPasses(std::move(Arg.AnalysisPasses)) {} AnalysisManagerBase &operator=(AnalysisManagerBase &&RHS) { Index: include/llvm/IR/PassManagerInternal.h =================================================================== --- include/llvm/IR/PassManagerInternal.h +++ include/llvm/IR/PassManagerInternal.h @@ -33,7 +33,7 @@ /// polymorphically over pass objects. template struct PassConcept { // Boiler plate necessary for the container of derived classes. - virtual ~PassConcept() {} + virtual ~PassConcept() = default; /// \brief The polymorphic API which runs the pass over a given IR entity. /// @@ -134,7 +134,7 @@ /// This concept is parameterized over the IR unit that this result pertains /// to. template struct AnalysisResultConcept { - virtual ~AnalysisResultConcept() {} + virtual ~AnalysisResultConcept() = default; /// \brief Method to try and mark a result as invalid. /// @@ -246,7 +246,7 @@ /// This concept is parameterized over the IR unit that it can run over and /// produce an analysis result. template struct AnalysisPassConcept { - virtual ~AnalysisPassConcept() {} + virtual ~AnalysisPassConcept() = default; /// \brief Method to run this analysis over a unit of IR. /// \returns A unique_ptr to the analysis result object to be queried by Index: include/llvm/IR/SymbolTableListTraits.h =================================================================== --- include/llvm/IR/SymbolTableListTraits.h +++ include/llvm/IR/SymbolTableListTraits.h @@ -75,7 +75,7 @@ typename SymbolTableListParentType::type ItemParentClass; public: - SymbolTableListTraits() {} + SymbolTableListTraits() = default; private: /// getListOwner - Return the object that owns this list. If this is a list Index: include/llvm/IR/TrackingMDRef.h =================================================================== --- include/llvm/IR/TrackingMDRef.h +++ include/llvm/IR/TrackingMDRef.h @@ -106,7 +106,7 @@ TrackingMDRef Ref; public: - TypedTrackingMDRef() {} + TypedTrackingMDRef() = default; explicit TypedTrackingMDRef(T *MD) : Ref(static_cast(MD)) {} TypedTrackingMDRef(TypedTrackingMDRef &&X) : Ref(std::move(X.Ref)) {} Index: include/llvm/IR/User.h =================================================================== --- include/llvm/IR/User.h +++ include/llvm/IR/User.h @@ -86,8 +86,7 @@ void growHungoffUses(unsigned N, bool IsPhi = false); public: - ~User() override { - } + ~User() override = default; /// \brief Free memory allocated for User and Use objects. void operator delete(void *Usr); /// \brief Placement delete - required by std, but never called. Index: include/llvm/IR/Value.h =================================================================== --- include/llvm/IR/Value.h +++ include/llvm/IR/Value.h @@ -157,7 +157,7 @@ friend class Value; public: - user_iterator_impl() {} + user_iterator_impl() = default; bool operator==(const user_iterator_impl &x) const { return UI == x.UI; } bool operator!=(const user_iterator_impl &x) const { return !operator==(x); } Index: include/llvm/MC/MCELFObjectWriter.h =================================================================== --- include/llvm/MC/MCELFObjectWriter.h +++ include/llvm/MC/MCELFObjectWriter.h @@ -62,7 +62,7 @@ } } - virtual ~MCELFObjectTargetWriter() {} + virtual ~MCELFObjectTargetWriter() = default; virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const = 0; Index: include/llvm/MC/MCExpr.h =================================================================== --- include/llvm/MC/MCExpr.h +++ include/llvm/MC/MCExpr.h @@ -550,7 +550,7 @@ virtual void anchor(); protected: MCTargetExpr() : MCExpr(Target) {} - virtual ~MCTargetExpr() {} + virtual ~MCTargetExpr() = default; public: virtual void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const = 0; virtual bool evaluateAsRelocatableImpl(MCValue &Res, Index: include/llvm/MC/MCInstrAnalysis.h =================================================================== --- include/llvm/MC/MCInstrAnalysis.h +++ include/llvm/MC/MCInstrAnalysis.h @@ -29,7 +29,7 @@ public: MCInstrAnalysis(const MCInstrInfo *Info) : Info(Info) {} - virtual ~MCInstrAnalysis() {} + virtual ~MCInstrAnalysis() = default; virtual bool isBranch(const MCInst &Inst) const { return Info->get(Inst.getOpcode()).isBranch(); Index: include/llvm/MC/MCParser/MCParsedAsmOperand.h =================================================================== --- include/llvm/MC/MCParser/MCParsedAsmOperand.h +++ include/llvm/MC/MCParser/MCParsedAsmOperand.h @@ -40,7 +40,7 @@ MCParsedAsmOperand() = default; public: - virtual ~MCParsedAsmOperand() {} + virtual ~MCParsedAsmOperand() = default; void setConstraint(StringRef C) { Constraint = C.str(); } StringRef getConstraint() { return Constraint; } Index: include/llvm/MC/MCWinCOFFObjectWriter.h =================================================================== --- include/llvm/MC/MCWinCOFFObjectWriter.h +++ include/llvm/MC/MCWinCOFFObjectWriter.h @@ -26,7 +26,7 @@ MCWinCOFFObjectTargetWriter(unsigned Machine_); public: - virtual ~MCWinCOFFObjectTargetWriter() {} + virtual ~MCWinCOFFObjectTargetWriter() = default; unsigned getMachine() const { return Machine; } virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, Index: include/llvm/MC/MCWinEH.h =================================================================== --- include/llvm/MC/MCWinEH.h +++ include/llvm/MC/MCWinEH.h @@ -70,7 +70,7 @@ static MCSection *getXDataSection(const MCSymbol *Function, MCContext &Context); - virtual ~UnwindEmitter() { } + virtual ~UnwindEmitter() = default; // // This emits the unwind info sections (.pdata and .xdata in PE/COFF). Index: include/llvm/Object/Binary.h =================================================================== --- include/llvm/Object/Binary.h +++ include/llvm/Object/Binary.h @@ -160,7 +160,7 @@ std::unique_ptr Buf) : Bin(std::move(Bin)), Buf(std::move(Buf)) {} -template OwningBinary::OwningBinary() {} +template OwningBinary::OwningBinary() = default; template OwningBinary::OwningBinary(OwningBinary &&Other) Index: include/llvm/PassSupport.h =================================================================== --- include/llvm/PassSupport.h +++ include/llvm/PassSupport.h @@ -225,8 +225,8 @@ /// struct PassRegistrationListener { - PassRegistrationListener() {} - virtual ~PassRegistrationListener() {} + PassRegistrationListener() = default; + virtual ~PassRegistrationListener() = default; /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. Index: include/llvm/ProfileData/CoverageMappingReader.h =================================================================== --- include/llvm/ProfileData/CoverageMappingReader.h +++ include/llvm/ProfileData/CoverageMappingReader.h @@ -72,7 +72,7 @@ virtual std::error_code readNextRecord(CoverageMappingRecord &Record) = 0; CoverageMappingIterator begin() { return CoverageMappingIterator(this); } CoverageMappingIterator end() { return CoverageMappingIterator(); } - virtual ~CoverageMappingReader() {} + virtual ~CoverageMappingReader() = default; }; /// \brief Base class for the raw coverage mapping and filenames data readers. Index: include/llvm/ProfileData/InstrProfReader.h =================================================================== --- include/llvm/ProfileData/InstrProfReader.h +++ include/llvm/ProfileData/InstrProfReader.h @@ -54,7 +54,7 @@ public: InstrProfReader() : LastError(instrprof_error::success) {} - virtual ~InstrProfReader() {} + virtual ~InstrProfReader() = default; /// Read the header. Required before reading first record. virtual std::error_code readHeader() = 0; Index: include/llvm/ProfileData/SampleProfReader.h =================================================================== --- include/llvm/ProfileData/SampleProfReader.h +++ include/llvm/ProfileData/SampleProfReader.h @@ -231,7 +231,7 @@ SampleProfileReader(std::unique_ptr B, LLVMContext &C) : Profiles(0), Ctx(C), Buffer(std::move(B)) {} - virtual ~SampleProfileReader() {} + virtual ~SampleProfileReader() = default; /// \brief Read and validate the file header. virtual std::error_code readHeader() = 0; Index: include/llvm/ProfileData/SampleProfWriter.h =================================================================== --- include/llvm/ProfileData/SampleProfWriter.h +++ include/llvm/ProfileData/SampleProfWriter.h @@ -34,7 +34,7 @@ SampleProfileWriter(StringRef Filename, std::error_code &EC, sys::fs::OpenFlags Flags) : OS(Filename, EC, Flags) {} - virtual ~SampleProfileWriter() {} + virtual ~SampleProfileWriter() = default; /// Write sample profiles in \p S for function \p FName. /// Index: include/llvm/Support/AlignOf.h =================================================================== --- include/llvm/Support/AlignOf.h +++ include/llvm/Support/AlignOf.h @@ -32,7 +32,7 @@ #endif T t; private: - AlignmentCalcImpl() {} // Never instantiate. + AlignmentCalcImpl() = default; // Never instantiate. }; /// AlignOf - A templated class that contains an enum value representing Index: include/llvm/Support/CommandLine.h =================================================================== --- include/llvm/Support/CommandLine.h +++ include/llvm/Support/CommandLine.h @@ -287,7 +287,7 @@ public: inline int getNumOccurrences() const { return NumOccurrences; } - virtual ~Option() {} + virtual ~Option() = default; }; //===----------------------------------------------------------------------===// @@ -565,7 +565,7 @@ public: generic_parser_base(Option &O) : Owner(O) {} - virtual ~generic_parser_base() {} // Base class should have virtual-dtor + virtual ~generic_parser_base() = default; // Base class should have virtual-dtor // getNumOptions - Virtual function implemented by generic subclass to // indicate how many entries are in Values. @@ -760,7 +760,7 @@ protected: // Workaround Clang PR22793 - ~basic_parser() {} + ~basic_parser() = default; }; //-------------------------------------------------- Index: include/llvm/Support/ManagedStatic.h =================================================================== --- include/llvm/Support/ManagedStatic.h +++ include/llvm/Support/ManagedStatic.h @@ -102,7 +102,7 @@ /// llvm_shutdown_obj - This is a simple helper class that calls /// llvm_shutdown() when it is destroyed. struct llvm_shutdown_obj { - llvm_shutdown_obj() { } + llvm_shutdown_obj() = default; ~llvm_shutdown_obj() { llvm_shutdown(); } }; Index: include/llvm/Support/MemoryBuffer.h =================================================================== --- include/llvm/Support/MemoryBuffer.h +++ include/llvm/Support/MemoryBuffer.h @@ -41,7 +41,7 @@ MemoryBuffer(const MemoryBuffer &) = delete; MemoryBuffer &operator=(const MemoryBuffer &) = delete; protected: - MemoryBuffer() {} + MemoryBuffer() = default; void init(const char *BufStart, const char *BufEnd, bool RequiresNullTerminator); public: Index: include/llvm/Support/YAMLTraits.h =================================================================== --- include/llvm/Support/YAMLTraits.h +++ include/llvm/Support/YAMLTraits.h @@ -983,7 +983,7 @@ virtual void anchor(); public: HNode(Node *n) : _node(n) { } - virtual ~HNode() { } + virtual ~HNode() = default; static inline bool classof(const HNode *) { return true; } Node *_node; Index: include/llvm/Support/raw_ostream.h =================================================================== --- include/llvm/Support/raw_ostream.h +++ include/llvm/Support/raw_ostream.h @@ -507,7 +507,7 @@ explicit raw_svector_ostream(SmallVectorImpl &O) : OS(O) { SetUnbuffered(); } - ~raw_svector_ostream() override {} + ~raw_svector_ostream() override = default; void flush() = delete; Index: include/llvm/TableGen/Record.h =================================================================== --- include/llvm/TableGen/Record.h +++ include/llvm/TableGen/Record.h @@ -58,7 +58,7 @@ RecTyKind getRecTyKind() const { return Kind; } RecTy(RecTyKind K) : Kind(K) {} - virtual ~RecTy() {} + virtual ~RecTy() = default; virtual std::string getAsString() const = 0; void print(raw_ostream &OS) const { OS << getAsString(); } @@ -267,7 +267,7 @@ explicit Init(InitKind K) : Kind(K) {} public: - virtual ~Init() {} + virtual ~Init() = default; /// isComplete - This virtual method should be overridden by values that may /// not be completely specified yet. Index: include/llvm/TableGen/SetTheory.h =================================================================== --- include/llvm/TableGen/SetTheory.h +++ include/llvm/TableGen/SetTheory.h @@ -69,7 +69,7 @@ class Operator { virtual void anchor(); public: - virtual ~Operator() {} + virtual ~Operator() = default; /// apply - Apply this operator to Expr's arguments and insert the result /// in Elts. @@ -83,7 +83,7 @@ class Expander { virtual void anchor(); public: - virtual ~Expander() {} + virtual ~Expander() = default; virtual void expand(SetTheory&, Record*, RecSet &Elts) =0; }; Index: include/llvm/Target/TargetLowering.h =================================================================== --- include/llvm/Target/TargetLowering.h +++ include/llvm/Target/TargetLowering.h @@ -152,7 +152,7 @@ /// NOTE: The TargetMachine owns TLOF. explicit TargetLoweringBase(const TargetMachine &TM); - virtual ~TargetLoweringBase() {} + virtual ~TargetLoweringBase() = default; protected: /// \brief Initialize all of the actions to default values. Index: include/llvm/Transforms/Utils/Cloning.h =================================================================== --- include/llvm/Transforms/Utils/Cloning.h +++ include/llvm/Transforms/Utils/Cloning.h @@ -159,7 +159,7 @@ CloneSuccessors }; - virtual ~CloningDirector() {} + virtual ~CloningDirector() = default; /// Subclasses must override this function to customize cloning behavior. virtual CloningAction handleInstruction(ValueToValueMapTy &VMap, Index: include/llvm/Transforms/Utils/SSAUpdater.h =================================================================== --- include/llvm/Transforms/Utils/SSAUpdater.h +++ include/llvm/Transforms/Utils/SSAUpdater.h @@ -138,7 +138,7 @@ public: LoadAndStorePromoter(ArrayRef Insts, SSAUpdater &S, StringRef Name = StringRef()); - virtual ~LoadAndStorePromoter() {} + virtual ~LoadAndStorePromoter() = default; /// \brief This does the promotion. /// Index: include/llvm/Transforms/Utils/SimplifyIndVar.h =================================================================== --- include/llvm/Transforms/Utils/SimplifyIndVar.h +++ include/llvm/Transforms/Utils/SimplifyIndVar.h @@ -40,7 +40,7 @@ public: IVVisitor(): DT(nullptr), ShouldSplitOverflowIntrinsics(false) {} - virtual ~IVVisitor() {} + virtual ~IVVisitor() = default; const DominatorTree *getDomTree() const { return DT; } Index: include/llvm/Transforms/Utils/SymbolRewriter.h =================================================================== --- include/llvm/Transforms/Utils/SymbolRewriter.h +++ include/llvm/Transforms/Utils/SymbolRewriter.h @@ -73,7 +73,7 @@ NamedAlias, /// named alias - descriptor rewrites a global alias }; - virtual ~RewriteDescriptor() {} + virtual ~RewriteDescriptor() = default; Type getType() const { return Kind; } Index: include/llvm/Transforms/Utils/ValueMapper.h =================================================================== --- include/llvm/Transforms/Utils/ValueMapper.h +++ include/llvm/Transforms/Utils/ValueMapper.h @@ -27,7 +27,7 @@ class ValueMapTypeRemapper { virtual void anchor(); // Out of line method. public: - virtual ~ValueMapTypeRemapper() {} + virtual ~ValueMapTypeRemapper() = default; /// remapType - The client should implement this method if they want to /// remap types while mapping values. @@ -39,7 +39,7 @@ class ValueMaterializer { virtual void anchor(); // Out of line method. public: - virtual ~ValueMaterializer() {} + virtual ~ValueMaterializer() = default; /// materializeValueFor - The client should implement this method if they /// want to generate a mapped Value on demand. For example, if linking Index: lib/Analysis/AliasAnalysis.cpp =================================================================== --- lib/Analysis/AliasAnalysis.cpp +++ lib/Analysis/AliasAnalysis.cpp @@ -64,16 +64,7 @@ return *this; } -AAResults::~AAResults() { -// FIXME; It would be nice to at least clear out the pointers back to this -// aggregation here, but we end up with non-nesting lifetimes in the legacy -// pass manager that prevent this from working. In the legacy pass manager -// we'll end up with dangling references here in some cases. -#if 0 - for (auto &AA : AAs) - AA->setAAResults(nullptr); -#endif -} +AAResults::~AAResults() = default; //===----------------------------------------------------------------------===// // Default chaining methods @@ -362,7 +353,7 @@ } // Provide a definition for the root virtual destructor. -AAResults::Concept::~Concept() {} +AAResults::Concept::~Concept() = default; AAResultsWrapperPass::AAResultsWrapperPass() : FunctionPass(ID) { initializeAAResultsWrapperPassPass(*PassRegistry::getPassRegistry()); Index: lib/Analysis/AssumptionCache.cpp =================================================================== --- lib/Analysis/AssumptionCache.cpp +++ lib/Analysis/AssumptionCache.cpp @@ -133,7 +133,7 @@ initializeAssumptionCacheTrackerPass(*PassRegistry::getPassRegistry()); } -AssumptionCacheTracker::~AssumptionCacheTracker() {} +AssumptionCacheTracker::~AssumptionCacheTracker() = default; INITIALIZE_PASS(AssumptionCacheTracker, "assumption-cache-tracker", "Assumption Cache Tracker", false, true) Index: lib/Analysis/BlockFrequencyInfo.cpp =================================================================== --- lib/Analysis/BlockFrequencyInfo.cpp +++ lib/Analysis/BlockFrequencyInfo.cpp @@ -189,7 +189,7 @@ initializeBlockFrequencyInfoWrapperPassPass(*PassRegistry::getPassRegistry()); } -BlockFrequencyInfoWrapperPass::~BlockFrequencyInfoWrapperPass() {} +BlockFrequencyInfoWrapperPass::~BlockFrequencyInfoWrapperPass() = default; void BlockFrequencyInfoWrapperPass::print(raw_ostream &OS, const Module *) const { Index: lib/Analysis/CFLAliasAnalysis.cpp =================================================================== --- lib/Analysis/CFLAliasAnalysis.cpp +++ lib/Analysis/CFLAliasAnalysis.cpp @@ -584,7 +584,7 @@ // ----- Actual graph-related things ----- // - WeightedBidirectionalGraph() {} + WeightedBidirectionalGraph() = default; WeightedBidirectionalGraph(WeightedBidirectionalGraph &&Other) : NodeImpls(std::move(Other.NodeImpls)) {} Index: lib/Analysis/CallGraph.cpp =================================================================== --- lib/Analysis/CallGraph.cpp +++ lib/Analysis/CallGraph.cpp @@ -275,7 +275,7 @@ initializeCallGraphWrapperPassPass(*PassRegistry::getPassRegistry()); } -CallGraphWrapperPass::~CallGraphWrapperPass() {} +CallGraphWrapperPass::~CallGraphWrapperPass() = default; void CallGraphWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); Index: lib/Analysis/CaptureTracking.cpp =================================================================== --- lib/Analysis/CaptureTracking.cpp +++ lib/Analysis/CaptureTracking.cpp @@ -29,7 +29,7 @@ using namespace llvm; -CaptureTracker::~CaptureTracker() {} +CaptureTracker::~CaptureTracker() = default; bool CaptureTracker::shouldExplore(const Use *U) { return true; } Index: lib/Analysis/InlineCost.cpp =================================================================== --- lib/Analysis/InlineCost.cpp +++ lib/Analysis/InlineCost.cpp @@ -1330,7 +1330,7 @@ InlineCostAnalysis::InlineCostAnalysis() : CallGraphSCCPass(ID) {} -InlineCostAnalysis::~InlineCostAnalysis() {} +InlineCostAnalysis::~InlineCostAnalysis() = default; void InlineCostAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); Index: lib/Analysis/MemoryDependenceAnalysis.cpp =================================================================== --- lib/Analysis/MemoryDependenceAnalysis.cpp +++ lib/Analysis/MemoryDependenceAnalysis.cpp @@ -75,8 +75,7 @@ : FunctionPass(ID) { initializeMemoryDependenceAnalysisPass(*PassRegistry::getPassRegistry()); } -MemoryDependenceAnalysis::~MemoryDependenceAnalysis() { -} +MemoryDependenceAnalysis::~MemoryDependenceAnalysis() = default; /// Clean up memory in between runs void MemoryDependenceAnalysis::releaseMemory() { Index: lib/Analysis/RegionInfo.cpp =================================================================== --- lib/Analysis/RegionInfo.cpp +++ lib/Analysis/RegionInfo.cpp @@ -71,7 +71,7 @@ } -Region::~Region() { } +Region::~Region() = default; //===----------------------------------------------------------------------===// // RegionInfo implementation @@ -82,9 +82,7 @@ } -RegionInfo::~RegionInfo() { - -} +RegionInfo::~RegionInfo() = default; void RegionInfo::updateStatistics(Region *R) { ++numRegions; @@ -120,9 +118,7 @@ initializeRegionInfoPassPass(*PassRegistry::getPassRegistry()); } -RegionInfoPass::~RegionInfoPass() { - -} +RegionInfoPass::~RegionInfoPass() = default; bool RegionInfoPass::runOnFunction(Function &F) { releaseMemory(); Index: lib/Analysis/SparsePropagation.cpp =================================================================== --- lib/Analysis/SparsePropagation.cpp +++ lib/Analysis/SparsePropagation.cpp @@ -26,7 +26,7 @@ // AbstractLatticeFunction Implementation //===----------------------------------------------------------------------===// -AbstractLatticeFunction::~AbstractLatticeFunction() {} +AbstractLatticeFunction::~AbstractLatticeFunction() = default; /// PrintValue - Render the specified lattice value to the specified stream. void AbstractLatticeFunction::PrintValue(LatticeVal V, raw_ostream &OS) { Index: lib/Analysis/StratifiedSets.h =================================================================== --- lib/Analysis/StratifiedSets.h +++ lib/Analysis/StratifiedSets.h @@ -95,7 +95,7 @@ // below set A. template class StratifiedSets { public: - StratifiedSets() {} + StratifiedSets() = default; StratifiedSets(DenseMap Map, std::vector Links) Index: lib/Analysis/TargetTransformInfo.cpp =================================================================== --- lib/Analysis/TargetTransformInfo.cpp +++ lib/Analysis/TargetTransformInfo.cpp @@ -36,7 +36,7 @@ TargetTransformInfo::TargetTransformInfo(const DataLayout &DL) : TTIImpl(new Model(NoTTIImpl(DL))) {} -TargetTransformInfo::~TargetTransformInfo() {} +TargetTransformInfo::~TargetTransformInfo() = default; TargetTransformInfo::TargetTransformInfo(TargetTransformInfo &&Arg) : TTIImpl(std::move(Arg.TTIImpl)) {} @@ -339,7 +339,7 @@ return TTIImpl->areInlineCompatible(Caller, Callee); } -TargetTransformInfo::Concept::~Concept() {} +TargetTransformInfo::Concept::~Concept() = default; TargetIRAnalysis::TargetIRAnalysis() : TTICallback(&getDefaultTTI) {} Index: lib/CodeGen/AsmPrinter/ARMException.cpp =================================================================== --- lib/CodeGen/AsmPrinter/ARMException.cpp +++ lib/CodeGen/AsmPrinter/ARMException.cpp @@ -38,7 +38,7 @@ ARMException::ARMException(AsmPrinter *A) : DwarfCFIExceptionBase(A) {} -ARMException::~ARMException() {} +ARMException::~ARMException() = default; ARMTargetStreamer &ARMException::getTargetStreamer() { MCTargetStreamer &TS = *Asm->OutStreamer->getTargetStreamer(); Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp =================================================================== --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -2600,6 +2600,6 @@ } /// Pin vtable to this file. -AsmPrinterHandler::~AsmPrinterHandler() {} +AsmPrinterHandler::~AsmPrinterHandler() = default; void AsmPrinterHandler::markFunctionEnd() {} Index: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DwarfCFIException.cpp +++ lib/CodeGen/AsmPrinter/DwarfCFIException.cpp @@ -58,7 +58,7 @@ shouldEmitLSDA(false), shouldEmitMoves(false), moveTypeModule(AsmPrinter::CFI_M_None) {} -DwarfCFIException::~DwarfCFIException() {} +DwarfCFIException::~DwarfCFIException() = default; /// endModule - Emit all exception information that should come after the /// content. Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -285,7 +285,7 @@ } // Define out of line so we don't have to include DwarfUnit.h in DwarfDebug.h. -DwarfDebug::~DwarfDebug() { } +DwarfDebug::~DwarfDebug() = default; static bool isObjCClass(StringRef Name) { return Name.startswith("+") || Name.startswith("-"); Index: lib/CodeGen/AsmPrinter/DwarfExpression.h =================================================================== --- lib/CodeGen/AsmPrinter/DwarfExpression.h +++ lib/CodeGen/AsmPrinter/DwarfExpression.h @@ -38,7 +38,7 @@ DwarfExpression(const TargetRegisterInfo &TRI, unsigned DwarfVersion) : TRI(TRI), DwarfVersion(DwarfVersion) {} - virtual ~DwarfExpression() {} + virtual ~DwarfExpression() = default; /// Output a dwarf operand and an optional assembler comment. virtual void EmitOp(uint8_t Op, const char *Comment = nullptr) = 0; Index: lib/CodeGen/AsmPrinter/EHStreamer.cpp =================================================================== --- lib/CodeGen/AsmPrinter/EHStreamer.cpp +++ lib/CodeGen/AsmPrinter/EHStreamer.cpp @@ -27,7 +27,7 @@ EHStreamer::EHStreamer(AsmPrinter *A) : Asm(A), MMI(Asm->MMI) {} -EHStreamer::~EHStreamer() {} +EHStreamer::~EHStreamer() = default; /// How many leading type ids two landing pads have in common. unsigned EHStreamer::sharedTypeIDs(const LandingPadInfo *L, Index: lib/CodeGen/AsmPrinter/WinException.cpp =================================================================== --- lib/CodeGen/AsmPrinter/WinException.cpp +++ lib/CodeGen/AsmPrinter/WinException.cpp @@ -47,7 +47,7 @@ useImageRel32 = (A->getDataLayout().getPointerSizeInBits() == 64); } -WinException::~WinException() {} +WinException::~WinException() = default; /// endModule - Emit all exception information that should come after the /// content. Index: lib/CodeGen/CodeGenPrepare.cpp =================================================================== --- lib/CodeGen/CodeGenPrepare.cpp +++ lib/CodeGen/CodeGenPrepare.cpp @@ -1676,7 +1676,7 @@ /// The constructor performs the related action on the IR. TypePromotionAction(Instruction *Inst) : Inst(Inst) {} - virtual ~TypePromotionAction() {} + virtual ~TypePromotionAction() = default; /// \brief Undo the modification done by this action. /// When this method is called, the IR must be in the same state as it was Index: lib/CodeGen/CriticalAntiDepBreaker.cpp =================================================================== --- lib/CodeGen/CriticalAntiDepBreaker.cpp +++ lib/CodeGen/CriticalAntiDepBreaker.cpp @@ -35,8 +35,7 @@ Classes(TRI->getNumRegs(), nullptr), KillIndices(TRI->getNumRegs(), 0), DefIndices(TRI->getNumRegs(), 0), KeepRegs(TRI->getNumRegs(), false) {} -CriticalAntiDepBreaker::~CriticalAntiDepBreaker() { -} +CriticalAntiDepBreaker::~CriticalAntiDepBreaker() = default; void CriticalAntiDepBreaker::StartBlock(MachineBasicBlock *BB) { const unsigned BBSize = BB->size(); Index: lib/CodeGen/GCMetadata.cpp =================================================================== --- lib/CodeGen/GCMetadata.cpp +++ lib/CodeGen/GCMetadata.cpp @@ -48,7 +48,7 @@ GCFunctionInfo::GCFunctionInfo(const Function &F, GCStrategy &S) : F(F), S(S), FrameSize(~0LL) {} -GCFunctionInfo::~GCFunctionInfo() {} +GCFunctionInfo::~GCFunctionInfo() = default; // ----------------------------------------------------------------------------- Index: lib/CodeGen/GCMetadataPrinter.cpp =================================================================== --- lib/CodeGen/GCMetadataPrinter.cpp +++ lib/CodeGen/GCMetadataPrinter.cpp @@ -14,6 +14,6 @@ #include "llvm/CodeGen/GCMetadataPrinter.h" using namespace llvm; -GCMetadataPrinter::GCMetadataPrinter() {} +GCMetadataPrinter::GCMetadataPrinter() = default; -GCMetadataPrinter::~GCMetadataPrinter() {} +GCMetadataPrinter::~GCMetadataPrinter() = default; Index: lib/CodeGen/InlineSpiller.cpp =================================================================== --- lib/CodeGen/InlineSpiller.cpp +++ lib/CodeGen/InlineSpiller.cpp @@ -135,7 +135,7 @@ // Dead defs generated during spilling. SmallVector DeadDefs; - ~InlineSpiller() override {} + ~InlineSpiller() override = default; public: InlineSpiller(MachineFunctionPass &pass, MachineFunction &mf, VirtRegMap &vrm) @@ -185,7 +185,7 @@ namespace llvm { -Spiller::~Spiller() { } +Spiller::~Spiller() = default; void Spiller::anchor() { } Spiller *createInlineSpiller(MachineFunctionPass &pass, Index: lib/CodeGen/MIRParser/MIRParser.cpp =================================================================== --- lib/CodeGen/MIRParser/MIRParser.cpp +++ lib/CodeGen/MIRParser/MIRParser.cpp @@ -710,7 +710,7 @@ MIRParser::MIRParser(std::unique_ptr Impl) : Impl(std::move(Impl)) {} -MIRParser::~MIRParser() {} +MIRParser::~MIRParser() = default; std::unique_ptr MIRParser::parseLLVMModule() { return Impl->parse(); } Index: lib/CodeGen/MachineBasicBlock.cpp =================================================================== --- lib/CodeGen/MachineBasicBlock.cpp +++ lib/CodeGen/MachineBasicBlock.cpp @@ -43,8 +43,7 @@ Insts.Parent = this; } -MachineBasicBlock::~MachineBasicBlock() { -} +MachineBasicBlock::~MachineBasicBlock() = default; /// Return the MCSymbol for this basic block. MCSymbol *MachineBasicBlock::getSymbol() const { Index: lib/CodeGen/MachineBlockFrequencyInfo.cpp =================================================================== --- lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -128,7 +128,7 @@ initializeMachineBlockFrequencyInfoPass(*PassRegistry::getPassRegistry()); } -MachineBlockFrequencyInfo::~MachineBlockFrequencyInfo() {} +MachineBlockFrequencyInfo::~MachineBlockFrequencyInfo() = default; void MachineBlockFrequencyInfo::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); Index: lib/CodeGen/MachineFunction.cpp =================================================================== --- lib/CodeGen/MachineFunction.cpp +++ lib/CodeGen/MachineFunction.cpp @@ -52,7 +52,7 @@ //===----------------------------------------------------------------------===// // Out-of-line virtual method. -MachineFunctionInfo::~MachineFunctionInfo() {} +MachineFunctionInfo::~MachineFunctionInfo() = default; void ilist_traits::deleteNode(MachineBasicBlock *MBB) { MBB->getParent()->DeleteMachineBasicBlock(MBB); Index: lib/CodeGen/MachineModuleInfo.cpp =================================================================== --- lib/CodeGen/MachineModuleInfo.cpp +++ lib/CodeGen/MachineModuleInfo.cpp @@ -32,7 +32,7 @@ char MachineModuleInfo::ID = 0; // Out of line virtual method. -MachineModuleInfoImpl::~MachineModuleInfoImpl() {} +MachineModuleInfoImpl::~MachineModuleInfoImpl() = default; namespace llvm { class MMIAddrLabelMapCallbackPtr final : CallbackVH { @@ -200,8 +200,7 @@ "LLVMTargetMachine"); } -MachineModuleInfo::~MachineModuleInfo() { -} +MachineModuleInfo::~MachineModuleInfo() = default; bool MachineModuleInfo::doInitialization(Module &M) { Index: lib/CodeGen/MachineRegionInfo.cpp =================================================================== --- lib/CodeGen/MachineRegionInfo.cpp +++ lib/CodeGen/MachineRegionInfo.cpp @@ -28,7 +28,7 @@ } -MachineRegion::~MachineRegion() { } +MachineRegion::~MachineRegion() = default; //===----------------------------------------------------------------------===// // MachineRegionInfo implementation @@ -39,9 +39,7 @@ } -MachineRegionInfo::~MachineRegionInfo() { - -} +MachineRegionInfo::~MachineRegionInfo() = default; void MachineRegionInfo::updateStatistics(MachineRegion *R) { ++numMachineRegions; @@ -74,9 +72,7 @@ initializeMachineRegionInfoPassPass(*PassRegistry::getPassRegistry()); } -MachineRegionInfoPass::~MachineRegionInfoPass() { - -} +MachineRegionInfoPass::~MachineRegionInfoPass() = default; bool MachineRegionInfoPass::runOnMachineFunction(MachineFunction &F) { releaseMemory(); Index: lib/CodeGen/MachineScheduler.cpp =================================================================== --- lib/CodeGen/MachineScheduler.cpp +++ lib/CodeGen/MachineScheduler.cpp @@ -517,8 +517,7 @@ // ===----------------------------------------------------------------------===/ // Provide a vtable anchor. -ScheduleDAGMI::~ScheduleDAGMI() { -} +ScheduleDAGMI::~ScheduleDAGMI() = default; bool ScheduleDAGMI::canAddEdge(SUnit *SuccSU, SUnit *PredSU) { return SuccSU == &ExitSU || !Topo.IsReachable(PredSU, SuccSU); Index: lib/CodeGen/MachineTraceMetrics.cpp =================================================================== --- lib/CodeGen/MachineTraceMetrics.cpp +++ lib/CodeGen/MachineTraceMetrics.cpp @@ -151,7 +151,7 @@ } // Virtual destructor serves as an anchor. -MachineTraceMetrics::Ensemble::~Ensemble() {} +MachineTraceMetrics::Ensemble::~Ensemble() = default; const MachineLoop* MachineTraceMetrics::Ensemble::getLoopFor(const MachineBasicBlock *MBB) const { Index: lib/CodeGen/PeepholeOptimizer.cpp =================================================================== --- lib/CodeGen/PeepholeOptimizer.cpp +++ lib/CodeGen/PeepholeOptimizer.cpp @@ -735,7 +735,7 @@ public: CopyRewriter(MachineInstr &MI) : CopyLike(MI), CurrentSrcIdx(0) {} - virtual ~CopyRewriter() {} + virtual ~CopyRewriter() = default; /// \brief Get the next rewritable source (SrcReg, SrcSubReg) and /// the related value that it affects (TrackReg, TrackSubReg). Index: lib/CodeGen/PostRASchedulerList.cpp =================================================================== --- lib/CodeGen/PostRASchedulerList.cpp +++ lib/CodeGen/PostRASchedulerList.cpp @@ -74,7 +74,7 @@ cl::desc("Debug control MBBs that are scheduled"), cl::init(0), cl::Hidden); -AntiDepBreaker::~AntiDepBreaker() { } +AntiDepBreaker::~AntiDepBreaker() = default; namespace { class PostRAScheduler : public MachineFunctionPass { Index: lib/CodeGen/PseudoSourceValue.cpp =================================================================== --- lib/CodeGen/PseudoSourceValue.cpp +++ lib/CodeGen/PseudoSourceValue.cpp @@ -29,7 +29,7 @@ PseudoSourceValue::PseudoSourceValue(PSVKind Kind) : Kind(Kind) {} -PseudoSourceValue::~PseudoSourceValue() {} +PseudoSourceValue::~PseudoSourceValue() = default; void PseudoSourceValue::printCustom(raw_ostream &O) const { O << PSVNames[Kind]; Index: lib/CodeGen/RegAllocBase.h =================================================================== --- lib/CodeGen/RegAllocBase.h +++ lib/CodeGen/RegAllocBase.h @@ -68,7 +68,7 @@ RegAllocBase() : TRI(nullptr), MRI(nullptr), VRM(nullptr), LIS(nullptr), Matrix(nullptr) {} - virtual ~RegAllocBase() {} + virtual ~RegAllocBase() = default; // A RegAlloc pass should call this before allocatePhysRegs. void init(VirtRegMap &vrm, LiveIntervals &lis, LiveRegMatrix &mat); Index: lib/CodeGen/RegAllocPBQP.cpp =================================================================== --- lib/CodeGen/RegAllocPBQP.cpp +++ lib/CodeGen/RegAllocPBQP.cpp @@ -491,7 +491,7 @@ } // End anonymous namespace. // Out-of-line destructor/anchor for PBQPRAConstraint. -PBQPRAConstraint::~PBQPRAConstraint() {} +PBQPRAConstraint::~PBQPRAConstraint() = default; void PBQPRAConstraint::anchor() {} void PBQPRAConstraintList::anchor() {} Index: lib/CodeGen/ScheduleDAG.cpp =================================================================== --- lib/CodeGen/ScheduleDAG.cpp +++ lib/CodeGen/ScheduleDAG.cpp @@ -44,7 +44,7 @@ #endif } -ScheduleDAG::~ScheduleDAG() {} +ScheduleDAG::~ScheduleDAG() = default; /// Clear the DAG state (e.g. between scheduling regions). void ScheduleDAG::clearDAG() { @@ -639,4 +639,4 @@ ScheduleDAGTopologicalSort(std::vector &sunits, SUnit *exitsu) : SUnits(sunits), ExitSU(exitsu) {} -ScheduleHazardRecognizer::~ScheduleHazardRecognizer() {} +ScheduleHazardRecognizer::~ScheduleHazardRecognizer() = default; Index: lib/CodeGen/SelectionDAG/FastISel.cpp =================================================================== --- lib/CodeGen/SelectionDAG/FastISel.cpp +++ lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1630,7 +1630,7 @@ TRI(*MF->getSubtarget().getRegisterInfo()), LibInfo(LibInfo), SkipTargetIndependentISel(SkipTargetIndependentISel) {} -FastISel::~FastISel() {} +FastISel::~FastISel() = default; bool FastISel::fastLowerArguments() { return false; } Index: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h =================================================================== --- lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h +++ lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h @@ -44,7 +44,7 @@ explicit ScheduleDAGSDNodes(MachineFunction &mf); - ~ScheduleDAGSDNodes() override {} + ~ScheduleDAGSDNodes() override = default; /// Run - perform scheduling. /// Index: lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp =================================================================== --- lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp +++ lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp @@ -15,5 +15,4 @@ #include "llvm/Target/TargetMachine.h" using namespace llvm; -TargetSelectionDAGInfo::~TargetSelectionDAGInfo() { -} +TargetSelectionDAGInfo::~TargetSelectionDAGInfo() = default; Index: lib/CodeGen/TargetFrameLoweringImpl.cpp =================================================================== --- lib/CodeGen/TargetFrameLoweringImpl.cpp +++ lib/CodeGen/TargetFrameLoweringImpl.cpp @@ -24,8 +24,7 @@ #include using namespace llvm; -TargetFrameLowering::~TargetFrameLowering() { -} +TargetFrameLowering::~TargetFrameLowering() = default; /// The default implementation just looks at attribute "no-frame-pointer-elim". bool TargetFrameLowering::noFramePointerElim(const MachineFunction &MF) const { Index: lib/CodeGen/TargetInstrInfo.cpp =================================================================== --- lib/CodeGen/TargetInstrInfo.cpp +++ lib/CodeGen/TargetInstrInfo.cpp @@ -37,8 +37,7 @@ "disable-sched-hazard", cl::Hidden, cl::init(false), cl::desc("Disable hazard detection during preRA scheduling")); -TargetInstrInfo::~TargetInstrInfo() { -} +TargetInstrInfo::~TargetInstrInfo() = default; const TargetRegisterClass* TargetInstrInfo::getRegClass(const MCInstrDesc &MCID, unsigned OpNum, Index: lib/CodeGen/TargetRegisterInfo.cpp =================================================================== --- lib/CodeGen/TargetRegisterInfo.cpp +++ lib/CodeGen/TargetRegisterInfo.cpp @@ -38,7 +38,7 @@ CoveringLanes(SRICoveringLanes) { } -TargetRegisterInfo::~TargetRegisterInfo() {} +TargetRegisterInfo::~TargetRegisterInfo() = default; void PrintReg::print(raw_ostream &OS) const { if (!Reg) Index: lib/DebugInfo/DWARF/DWARFCompileUnit.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFCompileUnit.cpp +++ lib/DebugInfo/DWARF/DWARFCompileUnit.cpp @@ -29,5 +29,4 @@ } // VTable anchor. -DWARFCompileUnit::~DWARFCompileUnit() { -} +DWARFCompileUnit::~DWARFCompileUnit() = default; Index: lib/DebugInfo/DWARF/DWARFDebugFrame.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFDebugFrame.cpp +++ lib/DebugInfo/DWARF/DWARFDebugFrame.cpp @@ -32,8 +32,7 @@ FrameEntry(FrameKind K, uint64_t Offset, uint64_t Length) : Kind(K), Offset(Offset), Length(Length) {} - virtual ~FrameEntry() { - } + virtual ~FrameEntry() = default; FrameKind getKind() const { return Kind; } virtual uint64_t getOffset() const { return Offset; } @@ -200,7 +199,7 @@ DataAlignmentFactor(DataAlignmentFactor), ReturnAddressRegister(ReturnAddressRegister) {} - ~CIE() override {} + ~CIE() override = default; uint64_t getCodeAlignmentFactor() const { return CodeAlignmentFactor; } int64_t getDataAlignmentFactor() const { return DataAlignmentFactor; } @@ -255,7 +254,7 @@ InitialLocation(InitialLocation), AddressRange(AddressRange), LinkedCIE(Cie) {} - ~FDE() override {} + ~FDE() override = default; CIE *getLinkedCIE() const { return LinkedCIE; } @@ -426,8 +425,7 @@ DWARFDebugFrame::DWARFDebugFrame() { } -DWARFDebugFrame::~DWARFDebugFrame() { -} +DWARFDebugFrame::~DWARFDebugFrame() = default; static void LLVM_ATTRIBUTE_UNUSED dumpDataAux(DataExtractor Data, uint32_t Offset, int Length) { Index: lib/DebugInfo/DWARF/DWARFUnit.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFUnit.cpp +++ lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -40,8 +40,7 @@ clear(); } -DWARFUnit::~DWARFUnit() { -} +DWARFUnit::~DWARFUnit() = default; bool DWARFUnit::getAddrOffsetSectionItem(uint32_t Index, uint64_t &Result) const { Index: lib/DebugInfo/PDB/IPDBSourceFile.cpp =================================================================== --- lib/DebugInfo/PDB/IPDBSourceFile.cpp +++ lib/DebugInfo/PDB/IPDBSourceFile.cpp @@ -15,7 +15,7 @@ using namespace llvm; -IPDBSourceFile::~IPDBSourceFile() {} +IPDBSourceFile::~IPDBSourceFile() = default; void IPDBSourceFile::dump(raw_ostream &OS, int Indent) const { OS.indent(Indent); Index: lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp =================================================================== --- lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp +++ lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp @@ -19,10 +19,10 @@ using namespace llvm; -IPDBSession::~IPDBSession() {} +IPDBSession::~IPDBSession() = default; -IPDBDataStream::~IPDBDataStream() {} +IPDBDataStream::~IPDBDataStream() = default; -IPDBRawSymbol::~IPDBRawSymbol() {} +IPDBRawSymbol::~IPDBRawSymbol() = default; -IPDBLineNumber::~IPDBLineNumber() {} +IPDBLineNumber::~IPDBLineNumber() = default; Index: lib/DebugInfo/PDB/PDBSymDumper.cpp =================================================================== --- lib/DebugInfo/PDB/PDBSymDumper.cpp +++ lib/DebugInfo/PDB/PDBSymDumper.cpp @@ -19,7 +19,7 @@ PDBSymDumper::PDBSymDumper(bool ShouldRequireImpl) : RequireImpl(ShouldRequireImpl) {} -PDBSymDumper::~PDBSymDumper() {} +PDBSymDumper::~PDBSymDumper() = default; void PDBSymDumper::dump(const PDBSymbolAnnotation &Symbol) { PDB_SYMDUMP_UNREACHABLE(PDBSymbolAnnotation) Index: lib/DebugInfo/PDB/PDBSymbol.cpp =================================================================== --- lib/DebugInfo/PDB/PDBSymbol.cpp +++ lib/DebugInfo/PDB/PDBSymbol.cpp @@ -55,7 +55,7 @@ std::unique_ptr Symbol) : Session(PDBSession), RawSymbol(std::move(Symbol)) {} -PDBSymbol::~PDBSymbol() {} +PDBSymbol::~PDBSymbol() = default; #define FACTORY_SYMTAG_CASE(Tag, Type) \ case PDB_SymType::Tag: \ Index: lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp =================================================================== --- lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp +++ lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp @@ -30,7 +30,7 @@ namespace llvm { -RTDyldMemoryManager::~RTDyldMemoryManager() {} +RTDyldMemoryManager::~RTDyldMemoryManager() = default; // Determine whether we can register EH tables. #if (defined(__GNUC__) && !defined(__ARM_EABI__) && !defined(__ia64__) && \ Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp =================================================================== --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -28,7 +28,7 @@ #define DEBUG_TYPE "dyld" // Empty out-of-line virtual destructor as the key function. -RuntimeDyldImpl::~RuntimeDyldImpl() {} +RuntimeDyldImpl::~RuntimeDyldImpl() = default; // Pin LoadedObjectInfo's vtables to this file. void RuntimeDyld::LoadedObjectInfo::anchor() {} @@ -870,7 +870,7 @@ Checker = nullptr; } -RuntimeDyld::~RuntimeDyld() {} +RuntimeDyld::~RuntimeDyld() = default; static std::unique_ptr createRuntimeDyldCOFF(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MM, Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp =================================================================== --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -910,7 +910,7 @@ : Impl(make_unique(RTDyld, Disassembler, InstPrinter, ErrStream)) {} -RuntimeDyldChecker::~RuntimeDyldChecker() {} +RuntimeDyldChecker::~RuntimeDyldChecker() = default; RuntimeDyld& RuntimeDyldChecker::getRTDyld() { return Impl->RTDyld; Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp =================================================================== --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -193,7 +193,7 @@ RuntimeDyldELF::RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver) : RuntimeDyldImpl(MemMgr, Resolver), GOTSectionID(0), CurrentGOTIndex(0) {} -RuntimeDyldELF::~RuntimeDyldELF() {} +RuntimeDyldELF::~RuntimeDyldELF() = default; void RuntimeDyldELF::registerEHFrames() { for (int i = 0, e = UnregisteredEHFrameSections.size(); i != e; ++i) { Index: lib/IR/AsmWriter.cpp =================================================================== --- lib/IR/AsmWriter.cpp +++ lib/IR/AsmWriter.cpp @@ -47,7 +47,7 @@ using namespace llvm; // Make virtual table appear in this compilation unit. -AssemblyAnnotationWriter::~AssemblyAnnotationWriter() {} +AssemblyAnnotationWriter::~AssemblyAnnotationWriter() = default; //===----------------------------------------------------------------------===// // Helper Functions @@ -690,7 +690,7 @@ : nullptr), M(M), Machine(MachineStorage.get()) {} -ModuleSlotTracker::~ModuleSlotTracker() {} +ModuleSlotTracker::~ModuleSlotTracker() = default; void ModuleSlotTracker::incorporateFunction(const Function &F) { if (!Machine) Index: lib/IR/Attributes.cpp =================================================================== --- lib/IR/Attributes.cpp +++ lib/IR/Attributes.cpp @@ -336,7 +336,7 @@ //===----------------------------------------------------------------------===// // Pin the vtables to this file. -AttributeImpl::~AttributeImpl() {} +AttributeImpl::~AttributeImpl() = default; void EnumAttributeImpl::anchor() {} void IntAttributeImpl::anchor() {} void StringAttributeImpl::anchor() {} Index: lib/IR/GVMaterializer.cpp =================================================================== --- lib/IR/GVMaterializer.cpp +++ lib/IR/GVMaterializer.cpp @@ -15,4 +15,4 @@ #include "llvm/IR/GVMaterializer.h" using namespace llvm; -GVMaterializer::~GVMaterializer() {} +GVMaterializer::~GVMaterializer() = default; Index: lib/IR/InlineAsm.cpp =================================================================== --- lib/IR/InlineAsm.cpp +++ lib/IR/InlineAsm.cpp @@ -21,8 +21,7 @@ // Implement the first virtual method in this class in this file so the // InlineAsm vtable is emitted here. -InlineAsm::~InlineAsm() { -} +InlineAsm::~InlineAsm() = default; InlineAsm *InlineAsm::get(FunctionType *FTy, StringRef AsmString, StringRef Constraints, bool hasSideEffects, Index: lib/IR/Instructions.cpp =================================================================== --- lib/IR/Instructions.cpp +++ lib/IR/Instructions.cpp @@ -42,16 +42,14 @@ //===----------------------------------------------------------------------===// // Out of line virtual method, so the vtable, etc has a home. -TerminatorInst::~TerminatorInst() { -} +TerminatorInst::~TerminatorInst() = default; //===----------------------------------------------------------------------===// // UnaryInstruction Class //===----------------------------------------------------------------------===// // Out of line virtual method, so the vtable, etc has a home. -UnaryInstruction::~UnaryInstruction() { -} +UnaryInstruction::~UnaryInstruction() = default; //===----------------------------------------------------------------------===// // SelectInst Class @@ -222,8 +220,7 @@ // CallInst Implementation //===----------------------------------------------------------------------===// -CallInst::~CallInst() { -} +CallInst::~CallInst() = default; void CallInst::init(FunctionType *FTy, Value *Func, ArrayRef Args, ArrayRef Bundles, const Twine &NameStr) { @@ -653,8 +650,7 @@ llvm_unreachable("ReturnInst has no successors!"); } -ReturnInst::~ReturnInst() { -} +ReturnInst::~ReturnInst() = default; //===----------------------------------------------------------------------===// // ResumeInst Implementation @@ -1197,8 +1193,7 @@ } // Out of line virtual method, so the vtable, etc has a home. -AllocaInst::~AllocaInst() { -} +AllocaInst::~AllocaInst() = default; void AllocaInst::setAlignment(unsigned Align) { assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); Index: lib/IR/LegacyPassManager.cpp =================================================================== --- lib/IR/LegacyPassManager.cpp +++ lib/IR/LegacyPassManager.cpp @@ -1902,4 +1902,4 @@ BBP->add(this); } -PassManagerBase::~PassManagerBase() {} +PassManagerBase::~PassManagerBase() = default; Index: lib/IR/Pass.cpp =================================================================== --- lib/IR/Pass.cpp +++ lib/IR/Pass.cpp @@ -34,7 +34,7 @@ } // Force out-of-line virtual method. -ModulePass::~ModulePass() { } +ModulePass::~ModulePass() = default; Pass *ModulePass::createPrinterPass(raw_ostream &O, const std::string &Banner) const { @@ -121,7 +121,7 @@ // ImmutablePass Implementation // // Force out-of-line virtual method. -ImmutablePass::~ImmutablePass() { } +ImmutablePass::~ImmutablePass() = default; void ImmutablePass::initializePass() { // By default, don't do anything. @@ -228,11 +228,7 @@ PassRegistry::getPassRegistry()->addRegistrationListener(this); } -PassNameParser::~PassNameParser() { - // This only gets called during static destruction, in which case the - // PassRegistry will have already been destroyed by llvm_shutdown(). So - // attempting to remove the registration listener is an error. -} +PassNameParser::~PassNameParser() = default; //===----------------------------------------------------------------------===// // AnalysisUsage Class Implementation Index: lib/IR/PassRegistry.cpp =================================================================== --- lib/IR/PassRegistry.cpp +++ lib/IR/PassRegistry.cpp @@ -36,7 +36,7 @@ // Accessors // -PassRegistry::~PassRegistry() {} +PassRegistry::~PassRegistry() = default; const PassInfo *PassRegistry::getPassInfo(const void *TI) const { sys::SmartScopedReader Guard(Lock); Index: lib/IR/ValueSymbolTable.cpp =================================================================== --- lib/IR/ValueSymbolTable.cpp +++ lib/IR/ValueSymbolTable.cpp @@ -22,15 +22,7 @@ #define DEBUG_TYPE "valuesymtab" // Class destructor -ValueSymbolTable::~ValueSymbolTable() { -#ifndef NDEBUG // Only do this in -g mode... - for (iterator VI = vmap.begin(), VE = vmap.end(); VI != VE; ++VI) - dbgs() << "Value still in symbol table! Type = '" - << *VI->getValue()->getType() << "' Name = '" - << VI->getKeyData() << "'\n"; - assert(vmap.empty() && "Values remain in symbol table!"); -#endif -} +ValueSymbolTable::~ValueSymbolTable() = default; // Insert a value into the symbol table with the specified name... // Index: lib/LTO/LTOCodeGenerator.cpp =================================================================== --- lib/LTO/LTOCodeGenerator.cpp +++ lib/LTO/LTOCodeGenerator.cpp @@ -84,7 +84,7 @@ initializeLTOPasses(); } -LTOCodeGenerator::~LTOCodeGenerator() {} +LTOCodeGenerator::~LTOCodeGenerator() = default; // Initialize LTO passes. Please keep this function in sync with // PassManagerBuilder::populateLTOPassManager(), and make sure all LTO Index: lib/LTO/LTOModule.cpp =================================================================== --- lib/LTO/LTOModule.cpp +++ lib/LTO/LTOModule.cpp @@ -59,7 +59,7 @@ std::unique_ptr Context) : OwnedContext(std::move(Context)), IRFile(std::move(Obj)), _target(TM) {} -LTOModule::~LTOModule() {} +LTOModule::~LTOModule() = default; /// isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM /// bitcode. Index: lib/LineEditor/LineEditor.cpp =================================================================== --- lib/LineEditor/LineEditor.cpp +++ lib/LineEditor/LineEditor.cpp @@ -28,8 +28,8 @@ return std::string(); } -LineEditor::CompleterConcept::~CompleterConcept() {} -LineEditor::ListCompleterConcept::~ListCompleterConcept() {} +LineEditor::CompleterConcept::~CompleterConcept() = default; +LineEditor::ListCompleterConcept::~ListCompleterConcept() = default; std::string LineEditor::ListCompleterConcept::getCommonPrefix( const std::vector &Comps) { Index: lib/MC/ELFObjectWriter.cpp =================================================================== --- lib/MC/ELFObjectWriter.cpp +++ lib/MC/ELFObjectWriter.cpp @@ -300,7 +300,7 @@ } ELFObjectWriter::~ELFObjectWriter() -{} += default; // Emit the ELF header. void ELFObjectWriter::writeHeader(const MCAssembler &Asm) { Index: lib/MC/MCAsmBackend.cpp =================================================================== --- lib/MC/MCAsmBackend.cpp +++ lib/MC/MCAsmBackend.cpp @@ -14,7 +14,7 @@ MCAsmBackend::MCAsmBackend() : HasDataInCodeSupport(false) {} -MCAsmBackend::~MCAsmBackend() {} +MCAsmBackend::~MCAsmBackend() = default; const MCFixupKindInfo &MCAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { static const MCFixupKindInfo Builtins[] = { Index: lib/MC/MCAsmInfo.cpp =================================================================== --- lib/MC/MCAsmInfo.cpp +++ lib/MC/MCAsmInfo.cpp @@ -110,8 +110,7 @@ CompressDebugSections = false; } -MCAsmInfo::~MCAsmInfo() { -} +MCAsmInfo::~MCAsmInfo() = default; bool MCAsmInfo::isSectionAtomizableBySymbols(const MCSection &Section) const { return false; Index: lib/MC/MCAssembler.cpp =================================================================== --- lib/MC/MCAssembler.cpp +++ lib/MC/MCAssembler.cpp @@ -270,7 +270,7 @@ AlignToBundleEnd(false), BundlePadding(0) { } -MCFragment::~MCFragment() { } +MCFragment::~MCFragment() = default; MCFragment::MCFragment(FragmentType Kind, bool HasInstructions, uint8_t BundlePadding, MCSection *Parent) @@ -335,8 +335,7 @@ VersionMinInfo.Major = 0; // Major version == 0 for "none specified" } -MCAssembler::~MCAssembler() { -} +MCAssembler::~MCAssembler() = default; void MCAssembler::reset() { Sections.clear(); Index: lib/MC/MCCodeEmitter.cpp =================================================================== --- lib/MC/MCCodeEmitter.cpp +++ lib/MC/MCCodeEmitter.cpp @@ -11,8 +11,6 @@ using namespace llvm; -MCCodeEmitter::MCCodeEmitter() { -} +MCCodeEmitter::MCCodeEmitter() = default; -MCCodeEmitter::~MCCodeEmitter() { -} +MCCodeEmitter::~MCCodeEmitter() = default; Index: lib/MC/MCDisassembler/MCDisassembler.cpp =================================================================== --- lib/MC/MCDisassembler/MCDisassembler.cpp +++ lib/MC/MCDisassembler/MCDisassembler.cpp @@ -13,8 +13,7 @@ using namespace llvm; -MCDisassembler::~MCDisassembler() { -} +MCDisassembler::~MCDisassembler() = default; bool MCDisassembler::tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, Index: lib/MC/MCDisassembler/MCRelocationInfo.cpp =================================================================== --- lib/MC/MCDisassembler/MCRelocationInfo.cpp +++ lib/MC/MCDisassembler/MCRelocationInfo.cpp @@ -18,8 +18,7 @@ : Ctx(Ctx) { } -MCRelocationInfo::~MCRelocationInfo() { -} +MCRelocationInfo::~MCRelocationInfo() = default; const MCExpr * MCRelocationInfo::createExprForRelocation(object::RelocationRef Rel) { Index: lib/MC/MCELFStreamer.cpp =================================================================== --- lib/MC/MCELFStreamer.cpp +++ lib/MC/MCELFStreamer.cpp @@ -41,8 +41,7 @@ return getCurrentSectionOnly()->isBundleLocked(); } -MCELFStreamer::~MCELFStreamer() { -} +MCELFStreamer::~MCELFStreamer() = default; void MCELFStreamer::mergeFragment(MCDataFragment *DF, MCDataFragment *EF) { Index: lib/MC/MCInstPrinter.cpp =================================================================== --- lib/MC/MCInstPrinter.cpp +++ lib/MC/MCInstPrinter.cpp @@ -25,8 +25,7 @@ } } -MCInstPrinter::~MCInstPrinter() { -} +MCInstPrinter::~MCInstPrinter() = default; /// getOpcodeName - Return the name of the specified opcode enum (e.g. /// "MOV32ri") or empty if we can't resolve it. Index: lib/MC/MCMachObjectTargetWriter.cpp =================================================================== --- lib/MC/MCMachObjectTargetWriter.cpp +++ lib/MC/MCMachObjectTargetWriter.cpp @@ -16,4 +16,4 @@ uint32_t CPUSubtype_) : Is64Bit(Is64Bit_), CPUType(CPUType_), CPUSubtype(CPUSubtype_) {} -MCMachObjectTargetWriter::~MCMachObjectTargetWriter() {} +MCMachObjectTargetWriter::~MCMachObjectTargetWriter() = default; Index: lib/MC/MCObjectWriter.cpp =================================================================== --- lib/MC/MCObjectWriter.cpp +++ lib/MC/MCObjectWriter.cpp @@ -14,8 +14,7 @@ using namespace llvm; -MCObjectWriter::~MCObjectWriter() { -} +MCObjectWriter::~MCObjectWriter() = default; bool MCObjectWriter::isSymbolRefDifferenceFullyResolved( const MCAssembler &Asm, const MCSymbolRefExpr *A, const MCSymbolRefExpr *B, Index: lib/MC/MCParser/AsmLexer.cpp =================================================================== --- lib/MC/MCParser/AsmLexer.cpp +++ lib/MC/MCParser/AsmLexer.cpp @@ -27,8 +27,7 @@ AllowAtInIdentifier = !StringRef(MAI.getCommentString()).startswith("@"); } -AsmLexer::~AsmLexer() { -} +AsmLexer::~AsmLexer() = default; void AsmLexer::setBuffer(StringRef Buf, const char *ptr) { CurBuf = Buf; Index: lib/MC/MCParser/AsmParser.cpp =================================================================== --- lib/MC/MCParser/AsmParser.cpp +++ lib/MC/MCParser/AsmParser.cpp @@ -46,7 +46,7 @@ #include using namespace llvm; -MCAsmParserSemaCallback::~MCAsmParserSemaCallback() {} +MCAsmParserSemaCallback::~MCAsmParserSemaCallback() = default; namespace { /// \brief Helper types for tracking macro definitions. Index: lib/MC/MCParser/MCAsmLexer.cpp =================================================================== --- lib/MC/MCParser/MCAsmLexer.cpp +++ lib/MC/MCParser/MCAsmLexer.cpp @@ -16,8 +16,7 @@ TokStart(nullptr), SkipSpace(true) { } -MCAsmLexer::~MCAsmLexer() { -} +MCAsmLexer::~MCAsmLexer() = default; SMLoc MCAsmLexer::getLoc() const { return SMLoc::getFromPointer(TokStart); Index: lib/MC/MCParser/MCAsmParser.cpp =================================================================== --- lib/MC/MCParser/MCAsmParser.cpp +++ lib/MC/MCParser/MCAsmParser.cpp @@ -20,8 +20,7 @@ MCAsmParser::MCAsmParser() : TargetParser(nullptr), ShowParsedOperands(0) { } -MCAsmParser::~MCAsmParser() { -} +MCAsmParser::~MCAsmParser() = default; void MCAsmParser::setTargetParser(MCTargetAsmParser &P) { assert(!TargetParser && "Target parser is already initialized!"); Index: lib/MC/MCParser/MCAsmParserExtension.cpp =================================================================== --- lib/MC/MCParser/MCAsmParserExtension.cpp +++ lib/MC/MCParser/MCAsmParserExtension.cpp @@ -14,8 +14,7 @@ BracketExpressionsSupported(false) { } -MCAsmParserExtension::~MCAsmParserExtension() { -} +MCAsmParserExtension::~MCAsmParserExtension() = default; void MCAsmParserExtension::Initialize(MCAsmParser &Parser) { this->Parser = &Parser; Index: lib/MC/MCParser/MCTargetAsmParser.cpp =================================================================== --- lib/MC/MCParser/MCTargetAsmParser.cpp +++ lib/MC/MCParser/MCTargetAsmParser.cpp @@ -15,5 +15,4 @@ { } -MCTargetAsmParser::~MCTargetAsmParser() { -} +MCTargetAsmParser::~MCTargetAsmParser() = default; Index: lib/MC/MCSection.cpp =================================================================== --- lib/MC/MCSection.cpp +++ lib/MC/MCSection.cpp @@ -31,8 +31,7 @@ bool MCSection::hasEnded() const { return End && End->isInSection(); } -MCSection::~MCSection() { -} +MCSection::~MCSection() = default; void MCSection::setBundleLockState(BundleLockStateType NewState) { if (NewState == NotBundleLocked) { Index: lib/MC/MCSectionCOFF.cpp =================================================================== --- lib/MC/MCSectionCOFF.cpp +++ lib/MC/MCSectionCOFF.cpp @@ -15,7 +15,7 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; -MCSectionCOFF::~MCSectionCOFF() {} // anchor. +MCSectionCOFF::~MCSectionCOFF() = default; // anchor. // ShouldOmitSectionDirective - Decides whether a '.section' directive // should be printed before the section name Index: lib/MC/MCSectionELF.cpp =================================================================== --- lib/MC/MCSectionELF.cpp +++ lib/MC/MCSectionELF.cpp @@ -17,7 +17,7 @@ using namespace llvm; -MCSectionELF::~MCSectionELF() {} // anchor. +MCSectionELF::~MCSectionELF() = default; // anchor. // Decides whether a '.section' directive // should be printed before the section name. Index: lib/MC/MCStreamer.cpp =================================================================== --- lib/MC/MCStreamer.cpp +++ lib/MC/MCStreamer.cpp @@ -28,7 +28,7 @@ using namespace llvm; // Pin the vtables to this file. -MCTargetStreamer::~MCTargetStreamer() {} +MCTargetStreamer::~MCTargetStreamer() = default; MCTargetStreamer::MCTargetStreamer(MCStreamer &S) : Streamer(S) { S.setTargetStreamer(this); Index: lib/MC/MCSymbolizer.cpp =================================================================== --- lib/MC/MCSymbolizer.cpp +++ lib/MC/MCSymbolizer.cpp @@ -11,5 +11,4 @@ using namespace llvm; -MCSymbolizer::~MCSymbolizer() { -} +MCSymbolizer::~MCSymbolizer() = default; Index: lib/Object/Binary.cpp =================================================================== --- lib/Object/Binary.cpp +++ lib/Object/Binary.cpp @@ -25,7 +25,7 @@ using namespace llvm; using namespace object; -Binary::~Binary() {} +Binary::~Binary() = default; Binary::Binary(unsigned int Type, MemoryBufferRef Source) : TypeID(Type), Data(Source) {} Index: lib/Object/ELFYAML.cpp =================================================================== --- lib/Object/ELFYAML.cpp +++ lib/Object/ELFYAML.cpp @@ -17,7 +17,7 @@ namespace llvm { -ELFYAML::Section::~Section() {} +ELFYAML::Section::~Section() = default; namespace yaml { Index: lib/Object/FunctionIndexObjectFile.cpp =================================================================== --- lib/Object/FunctionIndexObjectFile.cpp +++ lib/Object/FunctionIndexObjectFile.cpp @@ -26,7 +26,7 @@ MemoryBufferRef Object, std::unique_ptr I) : SymbolicFile(Binary::ID_FunctionIndex, Object), Index(std::move(I)) {} -FunctionIndexObjectFile::~FunctionIndexObjectFile() {} +FunctionIndexObjectFile::~FunctionIndexObjectFile() = default; std::unique_ptr FunctionIndexObjectFile::takeIndex() { return std::move(Index); Index: lib/Object/IRObjectFile.cpp =================================================================== --- lib/Object/IRObjectFile.cpp +++ lib/Object/IRObjectFile.cpp @@ -111,8 +111,7 @@ } } -IRObjectFile::~IRObjectFile() { - } +IRObjectFile::~IRObjectFile() = default; static GlobalValue *getGV(DataRefImpl &Symb) { if ((Symb.p & 3) == 3) Index: lib/Object/SymbolicFile.cpp =================================================================== --- lib/Object/SymbolicFile.cpp +++ lib/Object/SymbolicFile.cpp @@ -24,7 +24,7 @@ SymbolicFile::SymbolicFile(unsigned int Type, MemoryBufferRef Source) : Binary(Type, Source) {} -SymbolicFile::~SymbolicFile() {} +SymbolicFile::~SymbolicFile() = default; ErrorOr> SymbolicFile::createSymbolicFile( MemoryBufferRef Object, sys::fs::file_magic Type, LLVMContext *Context) { Index: lib/Option/OptTable.cpp =================================================================== --- lib/Option/OptTable.cpp +++ lib/Option/OptTable.cpp @@ -150,8 +150,7 @@ } } -OptTable::~OptTable() { -} +OptTable::~OptTable() = default; const Option OptTable::getOption(OptSpecifier Opt) const { unsigned id = Opt.getID(); Index: lib/Support/CommandLine.cpp =================================================================== --- lib/Support/CommandLine.cpp +++ lib/Support/CommandLine.cpp @@ -1492,7 +1492,7 @@ public: explicit HelpPrinter(bool showHidden) : ShowHidden(showHidden) {} - virtual ~HelpPrinter() {} + virtual ~HelpPrinter() = default; // Invoke the printer. void operator=(bool Value) { Index: lib/Support/CrashRecoveryContext.cpp =================================================================== --- lib/Support/CrashRecoveryContext.cpp +++ lib/Support/CrashRecoveryContext.cpp @@ -79,7 +79,7 @@ static ManagedStatic> tlIsRecoveringFromCrash; -CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup() {} +CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup() = default; CrashRecoveryContext::~CrashRecoveryContext() { // Reclaim registered resources. Index: lib/Support/DataStream.cpp =================================================================== --- lib/Support/DataStream.cpp +++ lib/Support/DataStream.cpp @@ -44,7 +44,7 @@ STATISTIC(NumStreamFetches, "Number of calls to Data stream fetch"); namespace llvm { -DataStreamer::~DataStreamer() {} +DataStreamer::~DataStreamer() = default; } namespace { Index: lib/Support/DeltaAlgorithm.cpp =================================================================== --- lib/Support/DeltaAlgorithm.cpp +++ lib/Support/DeltaAlgorithm.cpp @@ -11,8 +11,7 @@ #include using namespace llvm; -DeltaAlgorithm::~DeltaAlgorithm() { -} +DeltaAlgorithm::~DeltaAlgorithm() = default; bool DeltaAlgorithm::GetTestResult(const changeset_ty &Changes) { if (FailedTestsCache.count(Changes)) Index: lib/Support/MemoryBuffer.cpp =================================================================== --- lib/Support/MemoryBuffer.cpp +++ lib/Support/MemoryBuffer.cpp @@ -38,7 +38,7 @@ // MemoryBuffer implementation itself. //===----------------------------------------------------------------------===// -MemoryBuffer::~MemoryBuffer() { } +MemoryBuffer::~MemoryBuffer() = default; /// init - Initialize this MemoryBuffer as a reference to externally allocated /// memory, memory that we know is already null terminated. Index: lib/Support/MemoryObject.cpp =================================================================== --- lib/Support/MemoryObject.cpp +++ lib/Support/MemoryObject.cpp @@ -10,5 +10,4 @@ #include "llvm/Support/MemoryObject.h" using namespace llvm; -MemoryObject::~MemoryObject() { -} +MemoryObject::~MemoryObject() = default; Index: lib/Support/SpecialCaseList.cpp =================================================================== --- lib/Support/SpecialCaseList.cpp +++ lib/Support/SpecialCaseList.cpp @@ -152,7 +152,7 @@ IsCompiled = true; } -SpecialCaseList::~SpecialCaseList() {} +SpecialCaseList::~SpecialCaseList() = default; bool SpecialCaseList::inSection(StringRef Section, StringRef Query, StringRef Category) const { Index: lib/Support/Unix/COM.inc =================================================================== --- lib/Support/Unix/COM.inc +++ lib/Support/Unix/COM.inc @@ -22,6 +22,6 @@ InitializeCOMRAII::InitializeCOMRAII(COMThreadingMode Threading, bool SpeedOverMemory) {} -InitializeCOMRAII::~InitializeCOMRAII() {} +InitializeCOMRAII::~InitializeCOMRAII() = default; } } Index: lib/Support/YAMLParser.cpp =================================================================== --- lib/Support/YAMLParser.cpp +++ lib/Support/YAMLParser.cpp @@ -1774,7 +1774,7 @@ Stream::Stream(MemoryBufferRef InputBuffer, SourceMgr &SM, bool ShowColors) : scanner(new Scanner(InputBuffer, SM, ShowColors)), CurrentDoc() {} -Stream::~Stream() {} +Stream::~Stream() = default; bool Stream::failed() { return scanner->failed(); } Index: lib/Support/YAMLTraits.cpp =================================================================== --- lib/Support/YAMLTraits.cpp +++ lib/Support/YAMLTraits.cpp @@ -29,8 +29,7 @@ IO::IO(void *Context) : Ctxt(Context) { } -IO::~IO() { -} +IO::~IO() = default; void *IO::getContext() { return Ctxt; @@ -56,8 +55,7 @@ DocIterator = Strm->begin(); } -Input::~Input() { -} +Input::~Input() = default; std::error_code Input::error() { return EC; } @@ -409,8 +407,7 @@ NeedsNewLine(false) { } -Output::~Output() { -} +Output::~Output() = default; bool Output::outputting() { return true; Index: lib/Support/raw_ostream.cpp =================================================================== --- lib/Support/raw_ostream.cpp +++ lib/Support/raw_ostream.cpp @@ -770,14 +770,7 @@ // raw_null_ostream //===----------------------------------------------------------------------===// -raw_null_ostream::~raw_null_ostream() { -#ifndef NDEBUG - // ~raw_ostream asserts that the buffer is empty. This isn't necessary - // with raw_null_ostream, but it's better to have raw_null_ostream follow - // the rules than to change the rules just for raw_null_ostream. - flush(); -#endif -} +raw_null_ostream::~raw_null_ostream() = default; void raw_null_ostream::write_impl(const char *Ptr, size_t Size) { } Index: lib/Target/AArch64/AArch64TargetMachine.cpp =================================================================== --- lib/Target/AArch64/AArch64TargetMachine.cpp +++ lib/Target/AArch64/AArch64TargetMachine.cpp @@ -135,7 +135,7 @@ initAsmInfo(); } -AArch64TargetMachine::~AArch64TargetMachine() {} +AArch64TargetMachine::~AArch64TargetMachine() = default; const AArch64Subtarget * AArch64TargetMachine::getSubtargetImpl(const Function &F) const { Index: lib/Target/AArch64/Disassembler/AArch64Disassembler.h =================================================================== --- lib/Target/AArch64/Disassembler/AArch64Disassembler.h +++ lib/Target/AArch64/Disassembler/AArch64Disassembler.h @@ -26,7 +26,7 @@ AArch64Disassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - ~AArch64Disassembler() {} + ~AArch64Disassembler() = default; MCDisassembler::DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, Index: lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp =================================================================== --- lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp +++ lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp @@ -41,7 +41,7 @@ : MCELFObjectTargetWriter(/*Is64Bit*/ true, OSABI, ELF::EM_AARCH64, /*HasRelocationAddend*/ true) {} -AArch64ELFObjectWriter::~AArch64ELFObjectWriter() {} +AArch64ELFObjectWriter::~AArch64ELFObjectWriter() = default; unsigned AArch64ELFObjectWriter::GetRelocType(const MCValue &Target, const MCFixup &Fixup, Index: lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp =================================================================== --- lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp +++ lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp @@ -41,7 +41,7 @@ public: AArch64MCCodeEmitter(const MCInstrInfo &mcii, MCContext &ctx) : Ctx(ctx) {} - ~AArch64MCCodeEmitter() override {} + ~AArch64MCCodeEmitter() override = default; // getBinaryCodeForInstr - TableGen'erated function for getting the // binary encoding for an instruction. Index: lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp =================================================================== --- lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp +++ lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp @@ -21,7 +21,7 @@ AArch64TargetStreamer::AArch64TargetStreamer(MCStreamer &S) : MCTargetStreamer(S), ConstantPools(new AssemblerConstantPools()) {} -AArch64TargetStreamer::~AArch64TargetStreamer() {} +AArch64TargetStreamer::~AArch64TargetStreamer() = default; // The constant pool handling is shared by all AArch64TargetStreamer // implementations. Index: lib/Target/AArch64/Utils/AArch64BaseInfo.h =================================================================== --- lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -1204,7 +1204,7 @@ const AArch64NamedImmMapper::Mapping *InstMappings; size_t NumInstMappings; - SysRegMapper() { } + SysRegMapper() = default; uint32_t fromString(StringRef Name, const FeatureBitset& FeatureBits, bool &Valid) const; std::string toString(uint32_t Bits, const FeatureBitset& FeatureBits) const; Index: lib/Target/AMDGPU/AMDGPUFrameLowering.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPUFrameLowering.cpp +++ lib/Target/AMDGPU/AMDGPUFrameLowering.cpp @@ -22,7 +22,7 @@ int LAO, unsigned TransAl) : TargetFrameLowering(D, StackAl, LAO, TransAl) { } -AMDGPUFrameLowering::~AMDGPUFrameLowering() { } +AMDGPUFrameLowering::~AMDGPUFrameLowering() = default; unsigned AMDGPUFrameLowering::getStackWidth(const MachineFunction &MF) const { Index: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp +++ lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp @@ -161,8 +161,7 @@ return SelectionDAGISel::runOnMachineFunction(MF); } -AMDGPUDAGToDAGISel::~AMDGPUDAGToDAGISel() { -} +AMDGPUDAGToDAGISel::~AMDGPUDAGToDAGISel() = default; bool AMDGPUDAGToDAGISel::isInlineImmediate(SDNode *N) const { const SITargetLowering *TL Index: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp =================================================================== --- lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -93,7 +93,7 @@ initAsmInfo(); } -AMDGPUTargetMachine::~AMDGPUTargetMachine() { } +AMDGPUTargetMachine::~AMDGPUTargetMachine() = default; //===----------------------------------------------------------------------===// // R600 Target Machine (R600 -> Cayman) Index: lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp =================================================================== --- lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp +++ lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp @@ -49,7 +49,7 @@ MCContext &ctx) : MCII(mcii), MRI(mri), Ctx(ctx) { } - ~SIMCCodeEmitter() override {} + ~SIMCCodeEmitter() override = default; /// \brief Encode the instruction and write it to the OS. void encodeInstruction(const MCInst &MI, raw_ostream &OS, Index: lib/Target/AMDGPU/R600MachineScheduler.h =================================================================== --- lib/Target/AMDGPU/R600MachineScheduler.h +++ lib/Target/AMDGPU/R600MachineScheduler.h @@ -71,7 +71,7 @@ DAG(nullptr), TII(nullptr), TRI(nullptr), MRI(nullptr) { } - virtual ~R600SchedStrategy() {} + virtual ~R600SchedStrategy() = default; void initialize(ScheduleDAGMI *dag) override; SUnit *pickNode(bool &IsTopNode) override; Index: lib/Target/ARM/ARMConstantPoolValue.cpp =================================================================== --- lib/Target/ARM/ARMConstantPoolValue.cpp +++ lib/Target/ARM/ARMConstantPoolValue.cpp @@ -44,7 +44,7 @@ LabelId(id), Kind(kind), PCAdjust(PCAdj), Modifier(modifier), AddCurrentAddress(addCurrentAddress) {} -ARMConstantPoolValue::~ARMConstantPoolValue() {} +ARMConstantPoolValue::~ARMConstantPoolValue() = default; const char *ARMConstantPoolValue::getModifierText() const { switch (Modifier) { Index: lib/Target/ARM/ARMTargetMachine.cpp =================================================================== --- lib/Target/ARM/ARMTargetMachine.cpp +++ lib/Target/ARM/ARMTargetMachine.cpp @@ -186,7 +186,7 @@ Subtarget.isTargetHardFloat() ? FloatABI::Hard : FloatABI::Soft; } -ARMBaseTargetMachine::~ARMBaseTargetMachine() {} +ARMBaseTargetMachine::~ARMBaseTargetMachine() = default; const ARMSubtarget * ARMBaseTargetMachine::getSubtargetImpl(const Function &F) const { Index: lib/Target/ARM/Disassembler/ARMDisassembler.cpp =================================================================== --- lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -91,7 +91,7 @@ MCDisassembler(STI, Ctx) { } - ~ARMDisassembler() override {} + ~ARMDisassembler() override = default; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, @@ -106,7 +106,7 @@ MCDisassembler(STI, Ctx) { } - ~ThumbDisassembler() override {} + ~ThumbDisassembler() override = default; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, Index: lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp @@ -47,7 +47,7 @@ ELF::EM_ARM, /*HasRelocationAddend*/ false) {} -ARMELFObjectWriter::~ARMELFObjectWriter() {} +ARMELFObjectWriter::~ARMELFObjectWriter() = default; bool ARMELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym, unsigned Type) const { Index: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp +++ lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp @@ -418,7 +418,7 @@ Reset(); } - ~ARMELFStreamer() {} + ~ARMELFStreamer() = default; void FinishImpl() override; Index: lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp @@ -48,7 +48,7 @@ : MCII(mcii), CTX(ctx), IsLittleEndian(IsLittle) { } - ~ARMMCCodeEmitter() override {} + ~ARMMCCodeEmitter() override = default; bool isThumb(const MCSubtargetInfo &STI) const { return STI.getFeatureBits()[ARM::ModeThumb]; Index: lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp +++ lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp @@ -23,7 +23,7 @@ ARMTargetStreamer::ARMTargetStreamer(MCStreamer &S) : MCTargetStreamer(S), ConstantPools(new AssemblerConstantPools()) {} -ARMTargetStreamer::~ARMTargetStreamer() {} +ARMTargetStreamer::~ARMTargetStreamer() = default; // The constant pool handling is shared by all ARMTargetStreamer // implementations. Index: lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp +++ lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp @@ -26,7 +26,7 @@ : MCWinCOFFObjectTargetWriter(COFF::IMAGE_FILE_MACHINE_ARMNT) { assert(!Is64Bit && "AArch64 support not yet implemented"); } - ~ARMWinCOFFObjectWriter() override {} + ~ARMWinCOFFObjectWriter() override = default; unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsCrossSection, Index: lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp =================================================================== --- lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp +++ lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp @@ -29,7 +29,7 @@ BPFAsmBackend(bool IsLittleEndian) : MCAsmBackend(), IsLittleEndian(IsLittleEndian) {} - ~BPFAsmBackend() override {} + ~BPFAsmBackend() override = default; void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, uint64_t Value, bool IsPCRel) const override; Index: lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp =================================================================== --- lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp +++ lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp @@ -31,7 +31,7 @@ : MCELFObjectTargetWriter(/*Is64Bit*/ true, OSABI, ELF::EM_NONE, /*HasRelocationAddend*/ false) {} -BPFELFObjectWriter::~BPFELFObjectWriter() {} +BPFELFObjectWriter::~BPFELFObjectWriter() = default; unsigned BPFELFObjectWriter::GetRelocType(const MCValue &Target, const MCFixup &Fixup, Index: lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp =================================================================== --- lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp +++ lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp @@ -36,7 +36,7 @@ BPFMCCodeEmitter(const MCRegisterInfo &mri, bool IsLittleEndian) : MRI(mri), IsLittleEndian(IsLittleEndian) {} - ~BPFMCCodeEmitter() {} + ~BPFMCCodeEmitter() = default; // getBinaryCodeForInstr - TableGen'erated function for getting the // binary encoding for an instruction. Index: lib/Target/Hexagon/BitTracker.h =================================================================== --- lib/Target/Hexagon/BitTracker.h +++ lib/Target/Hexagon/BitTracker.h @@ -342,7 +342,7 @@ struct BitTracker::MachineEvaluator { MachineEvaluator(const TargetRegisterInfo &T, MachineRegisterInfo &M) : TRI(T), MRI(M) {} - virtual ~MachineEvaluator() {} + virtual ~MachineEvaluator() = default; uint16_t getRegBitWidth(const RegisterRef &RR) const; Index: lib/Target/Hexagon/HexagonTargetMachine.cpp =================================================================== --- lib/Target/Hexagon/HexagonTargetMachine.cpp +++ lib/Target/Hexagon/HexagonTargetMachine.cpp @@ -148,7 +148,7 @@ } -HexagonTargetMachine::~HexagonTargetMachine() {} +HexagonTargetMachine::~HexagonTargetMachine() = default; namespace { /// Hexagon Code Generator Pass Configuration Options. Index: lib/Target/MSP430/MSP430TargetMachine.cpp =================================================================== --- lib/Target/MSP430/MSP430TargetMachine.cpp +++ lib/Target/MSP430/MSP430TargetMachine.cpp @@ -38,7 +38,7 @@ initAsmInfo(); } -MSP430TargetMachine::~MSP430TargetMachine() {} +MSP430TargetMachine::~MSP430TargetMachine() = default; namespace { /// MSP430 Code Generator Pass Configuration Options. Index: lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp +++ lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp @@ -59,7 +59,7 @@ /*HasRelocationAddend*/ _isN64, /*IsN64*/ _isN64) {} -MipsELFObjectWriter::~MipsELFObjectWriter() {} +MipsELFObjectWriter::~MipsELFObjectWriter() = default; unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target, const MCFixup &Fixup, Index: lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h +++ lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h @@ -44,7 +44,7 @@ MipsMCCodeEmitter(const MCInstrInfo &mcii, MCContext &Ctx_, bool IsLittle) : MCII(mcii), Ctx(Ctx_), IsLittleEndian(IsLittle) {} - ~MipsMCCodeEmitter() override {} + ~MipsMCCodeEmitter() override = default; void EmitByte(unsigned char C, raw_ostream &OS) const; Index: lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp =================================================================== --- lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp +++ lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp @@ -40,7 +40,7 @@ raw_pwrite_stream &OS, MCCodeEmitter *Emitter) : MipsELFStreamer(Context, TAB, OS, Emitter), PendingCall(false) {} - ~MipsNaClELFStreamer() override {} + ~MipsNaClELFStreamer() override = default; private: // Whether we started the sandboxing sequence for calls. Calls are bundled Index: lib/Target/Mips/MipsDelaySlotFiller.cpp =================================================================== --- lib/Target/Mips/MipsDelaySlotFiller.cpp +++ lib/Target/Mips/MipsDelaySlotFiller.cpp @@ -106,7 +106,7 @@ /// Return true if MI cannot be moved to delay slot. bool hasHazard(const MachineInstr &MI); - virtual ~InspectMemInstr() {} + virtual ~InspectMemInstr() = default; protected: /// Flags indicating whether loads or stores have been seen. Index: lib/Target/Mips/MipsMachineFunction.cpp =================================================================== --- lib/Target/Mips/MipsMachineFunction.cpp +++ lib/Target/Mips/MipsMachineFunction.cpp @@ -24,7 +24,7 @@ FixGlobalBaseReg("mips-fix-global-base-reg", cl::Hidden, cl::init(true), cl::desc("Always use $gp as the global base register.")); -MipsFunctionInfo::~MipsFunctionInfo() {} +MipsFunctionInfo::~MipsFunctionInfo() = default; bool MipsFunctionInfo::globalBaseRegSet() const { return GlobalBaseReg; Index: lib/Target/Mips/MipsOptionRecord.h =================================================================== --- lib/Target/Mips/MipsOptionRecord.h +++ lib/Target/Mips/MipsOptionRecord.h @@ -30,7 +30,7 @@ class MipsOptionRecord { public: - virtual ~MipsOptionRecord(){}; + virtual ~MipsOptionRecord() = default; virtual void EmitMipsOptionRecord() = 0; }; @@ -53,7 +53,7 @@ COP2RegClass = &(TRI->getRegClass(Mips::COP2RegClassID)); COP3RegClass = &(TRI->getRegClass(Mips::COP3RegClassID)); } - ~MipsRegInfoRecord() override {} + ~MipsRegInfoRecord() override = default; void EmitMipsOptionRecord() override; void SetPhysRegUsed(unsigned Reg, const MCRegisterInfo *MCRegInfo); Index: lib/Target/Mips/MipsTargetMachine.cpp =================================================================== --- lib/Target/Mips/MipsTargetMachine.cpp +++ lib/Target/Mips/MipsTargetMachine.cpp @@ -100,7 +100,7 @@ initAsmInfo(); } -MipsTargetMachine::~MipsTargetMachine() {} +MipsTargetMachine::~MipsTargetMachine() = default; void MipsebTargetMachine::anchor() { } Index: lib/Target/NVPTX/NVPTXSection.h =================================================================== --- lib/Target/NVPTX/NVPTXSection.h +++ lib/Target/NVPTX/NVPTXSection.h @@ -26,7 +26,7 @@ virtual void anchor(); public: NVPTXSection(SectionVariant V, SectionKind K) : MCSection(V, K, nullptr) {} - ~NVPTXSection() {} + ~NVPTXSection() = default; /// Override this as NVPTX has its own way of printing switching /// to a section. Index: lib/Target/NVPTX/NVPTXTargetMachine.cpp =================================================================== --- lib/Target/NVPTX/NVPTXTargetMachine.cpp +++ lib/Target/NVPTX/NVPTXTargetMachine.cpp @@ -103,7 +103,7 @@ initAsmInfo(); } -NVPTXTargetMachine::~NVPTXTargetMachine() {} +NVPTXTargetMachine::~NVPTXTargetMachine() = default; void NVPTXTargetMachine32::anchor() {} Index: lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp =================================================================== --- lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp +++ lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp @@ -46,7 +46,7 @@ : MCII(mcii), CTX(ctx), IsLittleEndian(ctx.getAsmInfo()->isLittleEndian()) {} - ~PPCMCCodeEmitter() override {} + ~PPCMCCodeEmitter() override = default; unsigned getDirectBrEncoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl &Fixups, Index: lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp =================================================================== --- lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp +++ lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp @@ -42,7 +42,7 @@ #include "PPCGenRegisterInfo.inc" // Pin the vtable to this file. -PPCTargetStreamer::~PPCTargetStreamer() {} +PPCTargetStreamer::~PPCTargetStreamer() = default; PPCTargetStreamer::PPCTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {} static MCInstrInfo *createPPCMCInstrInfo() { Index: lib/Target/PowerPC/PPCTargetMachine.cpp =================================================================== --- lib/Target/PowerPC/PPCTargetMachine.cpp +++ lib/Target/PowerPC/PPCTargetMachine.cpp @@ -200,7 +200,7 @@ initAsmInfo(); } -PPCTargetMachine::~PPCTargetMachine() {} +PPCTargetMachine::~PPCTargetMachine() = default; void PPC32TargetMachine::anchor() { } Index: lib/Target/Sparc/Disassembler/SparcDisassembler.cpp =================================================================== --- lib/Target/Sparc/Disassembler/SparcDisassembler.cpp +++ lib/Target/Sparc/Disassembler/SparcDisassembler.cpp @@ -34,7 +34,7 @@ public: SparcDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - virtual ~SparcDisassembler() {} + virtual ~SparcDisassembler() = default; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, Index: lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp =================================================================== --- lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp +++ lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp @@ -26,7 +26,7 @@ Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC, /*HasRelocationAddend*/ true) {} - ~SparcELFObjectWriter() override {} + ~SparcELFObjectWriter() override = default; protected: unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, Index: lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp =================================================================== --- lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp +++ lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp @@ -39,7 +39,7 @@ public: SparcMCCodeEmitter(MCContext &ctx): Ctx(ctx) {} - ~SparcMCCodeEmitter() override {} + ~SparcMCCodeEmitter() override = default; void encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl &Fixups, Index: lib/Target/Sparc/SparcTargetMachine.cpp =================================================================== --- lib/Target/Sparc/SparcTargetMachine.cpp +++ lib/Target/Sparc/SparcTargetMachine.cpp @@ -66,7 +66,7 @@ initAsmInfo(); } -SparcTargetMachine::~SparcTargetMachine() {} +SparcTargetMachine::~SparcTargetMachine() = default; namespace { /// Sparc Code Generator Pass Configuration Options. Index: lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp =================================================================== --- lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp +++ lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp @@ -25,7 +25,7 @@ public: SystemZDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - ~SystemZDisassembler() override {} + ~SystemZDisassembler() override = default; DecodeStatus getInstruction(MCInst &instr, uint64_t &Size, ArrayRef Bytes, uint64_t Address, Index: lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp =================================================================== --- lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp +++ lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp @@ -34,7 +34,7 @@ : MCII(mcii), Ctx(ctx) { } - ~SystemZMCCodeEmitter() override {} + ~SystemZMCCodeEmitter() override = default; // OVerride MCCodeEmitter. void encodeInstruction(const MCInst &MI, raw_ostream &OS, Index: lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp =================================================================== --- lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp +++ lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp @@ -33,8 +33,7 @@ : MCELFObjectTargetWriter(/*Is64Bit=*/true, OSABI, ELF::EM_S390, /*HasRelocationAddend=*/ true) {} -SystemZObjectWriter::~SystemZObjectWriter() { -} +SystemZObjectWriter::~SystemZObjectWriter() = default; // Return the relocation type for an absolute value of MCFixupKind Kind. static unsigned getAbsoluteReloc(unsigned Kind) { Index: lib/Target/SystemZ/SystemZTargetMachine.cpp =================================================================== --- lib/Target/SystemZ/SystemZTargetMachine.cpp +++ lib/Target/SystemZ/SystemZTargetMachine.cpp @@ -90,7 +90,7 @@ initAsmInfo(); } -SystemZTargetMachine::~SystemZTargetMachine() {} +SystemZTargetMachine::~SystemZTargetMachine() = default; namespace { /// SystemZ Code Generator Pass Configuration Options. Index: lib/Target/TargetIntrinsicInfo.cpp =================================================================== --- lib/Target/TargetIntrinsicInfo.cpp +++ lib/Target/TargetIntrinsicInfo.cpp @@ -16,11 +16,9 @@ #include "llvm/IR/Function.h" using namespace llvm; -TargetIntrinsicInfo::TargetIntrinsicInfo() { -} +TargetIntrinsicInfo::TargetIntrinsicInfo() = default; -TargetIntrinsicInfo::~TargetIntrinsicInfo() { -} +TargetIntrinsicInfo::~TargetIntrinsicInfo() = default; unsigned TargetIntrinsicInfo::getIntrinsicID(Function *F) const { const ValueName *ValName = F->getValueName(); Index: lib/Target/TargetLoweringObjectFile.cpp =================================================================== --- lib/Target/TargetLoweringObjectFile.cpp +++ lib/Target/TargetLoweringObjectFile.cpp @@ -47,8 +47,7 @@ TM.getCodeModel(), *Ctx); } -TargetLoweringObjectFile::~TargetLoweringObjectFile() { -} +TargetLoweringObjectFile::~TargetLoweringObjectFile() = default; static bool isSuitableForBSS(const GlobalVariable *GV, bool NoZerosInBSS) { const Constant *C = GV->getInitializer(); Index: lib/Target/TargetSubtargetInfo.cpp =================================================================== --- lib/Target/TargetSubtargetInfo.cpp +++ lib/Target/TargetSubtargetInfo.cpp @@ -28,7 +28,7 @@ : MCSubtargetInfo(TT, CPU, FS, PF, PD, ProcSched, WPR, WL, RA, IS, OC, FP) { } -TargetSubtargetInfo::~TargetSubtargetInfo() {} +TargetSubtargetInfo::~TargetSubtargetInfo() = default; bool TargetSubtargetInfo::enableAtomicExpand() const { return true; Index: lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp =================================================================== --- lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp +++ lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp @@ -185,7 +185,7 @@ X86AddressSanitizer(const MCSubtargetInfo &STI) : X86AsmInstrumentation(STI), RepPrefix(false), OrigSPOffset(0) {} - ~X86AddressSanitizer() override {} + ~X86AddressSanitizer() override = default; // X86AsmInstrumentation implementation: void InstrumentAndEmitInstruction(const MCInst &Inst, @@ -506,7 +506,7 @@ X86AddressSanitizer32(const MCSubtargetInfo &STI) : X86AddressSanitizer(STI) {} - ~X86AddressSanitizer32() override {} + ~X86AddressSanitizer32() override = default; unsigned GetFrameReg(const MCContext &Ctx, MCStreamer &Out) { unsigned FrameReg = GetFrameRegGeneric(Ctx, Out); @@ -763,7 +763,7 @@ X86AddressSanitizer64(const MCSubtargetInfo &STI) : X86AddressSanitizer(STI) {} - ~X86AddressSanitizer64() override {} + ~X86AddressSanitizer64() override = default; unsigned GetFrameReg(const MCContext &Ctx, MCStreamer &Out) { unsigned FrameReg = GetFrameRegGeneric(Ctx, Out); @@ -1033,7 +1033,7 @@ X86AsmInstrumentation::X86AsmInstrumentation(const MCSubtargetInfo &STI) : STI(STI), InitialFrameReg(0) {} -X86AsmInstrumentation::~X86AsmInstrumentation() {} +X86AsmInstrumentation::~X86AsmInstrumentation() = default; void X86AsmInstrumentation::InstrumentAndEmitInstruction( const MCInst &Inst, OperandVector &Operands, MCContext &Ctx, Index: lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp +++ lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp @@ -37,7 +37,7 @@ /*HasRelocationAddend*/ EMachine != ELF::EM_386) {} X86ELFObjectWriter::~X86ELFObjectWriter() -{} += default; enum X86_64RelType { RT64_64, RT64_32, RT64_32S, RT64_16, RT64_8 }; Index: lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp +++ lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp @@ -39,7 +39,7 @@ : MCII(mcii), Ctx(ctx) { } - ~X86MCCodeEmitter() override {} + ~X86MCCodeEmitter() override = default; bool is64BitMode(const MCSubtargetInfo &STI) const { return STI.getFeatureBits()[X86::Mode64Bit]; Index: lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp +++ lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp @@ -37,7 +37,7 @@ : MCWinCOFFObjectTargetWriter(Is64Bit ? COFF::IMAGE_FILE_MACHINE_AMD64 : COFF::IMAGE_FILE_MACHINE_I386) {} -X86WinCOFFObjectWriter::~X86WinCOFFObjectWriter() {} +X86WinCOFFObjectWriter::~X86WinCOFFObjectWriter() = default; unsigned X86WinCOFFObjectWriter::getRelocType(const MCValue &Target, const MCFixup &Fixup, Index: lib/Target/X86/X86MCInstLower.cpp =================================================================== --- lib/Target/X86/X86MCInstLower.cpp +++ lib/Target/X86/X86MCInstLower.cpp @@ -75,7 +75,7 @@ X86AsmPrinter::StackMapShadowTracker::StackMapShadowTracker(TargetMachine &TM) : TM(TM), InShadow(false), RequiredShadowSize(0), CurrentShadowSize(0) {} - X86AsmPrinter::StackMapShadowTracker::~StackMapShadowTracker() {} + X86AsmPrinter::StackMapShadowTracker::~StackMapShadowTracker() = default; void X86AsmPrinter::StackMapShadowTracker::startFunction(MachineFunction &F) { Index: lib/Target/X86/X86TargetMachine.cpp =================================================================== --- lib/Target/X86/X86TargetMachine.cpp +++ lib/Target/X86/X86TargetMachine.cpp @@ -130,7 +130,7 @@ initAsmInfo(); } -X86TargetMachine::~X86TargetMachine() {} +X86TargetMachine::~X86TargetMachine() = default; const X86Subtarget * X86TargetMachine::getSubtargetImpl(const Function &F) const { Index: lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp =================================================================== --- lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp +++ lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp @@ -89,7 +89,7 @@ } XCoreTargetStreamer::XCoreTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {} -XCoreTargetStreamer::~XCoreTargetStreamer() {} +XCoreTargetStreamer::~XCoreTargetStreamer() = default; namespace { Index: lib/Target/XCore/XCoreMachineFunctionInfo.h =================================================================== --- lib/Target/XCore/XCoreMachineFunctionInfo.h +++ lib/Target/XCore/XCoreMachineFunctionInfo.h @@ -57,7 +57,7 @@ VarArgsFrameIndex(0), CachedEStackSize(-1) {} - ~XCoreFunctionInfo() {} + ~XCoreFunctionInfo() = default; void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; } int getVarArgsFrameIndex() const { return VarArgsFrameIndex; } Index: lib/Target/XCore/XCoreTargetMachine.cpp =================================================================== --- lib/Target/XCore/XCoreTargetMachine.cpp +++ lib/Target/XCore/XCoreTargetMachine.cpp @@ -35,7 +35,7 @@ initAsmInfo(); } -XCoreTargetMachine::~XCoreTargetMachine() {} +XCoreTargetMachine::~XCoreTargetMachine() = default; namespace { /// XCore Code Generator Pass Configuration Options. Index: lib/Transforms/Instrumentation/MemorySanitizer.cpp =================================================================== --- lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -596,7 +596,7 @@ /// instructions in a function. virtual void finalizeInstrumentation() = 0; - virtual ~VarArgHelper() {} + virtual ~VarArgHelper() = default; }; struct MemorySanitizerVisitor; Index: lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== --- lib/Transforms/Vectorize/LoopVectorize.cpp +++ lib/Transforms/Vectorize/LoopVectorize.cpp @@ -300,7 +300,7 @@ return AddedSafetyChecks; } - virtual ~InnerLoopVectorizer() {} + virtual ~InnerLoopVectorizer() = default; protected: /// A small list of PHINodes. Index: tools/bugpoint/ListReducer.h =================================================================== --- tools/bugpoint/ListReducer.h +++ tools/bugpoint/ListReducer.h @@ -34,7 +34,7 @@ InternalError // Encountered an error trying to run the predicate }; - virtual ~ListReducer() {} + virtual ~ListReducer() = default; // doTest - This virtual function should be overriden by subclasses to // implement the test desired. The testcase is only required to test to see Index: tools/bugpoint/ToolRunner.h =================================================================== --- tools/bugpoint/ToolRunner.h +++ tools/bugpoint/ToolRunner.h @@ -110,7 +110,7 @@ const std::string &ExecCommandLine); - virtual ~AbstractInterpreter() {} + virtual ~AbstractInterpreter() = default; /// compileProgram - Compile the specified program from bitcode to executable /// code. This does not produce any output, it is only used when debugging Index: tools/lli/RemoteTargetExternal.h =================================================================== --- tools/lli/RemoteTargetExternal.h +++ tools/lli/RemoteTargetExternal.h @@ -106,7 +106,7 @@ void stop() override; RemoteTargetExternal(std::string &Name) : RemoteTarget(), ChildName(Name) {} - ~RemoteTargetExternal() override {} + ~RemoteTargetExternal() override = default; private: std::string ChildName; Index: tools/lli/lli.cpp =================================================================== --- tools/lli/lli.cpp +++ tools/lli/lli.cpp @@ -254,7 +254,7 @@ this->CacheDir[this->CacheDir.size() - 1] != '/') this->CacheDir += '/'; } - ~LLIObjectCache() override {} + ~LLIObjectCache() override = default; void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj) override { const std::string ModuleID = M->getModuleIdentifier(); Index: tools/llvm-cov/CoverageFilters.h =================================================================== --- tools/llvm-cov/CoverageFilters.h +++ tools/llvm-cov/CoverageFilters.h @@ -23,7 +23,7 @@ /// \brief Matches specific functions that pass the requirement of this filter. class CoverageFilter { public: - virtual ~CoverageFilter() {} + virtual ~CoverageFilter() = default; /// \brief Return true if the function passes the requirements of this filter. virtual bool matches(const coverage::FunctionRecord &Function) { Index: tools/llvm-diff/DiffConsumer.h =================================================================== --- tools/llvm-diff/DiffConsumer.h +++ tools/llvm-diff/DiffConsumer.h @@ -49,7 +49,7 @@ virtual void logd(const DiffLogBuilder &Log) = 0; protected: - virtual ~Consumer() {} + virtual ~Consumer() = default; }; class DiffConsumer : public Consumer { Index: tools/llvm-diff/DifferenceEngine.h =================================================================== --- tools/llvm-diff/DifferenceEngine.h +++ tools/llvm-diff/DifferenceEngine.h @@ -55,7 +55,7 @@ virtual bool operator()(Value *L, Value *R) = 0; protected: - virtual ~Oracle() {} + virtual ~Oracle() = default; }; DifferenceEngine(Consumer &consumer) Index: tools/llvm-objdump/llvm-objdump.cpp =================================================================== --- tools/llvm-objdump/llvm-objdump.cpp +++ tools/llvm-objdump/llvm-objdump.cpp @@ -299,7 +299,7 @@ namespace { class PrettyPrinter { public: - virtual ~PrettyPrinter(){} + virtual ~PrettyPrinter()= default; virtual void printInst(MCInstPrinter &IP, const MCInst *MI, ArrayRef Bytes, uint64_t Address, raw_ostream &OS, StringRef Annot, Index: tools/llvm-readobj/ObjDumper.cpp =================================================================== --- tools/llvm-readobj/ObjDumper.cpp +++ tools/llvm-readobj/ObjDumper.cpp @@ -25,7 +25,6 @@ : W(Writer) { } -ObjDumper::~ObjDumper() { -} +ObjDumper::~ObjDumper() = default; } // namespace llvm Index: tools/llvm-stress/llvm-stress.cpp =================================================================== --- tools/llvm-stress/llvm-stress.cpp +++ tools/llvm-stress/llvm-stress.cpp @@ -151,7 +151,7 @@ BB(Block),PT(PT),Ran(R),Context(BB->getContext()) {} /// virtual D'tor to silence warnings. - virtual ~Modifier() {} + virtual ~Modifier() = default; /// Add a new instruction. virtual void Act() = 0; Index: unittests/ADT/SmallVectorTest.cpp =================================================================== --- unittests/ADT/SmallVectorTest.cpp +++ unittests/ADT/SmallVectorTest.cpp @@ -141,7 +141,7 @@ int Constructable::numMoveAssignmentCalls; struct NonCopyable { - NonCopyable() {} + NonCopyable() = default; NonCopyable(NonCopyable &&) {} NonCopyable &operator=(NonCopyable &&) { return *this; } private: Index: unittests/ADT/StringMapTest.cpp =================================================================== --- unittests/ADT/StringMapTest.cpp +++ unittests/ADT/StringMapTest.cpp @@ -257,7 +257,7 @@ } struct Immovable { - Immovable() {} + Immovable() = default; Immovable(Immovable&&) = delete; // will disable the other special members }; Index: unittests/Support/AlignOfTest.cpp =================================================================== --- unittests/Support/AlignOfTest.cpp +++ unittests/Support/AlignOfTest.cpp @@ -80,14 +80,14 @@ double S6::f() { return 0.0; } float D2::g() { return 0.0f; } -V1::~V1() {} -V2::~V2() {} -V3::~V3() {} -V4::~V4() {} -V5::~V5() {} -V6::~V6() {} -V7::~V7() {} -V8::~V8() {} +V1::~V1() = default; +V2::~V2() = default; +V3::~V3() = default; +V4::~V4() = default; +V5::~V5() = default; +V6::~V6() = default; +V7::~V7() = default; +V8::~V8() = default; // Ensure alignment is a compile-time constant. char LLVM_ATTRIBUTE_UNUSED test_arr1 Index: unittests/Support/AllocatorTest.cpp =================================================================== --- unittests/Support/AllocatorTest.cpp +++ unittests/Support/AllocatorTest.cpp @@ -141,7 +141,7 @@ static size_t LastSlabSize; public: - ~MockSlabAllocator() { } + ~MockSlabAllocator() = default; void *Allocate(size_t Size, size_t /*Alignment*/) { // Allocate space for the alignment, the slab, and a void* that goes right Index: unittests/Support/Casting.cpp =================================================================== --- unittests/Support/Casting.cpp +++ unittests/Support/Casting.cpp @@ -24,7 +24,7 @@ // with conversion facility // struct bar { - bar() {} + bar() = default; struct foo *baz(); struct foo *caz(); struct foo *daz(); @@ -189,7 +189,7 @@ class Base { public: // No classof. We are testing that the upcast is inferred. - Base() {} + Base() = default; }; class Derived : public Base { Index: utils/TableGen/CodeGenDAGPatterns.cpp =================================================================== --- utils/TableGen/CodeGenDAGPatterns.cpp +++ utils/TableGen/CodeGenDAGPatterns.cpp @@ -1158,12 +1158,7 @@ // TreePatternNode implementation // -TreePatternNode::~TreePatternNode() { -#if 0 // FIXME: implement refcounted tree nodes! - for (unsigned i = 0, e = getNumChildren(); i != e; ++i) - delete getChild(i); -#endif -} +TreePatternNode::~TreePatternNode() = default; static unsigned GetNumNodeResults(Record *Operator, CodeGenDAGPatterns &CDP) { if (Operator->getName() == "set" || Index: utils/TableGen/CodeGenTarget.cpp =================================================================== --- utils/TableGen/CodeGenTarget.cpp +++ utils/TableGen/CodeGenTarget.cpp @@ -145,8 +145,7 @@ TargetRec = Targets[0]; } -CodeGenTarget::~CodeGenTarget() { -} +CodeGenTarget::~CodeGenTarget() = default; const std::string &CodeGenTarget::getName() const { return TargetRec->getName(); Index: utils/TableGen/DAGISelMatcher.h =================================================================== --- utils/TableGen/DAGISelMatcher.h +++ utils/TableGen/DAGISelMatcher.h @@ -91,7 +91,7 @@ protected: Matcher(KindTy K) : Kind(K) {} public: - virtual ~Matcher() {} + virtual ~Matcher() = default; KindTy getKind() const { return Kind; } Index: utils/TableGen/FixedLenDecoderEmitter.cpp =================================================================== --- utils/TableGen/FixedLenDecoderEmitter.cpp +++ utils/TableGen/FixedLenDecoderEmitter.cpp @@ -530,8 +530,7 @@ && "Filter returns no instruction categories"); } -Filter::~Filter() { -} +Filter::~Filter() = default; // Divides the decoding task into sub tasks and delegates them to the // inferior FilterChooser's. Index: utils/TableGen/X86ModRMFilters.h =================================================================== --- utils/TableGen/X86ModRMFilters.h +++ utils/TableGen/X86ModRMFilters.h @@ -30,7 +30,7 @@ virtual void anchor(); public: /// Destructor - Override as necessary. - virtual ~ModRMFilter() { } + virtual ~ModRMFilter() = default; /// isDumb - Indicates whether this filter returns the same value for /// any value of the ModR/M byte. Index: utils/unittest/googletest/include/gtest/gtest.h =================================================================== --- utils/unittest/googletest/include/gtest/gtest.h +++ utils/unittest/googletest/include/gtest/gtest.h @@ -1672,7 +1672,7 @@ class WithParamInterface { public: typedef T ParamType; - virtual ~WithParamInterface() {} + virtual ~WithParamInterface() = default; // The current parameter value. Is also available in the test fixture's // constructor. This member function is non-static, even though it only Index: utils/unittest/googletest/include/gtest/internal/gtest-internal.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-internal.h +++ utils/unittest/googletest/include/gtest/internal/gtest-internal.h @@ -544,7 +544,7 @@ virtual Test* CreateTest() = 0; protected: - TestFactoryBase() {} + TestFactoryBase() = default; private: GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); Index: utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h +++ utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h @@ -2840,7 +2840,7 @@ CartesianProductGenerator2(const ParamGenerator& g1, const ParamGenerator& g2) : g1_(g1), g2_(g2) {} - virtual ~CartesianProductGenerator2() {} + virtual ~CartesianProductGenerator2() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin()); @@ -2862,7 +2862,7 @@ begin2_(g2.begin()), end2_(g2.end()), current2_(current2) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -2955,7 +2955,7 @@ CartesianProductGenerator3(const ParamGenerator& g1, const ParamGenerator& g2, const ParamGenerator& g3) : g1_(g1), g2_(g2), g3_(g3) {} - virtual ~CartesianProductGenerator3() {} + virtual ~CartesianProductGenerator3() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -2981,7 +2981,7 @@ begin3_(g3.begin()), end3_(g3.end()), current3_(current3) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -3088,7 +3088,7 @@ const ParamGenerator& g2, const ParamGenerator& g3, const ParamGenerator& g4) : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} - virtual ~CartesianProductGenerator4() {} + virtual ~CartesianProductGenerator4() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -3118,7 +3118,7 @@ begin4_(g4.begin()), end4_(g4.end()), current4_(current4) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -3239,7 +3239,7 @@ const ParamGenerator& g2, const ParamGenerator& g3, const ParamGenerator& g4, const ParamGenerator& g5) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} - virtual ~CartesianProductGenerator5() {} + virtual ~CartesianProductGenerator5() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -3272,7 +3272,7 @@ begin5_(g5.begin()), end5_(g5.end()), current5_(current5) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -3409,7 +3409,7 @@ const ParamGenerator& g4, const ParamGenerator& g5, const ParamGenerator& g6) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} - virtual ~CartesianProductGenerator6() {} + virtual ~CartesianProductGenerator6() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -3445,7 +3445,7 @@ begin6_(g6.begin()), end6_(g6.end()), current6_(current6) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -3595,7 +3595,7 @@ const ParamGenerator& g4, const ParamGenerator& g5, const ParamGenerator& g6, const ParamGenerator& g7) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} - virtual ~CartesianProductGenerator7() {} + virtual ~CartesianProductGenerator7() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -3635,7 +3635,7 @@ begin7_(g7.begin()), end7_(g7.end()), current7_(current7) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -3800,7 +3800,7 @@ const ParamGenerator& g8) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8) {} - virtual ~CartesianProductGenerator8() {} + virtual ~CartesianProductGenerator8() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -3844,7 +3844,7 @@ begin8_(g8.begin()), end8_(g8.end()), current8_(current8) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -4022,7 +4022,7 @@ const ParamGenerator& g8, const ParamGenerator& g9) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), g9_(g9) {} - virtual ~CartesianProductGenerator9() {} + virtual ~CartesianProductGenerator9() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -4069,7 +4069,7 @@ begin9_(g9.begin()), end9_(g9.end()), current9_(current9) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -4262,7 +4262,7 @@ const ParamGenerator& g10) : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), g9_(g9), g10_(g10) {} - virtual ~CartesianProductGenerator10() {} + virtual ~CartesianProductGenerator10() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, @@ -4312,7 +4312,7 @@ begin10_(g10.begin()), end10_(g10.end()), current10_(current10) { ComputeCurrentValue(); } - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; Index: utils/unittest/googletest/include/gtest/internal/gtest-param-util.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-param-util.h +++ utils/unittest/googletest/include/gtest/internal/gtest-param-util.h @@ -68,7 +68,7 @@ template class ParamIteratorInterface { public: - virtual ~ParamIteratorInterface() {} + virtual ~ParamIteratorInterface() = default; // A pointer to the base generator instance. // Used only for the purposes of iterator comparison // to make sure that two iterators belong to the same generator. @@ -143,7 +143,7 @@ public: typedef T ParamType; - virtual ~ParamGeneratorInterface() {} + virtual ~ParamGeneratorInterface() = default; // Generator interface definition virtual ParamIteratorInterface* Begin() const = 0; @@ -185,7 +185,7 @@ RangeGenerator(T begin, T end, IncrementT step) : begin_(begin), end_(end), step_(step), end_index_(CalculateEndIndex(begin, end, step)) {} - virtual ~RangeGenerator() {} + virtual ~RangeGenerator() = default; virtual ParamIteratorInterface* Begin() const { return new Iterator(this, begin_, 0, step_); @@ -200,7 +200,7 @@ Iterator(const ParamGeneratorInterface* base, T value, int index, IncrementT step) : base_(base), value_(value), index_(index), step_(step) {} - virtual ~Iterator() {} + virtual ~Iterator() = default; virtual const ParamGeneratorInterface* BaseGenerator() const { return base_; @@ -270,7 +270,7 @@ template ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) : container_(begin, end) {} - ~ValuesInIteratorRangeGenerator() override {} + ~ValuesInIteratorRangeGenerator() override = default; ParamIteratorInterface *Begin() const override { return new Iterator(this, container_.begin()); @@ -287,7 +287,7 @@ Iterator(const ParamGeneratorInterface* base, typename ContainerType::const_iterator iterator) : base_(base), iterator_(iterator) {} - ~Iterator() override {} + ~Iterator() override = default; const ParamGeneratorInterface *BaseGenerator() const override { return base_; @@ -373,7 +373,7 @@ template class TestMetaFactoryBase { public: - virtual ~TestMetaFactoryBase() {} + virtual ~TestMetaFactoryBase() = default; virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0; }; @@ -392,7 +392,7 @@ public: typedef typename TestCase::ParamType ParamType; - TestMetaFactory() {} + TestMetaFactory() = default; TestFactoryBase *CreateTestFactory(ParamType parameter) override { return new ParameterizedTestFactory(parameter); @@ -427,7 +427,7 @@ virtual void RegisterTests() = 0; protected: - ParameterizedTestCaseInfoBase() {} + ParameterizedTestCaseInfoBase() = default; private: GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase); Index: utils/unittest/googletest/include/gtest/internal/gtest-tuple.h =================================================================== --- utils/unittest/googletest/include/gtest/internal/gtest-tuple.h +++ utils/unittest/googletest/include/gtest/internal/gtest-tuple.h @@ -174,7 +174,7 @@ template <> class tuple<> { public: - tuple() {} + tuple() = default; tuple(const tuple& /* t */) {} tuple& operator=(const tuple& /* t */) { return *this; } }; Index: utils/unittest/googletest/src/gtest-death-test.cc =================================================================== --- utils/unittest/googletest/src/gtest-death-test.cc +++ utils/unittest/googletest/src/gtest-death-test.cc @@ -301,7 +301,7 @@ } // Pin the vtable to this file. -DeathTest::~DeathTest() {} +DeathTest::~DeathTest() = default; // Creates and returns a death test by dispatching to the current // death test factory. @@ -1096,7 +1096,7 @@ } // Pin the vtable to this file. -DeathTestFactory::~DeathTestFactory() {} +DeathTestFactory::~DeathTestFactory() = default; // Splits a given string on a given delimiter, populating a given // vector with the fields. GTEST_HAS_DEATH_TEST implies that we have Index: utils/unittest/googletest/src/gtest-internal-inl.h =================================================================== --- utils/unittest/googletest/src/gtest-internal-inl.h +++ utils/unittest/googletest/src/gtest-internal-inl.h @@ -407,7 +407,7 @@ // The role interface for getting the OS stack trace as a string. class OsStackTraceGetterInterface { public: - OsStackTraceGetterInterface() {} + OsStackTraceGetterInterface() = default; virtual ~OsStackTraceGetterInterface(); // Returns the current OS stack trace as a String. Parameters: Index: utils/unittest/googletest/src/gtest-port.cc =================================================================== --- utils/unittest/googletest/src/gtest-port.cc +++ utils/unittest/googletest/src/gtest-port.cc @@ -748,10 +748,10 @@ // Pin the vtables to this file. #if GTEST_HAS_PTHREAD -ThreadWithParamBase::~ThreadWithParamBase() {} -ThreadLocalValueHolderBase::~ThreadLocalValueHolderBase() {} +ThreadWithParamBase::~ThreadWithParamBase() = default; +ThreadLocalValueHolderBase::~ThreadLocalValueHolderBase() = default; #endif -TestFactoryBase::~TestFactoryBase() {} +TestFactoryBase::~TestFactoryBase() = default; } // namespace internal } // namespace testing Index: utils/unittest/googletest/src/gtest.cc =================================================================== --- utils/unittest/googletest/src/gtest.cc +++ utils/unittest/googletest/src/gtest.cc @@ -1777,8 +1777,7 @@ } // D'tor. -TestResult::~TestResult() { -} +TestResult::~TestResult() = default; // Returns the i-th test part result among all the results. i can // range from 0 to total_part_count() - 1. If i is not in that range, @@ -4866,13 +4865,13 @@ } // Pin the vtables to this file. -Environment::~Environment() {} -TestPartResultReporterInterface::~TestPartResultReporterInterface() {} -TestEventListener::~TestEventListener() {} +Environment::~Environment() = default; +TestPartResultReporterInterface::~TestPartResultReporterInterface() = default; +TestEventListener::~TestEventListener() = default; void EmptyTestEventListener::anchor() {} namespace internal { -OsStackTraceGetterInterface::~OsStackTraceGetterInterface() {} -ParameterizedTestCaseInfoBase::~ParameterizedTestCaseInfoBase() {} +OsStackTraceGetterInterface::~OsStackTraceGetterInterface() = default; +ParameterizedTestCaseInfoBase::~ParameterizedTestCaseInfoBase() = default; } } // namespace testing