6 changes: 2 additions & 4 deletions llvm/include/llvm/CodeGen/SelectionDAGNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -741,11 +741,9 @@ END_TWO_BYTE_PACK()
using reference = value_type &;

use_iterator() = default;
use_iterator(const use_iterator &I) : Op(I.Op) {}
use_iterator(const use_iterator &I) = default;

bool operator==(const use_iterator &x) const {
return Op == x.Op;
}
bool operator==(const use_iterator &x) const { return Op == x.Op; }
bool operator!=(const use_iterator &x) const {
return !operator==(x);
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class FrameEntry {
: Kind(K), IsDWARF64(IsDWARF64), Offset(Offset), Length(Length),
CFIs(CodeAlign, DataAlign, Arch) {}

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

FrameKind getKind() const { return Kind; }
uint64_t getOffset() const { return Offset; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/DebugInfo/GSYM/StringTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace gsym {
/// string at offset zero. Strings must be UTF8 NULL terminated strings.
struct StringTable {
StringRef Data;
StringTable() {}
StringTable() = default;
StringTable(StringRef D) : Data(D) {}
StringRef operator[](size_t Offset) const { return getString(Offset); }
StringRef getString(uint32_t Offset) const {
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ struct Request {

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

virtual void print(const Request &Request, const DILineInfo &Info) = 0;
virtual void print(const Request &Request, const DIInliningInfo &Info) = 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ using AsyncLookupResult = DenseMap<StringRef, JITEvaluatedSymbol>;
/// or an error if resolution failed.
class JITLinkAsyncLookupContinuation {
public:
virtual ~JITLinkAsyncLookupContinuation() {}
virtual ~JITLinkAsyncLookupContinuation() = default;
virtual void run(Expected<AsyncLookupResult> LR) = 0;

private:
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/Orc/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ class MaterializationUnit {
MaterializationUnit(Interface I)
: SymbolFlags(std::move(I.SymbolFlags)),
InitSymbol(std::move(I.InitSymbol)) {}
virtual ~MaterializationUnit() {}
virtual ~MaterializationUnit() = default;

/// Return the name of this materialization unit. Useful for debugging
/// output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GDBJITDebugInfoRegistrationPlugin : public ObjectLinkingLayer::Plugin {
public:
class DebugSectionSynthesizer {
public:
virtual ~DebugSectionSynthesizer() {}
virtual ~DebugSectionSynthesizer() = default;
virtual Error startSynthesis() = 0;
virtual Error completeSynthesisAndRegister() = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ExecutionSession;
class DebugObjectRegistrar {
public:
virtual Error registerDebugObject(ExecutorAddrRange TargetMem) = 0;
virtual ~DebugObjectRegistrar() {}
virtual ~DebugObjectRegistrar() = default;
};

/// Use ExecutorProcessControl to register debug objects locally or in a remote
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/Orc/TaskDispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Task : public RTTIExtends<Task, RTTIRoot> {
public:
static char ID;

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

/// Description of the task to be performed. Used for logging.
virtual void printDescription(raw_ostream &OS) = 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/PassInstrumentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class PassInstrumentationCallbacks {
using AnalysesClearedFunc = void(StringRef);

public:
PassInstrumentationCallbacks() {}
PassInstrumentationCallbacks() = default;

/// Copying PassInstrumentationCallbacks is not intended.
PassInstrumentationCallbacks(const PassInstrumentationCallbacks &) = delete;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/PassManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class PassManager : public PassInfoMixin<
PassManager<IRUnitT, AnalysisManagerT, ExtraArgTs...>> {
public:
/// Construct a pass manager.
explicit PassManager() {}
explicit PassManager() = default;

// FIXME: These are equivalent to the default move constructor/move
// assignment. However, using = default triggers linker errors due to the
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/PassManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace llvm {

template <typename IRUnitT, typename... ExtraArgTs>
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager() {}
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager() = default;

template <typename IRUnitT, typename... ExtraArgTs>
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager(
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/IR/SafepointIRVerifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FunctionPass *createSafepointIRVerifierPass();
class SafepointIRVerifierPass : public PassInfoMixin<SafepointIRVerifierPass> {

public:
explicit SafepointIRVerifierPass() {}
explicit SafepointIRVerifierPass() = default;

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/InterfaceStub/IFSStub.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct IFSStub {
std::vector<std::string> NeededLibs;
std::vector<IFSSymbol> Symbols;

IFSStub() {}
IFSStub() = default;
IFSStub(const IFSStub &Stub);
IFSStub(IFSStub &&Stub);
};
Expand All @@ -106,7 +106,7 @@ struct IFSStub {
// This class makes it possible to map a second traits so the same data
// structure can be used for 2 different yaml schema.
struct IFSStubTriple : IFSStub {
IFSStubTriple() {}
IFSStubTriple() = default;
IFSStubTriple(const IFSStub &Stub);
IFSStubTriple(const IFSStubTriple &Stub);
IFSStubTriple(IFSStubTriple &&Stub);
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/LineEditor/LineEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class LineEditor {

/// A possible completion at a given cursor position.
struct Completion {
Completion() {}
Completion() = default;
Completion(const std::string &TypedText, const std::string &DisplayText)
: TypedText(TypedText), DisplayText(DisplayText) {}

Expand Down
3 changes: 2 additions & 1 deletion llvm/include/llvm/MC/MCPseudoProbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ class MCDecodedPseudoProbeInlineTree
// Used for decoding
uint32_t ChildrenToProcess = 0;

MCDecodedPseudoProbeInlineTree(){};
MCDecodedPseudoProbeInlineTree() = default;
;
MCDecodedPseudoProbeInlineTree(const InlineSite &Site) : ISite(Site){};

// Return false if it's a dummy inline site
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MCA/CustomBehaviour.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class InstrPostProcess {
InstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
: STI(STI), MCII(MCII) {}

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

/// This method can be overriden by targets to modify the mca::Instruction
/// object after it has been lowered from the MCInst.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MCA/HWEventListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class HWEventListener {
virtual void onReleasedBuffers(const InstRef &Inst,
ArrayRef<unsigned> Buffers) {}

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

private:
virtual void anchor();
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ResourceStrategy {
ResourceStrategy &operator=(const ResourceStrategy &) = delete;

public:
ResourceStrategy() {}
ResourceStrategy() = default;
virtual ~ResourceStrategy();

/// Selects a processor resource unit from a ReadyMask.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Object/Archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AbstractArchiveMemberHeader {
public:
friend class Archive;
virtual std::unique_ptr<AbstractArchiveMemberHeader> clone() const = 0;
virtual ~AbstractArchiveMemberHeader(){};
virtual ~AbstractArchiveMemberHeader() = default;

/// Get the name without looking up long names.
virtual Expected<StringRef> getRawName() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Object/ELFTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ template <class ELFT> class Elf_Note_Iterator_Impl {
}
}

Elf_Note_Iterator_Impl() {}
Elf_Note_Iterator_Impl() = default;
explicit Elf_Note_Iterator_Impl(Error &Err) : Err(&Err) {}
Elf_Note_Iterator_Impl(const uint8_t *Start, size_t Size, Error &Err)
: RemainingSize(Size), Err(&Err) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Passes/StandardInstrumentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class OptNoneInstrumentation {

class OptBisectInstrumentation {
public:
OptBisectInstrumentation() {}
OptBisectInstrumentation() = default;
void registerCallbacks(PassInstrumentationCallbacks &PIC);
};

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ProfileData/InstrProfCorrelator.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class InstrProfCorrelator {

enum InstrProfCorrelatorKind { CK_32Bit, CK_64Bit };
InstrProfCorrelatorKind getKind() const { return Kind; }
virtual ~InstrProfCorrelator() {}
virtual ~InstrProfCorrelator() = default;

protected:
struct Context {
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ProfileData/InstrProfReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ class InstrProfReaderIndex : public InstrProfReaderIndexBase {
/// Name matcher supporting fuzzy matching of symbol names to names in profiles.
class InstrProfReaderRemapper {
public:
virtual ~InstrProfReaderRemapper() {}
virtual ~InstrProfReaderRemapper() = default;
virtual Error populateRemappings() { return Error::success(); }
virtual Error getRecords(StringRef FuncName,
ArrayRef<NamedInstrProfRecord> &Data) = 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Remarks/RemarkParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class EndOfFileError : public ErrorInfo<EndOfFileError> {
public:
static char ID;

EndOfFileError() {}
EndOfFileError() = default;

void log(raw_ostream &OS) const override { OS << "End of file reached."; }
std::error_code convertToErrorCode() const override {
Expand Down
11 changes: 3 additions & 8 deletions llvm/include/llvm/Support/BinaryStreamReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ class BinaryStreamReader {
llvm::support::endianness Endian);
explicit BinaryStreamReader(StringRef Data, llvm::support::endianness Endian);

BinaryStreamReader(const BinaryStreamReader &Other)
: Stream(Other.Stream), Offset(Other.Offset) {}
BinaryStreamReader(const BinaryStreamReader &Other) = default;

BinaryStreamReader &operator=(const BinaryStreamReader &Other) {
Stream = Other.Stream;
Offset = Other.Offset;
return *this;
}
BinaryStreamReader &operator=(const BinaryStreamReader &Other) = default;

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

/// Read as much as possible from the underlying string at the current offset
/// without invoking a copy, and set \p Buffer to the resulting data slice.
Expand Down
11 changes: 3 additions & 8 deletions llvm/include/llvm/Support/BinaryStreamWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ class BinaryStreamWriter {
explicit BinaryStreamWriter(MutableArrayRef<uint8_t> Data,
llvm::support::endianness Endian);

BinaryStreamWriter(const BinaryStreamWriter &Other)
: Stream(Other.Stream), Offset(Other.Offset) {}
BinaryStreamWriter(const BinaryStreamWriter &Other) = default;

BinaryStreamWriter &operator=(const BinaryStreamWriter &Other) {
Stream = Other.Stream;
Offset = Other.Offset;
return *this;
}
BinaryStreamWriter &operator=(const BinaryStreamWriter &Other) = default;

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

/// Write the bytes specified in \p Buffer to the underlying stream.
/// On success, updates the offset so that subsequent writes will occur
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/CommandLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ class basic_parser_impl { // non-template implementation of basic_parser<t>
public:
basic_parser_impl(Option &) {}

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

enum ValueExpected getValueExpectedFlagDefault() const {
return ValueRequired;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/FileOutputBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class FileOutputBuffer {
/// If this object was previously committed, the destructor just deletes
/// this object. If this object was not committed, the destructor
/// deallocates the buffer and the target file is never written.
virtual ~FileOutputBuffer() {}
virtual ~FileOutputBuffer() = default;

/// This removes the temporary file (unless it already was committed)
/// but keeps the memory mapping alive.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/FormatVariadicDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class format_adapter {
virtual void anchor();

protected:
virtual ~format_adapter() {}
virtual ~format_adapter() = default;

public:
virtual void format(raw_ostream &S, StringRef Options) = 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/GenericDomTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class DominatorTreeBase {
friend struct DomTreeBuilder::SemiNCAInfo<DominatorTreeBase>;

public:
DominatorTreeBase() {}
DominatorTreeBase() = default;

DominatorTreeBase(DominatorTreeBase &&Arg)
: Roots(std::move(Arg.Roots)),
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/KnownBits.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct KnownBits {

public:
// Default construct Zero and One.
KnownBits() {}
KnownBits() = default;

/// Create a known bits object of BitWidth bits initialized to unknown.
KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {}
Expand Down
9 changes: 5 additions & 4 deletions llvm/include/llvm/Support/ScopedPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ScopedPrinter {
return SP->getKind() == ScopedPrinterKind::Base;
}

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

void flush() { OS.flush(); }

Expand Down Expand Up @@ -792,13 +792,14 @@ class JSONScopedPrinter : public ScopedPrinter {
struct DelimitedScope {
DelimitedScope(ScopedPrinter &W) : W(&W) {}
DelimitedScope() : W(nullptr) {}
virtual ~DelimitedScope(){};
virtual ~DelimitedScope() = default;
;
virtual void setPrinter(ScopedPrinter &W) = 0;
ScopedPrinter *W;
};

struct DictScope : DelimitedScope {
explicit DictScope() {}
explicit DictScope() = default;
explicit DictScope(ScopedPrinter &W) : DelimitedScope(W) { W.objectBegin(); }

DictScope(ScopedPrinter &W, StringRef N) : DelimitedScope(W) {
Expand All @@ -817,7 +818,7 @@ struct DictScope : DelimitedScope {
};

struct ListScope : DelimitedScope {
explicit ListScope() {}
explicit ListScope() = default;
explicit ListScope(ScopedPrinter &W) : DelimitedScope(W) { W.arrayBegin(); }

ListScope(ScopedPrinter &W, StringRef N) : DelimitedScope(W) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/SuffixTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct SuffixTreeNode {
SuffixTreeNode(unsigned StartIdx, unsigned *EndIdx, SuffixTreeNode *Link)
: StartIdx(StartIdx), EndIdx(EndIdx), Link(Link) {}

SuffixTreeNode() {}
SuffixTreeNode() = default;
};

/// A data structure for fast substring queries.
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Timer {
~Timer();

/// Create an uninitialized timer, client must use 'init'.
explicit Timer() {}
explicit Timer() = default;
void init(StringRef TimerName, StringRef TimerDescription);
void init(StringRef TimerName, StringRef TimerDescription, TimerGroup &tg);

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/TableGen/Record.h
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ class Resolver {

public:
explicit Resolver(Record *CurRec) : CurRec(CurRec) {}
virtual ~Resolver() {}
virtual ~Resolver() = default;

Record *getCurrentRecord() const { return CurRec; }

Expand Down
33 changes: 12 additions & 21 deletions llvm/include/llvm/Transforms/IPO/Attributor.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ enum class DepClassTy {
/// The data structure for the nodes of a dependency graph
struct AADepGraphNode {
public:
virtual ~AADepGraphNode(){};
virtual ~AADepGraphNode() = default;
using DepTy = PointerIntPair<AADepGraphNode *, 1>;

protected:
Expand Down Expand Up @@ -266,8 +266,8 @@ struct AADepGraphNode {
/// then it means that B depends on A, and when the state of A is
/// updated, node B should also be updated
struct AADepGraph {
AADepGraph() {}
~AADepGraph() {}
AADepGraph() = default;
~AADepGraph() = default;

using DepTy = AADepGraphNode::DepTy;
static AADepGraphNode *DepGetVal(DepTy &DT) { return DT.getPointer(); }
Expand Down Expand Up @@ -844,7 +844,7 @@ struct AnalysisGetter {
}

AnalysisGetter(FunctionAnalysisManager &FAM) : FAM(&FAM) {}
AnalysisGetter() {}
AnalysisGetter() = default;

private:
FunctionAnalysisManager *FAM = nullptr;
Expand Down Expand Up @@ -2081,7 +2081,7 @@ struct Attributor {
/// additional methods to directly modify the state based if needed. See the
/// class comments for help.
struct AbstractState {
virtual ~AbstractState() {}
virtual ~AbstractState() = default;

/// Return if this abstract state is in a valid state. If false, no
/// information provided should be used.
Expand Down Expand Up @@ -2122,7 +2122,7 @@ template <typename base_ty, base_ty BestState, base_ty WorstState>
struct IntegerStateBase : public AbstractState {
using base_t = base_ty;

IntegerStateBase() {}
IntegerStateBase() = default;
IntegerStateBase(base_t Assumed) : Assumed(Assumed) {}

/// Return the best possible representable state.
Expand Down Expand Up @@ -2365,7 +2365,7 @@ struct BooleanState : public IntegerStateBase<bool, true, false> {
using super = IntegerStateBase<bool, true, false>;
using base_t = IntegerStateBase::base_t;

BooleanState() {}
BooleanState() = default;
BooleanState(base_t Assumed) : super(Assumed) {}

/// Set the assumed value to \p Value but never below the known one.
Expand Down Expand Up @@ -2773,7 +2773,7 @@ struct AbstractAttribute : public IRPosition, public AADepGraphNode {
AbstractAttribute(const IRPosition &IRP) : IRPosition(IRP) {}

/// Virtual destructor.
virtual ~AbstractAttribute() {}
virtual ~AbstractAttribute() = default;

/// This function is used to identify if an \p DGN is of type
/// AbstractAttribute so that the dyn_cast and cast can use such information
Expand Down Expand Up @@ -4419,7 +4419,7 @@ class AACallEdgeIterator

struct AACallGraphNode {
AACallGraphNode(Attributor &A) : A(A) {}
virtual ~AACallGraphNode() {}
virtual ~AACallGraphNode() = default;

virtual AACallEdgeIterator optimisticEdgesBegin() const = 0;
virtual AACallEdgeIterator optimisticEdgesEnd() const = 0;
Expand Down Expand Up @@ -4485,7 +4485,7 @@ struct AACallEdges : public StateWrapper<BooleanState, AbstractAttribute>,
// Synthetic root node for the Attributor's internal call graph.
struct AttributorCallGraph : public AACallGraphNode {
AttributorCallGraph(Attributor &A) : AACallGraphNode(A) {}
virtual ~AttributorCallGraph() {}
virtual ~AttributorCallGraph() = default;

AACallEdgeIterator optimisticEdgesBegin() const override {
return AACallEdgeIterator(A, A.Functions.begin());
Expand Down Expand Up @@ -4639,21 +4639,12 @@ struct AAPointerInfo : public AbstractAttribute {
AccessKind Kind, Type *Ty)
: LocalI(LocalI), RemoteI(RemoteI), Content(Content), Kind(Kind),
Ty(Ty) {}
Access(const Access &Other)
: LocalI(Other.LocalI), RemoteI(Other.RemoteI), Content(Other.Content),
Kind(Other.Kind), Ty(Other.Ty) {}
Access(const Access &Other) = default;
Access(const Access &&Other)
: LocalI(Other.LocalI), RemoteI(Other.RemoteI), Content(Other.Content),
Kind(Other.Kind), Ty(Other.Ty) {}

Access &operator=(const Access &Other) {
LocalI = Other.LocalI;
RemoteI = Other.RemoteI;
Content = Other.Content;
Kind = Other.Kind;
Ty = Other.Ty;
return *this;
}
Access &operator=(const Access &Other) = default;
bool operator==(const Access &R) const {
return LocalI == R.LocalI && RemoteI == R.RemoteI &&
Content == R.Content && Kind == R.Kind;
Expand Down
6 changes: 2 additions & 4 deletions llvm/include/llvm/Transforms/IPO/IROutliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,9 @@ class IROutliner {
/// be analyzed for similarity. This is needed as there may be instruction we
/// can identify as having similarity, but are more complicated to outline.
struct InstructionAllowed : public InstVisitor<InstructionAllowed, bool> {
InstructionAllowed() {}
InstructionAllowed() = default;

bool visitBranchInst(BranchInst &BI) {
return EnableBranches;
}
bool visitBranchInst(BranchInst &BI) { return EnableBranches; }
bool visitPHINode(PHINode &PN) { return EnableBranches; }
// TODO: Handle allocas.
bool visitAllocaInst(AllocaInst &AI) { return false; }
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class PseudoProbeUpdatePass : public PassInfoMixin<PseudoProbeUpdatePass> {
void runOnFunction(Function &F, FunctionAnalysisManager &FAM);

public:
PseudoProbeUpdatePass() {}
PseudoProbeUpdatePass() = default;
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
};

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombiner {
MinimizeSize(MinimizeSize), AA(AA), AC(AC), TLI(TLI), DT(DT), DL(DL),
SQ(DL, &TLI, &DT, &AC), ORE(ORE), BFI(BFI), PSI(PSI), LI(LI) {}

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

/// Return the source operand of a potentially bitcasted value while
/// optionally checking if it has one use. If there is no bitcast or the one
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
PassManager<Loop, LoopAnalysisManager, LoopStandardAnalysisResults &,
LPMUpdater &>> {
public:
explicit PassManager() {}
explicit PassManager() = default;

// FIXME: These are equivalent to the default move constructor/move
// assignment. However, using = default triggers linker errors due to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace llvm {
struct LowerConstantIntrinsicsPass :
PassInfoMixin<LowerConstantIntrinsicsPass> {
public:
explicit LowerConstantIntrinsicsPass() {}
explicit LowerConstantIntrinsicsPass() = default;

/// Run the pass over the function.
///
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/Scalar/WarnMissedTransforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Function;
class WarnMissedTransformationsPass
: public PassInfoMixin<WarnMissedTransformationsPass> {
public:
explicit WarnMissedTransformationsPass() {}
explicit WarnMissedTransformationsPass() = default;

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CallGraphUpdater {
///}

public:
CallGraphUpdater() {}
CallGraphUpdater() = default;
~CallGraphUpdater() { finalize(); }

/// Initializers for usage outside of a CGSCC pass, inside a CGSCC pass in
Expand Down
6 changes: 3 additions & 3 deletions llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SSAUpdaterBulk {
SmallVector<Use *, 4> Uses;
StringRef Name;
Type *Ty;
RewriteInfo(){};
RewriteInfo() = default;
RewriteInfo(StringRef &N, Type *T) : Name(N), Ty(T){};
};
SmallVector<RewriteInfo, 4> Rewrites;
Expand All @@ -52,10 +52,10 @@ class SSAUpdaterBulk {
Value *computeValueAt(BasicBlock *BB, RewriteInfo &R, DominatorTree *DT);

public:
explicit SSAUpdaterBulk(){};
explicit SSAUpdaterBulk() = default;
SSAUpdaterBulk(const SSAUpdaterBulk &) = delete;
SSAUpdaterBulk &operator=(const SSAUpdaterBulk &) = delete;
~SSAUpdaterBulk(){};
~SSAUpdaterBulk() = default;

/// Add a new variable to the SSA rewriter. This needs to be called before
/// AddAvailableValue or AddUse calls. The return value is the variable ID,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3486,7 +3486,7 @@ const SCEV *ScalarEvolution::getUDivExpr(const SCEV *LHS,
return S;
}

const APInt gcd(const SCEVConstant *C1, const SCEVConstant *C2) {
APInt gcd(const SCEVConstant *C1, const SCEVConstant *C2) {
APInt A = C1->getAPInt().abs();
APInt B = C2->getAPInt().abs();
uint32_t ABW = A.getBitWidth();
Expand Down