Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/examples/Kaleidoscope/Chapter9/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class ExprAST {

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; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/examples/OptSubcommand/llvm-hello-sub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class HelloSubOptTable : public GenericOptTable {
HelloSubOptTable()
: GenericOptTable(OptionStrTable, OptionPrefixesTable, InfoTable,
/*IgnoreCase=*/false, OptionSubCommands,
OptionSubCommandIDsTable) {}
OptionSubCommandIDsTable) = default;
};
} // namespace

Expand Down
6 changes: 1 addition & 5 deletions llvm/include/llvm/Analysis/DDG.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ class LLVM_ABI DDGNode : public DDGNodeBase {
DDGNode(DDGNode &&N) : DDGNodeBase(std::move(N)), Kind(N.Kind) {}
virtual ~DDGNode() = 0;

DDGNode &operator=(const DDGNode &N) {
DGNode::operator=(N);
Kind = N.Kind;
return *this;
}
DDGNode &operator=(const DDGNode &N) = default;

DDGNode &operator=(DDGNode &&N) {
DGNode::operator=(std::move(N));
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Demangle/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class OutputBuffer {
OutputBuffer(const OutputBuffer &) = delete;
OutputBuffer &operator=(const OutputBuffer &) = delete;

virtual ~OutputBuffer() {}
virtual ~OutputBuffer() = default;

operator std::string_view() const {
return std::string_view(Buffer, CurrentPosition);
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/JITLink/aarch32.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct HalfWords {
/// FixupInfo base class is required for dynamic lookups.
struct FixupInfoBase {
LLVM_ABI static const FixupInfoBase *getDynFixupInfo(Edge::Kind K);
virtual ~FixupInfoBase() {}
virtual ~FixupInfoBase() = default;
};

/// FixupInfo checks for Arm edge kinds work on 32-bit words
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ size_t writeMachOStruct(MutableArrayRef<char> Buf, size_t Offset, MachOStruct S,

/// Base type for MachOBuilder load command wrappers.
struct MachOBuilderLoadCommandBase {
virtual ~MachOBuilderLoadCommandBase() {}
virtual ~MachOBuilderLoadCommandBase() = default;
virtual size_t size() const = 0;
virtual size_t write(MutableArrayRef<char> Buf, size_t Offset,
bool SwapStruct) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace rt_bootstrap {
class LLVM_ABI ExecutorSharedMemoryMapperService final
: public ExecutorBootstrapService {
public:
~ExecutorSharedMemoryMapperService() override {};
~ExecutorSharedMemoryMapperService() override = default;

Expected<std::pair<ExecutorAddr, std::string>> reserve(uint64_t Size);
Expected<ExecutorAddr> initialize(ExecutorAddr Reservation,
Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2383,7 +2383,7 @@ class OpenMPIRBuilder {
/// runtime library for debugging
Value *MapNamesArray = nullptr;

explicit TargetDataRTArgs() {}
explicit TargetDataRTArgs() = default;
explicit TargetDataRTArgs(Value *BasePointersArray, Value *PointersArray,
Value *SizesArray, Value *MapTypesArray,
Value *MapTypesArrayEnd, Value *MappersArray,
Expand Down Expand Up @@ -2451,7 +2451,7 @@ class OpenMPIRBuilder {
bool HasNoWait = false;

// Constructors for TargetKernelArgs.
TargetKernelArgs() {}
TargetKernelArgs() = default;
TargetKernelArgs(unsigned NumTargetItems, TargetDataRTArgs RTArgs,
Value *NumIterations, ArrayRef<Value *> NumTeams,
ArrayRef<Value *> NumThreads, Value *DynCGGroupMem,
Expand Down Expand Up @@ -2494,7 +2494,7 @@ class OpenMPIRBuilder {
/// Whether the `target ... data` directive has a `nowait` clause.
bool HasNoWait = false;

explicit TargetDataInfo() {}
explicit TargetDataInfo() = default;
explicit TargetDataInfo(bool RequiresDevicePointerInfo,
bool SeparateBeginEndCalls)
: RequiresDevicePointerInfo(RequiresDevicePointerInfo),
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/DebugProgramInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ filterDbgVars(iterator_range<simple_ilist<DbgRecord>::iterator> R) {
/// date.
class DbgMarker {
public:
DbgMarker() {}
DbgMarker() = default;
/// Link back to the Instruction that owns this marker. Can be null during
/// operations that move a marker from one instruction to another.
Instruction *MarkedInstr = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/DroppedVariableStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DroppedVariableStats {
public:
LLVM_ABI DroppedVariableStats(bool DroppedVarStatsEnabled);

virtual ~DroppedVariableStats() {}
virtual ~DroppedVariableStats() = default;

// We intend this to be unique per-compilation, thus no copies.
DroppedVariableStats(const DroppedVariableStats &) = delete;
Expand Down
7 changes: 2 additions & 5 deletions llvm/include/llvm/IR/TrackingMDRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,14 @@ template <class T> class TypedTrackingMDRef {
explicit TypedTrackingMDRef(T *MD) : Ref(static_cast<Metadata *>(MD)) {}

TypedTrackingMDRef(TypedTrackingMDRef &&X) : Ref(std::move(X.Ref)) {}
TypedTrackingMDRef(const TypedTrackingMDRef &X) : Ref(X.Ref) {}
TypedTrackingMDRef(const TypedTrackingMDRef &X) = default;

TypedTrackingMDRef &operator=(TypedTrackingMDRef &&X) {
Ref = std::move(X.Ref);
return *this;
}

TypedTrackingMDRef &operator=(const TypedTrackingMDRef &X) {
Ref = X.Ref;
return *this;
}
TypedTrackingMDRef &operator=(const TypedTrackingMDRef &X) = default;

T *get() const { return (T *)Ref.get(); }
operator T *() const { return get(); }
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MC/MCRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class LLVM_ABI MCRegisterInfo {
friend class MCRegUnitRootIterator;
friend class MCRegAliasIterator;

virtual ~MCRegisterInfo() {}
virtual ~MCRegisterInfo() = default;

/// Initialize MCRegisterInfo, called by TableGen
/// auto-generated routines. *DO NOT USE*.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MCA/SourceMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct SourceMgr {
/// Advance to the next \a SourceRef.
virtual void updateNext() = 0;

virtual ~SourceMgr() {}
virtual ~SourceMgr() = default;
};

/// The default implementation of \a SourceMgr. It always takes a fixed number
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ObjCopy/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace llvm {
namespace objcopy {

struct LLVM_ABI ConfigManager : public MultiFormatConfig {
~ConfigManager() override {}
~ConfigManager() override = default;

const CommonConfig &getCommonConfig() const override { return Common; }

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ObjCopy/MultiFormatConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct DXContainerConfig;

class MultiFormatConfig {
public:
virtual ~MultiFormatConfig() {}
virtual ~MultiFormatConfig() = default;

virtual const CommonConfig &getCommonConfig() const = 0;
virtual Expected<const ELFConfig &> getELFConfig() const = 0;
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/ObjectYAML/DXContainerYAML.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ struct RootParameterHeaderYaml {
dxbc::ShaderVisibility Visibility;
uint32_t Offset;

RootParameterHeaderYaml(){};
RootParameterHeaderYaml() = default;
RootParameterHeaderYaml(dxbc::RootParameterType T) : Type(T) {}
};

struct RootParameterLocationYaml {
RootParameterHeaderYaml Header;
std::optional<size_t> IndexInSignature;

RootParameterLocationYaml(){};
RootParameterLocationYaml() = default;
explicit RootParameterLocationYaml(RootParameterHeaderYaml Header)
: Header(Header) {}
};
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ProfileData/DataAccessProf.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct SourceLocation {
: FileName(FileNameRef.str()), Line(Line) {}

// Empty constructor is used in yaml conversion.
SourceLocation() {}
SourceLocation() = default;
/// The filename where the data is located.
std::string FileName;
/// The line number in the source code.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/SandboxIR/Pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Pass {
"A pass name should not contain whitespaces!");
assert(!Name.starts_with('-') && "A pass name should not start with '-'!");
}
virtual ~Pass() {}
virtual ~Pass() = default;
/// \Returns the name of the pass.
StringRef getName() const { return Name; }
#ifndef NDEBUG
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/DWARFLinker/Parallel/DWARFLinkerUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using MacroOffset2UnitMapTy = DenseMap<uint64_t, DwarfUnit *>;
/// Base class for all Dwarf units(Compile unit/Type table unit).
class DwarfUnit : public OutputSections {
public:
virtual ~DwarfUnit() {}
virtual ~DwarfUnit() = default;
DwarfUnit(LinkingGlobalData &GlobalData, unsigned ID,
StringRef ClangModuleName)
: OutputSections(GlobalData), ID(ID), ClangModuleName(ClangModuleName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class StringEntryToDwarfStringPoolEntryMap {
public:
StringEntryToDwarfStringPoolEntryMap(LinkingGlobalData &GlobalData)
: GlobalData(GlobalData) {}
~StringEntryToDwarfStringPoolEntryMap() {}
~StringEntryToDwarfStringPoolEntryMap() = default;

/// Create DwarfStringPoolEntry for specified StringEntry if necessary.
/// Initialize DwarfStringPoolEntry with initial values.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace llvm {
namespace orc {

MemoryMapper::~MemoryMapper() {}
MemoryMapper::~MemoryMapper() = default;

InProcessMemoryMapper::InProcessMemoryMapper(size_t PageSize)
: PageSize(PageSize) {}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/MC/GOFFObjectWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ GOFFObjectWriter::GOFFObjectWriter(
std::unique_ptr<MCGOFFObjectTargetWriter> MOTW, raw_pwrite_stream &OS)
: TargetObjectWriter(std::move(MOTW)), OS(OS) {}

GOFFObjectWriter::~GOFFObjectWriter() {}
GOFFObjectWriter::~GOFFObjectWriter() = default;

uint64_t GOFFObjectWriter::writeObject() {
uint64_t Size = GOFFWriter(OS, *Asm).writeObject();
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/MC/MCDXContainerWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

using namespace llvm;

MCDXContainerTargetWriter::~MCDXContainerTargetWriter() {}
MCDXContainerTargetWriter::~MCDXContainerTargetWriter() = default;

uint64_t DXContainerObjectWriter::writeObject() {
auto &Asm = *this->Asm;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/MC/MCGOFFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

using namespace llvm;

MCGOFFStreamer::~MCGOFFStreamer() {}
MCGOFFStreamer::~MCGOFFStreamer() = default;

GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast<GOFFObjectWriter &>(getAssembler().getWriter());
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjCopy/COFF/COFFWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class COFFWriter {
Expected<uint32_t> virtualAddressToFileAddress(uint32_t RVA);

public:
virtual ~COFFWriter() {}
virtual ~COFFWriter() = default;
Error write();

COFFWriter(Object &Obj, raw_ostream &Out)
Expand Down
10 changes: 5 additions & 5 deletions llvm/lib/ObjCopy/ELF/ELFObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ template <class ELFT> class ELFSectionWriter : public SectionWriter {
using Elf_Sym = typename ELFT::Sym;

public:
~ELFSectionWriter() override {}
~ELFSectionWriter() override = default;
Error visit(const SymbolTableSection &Sec) override;
Error visit(const RelocationSection &Sec) override;
Error visit(const GnuDebugLinkSection &Sec) override;
Expand Down Expand Up @@ -180,7 +180,7 @@ template <class ELFT> class ELFSectionSizer : public MutableSectionVisitor {

class BinarySectionWriter : public SectionWriter {
public:
~BinarySectionWriter() override {}
~BinarySectionWriter() override = default;

Error visit(const SymbolTableSection &Sec) override;
Error visit(const RelocationSection &Sec) override;
Expand Down Expand Up @@ -346,7 +346,7 @@ template <class ELFT> class ELFWriter : public Writer {
size_t totalSize() const;

public:
~ELFWriter() override {}
~ELFWriter() override = default;
bool WriteSectionHeaders;

// For --only-keep-debug, select an alternative section/segment layout
Expand All @@ -367,7 +367,7 @@ class BinaryWriter : public Writer {
uint64_t TotalSize = 0;

public:
~BinaryWriter() override {}
~BinaryWriter() override = default;
Error finalize() override;
Error write() override;
BinaryWriter(Object &Obj, raw_ostream &Out, const CommonConfig &Config)
Expand Down Expand Up @@ -784,7 +784,7 @@ class SectionIndexSection : public SectionBase {
SymbolTableSection *Symbols = nullptr;

public:
~SectionIndexSection() override {}
~SectionIndexSection() override = default;
void addIndex(uint32_t Index) {
assert(Size > 0);
Indexes.push_back(Index);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjCopy/MachO/MachOReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace macho {
// raw binaries and regular MachO object files.
class Reader {
public:
virtual ~Reader(){};
virtual ~Reader() = default;
virtual Expected<std::unique_ptr<Object>> create() const = 0;
};

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjCopy/XCOFF/XCOFFWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace xcoff {

class XCOFFWriter {
public:
virtual ~XCOFFWriter() {}
virtual ~XCOFFWriter() = default;
XCOFFWriter(Object &Obj, raw_ostream &Out) : Obj(Obj), Out(Out) {}
Error write();

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ObjectYAML/GOFFYAML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace llvm {
namespace GOFFYAML {

Object::Object() {}
Object::Object() = default;

} // namespace GOFFYAML

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Passes/StandardInstrumentations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void IRChangedPrinter::handleAfter(StringRef PassID, std::string &Name,
Out << "*** IR Dump After " << PassID << " on " << Name << " ***\n" << After;
}

IRChangedTester::~IRChangedTester() {}
IRChangedTester::~IRChangedTester() = default;

void IRChangedTester::registerCallbacks(PassInstrumentationCallbacks &PIC) {
if (TestChanged != "")
Expand Down Expand Up @@ -1566,7 +1566,7 @@ void InLineChangePrinter::registerCallbacks(PassInstrumentationCallbacks &PIC) {
TextChangeReporter<IRDataT<EmptyData>>::registerRequiredCallbacks(PIC);
}

TimeProfilingPassesHandler::TimeProfilingPassesHandler() {}
TimeProfilingPassesHandler::TimeProfilingPassesHandler() = default;

void TimeProfilingPassesHandler::registerCallbacks(
PassInstrumentationCallbacks &PIC) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/SandboxIR/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ Context::Context(LLVMContext &LLVMCtx)
: LLVMCtx(LLVMCtx), IRTracker(*this),
LLVMIRBuilder(LLVMCtx, ConstantFolder()) {}

Context::~Context() {}
Context::~Context() = default;

void Context::clear() {
// TODO: Ideally we should clear only function-scope objects, and keep global
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Target/AMDGPU/AMDGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ FunctionPass *createAMDGPUPreloadKernArgPrologLegacyPass();
ModulePass *createAMDGPUPreloadKernelArgumentsLegacyPass(const TargetMachine *);

struct AMDGPUSimplifyLibCallsPass : PassInfoMixin<AMDGPUSimplifyLibCallsPass> {
AMDGPUSimplifyLibCallsPass() {}
AMDGPUSimplifyLibCallsPass() = default;
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};

Expand Down Expand Up @@ -371,13 +371,13 @@ class AMDGPUPreloadKernelArgumentsPass
class AMDGPUAnnotateUniformValuesPass
: public PassInfoMixin<AMDGPUAnnotateUniformValuesPass> {
public:
AMDGPUAnnotateUniformValuesPass() {}
AMDGPUAnnotateUniformValuesPass() = default;
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};

class SIModeRegisterPass : public PassInfoMixin<SIModeRegisterPass> {
public:
SIModeRegisterPass() {}
SIModeRegisterPass() = default;
PreservedAnalyses run(MachineFunction &F, MachineFunctionAnalysisManager &AM);
};

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ inline raw_ostream &operator<<(raw_ostream &OS, const ArgDescriptor &Arg) {
}

struct KernArgPreloadDescriptor : public ArgDescriptor {
KernArgPreloadDescriptor() {}
KernArgPreloadDescriptor() = default;
SmallVector<MCRegister> Regs;
};

Expand Down
Loading
Loading