Skip to content

Commit 76cb97d

Browse files
kazutakahiratackoparkar
authored andcommitted
[TableGen] Use "= default" (NFC) (llvm#165968)
Identified with modernize-use-equals-default.
1 parent 6f170eb commit 76cb97d

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class RuntimeLibcallImpl {
154154
Provides = ProvideMap.lookup(ProvidesDef);
155155
}
156156

157-
~RuntimeLibcallImpl() {}
157+
~RuntimeLibcallImpl() = default;
158158

159159
const Record *getDef() const { return TheDef; }
160160

llvm/utils/TableGen/Basic/TargetFeaturesEmitter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TargetFeaturesEmitter {
4343
void printFeatureKeyValues(raw_ostream &OS, const FeatureMapTy &FeatureMap);
4444
void printCPUKeyValues(raw_ostream &OS, const FeatureMapTy &FeatureMap);
4545
virtual void run(raw_ostream &O);
46-
virtual ~TargetFeaturesEmitter() {};
46+
virtual ~TargetFeaturesEmitter() = default;
4747
};
4848
} // namespace llvm
4949
#endif

llvm/utils/TableGen/Common/CodeGenTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ CodeGenTarget::CodeGenTarget(const RecordKeeper &records)
8080
MacroFusions = Records.getAllDerivedDefinitions("Fusion");
8181
}
8282

83-
CodeGenTarget::~CodeGenTarget() {}
83+
CodeGenTarget::~CodeGenTarget() = default;
8484

8585
StringRef CodeGenTarget::getName() const { return TargetRec->getName(); }
8686

llvm/utils/TableGen/Common/DAGISelMatcher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Matcher {
105105
Matcher(KindTy K) : Kind(K) {}
106106

107107
public:
108-
virtual ~Matcher() {}
108+
virtual ~Matcher() = default;
109109

110110
unsigned getSize() const { return Size; }
111111
void setSize(unsigned sz) { Size = sz; }

llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ std::optional<LLTCodeGen> llvm::gi::MVTToLLT(MVT::SimpleValueType SVT) {
457457

458458
void Matcher::optimize() {}
459459

460-
Matcher::~Matcher() {}
460+
Matcher::~Matcher() = default;
461461

462462
//===- GroupMatcher -------------------------------------------------------===//
463463

@@ -1150,11 +1150,11 @@ void RuleMatcher::insnmatchers_pop_front() { Matchers.erase(Matchers.begin()); }
11501150

11511151
//===- PredicateMatcher ---------------------------------------------------===//
11521152

1153-
PredicateMatcher::~PredicateMatcher() {}
1153+
PredicateMatcher::~PredicateMatcher() = default;
11541154

11551155
//===- OperandPredicateMatcher --------------------------------------------===//
11561156

1157-
OperandPredicateMatcher::~OperandPredicateMatcher() {}
1157+
OperandPredicateMatcher::~OperandPredicateMatcher() = default;
11581158

11591159
bool OperandPredicateMatcher::isHigherPriorityThan(
11601160
const OperandPredicateMatcher &B) const {
@@ -1941,7 +1941,7 @@ bool InstructionOperandMatcher::isHigherPriorityThan(
19411941

19421942
//===- OperandRenderer ----------------------------------------------------===//
19431943

1944-
OperandRenderer::~OperandRenderer() {}
1944+
OperandRenderer::~OperandRenderer() = default;
19451945

19461946
//===- CopyRenderer -------------------------------------------------------===//
19471947

llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ class InstructionPredicateMatcher : public PredicateMatcher {
13751375
public:
13761376
InstructionPredicateMatcher(PredicateKind Kind, unsigned InsnVarID)
13771377
: PredicateMatcher(Kind, InsnVarID) {}
1378-
~InstructionPredicateMatcher() override {}
1378+
~InstructionPredicateMatcher() override = default;
13791379

13801380
/// Compare the priority of this object and B.
13811381
///
@@ -2319,7 +2319,7 @@ class MatchAction {
23192319

23202320
ActionKind getKind() const { return Kind; }
23212321

2322-
virtual ~MatchAction() {}
2322+
virtual ~MatchAction() = default;
23232323

23242324
// Some actions may need to add extra predicates to ensure they can run.
23252325
virtual void emitAdditionalPredicates(MatchTable &Table,

llvm/utils/TableGen/FastISelEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct OperandsSignature {
8585
char Repr = OK_Invalid;
8686

8787
public:
88-
OpKind() {}
88+
OpKind() = default;
8989

9090
bool operator<(OpKind RHS) const { return Repr < RHS.Repr; }
9191
bool operator==(OpKind RHS) const { return Repr == RHS.Repr; }

llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2441,7 +2441,7 @@ class GICombinerEmitter final : public GlobalISelMatchTableExecutorEmitter {
24412441
explicit GICombinerEmitter(const RecordKeeper &RK,
24422442
const CodeGenTarget &Target, StringRef Name,
24432443
const Record *Combiner);
2444-
~GICombinerEmitter() override {}
2444+
~GICombinerEmitter() override = default;
24452445

24462446
void run(raw_ostream &OS);
24472447
};

llvm/utils/TableGen/X86DisassemblerTables.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ DisassemblerTables::DisassemblerTables() {
708708
HasConflicts = false;
709709
}
710710

711-
DisassemblerTables::~DisassemblerTables() {}
711+
DisassemblerTables::~DisassemblerTables() = default;
712712

713713
void DisassemblerTables::emitModRMDecision(raw_ostream &o1, raw_ostream &o2,
714714
unsigned &i1, unsigned &i2,

llvm/utils/TableGen/X86ModRMFilters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ModRMFilter {
2828

2929
public:
3030
/// Destructor - Override as necessary.
31-
virtual ~ModRMFilter() {}
31+
virtual ~ModRMFilter() = default;
3232

3333
/// isDumb - Indicates whether this filter returns the same value for
3434
/// any value of the ModR/M byte.

0 commit comments

Comments
 (0)