diff options
author | Kazu Hirata <kazu@google.com> | 2022-02-06 22:18:35 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-02-06 22:18:35 -0800 |
commit | 3a3cb929ab6fd69ea7d5db42db613a4701fa4669 (patch) | |
tree | 2ec87878da9b43c38c832eed4625d75f38960313 /llvm/lib | |
parent | 1391f91b1f62b9510e4b71737aac2b45d0c4d6cd (diff) | |
download | llvm-3a3cb929ab6fd69ea7d5db42db613a4701fa4669.zip llvm-3a3cb929ab6fd69ea7d5db42db613a4701fa4669.tar.gz llvm-3a3cb929ab6fd69ea7d5db42db613a4701fa4669.tar.bz2 |
[llvm] Use = default (NFC)
Diffstat (limited to 'llvm/lib')
138 files changed, 171 insertions, 178 deletions
diff --git a/llvm/lib/Analysis/CaptureTracking.cpp b/llvm/lib/Analysis/CaptureTracking.cpp index ba8462e..8b83c6c3 100644 --- a/llvm/lib/Analysis/CaptureTracking.cpp +++ b/llvm/lib/Analysis/CaptureTracking.cpp @@ -52,7 +52,7 @@ unsigned llvm::getDefaultMaxUsesToExploreForCaptureTracking() { return DefaultMaxUsesToExplore; } -CaptureTracker::~CaptureTracker() {} +CaptureTracker::~CaptureTracker() = default; bool CaptureTracker::shouldExplore(const Use *U) { return true; } diff --git a/llvm/lib/Analysis/DDG.cpp b/llvm/lib/Analysis/DDG.cpp index 7e13579..a794752 100644 --- a/llvm/lib/Analysis/DDG.cpp +++ b/llvm/lib/Analysis/DDG.cpp @@ -34,7 +34,7 @@ template class llvm::DirectedGraph<DDGNode, DDGEdge>; //===--------------------------------------------------------------------===// // DDGNode implementation //===--------------------------------------------------------------------===// -DDGNode::~DDGNode() {} +DDGNode::~DDGNode() = default; bool DDGNode::collectInstructions( llvm::function_ref<bool(Instruction *)> const &Pred, diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp index 6869530..0015401 100644 --- a/llvm/lib/Analysis/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/GlobalsModRef.cpp @@ -68,8 +68,8 @@ class GlobalsAAResult::FunctionInfo { /// should provide this much alignment at least, but this makes it clear we /// specifically rely on this amount of alignment. struct alignas(8) AlignedMap { - AlignedMap() {} - AlignedMap(const AlignedMap &Arg) : Map(Arg.Map) {} + AlignedMap() = default; + AlignedMap(const AlignedMap &Arg) = default; GlobalInfoMapType Map; }; @@ -102,7 +102,7 @@ class GlobalsAAResult::FunctionInfo { "Insufficient low bits to store our flag and ModRef info."); public: - FunctionInfo() {} + FunctionInfo() = default; ~FunctionInfo() { delete Info.getPointer(); } @@ -979,7 +979,7 @@ GlobalsAAResult::GlobalsAAResult(GlobalsAAResult &&Arg) } } -GlobalsAAResult::~GlobalsAAResult() {} +GlobalsAAResult::~GlobalsAAResult() = default; /*static*/ GlobalsAAResult GlobalsAAResult::analyzeModule( Module &M, std::function<const TargetLibraryInfo &(Function &F)> GetTLI, diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index d5411d9..5333626 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -198,7 +198,7 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> { friend class InstVisitor<CallAnalyzer, bool>; protected: - virtual ~CallAnalyzer() {} + virtual ~CallAnalyzer() = default; /// The TargetTransformInfo available for this compilation. const TargetTransformInfo &TTI; @@ -1020,7 +1020,7 @@ public: return None; } - virtual ~InlineCostCallAnalyzer() {} + virtual ~InlineCostCallAnalyzer() = default; int getThreshold() const { return Threshold; } int getCost() const { return Cost; } Optional<CostBenefitPair> getCostBenefitPair() { return CostBenefit; } diff --git a/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp b/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp index a2e231e..4fcb78e 100644 --- a/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp +++ b/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp @@ -261,10 +261,10 @@ InlineSizeEstimatorAnalysis::InlineSizeEstimatorAnalysis( namespace llvm { class TFModelEvaluator {}; } // namespace llvm -InlineSizeEstimatorAnalysis::InlineSizeEstimatorAnalysis() {} +InlineSizeEstimatorAnalysis::InlineSizeEstimatorAnalysis() = default; InlineSizeEstimatorAnalysis ::InlineSizeEstimatorAnalysis( InlineSizeEstimatorAnalysis &&) {} -InlineSizeEstimatorAnalysis::~InlineSizeEstimatorAnalysis() {} +InlineSizeEstimatorAnalysis::~InlineSizeEstimatorAnalysis() = default; InlineSizeEstimatorAnalysis::Result InlineSizeEstimatorAnalysis::run(const Function &F, FunctionAnalysisManager &FAM) { diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index 1778be4..b232422 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -733,7 +733,7 @@ template <class AliasAnalysisType> class ClobberWalker { struct generic_def_path_iterator : public iterator_facade_base<generic_def_path_iterator<T, Walker>, std::forward_iterator_tag, T *> { - generic_def_path_iterator() {} + generic_def_path_iterator() = default; generic_def_path_iterator(Walker *W, ListIndex N) : W(W), N(N) {} T &operator*() const { return curNode(); } diff --git a/llvm/lib/Analysis/SyncDependenceAnalysis.cpp b/llvm/lib/Analysis/SyncDependenceAnalysis.cpp index 62581b1..b2c70a9 100644 --- a/llvm/lib/Analysis/SyncDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/SyncDependenceAnalysis.cpp @@ -259,7 +259,7 @@ SyncDependenceAnalysis::SyncDependenceAnalysis(const DominatorTree &DT, [&](const BasicBlock &BB) { LoopPO.appendBlock(BB); }); } -SyncDependenceAnalysis::~SyncDependenceAnalysis() {} +SyncDependenceAnalysis::~SyncDependenceAnalysis() = default; // divergence propagator for reducible CFGs struct DivergencePropagator { diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index 25e9dee9..f9bb3b0 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -179,7 +179,7 @@ bool HardwareLoopInfo::isHardwareLoopCandidate(ScalarEvolution &SE, TargetTransformInfo::TargetTransformInfo(const DataLayout &DL) : TTIImpl(new Model<NoTTIImpl>(NoTTIImpl(DL))) {} -TargetTransformInfo::~TargetTransformInfo() {} +TargetTransformInfo::~TargetTransformInfo() = default; TargetTransformInfo::TargetTransformInfo(TargetTransformInfo &&Arg) : TTIImpl(std::move(Arg.TTIImpl)) {} @@ -1155,7 +1155,7 @@ TargetTransformInfo::getInstructionThroughput(const Instruction *I) const { } } -TargetTransformInfo::Concept::~Concept() {} +TargetTransformInfo::Concept::~Concept() = default; TargetIRAnalysis::TargetIRAnalysis() : TTICallback(&getDefaultTTI) {} diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp index b56095c..5cd225a 100644 --- a/llvm/lib/DWARFLinker/DWARFLinker.cpp +++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp @@ -132,9 +132,9 @@ static bool isTypeTag(uint16_t Tag) { return false; } -AddressesMap::~AddressesMap() {} +AddressesMap::~AddressesMap() = default; -DwarfEmitter::~DwarfEmitter() {} +DwarfEmitter::~DwarfEmitter() = default; static Optional<StringRef> StripTemplateParameters(StringRef Name) { // We are looking for template parameters to strip from Name. e.g. diff --git a/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp b/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp index c7b1c65..3c9b41e 100644 --- a/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp +++ b/llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp @@ -46,7 +46,7 @@ static inline TypeLeafKind getTypeLeafKind(ContinuationRecordKind CK) { ContinuationRecordBuilder::ContinuationRecordBuilder() : SegmentWriter(Buffer), Mapping(SegmentWriter) {} -ContinuationRecordBuilder::~ContinuationRecordBuilder() {} +ContinuationRecordBuilder::~ContinuationRecordBuilder() = default; void ContinuationRecordBuilder::begin(ContinuationRecordKind RecordKind) { assert(!Kind.hasValue()); diff --git a/llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp index 3f93463..0158118 100644 --- a/llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp +++ b/llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp @@ -10,6 +10,6 @@ using namespace llvm::codeview; -DebugSubsectionRef::~DebugSubsectionRef() {} +DebugSubsectionRef::~DebugSubsectionRef() = default; -DebugSubsection::~DebugSubsection() {} +DebugSubsection::~DebugSubsection() = default; diff --git a/llvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp b/llvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp index d963e34..634bb57 100644 --- a/llvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp +++ b/llvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp @@ -29,7 +29,7 @@ static void addPadding(BinaryStreamWriter &Writer) { SimpleTypeSerializer::SimpleTypeSerializer() : ScratchBuffer(MaxRecordLength) {} -SimpleTypeSerializer::~SimpleTypeSerializer() {} +SimpleTypeSerializer::~SimpleTypeSerializer() = default; template <typename T> ArrayRef<uint8_t> SimpleTypeSerializer::serialize(T &Record) { diff --git a/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp index b6f11a9..14e6f93 100644 --- a/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp @@ -44,7 +44,7 @@ DbiModuleDescriptorBuilder::DbiModuleDescriptorBuilder(StringRef ModuleName, Layout.Mod = ModIndex; } -DbiModuleDescriptorBuilder::~DbiModuleDescriptorBuilder() {} +DbiModuleDescriptorBuilder::~DbiModuleDescriptorBuilder() = default; uint16_t DbiModuleDescriptorBuilder::getStreamIndex() const { return Layout.ModDiStream; diff --git a/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp index 0584966..c11fe2e 100644 --- a/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp @@ -30,7 +30,7 @@ DbiStreamBuilder::DbiStreamBuilder(msf::MSFBuilder &Msf) PdbDllVersion(0), PdbDllRbld(0), Flags(0), MachineType(PDB_Machine::x86), Header(nullptr) {} -DbiStreamBuilder::~DbiStreamBuilder() {} +DbiStreamBuilder::~DbiStreamBuilder() = default; void DbiStreamBuilder::setVersionHeader(PdbRaw_DbiVer V) { VerHeader = V; } diff --git a/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp index 9084e689d..b048e0c 100644 --- a/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp @@ -286,7 +286,7 @@ GSIStreamBuilder::GSIStreamBuilder(msf::MSFBuilder &Msf) : Msf(Msf), PSH(std::make_unique<GSIHashStreamBuilder>()), GSH(std::make_unique<GSIHashStreamBuilder>()) {} -GSIStreamBuilder::~GSIStreamBuilder() {} +GSIStreamBuilder::~GSIStreamBuilder() = default; uint32_t GSIStreamBuilder::calculatePublicsHashStreamSize() const { uint32_t Size = 0; diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp index 7f3b35c..5505283 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp @@ -25,7 +25,7 @@ NativeFunctionSymbol::NativeFunctionSymbol(NativeSession &Session, : NativeRawSymbol(Session, PDB_SymType::Function, Id), Sym(Sym), RecordOffset(Offset) {} -NativeFunctionSymbol::~NativeFunctionSymbol() {} +NativeFunctionSymbol::~NativeFunctionSymbol() = default; void NativeFunctionSymbol::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp index 8314353..fb51179 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp @@ -25,7 +25,7 @@ NativeInlineSiteSymbol::NativeInlineSiteSymbol( : NativeRawSymbol(Session, PDB_SymType::InlineSite, Id), Sym(Sym), ParentAddr(ParentAddr) {} -NativeInlineSiteSymbol::~NativeInlineSiteSymbol() {} +NativeInlineSiteSymbol::~NativeInlineSiteSymbol() = default; void NativeInlineSiteSymbol::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativePublicSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativePublicSymbol.cpp index 1265e68..739480e 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativePublicSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativePublicSymbol.cpp @@ -20,7 +20,7 @@ NativePublicSymbol::NativePublicSymbol(NativeSession &Session, SymIndexId Id, const codeview::PublicSym32 &Sym) : NativeRawSymbol(Session, PDB_SymType::PublicSymbol, Id), Sym(Sym) {} -NativePublicSymbol::~NativePublicSymbol() {} +NativePublicSymbol::~NativePublicSymbol() = default; void NativePublicSymbol::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp index e5f1dca..24807a7 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeSymbolEnumerator.cpp @@ -22,7 +22,7 @@ NativeSymbolEnumerator::NativeSymbolEnumerator( : NativeRawSymbol(Session, PDB_SymType::Data, Id), Parent(Parent), Record(std::move(Record)) {} -NativeSymbolEnumerator::~NativeSymbolEnumerator() {} +NativeSymbolEnumerator::~NativeSymbolEnumerator() = default; void NativeSymbolEnumerator::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp index 63ac9fa..31fc0ac 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp @@ -21,7 +21,7 @@ NativeTypeArray::NativeTypeArray(NativeSession &Session, SymIndexId Id, codeview::ArrayRecord Record) : NativeRawSymbol(Session, PDB_SymType::ArrayType, Id), Record(Record), Index(TI) {} -NativeTypeArray::~NativeTypeArray() {} +NativeTypeArray::~NativeTypeArray() = default; void NativeTypeArray::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp index a08663a..22bea31 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeBuiltin.cpp @@ -19,7 +19,7 @@ NativeTypeBuiltin::NativeTypeBuiltin(NativeSession &PDBSession, SymIndexId Id, : NativeRawSymbol(PDBSession, PDB_SymType::BuiltinType, Id), Session(PDBSession), Mods(Mods), Type(T), Length(L) {} -NativeTypeBuiltin::~NativeTypeBuiltin() {} +NativeTypeBuiltin::~NativeTypeBuiltin() = default; void NativeTypeBuiltin::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp index aaec3a5..98a8475 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp @@ -123,7 +123,7 @@ NativeTypeEnum::NativeTypeEnum(NativeSession &Session, SymIndexId Id, : NativeRawSymbol(Session, PDB_SymType::Enum, Id), UnmodifiedType(&UnmodifiedType), Modifiers(std::move(Modifier)) {} -NativeTypeEnum::~NativeTypeEnum() {} +NativeTypeEnum::~NativeTypeEnum() = default; void NativeTypeEnum::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp index f98a4c3..251ed58 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp @@ -96,7 +96,7 @@ void NativeTypeFunctionSig::initialize() { } } -NativeTypeFunctionSig::~NativeTypeFunctionSig() {} +NativeTypeFunctionSig::~NativeTypeFunctionSig() = default; void NativeTypeFunctionSig::initializeArgList(codeview::TypeIndex ArgListTI) { TpiStream &Tpi = cantFail(Session.getPDBFile().getPDBTpiStream()); diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp index 32dcfc2..ae153d6 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypePointer.cpp @@ -29,7 +29,7 @@ NativeTypePointer::NativeTypePointer(NativeSession &Session, SymIndexId Id, : NativeRawSymbol(Session, PDB_SymType::PointerType, Id), TI(TI), Record(std::move(Record)) {} -NativeTypePointer::~NativeTypePointer() {} +NativeTypePointer::~NativeTypePointer() = default; void NativeTypePointer::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp index 72964a9..39cda52 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp @@ -9,7 +9,7 @@ NativeTypeTypedef::NativeTypeTypedef(NativeSession &Session, SymIndexId Id, : NativeRawSymbol(Session, PDB_SymType::Typedef, Id), Record(std::move(Typedef)) {} -NativeTypeTypedef::~NativeTypeTypedef() {} +NativeTypeTypedef::~NativeTypeTypedef() = default; void NativeTypeTypedef::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp index 917ec14..2ed23f5 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp @@ -32,7 +32,7 @@ NativeTypeUDT::NativeTypeUDT(NativeSession &Session, SymIndexId Id, : NativeRawSymbol(Session, PDB_SymType::UDT, Id), UnmodifiedType(&UnmodifiedType), Modifiers(std::move(Modifier)) {} -NativeTypeUDT::~NativeTypeUDT() {} +NativeTypeUDT::~NativeTypeUDT() = default; void NativeTypeUDT::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp index 837fe19..b022345 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp @@ -10,7 +10,7 @@ NativeTypeVTShape::NativeTypeVTShape(NativeSession &Session, SymIndexId Id, : NativeRawSymbol(Session, PDB_SymType::VTableShape, Id), TI(TI), Record(std::move(SR)) {} -NativeTypeVTShape::~NativeTypeVTShape() {} +NativeTypeVTShape::~NativeTypeVTShape() = default; void NativeTypeVTShape::dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp index f331254..b23ce8c 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp @@ -34,7 +34,7 @@ PDBFileBuilder::PDBFileBuilder(BumpPtrAllocator &Allocator) : Allocator(Allocator), InjectedSourceHashTraits(Strings), InjectedSourceTable(2) {} -PDBFileBuilder::~PDBFileBuilder() {} +PDBFileBuilder::~PDBFileBuilder() = default; Error PDBFileBuilder::initialize(uint32_t BlockSize) { auto ExpectedMsf = MSFBuilder::create(Allocator, BlockSize); diff --git a/llvm/lib/DebugInfo/PDB/Native/SymbolStream.cpp b/llvm/lib/DebugInfo/PDB/Native/SymbolStream.cpp index 003840b..9e6932c 100644 --- a/llvm/lib/DebugInfo/PDB/Native/SymbolStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/SymbolStream.cpp @@ -22,7 +22,7 @@ using namespace llvm::pdb; SymbolStream::SymbolStream(std::unique_ptr<MappedBlockStream> Stream) : Stream(std::move(Stream)) {} -SymbolStream::~SymbolStream() {} +SymbolStream::~SymbolStream() = default; Error SymbolStream::reload() { BinaryStreamReader Reader(*Stream); diff --git a/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp b/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp index 1fb37ce..f05534d 100644 --- a/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp +++ b/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp @@ -70,7 +70,7 @@ LLVM_ATTRIBUTE_USED void requiredSymbolDefinitionsFromOrcTargetProcess() { } struct RegisteredObjectInfo { - RegisteredObjectInfo() {} + RegisteredObjectInfo() = default; RegisteredObjectInfo(std::size_t Size, jit_code_entry *Entry, OwningBinary<ObjectFile> Obj) @@ -96,7 +96,7 @@ class GDBJITRegistrationListener : public JITEventListener { public: /// Instantiates the JIT service. - GDBJITRegistrationListener() {} + GDBJITRegistrationListener() = default; /// Unregisters each object that was previously registered and releases all /// internal resources. diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h index fd7fa21..3dfe736 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -37,7 +37,7 @@ class AllocaHolder { std::vector<void *> Allocations; public: - AllocaHolder() {} + AllocaHolder() = default; // Make this type move-only. AllocaHolder(AllocaHolder &&) = default; diff --git a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp index 2ae1935..21bdb3f 100644 --- a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp @@ -756,7 +756,7 @@ Error EHFrameNullTerminator::operator()(LinkGraph &G) { return Error::success(); } -EHFrameRegistrar::~EHFrameRegistrar() {} +EHFrameRegistrar::~EHFrameRegistrar() = default; Error InProcessEHFrameRegistrar::registerEHFrames( orc::ExecutorAddrRange EHFrameSection) { diff --git a/llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.cpp b/llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.cpp index 2194a4f..5a983c2 100644 --- a/llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.cpp @@ -27,7 +27,7 @@ namespace jitlink { StringRef ELFLinkGraphBuilderBase::CommonSectionName(".common"); ArrayRef<const char *> ELFLinkGraphBuilderBase::DwarfSectionNames = DWSecNames; -ELFLinkGraphBuilderBase::~ELFLinkGraphBuilderBase() {} +ELFLinkGraphBuilderBase::~ELFLinkGraphBuilderBase() = default; } // end namespace jitlink } // end namespace llvm diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp index 78a603c..a705220 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp @@ -336,7 +336,7 @@ raw_ostream &operator<<(raw_ostream &OS, const SymbolLookupFlags &LF) { void JITLinkAsyncLookupContinuation::anchor() {} -JITLinkContext::~JITLinkContext() {} +JITLinkContext::~JITLinkContext() = default; bool JITLinkContext::shouldAddDefaultTargetPasses(const Triple &TT) const { return true; diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp index 35ee050..6d321a0 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp @@ -20,7 +20,7 @@ namespace llvm { namespace jitlink { -JITLinkerBase::~JITLinkerBase() {} +JITLinkerBase::~JITLinkerBase() = default; void JITLinkerBase::linkPhase1(std::unique_ptr<JITLinkerBase> Self) { diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp index 9315ac4..acb759d 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp @@ -211,7 +211,7 @@ SimpleSegmentAlloc::Create(JITLinkMemoryManager &MemMgr, const JITLinkDylib *JD, SimpleSegmentAlloc::SimpleSegmentAlloc(SimpleSegmentAlloc &&) = default; SimpleSegmentAlloc & SimpleSegmentAlloc::operator=(SimpleSegmentAlloc &&) = default; -SimpleSegmentAlloc::~SimpleSegmentAlloc() {} +SimpleSegmentAlloc::~SimpleSegmentAlloc() = default; SimpleSegmentAlloc::SegmentInfo SimpleSegmentAlloc::getSegInfo(AllocGroup AG) { auto I = ContentBlocks.find(AG); diff --git a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp index 6257460..8ab4415 100644 --- a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp @@ -19,7 +19,7 @@ static const char *CommonSectionName = "__common"; namespace llvm { namespace jitlink { -MachOLinkGraphBuilder::~MachOLinkGraphBuilder() {} +MachOLinkGraphBuilder::~MachOLinkGraphBuilder() = default; Expected<std::unique_ptr<LinkGraph>> MachOLinkGraphBuilder::buildGraph() { diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h index a5dd420..f6c4cdb 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h @@ -72,8 +72,7 @@ class MCJIT : public ExecutionEngine { class OwningModuleContainer { public: - OwningModuleContainer() { - } + OwningModuleContainer() = default; ~OwningModuleContainer() { freeModulePtrSet(AddedModules); freeModulePtrSet(LoadedModules); diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp index 1b1ba28..8a0d450 100644 --- a/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -62,7 +62,7 @@ void ResourceTracker::makeDefunct() { JDAndFlag.store(Val); } -ResourceManager::~ResourceManager() {} +ResourceManager::~ResourceManager() = default; ResourceTrackerDefunct::ResourceTrackerDefunct(ResourceTrackerSP RT) : RT(std::move(RT)) {} @@ -491,7 +491,7 @@ public: LookupSet(std::move(LookupSet)), RequiredState(RequiredState) { DefGeneratorCandidates = this->LookupSet; } - virtual ~InProgressLookupState() {} + virtual ~InProgressLookupState() = default; virtual void complete(std::unique_ptr<InProgressLookupState> IPLS) = 0; virtual void fail(Error Err) = 0; @@ -609,7 +609,7 @@ void LookupState::continueLookup(Error Err) { ES.OL_applyQueryPhase1(std::move(IPLS), std::move(Err)); } -DefinitionGenerator::~DefinitionGenerator() {} +DefinitionGenerator::~DefinitionGenerator() = default; JITDylib::~JITDylib() { LLVM_DEBUG(dbgs() << "Destroying JITDylib " << getName() << "\n"); @@ -1750,7 +1750,7 @@ void JITDylib::transferEmittedNodeDependencies( } } -Platform::~Platform() {} +Platform::~Platform() = default; Expected<DenseMap<JITDylib *, SymbolMap>> Platform::lookupInitSymbols( ExecutionSession &ES, diff --git a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp index 4ff6b7f..1e68ea1 100644 --- a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp +++ b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp @@ -42,7 +42,7 @@ class DebugObjectSection { public: virtual void setTargetMemoryRange(SectionRange Range) = 0; virtual void dump(raw_ostream &OS, StringRef Name) {} - virtual ~DebugObjectSection() {} + virtual ~DebugObjectSection() = default; }; template <typename ELFT> diff --git a/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp index 6916ee4..24fa107 100644 --- a/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp +++ b/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp @@ -48,7 +48,7 @@ public: MachODebugObjectSynthesizerBase(LinkGraph &G, ExecutorAddr RegisterActionAddr) : G(G), RegisterActionAddr(RegisterActionAddr) {} - virtual ~MachODebugObjectSynthesizerBase() {} + virtual ~MachODebugObjectSynthesizerBase() = default; Error preserveDebugSections() { if (G.findSectionByName(SynthDebugSectionName)) { diff --git a/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp index b901a2d..37c9b10 100644 --- a/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp @@ -234,7 +234,7 @@ Error EPCIndirectStubsManager::updatePointer(StringRef Name, namespace llvm { namespace orc { -EPCIndirectionUtils::ABISupport::~ABISupport() {} +EPCIndirectionUtils::ABISupport::~ABISupport() = default; Expected<std::unique_ptr<EPCIndirectionUtils>> EPCIndirectionUtils::Create(ExecutorProcessControl &EPC) { diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp index 2eb8355..412b9f9 100644 --- a/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp @@ -19,9 +19,9 @@ namespace llvm { namespace orc { -ExecutorProcessControl::MemoryAccess::~MemoryAccess() {} +ExecutorProcessControl::MemoryAccess::~MemoryAccess() = default; -ExecutorProcessControl::~ExecutorProcessControl() {} +ExecutorProcessControl::~ExecutorProcessControl() = default; SelfExecutorProcessControl::SelfExecutorProcessControl( std::shared_ptr<SymbolStringPool> SSP, std::unique_ptr<TaskDispatcher> D, diff --git a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp index aadc437..69aba1f 100644 --- a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp @@ -11,7 +11,7 @@ namespace llvm { namespace orc { -IRCompileLayer::IRCompiler::~IRCompiler() {} +IRCompileLayer::IRCompiler::~IRCompiler() = default; IRCompileLayer::IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer, std::unique_ptr<IRCompiler> Compile) diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index 7a71d2f..02e121c 100644 --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -59,7 +59,7 @@ private: namespace llvm { namespace orc { -TrampolinePool::~TrampolinePool() {} +TrampolinePool::~TrampolinePool() = default; void IndirectStubsManager::anchor() {} Expected<JITTargetAddress> diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp index 91949c9..8a8b285 100644 --- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp @@ -589,7 +589,7 @@ void LLJIT::PlatformSupport::setInitTransform( J.InitHelperTransformLayer->setTransform(std::move(T)); } -LLJIT::PlatformSupport::~PlatformSupport() {} +LLJIT::PlatformSupport::~PlatformSupport() = default; Error LLJITBuilderState::prepareForConstruction() { diff --git a/llvm/lib/ExecutionEngine/Orc/Layer.cpp b/llvm/lib/ExecutionEngine/Orc/Layer.cpp index adb8861..4a50f2d 100644 --- a/llvm/lib/ExecutionEngine/Orc/Layer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Layer.cpp @@ -19,7 +19,7 @@ namespace llvm { namespace orc { -IRLayer::~IRLayer() {} +IRLayer::~IRLayer() = default; Error IRLayer::add(ResourceTrackerSP RT, ThreadSafeModule TSM) { assert(RT && "RT can not be null"); @@ -158,7 +158,7 @@ char ObjectLayer::ID; ObjectLayer::ObjectLayer(ExecutionSession &ES) : ES(ES) {} -ObjectLayer::~ObjectLayer() {} +ObjectLayer::~ObjectLayer() = default; Error ObjectLayer::add(ResourceTrackerSP RT, std::unique_ptr<MemoryBuffer> O, MaterializationUnit::Interface I) { diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp index 32c5998..481f5f6 100644 --- a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp @@ -607,7 +607,7 @@ private: DenseMap<SymbolStringPtr, SymbolNameSet> InternalNamedSymbolDeps; }; -ObjectLinkingLayer::Plugin::~Plugin() {} +ObjectLinkingLayer::Plugin::~Plugin() = default; char ObjectLinkingLayer::ID; diff --git a/llvm/lib/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.cpp b/llvm/lib/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.cpp index 64fc717..2bb204e 100644 --- a/llvm/lib/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.cpp @@ -43,8 +43,8 @@ const char *DispatchFnName = "__llvm_orc_SimpleRemoteEPC_dispatch_fn"; } // end namespace SimpleRemoteEPCDefaultBootstrapSymbolNames -SimpleRemoteEPCTransportClient::~SimpleRemoteEPCTransportClient() {} -SimpleRemoteEPCTransport::~SimpleRemoteEPCTransport() {} +SimpleRemoteEPCTransportClient::~SimpleRemoteEPCTransportClient() = default; +SimpleRemoteEPCTransport::~SimpleRemoteEPCTransport() = default; Expected<std::unique_ptr<FDSimpleRemoteEPCTransport>> FDSimpleRemoteEPCTransport::Create(SimpleRemoteEPCTransportClient &C, int InFD, diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp index b6b21bd..8ab0af3 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp @@ -22,9 +22,9 @@ using namespace llvm::orc::shared; namespace llvm { namespace orc { -ExecutorBootstrapService::~ExecutorBootstrapService() {} +ExecutorBootstrapService::~ExecutorBootstrapService() = default; -SimpleRemoteEPCServer::Dispatcher::~Dispatcher() {} +SimpleRemoteEPCServer::Dispatcher::~Dispatcher() = default; #if LLVM_ENABLE_THREADS void SimpleRemoteEPCServer::ThreadDispatcher::dispatch( diff --git a/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp b/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp index 111c84e..11a9998 100644 --- a/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TaskDispatch.cpp @@ -16,7 +16,7 @@ char GenericNamedTask::ID = 0; const char *GenericNamedTask::DefaultDescription = "Generic Task"; void Task::anchor() {} -TaskDispatcher::~TaskDispatcher() {} +TaskDispatcher::~TaskDispatcher() = default; void InPlaceTaskDispatcher::dispatch(std::unique_ptr<Task> T) { T->run(); } diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp index 9c8d402..820d1db 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp @@ -29,7 +29,7 @@ namespace llvm { -RTDyldMemoryManager::~RTDyldMemoryManager() {} +RTDyldMemoryManager::~RTDyldMemoryManager() = default; #if defined(HAVE_REGISTER_FRAME) && defined(HAVE_DEREGISTER_FRAME) && \ !defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 3f38d26..2e0cba8 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -66,7 +66,7 @@ std::error_code RuntimeDyldError::convertToErrorCode() const { } // 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() {} @@ -1311,7 +1311,7 @@ RuntimeDyld::RuntimeDyld(RuntimeDyld::MemoryManager &MemMgr, ProcessAllSections = false; } -RuntimeDyld::~RuntimeDyld() {} +RuntimeDyld::~RuntimeDyld() = default; static std::unique_ptr<RuntimeDyldCOFF> createRuntimeDyldCOFF( diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index 33db234..aff44ce 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -892,7 +892,7 @@ RuntimeDyldChecker::RuntimeDyldChecker( std::move(GetGOTInfo), Endianness, Disassembler, InstPrinter, ErrStream)) {} -RuntimeDyldChecker::~RuntimeDyldChecker() {} +RuntimeDyldChecker::~RuntimeDyldChecker() = default; bool RuntimeDyldChecker::check(StringRef CheckExpr) const { return Impl->check(CheckExpr); diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index f92618a..fd75e3c 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -216,7 +216,7 @@ namespace llvm { RuntimeDyldELF::RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &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) { diff --git a/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp b/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp index 56b232b..b23e330 100644 --- a/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp @@ -238,7 +238,7 @@ SectionMemoryManager::~SectionMemoryManager() { } } -SectionMemoryManager::MemoryMapper::~MemoryMapper() {} +SectionMemoryManager::MemoryMapper::~MemoryMapper() = default; void SectionMemoryManager::anchor() {} diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 179754e..4306330 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -641,7 +641,7 @@ void TypePrinting::printStructBody(StructType *STy, raw_ostream &OS) { OS << '>'; } -AbstractSlotTrackerStorage::~AbstractSlotTrackerStorage() {} +AbstractSlotTrackerStorage::~AbstractSlotTrackerStorage() = default; namespace llvm { @@ -1290,7 +1290,7 @@ struct AsmWriterContext { /// prints a Metadata as operand. virtual void onWriteMetadataAsOperand(const Metadata *) {} - virtual ~AsmWriterContext() {} + virtual ~AsmWriterContext() = default; }; } // end anonymous namespace diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp index 9902f6f..c82a79c 100644 --- a/llvm/lib/IR/AutoUpgrade.cpp +++ b/llvm/lib/IR/AutoUpgrade.cpp @@ -4470,7 +4470,7 @@ namespace { // folding and other libcall simplification. The nobuiltin attribute on the // callsite has the same effect. struct StrictFPUpgradeVisitor : public InstVisitor<StrictFPUpgradeVisitor> { - StrictFPUpgradeVisitor() {} + StrictFPUpgradeVisitor() = default; void visitCallBase(CallBase &Call) { if (!Call.isStrictFP()) diff --git a/llvm/lib/IR/BuiltinGCs.cpp b/llvm/lib/IR/BuiltinGCs.cpp index 31ee863..e9ef034 100644 --- a/llvm/lib/IR/BuiltinGCs.cpp +++ b/llvm/lib/IR/BuiltinGCs.cpp @@ -53,7 +53,7 @@ public: /// while introducing only minor runtime overhead. class ShadowStackGC : public GCStrategy { public: - ShadowStackGC() {} + ShadowStackGC() = default; }; /// A GCStrategy which serves as an example for the usage of a statepoint based diff --git a/llvm/lib/IR/GVMaterializer.cpp b/llvm/lib/IR/GVMaterializer.cpp index 3539730..dc3b0e0 100644 --- a/llvm/lib/IR/GVMaterializer.cpp +++ b/llvm/lib/IR/GVMaterializer.cpp @@ -14,4 +14,4 @@ #include "llvm/IR/GVMaterializer.h" using namespace llvm; -GVMaterializer::~GVMaterializer() {} +GVMaterializer::~GVMaterializer() = default; diff --git a/llvm/lib/IR/IRBuilder.cpp b/llvm/lib/IR/IRBuilder.cpp index 213f252..43e3492 100644 --- a/llvm/lib/IR/IRBuilder.cpp +++ b/llvm/lib/IR/IRBuilder.cpp @@ -1269,8 +1269,8 @@ CallInst *IRBuilderBase::CreateAlignmentAssumption(const DataLayout &DL, return CreateAlignmentAssumptionHelper(DL, PtrValue, Alignment, OffsetValue); } -IRBuilderDefaultInserter::~IRBuilderDefaultInserter() {} -IRBuilderCallbackInserter::~IRBuilderCallbackInserter() {} -IRBuilderFolder::~IRBuilderFolder() {} +IRBuilderDefaultInserter::~IRBuilderDefaultInserter() = default; +IRBuilderCallbackInserter::~IRBuilderCallbackInserter() = default; +IRBuilderFolder::~IRBuilderFolder() = default; void ConstantFolder::anchor() {} void NoFolder::anchor() {} diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index 08cf909..fef700c 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -1767,4 +1767,4 @@ void FunctionPass::assignPassManager(PMStack &PMS, PM->add(this); } -legacy::PassManagerBase::~PassManagerBase() {} +legacy::PassManagerBase::~PassManagerBase() = default; diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index d710c81..647b8b9 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -1169,7 +1169,7 @@ public: : Conf(Conf), CombinedIndex(CombinedIndex), ModuleToDefinedGVSummaries(ModuleToDefinedGVSummaries) {} - virtual ~ThinBackendProc() {} + virtual ~ThinBackendProc() = default; virtual Error start( unsigned Task, BitcodeModule BM, const FunctionImporter::ImportMapTy &ImportList, diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index fdc9896..59786dc 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -132,7 +132,7 @@ LTOCodeGenerator::LTOCodeGenerator(LLVMContext &Context) }; } -LTOCodeGenerator::~LTOCodeGenerator() {} +LTOCodeGenerator::~LTOCodeGenerator() = default; void LTOCodeGenerator::setAsmUndefinedRefs(LTOModule *Mod) { for (const StringRef &Undef : Mod->getAsmUndefinedRefs()) diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp index 4cc1b30..5ad5e85 100644 --- a/llvm/lib/LTO/LTOModule.cpp +++ b/llvm/lib/LTO/LTOModule.cpp @@ -50,7 +50,7 @@ LTOModule::LTOModule(std::unique_ptr<Module> M, MemoryBufferRef MBRef, SymTab.addModule(Mod.get()); } -LTOModule::~LTOModule() {} +LTOModule::~LTOModule() = default; /// isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM /// bitcode. diff --git a/llvm/lib/LineEditor/LineEditor.cpp b/llvm/lib/LineEditor/LineEditor.cpp index 37c4b79..09ec65a 100644 --- a/llvm/lib/LineEditor/LineEditor.cpp +++ b/llvm/lib/LineEditor/LineEditor.cpp @@ -29,8 +29,8 @@ std::string LineEditor::getDefaultHistoryPath(StringRef ProgName) { 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<Completion> &Comps) { diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 3da1a9c..90a9dfa 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -25,7 +25,7 @@ using namespace llvm; using namespace llvm::codeview; -CodeViewContext::CodeViewContext() {} +CodeViewContext::CodeViewContext() = default; CodeViewContext::~CodeViewContext() { // If someone inserted strings into the string table but never actually diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index b7890e7..2164e4a 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -993,7 +993,7 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) { /* MultiSymbolsAllowed */ true, ".dwmac", XCOFF::SSUBTYP_DWMAC); } -MCObjectFileInfo::~MCObjectFileInfo() {} +MCObjectFileInfo::~MCObjectFileInfo() = default; void MCObjectFileInfo::initMCObjectFileInfo(MCContext &MCCtx, bool PIC, bool LargeCodeModel) { diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index ebbbd6a..d462e61 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -37,7 +37,7 @@ MCObjectStreamer::MCObjectStreamer(MCContext &Context, setAllowAutoPadding(Assembler->getBackend().allowAutoPadding()); } -MCObjectStreamer::~MCObjectStreamer() {} +MCObjectStreamer::~MCObjectStreamer() = default; // AssemblerPtr is used for evaluation of expressions and causes // difference between asm and object outputs. Return nullptr to in diff --git a/llvm/lib/MC/MCParser/GOFFAsmParser.cpp b/llvm/lib/MC/MCParser/GOFFAsmParser.cpp index c2a7eae..d64937f 100644 --- a/llvm/lib/MC/MCParser/GOFFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/GOFFAsmParser.cpp @@ -31,7 +31,7 @@ class GOFFAsmParser : public MCAsmParserExtension { } public: - GOFFAsmParser() {} + GOFFAsmParser() = default; void Initialize(MCAsmParser &Parser) override { // Call the base implementation. diff --git a/llvm/lib/MC/MCParser/MCAsmParser.cpp b/llvm/lib/MC/MCParser/MCAsmParser.cpp index d797c2d..7fc1dbf5 100644 --- a/llvm/lib/MC/MCParser/MCAsmParser.cpp +++ b/llvm/lib/MC/MCParser/MCAsmParser.cpp @@ -25,7 +25,7 @@ cl::opt<unsigned> AsmMacroMaxNestingDepth( "asm-macro-max-nesting-depth", cl::init(20), cl::Hidden, cl::desc("The maximum nesting depth allowed for assembly macros.")); -MCAsmParser::MCAsmParser() {} +MCAsmParser::MCAsmParser() = default; MCAsmParser::~MCAsmParser() = default; diff --git a/llvm/lib/MC/MCParser/XCOFFAsmParser.cpp b/llvm/lib/MC/MCParser/XCOFFAsmParser.cpp index 7494fe07..ced6399 100644 --- a/llvm/lib/MC/MCParser/XCOFFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/XCOFFAsmParser.cpp @@ -35,7 +35,7 @@ class XCOFFAsmParser : public MCAsmParserExtension { } public: - XCOFFAsmParser() {} + XCOFFAsmParser() = default; void Initialize(MCAsmParser &P) override { Parser = &P; diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 8608d7a..45a811b 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -96,7 +96,7 @@ MCStreamer::MCStreamer(MCContext &Ctx) SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>()); } -MCStreamer::~MCStreamer() {} +MCStreamer::~MCStreamer() = default; void MCStreamer::reset() { DwarfFrameInfos.clear(); diff --git a/llvm/lib/MC/MCWinEH.cpp b/llvm/lib/MC/MCWinEH.cpp index e58a0b2..14ee30f 100644 --- a/llvm/lib/MC/MCWinEH.cpp +++ b/llvm/lib/MC/MCWinEH.cpp @@ -18,7 +18,7 @@ namespace llvm { namespace WinEH { -UnwindEmitter::~UnwindEmitter() {} +UnwindEmitter::~UnwindEmitter() = default; } } diff --git a/llvm/lib/MC/XCOFFObjectWriter.cpp b/llvm/lib/MC/XCOFFObjectWriter.cpp index 177253d..90cdbd9 100644 --- a/llvm/lib/MC/XCOFFObjectWriter.cpp +++ b/llvm/lib/MC/XCOFFObjectWriter.cpp @@ -136,7 +136,7 @@ struct SectionEntry { Index = UninitializedIndex; } - virtual ~SectionEntry() {} + virtual ~SectionEntry() = default; }; // Represents the data related to a section excluding the csects that make up @@ -165,7 +165,7 @@ struct CsectSectionEntry : public SectionEntry { Group->clear(); } - virtual ~CsectSectionEntry() {} + virtual ~CsectSectionEntry() = default; }; struct DwarfSectionEntry : public SectionEntry { @@ -183,7 +183,7 @@ struct DwarfSectionEntry : public SectionEntry { DwarfSectionEntry(DwarfSectionEntry &&s) = default; - virtual ~DwarfSectionEntry() {} + virtual ~DwarfSectionEntry() = default; }; class XCOFFObjectWriter : public MCObjectWriter { diff --git a/llvm/lib/MCA/CustomBehaviour.cpp b/llvm/lib/MCA/CustomBehaviour.cpp index a9ea8ed..a10a2f5 100644 --- a/llvm/lib/MCA/CustomBehaviour.cpp +++ b/llvm/lib/MCA/CustomBehaviour.cpp @@ -16,7 +16,7 @@ namespace llvm { namespace mca { -CustomBehaviour::~CustomBehaviour() {} +CustomBehaviour::~CustomBehaviour() = default; unsigned CustomBehaviour::checkCustomHazard(ArrayRef<InstRef> IssuedInst, const InstRef &IR) { diff --git a/llvm/lib/MCA/HardwareUnits/LSUnit.cpp b/llvm/lib/MCA/HardwareUnits/LSUnit.cpp index 121d320..bafed9b 100644 --- a/llvm/lib/MCA/HardwareUnits/LSUnit.cpp +++ b/llvm/lib/MCA/HardwareUnits/LSUnit.cpp @@ -39,7 +39,7 @@ LSUnitBase::LSUnitBase(const MCSchedModel &SM, unsigned LQ, unsigned SQ, } } -LSUnitBase::~LSUnitBase() {} +LSUnitBase::~LSUnitBase() = default; void LSUnitBase::cycleEvent() { for (const std::pair<unsigned, std::unique_ptr<MemoryGroup>> &G : Groups) diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp index c653262..1aa7fee 100644 --- a/llvm/lib/Object/IRObjectFile.cpp +++ b/llvm/lib/Object/IRObjectFile.cpp @@ -32,7 +32,7 @@ IRObjectFile::IRObjectFile(MemoryBufferRef Object, SymTab.addModule(M.get()); } -IRObjectFile::~IRObjectFile() {} +IRObjectFile::~IRObjectFile() = default; static ModuleSymbolTable::Symbol getSym(DataRefImpl &Symb) { return *reinterpret_cast<ModuleSymbolTable::Symbol *>(Symb.p); diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp index c42b1cb..5861c59 100644 --- a/llvm/lib/Passes/StandardInstrumentations.cpp +++ b/llvm/lib/Passes/StandardInstrumentations.cpp @@ -587,7 +587,7 @@ void TextChangeReporter<T>::handleIgnored(StringRef PassID, std::string &Name) { Out << formatv("*** IR Pass {0} on {1} ignored ***\n", PassID, Name); } -IRChangedPrinter::~IRChangedPrinter() {} +IRChangedPrinter::~IRChangedPrinter() = default; void IRChangedPrinter::registerCallbacks(PassInstrumentationCallbacks &PIC) { if (PrintChanged == ChangePrinter::PrintChangedVerbose || @@ -1207,7 +1207,7 @@ void VerifyInstrumentation::registerCallbacks( }); } -InLineChangePrinter::~InLineChangePrinter() {} +InLineChangePrinter::~InLineChangePrinter() = default; void InLineChangePrinter::generateIRRepresentation(Any IR, StringRef PassID, IRDataT<EmptyData> &D) { diff --git a/llvm/lib/Support/CodeGenCoverage.cpp b/llvm/lib/Support/CodeGenCoverage.cpp index 73e0fb3..d5ab77b 100644 --- a/llvm/lib/Support/CodeGenCoverage.cpp +++ b/llvm/lib/Support/CodeGenCoverage.cpp @@ -23,7 +23,7 @@ using namespace llvm; static sys::SmartMutex<true> OutputMutex; -CodeGenCoverage::CodeGenCoverage() {} +CodeGenCoverage::CodeGenCoverage() = default; void CodeGenCoverage::setCovered(uint64_t RuleID) { if (RuleCoverage.size() <= RuleID) diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 71a6ebf..fd9022c 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -2236,7 +2236,7 @@ protected: public: explicit HelpPrinter(bool showHidden) : ShowHidden(showHidden) {} - virtual ~HelpPrinter() {} + virtual ~HelpPrinter() = default; // Invoke the printer. void operator=(bool Value) { diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp index 2ee3074..af1f4bb 100644 --- a/llvm/lib/Support/CrashRecoveryContext.cpp +++ b/llvm/lib/Support/CrashRecoveryContext.cpp @@ -97,7 +97,7 @@ static ManagedStatic<sys::ThreadLocal<const CrashRecoveryContext>> static void installExceptionOrSignalHandlers(); static void uninstallExceptionOrSignalHandlers(); -CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup() {} +CrashRecoveryContextCleanup::~CrashRecoveryContextCleanup() = default; CrashRecoveryContext::CrashRecoveryContext() { // On Windows, if abort() was previously triggered (and caught by a previous diff --git a/llvm/lib/Support/DeltaAlgorithm.cpp b/llvm/lib/Support/DeltaAlgorithm.cpp index a2017a1..341de24 100644 --- a/llvm/lib/Support/DeltaAlgorithm.cpp +++ b/llvm/lib/Support/DeltaAlgorithm.cpp @@ -11,8 +11,7 @@ #include <set> using namespace llvm; -DeltaAlgorithm::~DeltaAlgorithm() { -} +DeltaAlgorithm::~DeltaAlgorithm() = default; bool DeltaAlgorithm::GetTestResult(const changeset_ty &Changes) { if (FailedTestsCache.count(Changes)) diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp index 7816779..5003822 100644 --- a/llvm/lib/Support/MemoryBuffer.cpp +++ b/llvm/lib/Support/MemoryBuffer.cpp @@ -38,7 +38,7 @@ using namespace llvm; // 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. @@ -533,4 +533,4 @@ MemoryBufferRef MemoryBuffer::getMemBufferRef() const { return MemoryBufferRef(Data, Identifier); } -SmallVectorMemoryBuffer::~SmallVectorMemoryBuffer() {} +SmallVectorMemoryBuffer::~SmallVectorMemoryBuffer() = default; diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp index 137b37f..0fb65ac 100644 --- a/llvm/lib/Support/SpecialCaseList.cpp +++ b/llvm/lib/Support/SpecialCaseList.cpp @@ -198,7 +198,7 @@ bool SpecialCaseList::parse(const MemoryBuffer *MB, return true; } -SpecialCaseList::~SpecialCaseList() {} +SpecialCaseList::~SpecialCaseList() = default; bool SpecialCaseList::inSection(StringRef Section, StringRef Prefix, StringRef Query, StringRef Category) const { diff --git a/llvm/lib/Support/Unix/COM.inc b/llvm/lib/Support/Unix/COM.inc index 03a690a..d97b59a 100644 --- a/llvm/lib/Support/Unix/COM.inc +++ b/llvm/lib/Support/Unix/COM.inc @@ -21,6 +21,6 @@ namespace sys { InitializeCOMRAII::InitializeCOMRAII(COMThreadingMode Threading, bool SpeedOverMemory) {} -InitializeCOMRAII::~InitializeCOMRAII() {} +InitializeCOMRAII::~InitializeCOMRAII() = default; } } diff --git a/llvm/lib/TableGen/TGParser.h b/llvm/lib/TableGen/TGParser.h index 00883c85..d4b928c 100644 --- a/llvm/lib/TableGen/TGParser.h +++ b/llvm/lib/TableGen/TGParser.h @@ -45,7 +45,7 @@ namespace llvm { void dump() const; - RecordsEntry() {} + RecordsEntry() = default; RecordsEntry(std::unique_ptr<Record> Rec) : Rec(std::move(Rec)) {} RecordsEntry(std::unique_ptr<ForeachLoop> Loop) : Loop(std::move(Loop)) {} diff --git a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp index 3ff67d1..d7959a8 100644 --- a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp +++ b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp @@ -58,7 +58,7 @@ struct ShuffleVectorPseudo { ShuffleVectorPseudo(unsigned Opc, Register Dst, std::initializer_list<SrcOp> SrcOps) : Opc(Opc), Dst(Dst), SrcOps(SrcOps){}; - ShuffleVectorPseudo() {} + ShuffleVectorPseudo() = default; }; /// Check if a vector shuffle corresponds to a REV instruction with the diff --git a/llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp index bed0707f..8236ff6 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp @@ -22,7 +22,7 @@ namespace { class ExportClustering : public ScheduleDAGMutation { public: - ExportClustering() {} + ExportClustering() = default; void apply(ScheduleDAGInstrs *DAG) override; }; diff --git a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h index bcf7fc4..9b22d1f 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h @@ -42,7 +42,7 @@ namespace HSAMD { class MetadataStreamer { public: - virtual ~MetadataStreamer(){}; + virtual ~MetadataStreamer() = default; virtual bool emitTo(AMDGPUTargetStreamer &TargetStreamer) = 0; diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibFunc.h b/llvm/lib/Target/AMDGPU/AMDGPULibFunc.h index dc0ac72..bf0fda2 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULibFunc.h +++ b/llvm/lib/Target/AMDGPU/AMDGPULibFunc.h @@ -324,8 +324,8 @@ public: class AMDGPULibFuncImpl : public AMDGPULibFuncBase { public: - AMDGPULibFuncImpl() {} - virtual ~AMDGPULibFuncImpl() {} + AMDGPULibFuncImpl() = default; + virtual ~AMDGPULibFuncImpl() = default; /// Get unmangled name for mangled library function and name for unmangled /// library function. diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.h b/llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.h index 47faa6c..753f7ed 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.h @@ -25,7 +25,7 @@ struct PerFunctionMIParsingState; class AMDGPUMIRFormatter final : public MIRFormatter { public: - AMDGPUMIRFormatter() {} + AMDGPUMIRFormatter() = default; virtual ~AMDGPUMIRFormatter() = default; /// Implement target specific parsing of target custom pseudo source value. diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h index 7f1b94b..c5d31ed 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -267,7 +267,7 @@ public: /// \p WavefrontSize. AMDGPUDwarfFlavour getAMDGPUDwarfFlavour() const; - virtual ~AMDGPUSubtarget() {} + virtual ~AMDGPUSubtarget() = default; }; } // end namespace llvm diff --git a/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.h b/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.h index 56650515..7a0d454 100644 --- a/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.h +++ b/llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.h @@ -31,7 +31,7 @@ public: AMDGPUInstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII) : InstrPostProcess(STI, MCII) {} - ~AMDGPUInstrPostProcess() {} + ~AMDGPUInstrPostProcess() = default; void postProcessInstruction(std::unique_ptr<Instruction> &Inst, const MCInst &MCI) override; @@ -86,7 +86,7 @@ public: AMDGPUCustomBehaviour(const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, const MCInstrInfo &MCII); - ~AMDGPUCustomBehaviour() {} + ~AMDGPUCustomBehaviour() = default; /// This method is used to determine if an instruction /// should be allowed to be dispatched. The return value is /// how many cycles until the instruction can be dispatched. diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h index 4516b51..be19b60 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h @@ -496,7 +496,7 @@ struct Waitcnt { unsigned LgkmCnt = ~0u; unsigned VsCnt = ~0u; - Waitcnt() {} + Waitcnt() = default; Waitcnt(unsigned VmCnt, unsigned ExpCnt, unsigned LgkmCnt, unsigned VsCnt) : VmCnt(VmCnt), ExpCnt(ExpCnt), LgkmCnt(LgkmCnt), VsCnt(VsCnt) {} diff --git a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp index ff4647d..d1d30e6 100644 --- a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp @@ -15,4 +15,4 @@ using namespace llvm; void ARMRegisterInfo::anchor() { } -ARMRegisterInfo::ARMRegisterInfo() {} +ARMRegisterInfo::ARMRegisterInfo() = default; diff --git a/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp b/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp index 5d2bc4e..d5c0f3f 100644 --- a/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp @@ -37,7 +37,7 @@ extern cl::opt<bool> ReuseFrameIndexVals; using namespace llvm; -ThumbRegisterInfo::ThumbRegisterInfo() {} +ThumbRegisterInfo::ThumbRegisterInfo() = default; const TargetRegisterClass * ThumbRegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC, diff --git a/llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp b/llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp index 9dcd370..4ea2b7e 100644 --- a/llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp +++ b/llvm/lib/Target/AVR/Disassembler/AVRDisassembler.cpp @@ -36,7 +36,7 @@ class AVRDisassembler : public MCDisassembler { public: AVRDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - virtual ~AVRDisassembler() {} + virtual ~AVRDisassembler() = default; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp index b90e103..850ddf0 100644 --- a/llvm/lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp +++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp @@ -25,7 +25,7 @@ class AVRELFObjectWriter : public MCELFObjectTargetWriter { public: AVRELFObjectWriter(uint8_t OSABI); - virtual ~AVRELFObjectWriter() {} + virtual ~AVRELFObjectWriter() = default; unsigned getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override; diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h b/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h index 6858976..5bf6c1a 100644 --- a/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h +++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h @@ -84,7 +84,7 @@ private: private: explicit AVRMCExpr(VariantKind Kind, const MCExpr *Expr, bool Negated) : Kind(Kind), SubExpr(Expr), Negated(Negated) {} - ~AVRMCExpr() {} + ~AVRMCExpr() = default; }; } // end namespace llvm diff --git a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp index 0bb1658..dda42e3 100644 --- a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp +++ b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp @@ -92,11 +92,8 @@ namespace { struct RegisterSet : private BitVector { RegisterSet() = default; explicit RegisterSet(unsigned s, bool t = false) : BitVector(s, t) {} - RegisterSet(const RegisterSet &RS) : BitVector(RS) {} - RegisterSet &operator=(const RegisterSet &RS) { - BitVector::operator=(RS); - return *this; - } + RegisterSet(const RegisterSet &RS) = default; + RegisterSet &operator=(const RegisterSet &RS) = default; using BitVector::clear; diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp index c6703bb..3053757 100644 --- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp +++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp @@ -297,8 +297,7 @@ HexagonTargetMachine::getTargetTransformInfo(const Function &F) { return TargetTransformInfo(HexagonTTIImpl(this, F)); } - -HexagonTargetMachine::~HexagonTargetMachine() {} +HexagonTargetMachine::~HexagonTargetMachine() = default; namespace { /// Hexagon Code Generator Pass Configuration Options. diff --git a/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.h b/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.h index f1e0c58..f826b2e 100644 --- a/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.h +++ b/llvm/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.h @@ -127,7 +127,7 @@ class Loop; /// Hexagon Vector Loop Carried Reuse Pass struct HexagonVectorLoopCarriedReusePass : public PassInfoMixin<HexagonVectorLoopCarriedReusePass> { - HexagonVectorLoopCarriedReusePass() {} + HexagonVectorLoopCarriedReusePass() = default; /// Run pass over the Loop. PreservedAnalyses run(Loop &L, LoopAnalysisManager &LAM, diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp index 9539167..23af7d1 100644 --- a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp +++ b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp @@ -35,7 +35,7 @@ class MSP430AsmBackend : public MCAsmBackend { public: MSP430AsmBackend(const MCSubtargetInfo &STI, uint8_t OSABI) : MCAsmBackend(support::little), OSABI(OSABI) {} - ~MSP430AsmBackend() override {} + ~MSP430AsmBackend() override = default; void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &Target, MutableArrayRef<char> Data, diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp index bb5351a..aa097cc 100644 --- a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp +++ b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp @@ -24,7 +24,7 @@ public: : MCELFObjectTargetWriter(false, OSABI, ELF::EM_MSP430, /*HasRelocationAddend*/ true) {} - ~MSP430ELFObjectWriter() override {} + ~MSP430ELFObjectWriter() override = default; protected: unsigned getRelocType(MCContext &Ctx, const MCValue &Target, diff --git a/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp b/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp index a33146c..3192713 100644 --- a/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp +++ b/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp @@ -51,7 +51,7 @@ MSP430TargetMachine::MSP430TargetMachine(const Target &T, const Triple &TT, initAsmInfo(); } -MSP430TargetMachine::~MSP430TargetMachine() {} +MSP430TargetMachine::~MSP430TargetMachine() = default; namespace { /// MSP430 Code Generator Pass Configuration Options. diff --git a/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp b/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp index 563118d..b7b1d74 100644 --- a/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp +++ b/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp @@ -37,7 +37,7 @@ using namespace llvm; #define DEBUG_TYPE "mips16-registerinfo" -Mips16RegisterInfo::Mips16RegisterInfo() {} +Mips16RegisterInfo::Mips16RegisterInfo() = default; bool Mips16RegisterInfo::requiresRegisterScavenging (const MachineFunction &MF) const { diff --git a/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp b/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp index d648179..c86666c 100644 --- a/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp +++ b/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp @@ -38,7 +38,7 @@ using namespace llvm; #define DEBUG_TYPE "mips-reg-info" -MipsSERegisterInfo::MipsSERegisterInfo() {} +MipsSERegisterInfo::MipsSERegisterInfo() = default; bool MipsSERegisterInfo:: requiresRegisterScavenging(const MachineFunction &MF) const { diff --git a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp index 7b52489..66d6702 100644 --- a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp @@ -5131,7 +5131,7 @@ void NVPTXTargetLowering::ReplaceNodeResults( } // Pin NVPTXTargetObjectFile's vtables to this file. -NVPTXTargetObjectFile::~NVPTXTargetObjectFile() {} +NVPTXTargetObjectFile::~NVPTXTargetObjectFile() = default; MCSection *NVPTXTargetObjectFile::SelectSectionForGlobal( const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { diff --git a/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h b/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h index 4645671..37b0a44 100644 --- a/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h +++ b/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h @@ -17,7 +17,7 @@ namespace llvm { class NVPTXTargetObjectFile : public TargetLoweringObjectFile { public: - NVPTXTargetObjectFile() {} + NVPTXTargetObjectFile() = default; ~NVPTXTargetObjectFile() override; diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h index f04d291..241edd3 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h @@ -38,7 +38,7 @@ public: STI.getTargetTriple(), STI.getFeatureBits(), Options.getABIName()); RISCVFeatures::validate(STI.getTargetTriple(), STI.getFeatureBits()); } - ~RISCVAsmBackend() override {} + ~RISCVAsmBackend() override = default; void setForceRelocs() { ForceRelocs = true; } diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp index fb1ce19..0c362c5 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp @@ -43,7 +43,7 @@ RISCVELFObjectWriter::RISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit) : MCELFObjectTargetWriter(Is64Bit, OSABI, ELF::EM_RISCV, /*HasRelocationAddend*/ true) {} -RISCVELFObjectWriter::~RISCVELFObjectWriter() {} +RISCVELFObjectWriter::~RISCVELFObjectWriter() = default; unsigned RISCVELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target, diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp index 1078403..5fd11eb 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp @@ -46,7 +46,7 @@ public: RISCVMCCodeEmitter(MCContext &ctx, MCInstrInfo const &MCII) : Ctx(ctx), MCII(MCII) {} - ~RISCVMCCodeEmitter() override {} + ~RISCVMCCodeEmitter() override = default; void encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl<MCFixup> &Fixups, diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp index 649eb57..8fb7819 100644 --- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp +++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp @@ -400,7 +400,7 @@ struct BlockData { // Keeps track of whether the block is already in the queue. bool InQueue = false; - BlockData() {} + BlockData() = default; }; class RISCVInsertVSETVLI : public MachineFunctionPass { diff --git a/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp b/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp index 142124a..5443a60 100644 --- a/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp +++ b/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp @@ -32,7 +32,7 @@ class SparcDisassembler : public MCDisassembler { public: SparcDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - virtual ~SparcDisassembler() {} + virtual ~SparcDisassembler() = default; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, diff --git a/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp b/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp index 02261dc..dc01cba 100644 --- a/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp +++ b/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp @@ -26,7 +26,7 @@ namespace { Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC, /*HasRelocationAddend*/ true) {} - ~SparcELFObjectWriter() override {} + ~SparcELFObjectWriter() override = default; protected: unsigned getRelocType(MCContext &Ctx, const MCValue &Target, diff --git a/llvm/lib/Target/Sparc/SparcTargetMachine.cpp b/llvm/lib/Target/Sparc/SparcTargetMachine.cpp index 27c49a4..3212d61 100644 --- a/llvm/lib/Target/Sparc/SparcTargetMachine.cpp +++ b/llvm/lib/Target/Sparc/SparcTargetMachine.cpp @@ -102,7 +102,7 @@ SparcTargetMachine::SparcTargetMachine( initAsmInfo(); } -SparcTargetMachine::~SparcTargetMachine() {} +SparcTargetMachine::~SparcTargetMachine() = default; const SparcSubtarget * SparcTargetMachine::getSubtargetImpl(const Function &F) const { diff --git a/llvm/lib/Target/Sparc/SparcTargetObjectFile.h b/llvm/lib/Target/Sparc/SparcTargetObjectFile.h index f30ddc7..28ab139 100644 --- a/llvm/lib/Target/Sparc/SparcTargetObjectFile.h +++ b/llvm/lib/Target/Sparc/SparcTargetObjectFile.h @@ -18,7 +18,7 @@ class TargetMachine; class SparcELFTargetObjectFile : public TargetLoweringObjectFileELF { public: - SparcELFTargetObjectFile() {} + SparcELFTargetObjectFile() = default; void Initialize(MCContext &Ctx, const TargetMachine &TM) override; diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h index 8ce0107..b08c8e6 100644 --- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h +++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h @@ -74,7 +74,7 @@ public: /// Destroys the object. Bogus destructor allowing derived classes /// to override it. - virtual ~SystemZCallingConventionRegisters(){}; + virtual ~SystemZCallingConventionRegisters() = default; }; /// XPLINK64 calling convention specific use registers @@ -102,7 +102,8 @@ public: int getStackPointerBias() override final { return 2048; } /// Destroys the object. Bogus destructor overriding base class destructor - ~SystemZXPLINK64Registers(){}; + ~SystemZXPLINK64Registers() = default; + ; }; /// ELF calling convention specific use registers @@ -128,7 +129,7 @@ public: int getStackPointerBias() override final { return 0; } /// Destroys the object. Bogus destructor overriding base class destructor - ~SystemZELFRegisters(){}; + ~SystemZELFRegisters() = default; }; struct SystemZRegisterInfo : public SystemZGenRegisterInfo { diff --git a/llvm/lib/Target/TargetIntrinsicInfo.cpp b/llvm/lib/Target/TargetIntrinsicInfo.cpp index 256514c..f63517e 100644 --- a/llvm/lib/Target/TargetIntrinsicInfo.cpp +++ b/llvm/lib/Target/TargetIntrinsicInfo.cpp @@ -15,11 +15,9 @@ #include "llvm/IR/Function.h" using namespace llvm; -TargetIntrinsicInfo::TargetIntrinsicInfo() { -} +TargetIntrinsicInfo::TargetIntrinsicInfo() = default; -TargetIntrinsicInfo::~TargetIntrinsicInfo() { -} +TargetIntrinsicInfo::~TargetIntrinsicInfo() = default; unsigned TargetIntrinsicInfo::getIntrinsicID(const Function *F) const { const ValueName *ValName = F->getValueName(); diff --git a/llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp b/llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp index 72c40cb..4f45cca 100644 --- a/llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp +++ b/llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp @@ -33,7 +33,7 @@ class VEDisassembler : public MCDisassembler { public: VEDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) : MCDisassembler(STI, Ctx) {} - virtual ~VEDisassembler() {} + virtual ~VEDisassembler() = default; DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, diff --git a/llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp b/llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp index ae06540..1c89d64 100644 --- a/llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp +++ b/llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp @@ -25,7 +25,7 @@ public: : MCELFObjectTargetWriter(/* Is64Bit */ true, OSABI, ELF::EM_VE, /* HasRelocationAddend */ true) {} - ~VEELFObjectWriter() override {} + ~VEELFObjectWriter() override = default; protected: unsigned getRelocType(MCContext &Ctx, const MCValue &Target, diff --git a/llvm/lib/Target/VE/VETargetMachine.cpp b/llvm/lib/Target/VE/VETargetMachine.cpp index 9f294f1..30dfc6e 100644 --- a/llvm/lib/Target/VE/VETargetMachine.cpp +++ b/llvm/lib/Target/VE/VETargetMachine.cpp @@ -90,7 +90,7 @@ VETargetMachine::VETargetMachine(const Target &T, const Triple &TT, initAsmInfo(); } -VETargetMachine::~VETargetMachine() {} +VETargetMachine::~VETargetMachine() = default; TargetTransformInfo VETargetMachine::getTargetTransformInfo(const Function &F) { return TargetTransformInfo(VETTIImpl(this, F)); diff --git a/llvm/lib/Target/X86/MCA/X86CustomBehaviour.h b/llvm/lib/Target/X86/MCA/X86CustomBehaviour.h index 24d2675..61e1b6b 100644 --- a/llvm/lib/Target/X86/MCA/X86CustomBehaviour.h +++ b/llvm/lib/Target/X86/MCA/X86CustomBehaviour.h @@ -35,7 +35,7 @@ public: X86InstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII) : InstrPostProcess(STI, MCII) {} - ~X86InstrPostProcess() {} + ~X86InstrPostProcess() = default; void postProcessInstruction(std::unique_ptr<Instruction> &Inst, const MCInst &MCI) override; diff --git a/llvm/lib/Target/X86/X86DomainReassignment.cpp b/llvm/lib/Target/X86/X86DomainReassignment.cpp index 9826bf4..70a7f8e 100644 --- a/llvm/lib/Target/X86/X86DomainReassignment.cpp +++ b/llvm/lib/Target/X86/X86DomainReassignment.cpp @@ -86,7 +86,7 @@ protected: public: InstrConverterBase(unsigned SrcOpcode) : SrcOpcode(SrcOpcode) {} - virtual ~InstrConverterBase() {} + virtual ~InstrConverterBase() = default; /// \returns true if \p MI is legal to convert. virtual bool isLegal(const MachineInstr *MI, diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index fe985dc..2ef0bf6 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -916,7 +916,7 @@ struct AA::PointerInfo::State : public AbstractState { return R; } - State() {} + State() = default; State(const State &SIS) : AccessBins(SIS.AccessBins) {} State(State &&SIS) : AccessBins(std::move(SIS.AccessBins)) {} diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp index 2d765fb..1cfbae9 100644 --- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp @@ -591,7 +591,7 @@ struct KernelInfoState : AbstractState { /// Abstract State interface ///{ - KernelInfoState() {} + KernelInfoState() = default; KernelInfoState(bool BestState) { if (!BestState) indicatePessimisticFixpoint(); diff --git a/llvm/lib/Transforms/IPO/PartialInlining.cpp b/llvm/lib/Transforms/IPO/PartialInlining.cpp index 5f2223e..70eb103 100644 --- a/llvm/lib/Transforms/IPO/PartialInlining.cpp +++ b/llvm/lib/Transforms/IPO/PartialInlining.cpp @@ -169,7 +169,7 @@ struct FunctionOutliningInfo { }; struct FunctionOutliningMultiRegionInfo { - FunctionOutliningMultiRegionInfo() {} + FunctionOutliningMultiRegionInfo() = default; // Container for outline regions struct OutlineRegionInfo { diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h index 7743b4c..c776ab6f 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h +++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h @@ -71,7 +71,7 @@ public: : InstCombiner(Worklist, Builder, MinimizeSize, AA, AC, TLI, TTI, DT, ORE, BFI, PSI, DL, LI) {} - virtual ~InstCombinerImpl() {} + virtual ~InstCombinerImpl() = default; /// Run the combiner over the entire worklist until it is empty. /// diff --git a/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp b/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp index 3ea3143..2661942 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp @@ -61,7 +61,7 @@ private: ArrayType *MapTy; public: - InstrOrderFile() {} + InstrOrderFile() = default; void createOrderFileData(Module &M) { LLVMContext &Ctx = M.getContext(); diff --git a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp index 5e078f2..c91ddb6 100644 --- a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp @@ -255,7 +255,7 @@ public: } // end anonymous namespace -MemProfilerPass::MemProfilerPass() {} +MemProfilerPass::MemProfilerPass() = default; PreservedAnalyses MemProfilerPass::run(Function &F, AnalysisManager<Function> &AM) { @@ -266,7 +266,7 @@ PreservedAnalyses MemProfilerPass::run(Function &F, return PreservedAnalyses::all(); } -ModuleMemProfilerPass::ModuleMemProfilerPass() {} +ModuleMemProfilerPass::ModuleMemProfilerPass() = default; PreservedAnalyses ModuleMemProfilerPass::run(Module &M, AnalysisManager<Module> &AM) { diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp index 404dd4c..2a71830 100644 --- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp +++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp @@ -104,7 +104,7 @@ struct ConstraintListTy { SmallVector<ConstraintTy, 4> Constraints; SmallVector<PreconditionTy, 4> Preconditions; - ConstraintListTy() {} + ConstraintListTy() = default; ConstraintListTy(ArrayRef<ConstraintTy> Constraints, ArrayRef<PreconditionTy> Preconditions) diff --git a/llvm/lib/Transforms/Scalar/LoopPredication.cpp b/llvm/lib/Transforms/Scalar/LoopPredication.cpp index aa7e79a..276a7cb 100644 --- a/llvm/lib/Transforms/Scalar/LoopPredication.cpp +++ b/llvm/lib/Transforms/Scalar/LoopPredication.cpp @@ -244,7 +244,7 @@ struct LoopICmp { LoopICmp(ICmpInst::Predicate Pred, const SCEVAddRecExpr *IV, const SCEV *Limit) : Pred(Pred), IV(IV), Limit(Limit) {} - LoopICmp() {} + LoopICmp() = default; void dump() { dbgs() << "LoopICmp Pred = " << Pred << ", IV = " << *IV << ", Limit = " << *Limit << "\n"; diff --git a/llvm/lib/Transforms/Utils/CodeLayout.cpp b/llvm/lib/Transforms/Utils/CodeLayout.cpp index e46a939..cd3129e 100644 --- a/llvm/lib/Transforms/Utils/CodeLayout.cpp +++ b/llvm/lib/Transforms/Utils/CodeLayout.cpp @@ -120,7 +120,7 @@ enum class MergeTypeTy : int { X_Y, X1_Y_X2, Y_X2_X1, X2_X1_Y }; /// together with the corresponfiding merge 'type' and 'offset'. class MergeGainTy { public: - explicit MergeGainTy() {} + explicit MergeGainTy() = default; explicit MergeGainTy(double Score, size_t MergeOffset, MergeTypeTy MergeType) : Score(Score), MergeOffset(MergeOffset), MergeType(MergeType) {} diff --git a/llvm/lib/Transforms/Utils/SCCPSolver.cpp b/llvm/lib/Transforms/Utils/SCCPSolver.cpp index d7e8eaf..dac2146 100644 --- a/llvm/lib/Transforms/Utils/SCCPSolver.cpp +++ b/llvm/lib/Transforms/Utils/SCCPSolver.cpp @@ -1618,7 +1618,7 @@ SCCPSolver::SCCPSolver( LLVMContext &Ctx) : Visitor(new SCCPInstVisitor(DL, std::move(GetTLI), Ctx)) {} -SCCPSolver::~SCCPSolver() {} +SCCPSolver::~SCCPSolver() = default; void SCCPSolver::addAnalysis(Function &F, AnalysisResultsForFn A) { return Visitor->addAnalysis(F, std::move(A)); diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h index 71eb39a1..3fe2553 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h @@ -59,7 +59,7 @@ class VPBuilder { } public: - VPBuilder() {} + VPBuilder() = default; /// Clear the insertion point: created instructions will not be inserted into /// a block. diff --git a/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp b/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp index 40c03f7..0e58b0af 100644 --- a/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp +++ b/llvm/lib/WindowsManifest/WindowsManifestMerger.cpp @@ -706,7 +706,7 @@ bool windows_manifest::isAvailable() { return false; } WindowsManifestMerger::WindowsManifestMerger() : Impl(std::make_unique<WindowsManifestMergerImpl>()) {} -WindowsManifestMerger::~WindowsManifestMerger() {} +WindowsManifestMerger::~WindowsManifestMerger() = default; Error WindowsManifestMerger::merge(MemoryBufferRef Manifest) { return Impl->merge(Manifest); diff --git a/llvm/lib/XRay/FDRTraceWriter.cpp b/llvm/lib/XRay/FDRTraceWriter.cpp index 71c09bd..2b80740 100644 --- a/llvm/lib/XRay/FDRTraceWriter.cpp +++ b/llvm/lib/XRay/FDRTraceWriter.cpp @@ -74,7 +74,7 @@ FDRTraceWriter::FDRTraceWriter(raw_ostream &O, const XRayFileHeader &H) OS.write(FreeFormBytes); } -FDRTraceWriter::~FDRTraceWriter() {} +FDRTraceWriter::~FDRTraceWriter() = default; Error FDRTraceWriter::visit(BufferExtents &R) { return writeMetadata<7u>(OS, R.size()); |