Skip to content

Commit b82bde6

Browse files
[Analysis, CodeGen] Use "= default" (NFC) (llvm#166024)
Identified with modernize-use-equals-default.
1 parent ffe527c commit b82bde6

File tree

13 files changed

+16
-16
lines changed

13 files changed

+16
-16
lines changed

llvm/include/llvm/Analysis/AliasAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ class AAResultBase {
861861

862862
// Provide all the copy and move constructors so that derived types aren't
863863
// constrained.
864-
AAResultBase(const AAResultBase &Arg) {}
864+
AAResultBase(const AAResultBase &Arg) = default;
865865
AAResultBase(AAResultBase &&Arg) {}
866866

867867
public:

llvm/include/llvm/Analysis/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ConstraintSystem {
6464
SmallVector<std::string> getVarNamesList() const;
6565

6666
public:
67-
ConstraintSystem() {}
67+
ConstraintSystem() = default;
6868
ConstraintSystem(ArrayRef<Value *> FunctionArgs) {
6969
NumVariables += FunctionArgs.size();
7070
for (auto *Arg : FunctionArgs) {

llvm/include/llvm/Analysis/DOTGraphTraitsPass.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ struct DOTGraphTraitsViewer
8080
/// virtual destructor needed. Making this dtor protected stops accidental
8181
/// invocation when the derived class destructor should have been called.
8282
/// Those derived classes sould be marked final to avoid the warning.
83-
~DOTGraphTraitsViewer() {}
83+
~DOTGraphTraitsViewer() = default;
8484

8585
private:
8686
StringRef Name;
@@ -161,7 +161,7 @@ struct DOTGraphTraitsPrinter
161161
/// virtual destructor needed. Making this dtor protected stops accidental
162162
/// invocation when the derived class destructor should have been called.
163163
/// Those derived classes sould be marked final to avoid the warning.
164-
~DOTGraphTraitsPrinter() {}
164+
~DOTGraphTraitsPrinter() = default;
165165

166166
private:
167167
StringRef Name;

llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class BasicBlockSectionsProfileReader {
6666
BasicBlockSectionsProfileReader(const MemoryBuffer *Buf)
6767
: MBuf(Buf), LineIt(*Buf, /*SkipBlanks=*/true, /*CommentMarker=*/'#'){};
6868

69-
BasicBlockSectionsProfileReader(){};
69+
BasicBlockSectionsProfileReader() = default;
7070

7171
// Returns true if basic block sections profile exist for function \p
7272
// FuncName.

llvm/include/llvm/CodeGen/MachineScheduler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ class ResourceSegments {
829829

830830
public:
831831
// constructor for empty set
832-
explicit ResourceSegments(){};
832+
explicit ResourceSegments() = default;
833833
bool empty() const { return _Intervals.empty(); }
834834
explicit ResourceSegments(const std::list<IntervalTy> &Intervals)
835835
: _Intervals(Intervals) {

llvm/include/llvm/CodeGen/WindowScheduler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class WindowScheduler {
105105

106106
public:
107107
WindowScheduler(MachineSchedContext *C, MachineLoop &ML);
108-
virtual ~WindowScheduler() {}
108+
virtual ~WindowScheduler() = default;
109109

110110
bool run();
111111

llvm/lib/Analysis/AliasAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ AAResults::AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {}
7575
AAResults::AAResults(AAResults &&Arg)
7676
: TLI(Arg.TLI), AAs(std::move(Arg.AAs)), AADeps(std::move(Arg.AADeps)) {}
7777

78-
AAResults::~AAResults() {}
78+
AAResults::~AAResults() = default;
7979

8080
bool AAResults::invalidate(Function &F, const PreservedAnalyses &PA,
8181
FunctionAnalysisManager::Invalidator &Inv) {

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ class CodeGenPrepare {
368368
std::unique_ptr<DominatorTree> DT;
369369

370370
public:
371-
CodeGenPrepare(){};
371+
CodeGenPrepare() = default;
372372
CodeGenPrepare(const TargetMachine *TM) : TM(TM){};
373373
/// If encounter huge function, we need to limit the build time.
374374
bool IsHugeFunc = false;

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class MachineSchedulerImpl : public MachineSchedulerBase {
334334
LiveIntervals &LIS;
335335
};
336336

337-
MachineSchedulerImpl() {}
337+
MachineSchedulerImpl() = default;
338338
// Migration only
339339
void setLegacyPass(MachineFunctionPass *P) { this->P = P; }
340340
void setMFAM(MachineFunctionAnalysisManager *MFAM) { this->MFAM = MFAM; }
@@ -358,7 +358,7 @@ class PostMachineSchedulerImpl : public MachineSchedulerBase {
358358
MachineLoopInfo &MLI;
359359
AAResults &AA;
360360
};
361-
PostMachineSchedulerImpl() {}
361+
PostMachineSchedulerImpl() = default;
362362
// Migration only
363363
void setLegacyPass(MachineFunctionPass *P) { this->P = P; }
364364
void setMFAM(MachineFunctionAnalysisManager *MFAM) { this->MFAM = MFAM; }

llvm/lib/CodeGen/RegAllocFast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class RegAllocFastImpl {
206206
bool Error = false; ///< Could not allocate.
207207

208208
explicit LiveReg(Register VirtReg) : VirtReg(VirtReg) {}
209-
explicit LiveReg() {}
209+
explicit LiveReg() = default;
210210

211211
unsigned getSparseSetIndex() const { return VirtReg.virtRegIndex(); }
212212
};

0 commit comments

Comments
 (0)