Skip to content

Commit 53d460f

Browse files
kazutakahirataDebadri Basak
authored andcommitted
[Transforms] Use "= default" (NFC) (llvm#166043)
Identified with modernize-use-equals-default.
1 parent a0aa287 commit 53d460f

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

llvm/include/llvm/Transforms/Coroutines/CoroAnnotationElide.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace llvm {
2525

2626
struct CoroAnnotationElidePass : PassInfoMixin<CoroAnnotationElidePass> {
27-
CoroAnnotationElidePass() {}
27+
CoroAnnotationElidePass() = default;
2828

2929
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM,
3030
LazyCallGraph &CG, CGSCCUpdateResult &UR);

llvm/include/llvm/Transforms/IPO/FatLTOCleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ModuleSummaryIndex;
2626

2727
class FatLtoCleanup : public PassInfoMixin<FatLtoCleanup> {
2828
public:
29-
FatLtoCleanup() {}
29+
FatLtoCleanup() = default;
3030
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
3131
static bool isRequired() { return true; }
3232
};

llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class LegalityResult {
167167
LegalityResult &operator=(const LegalityResult &) = delete;
168168

169169
public:
170-
virtual ~LegalityResult() {}
170+
virtual ~LegalityResult() = default;
171171
LegalityResultID getSubclassID() const { return ID; }
172172
#ifndef NDEBUG
173173
virtual void print(raw_ostream &OS) const {

llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/SeedCollector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SeedBundle {
3636
/// No need to allow copies.
3737
SeedBundle(const SeedBundle &) = delete;
3838
SeedBundle &operator=(const SeedBundle &) = delete;
39-
virtual ~SeedBundle() {}
39+
virtual ~SeedBundle() = default;
4040

4141
using iterator = SmallVector<Instruction *>::iterator;
4242
using const_iterator = SmallVector<Instruction *>::const_iterator;

llvm/lib/Transforms/Coroutines/CoroCloner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class BaseCloner {
7777
: OrigF(OrigF), Suffix(Suffix), Shape(Shape), FKind(FKind),
7878
Builder(OrigF.getContext()), TTI(TTI) {}
7979

80-
virtual ~BaseCloner() {}
80+
virtual ~BaseCloner() = default;
8181

8282
/// Create a clone for a continuation lowering.
8383
static Function *createClone(Function &OrigF, const Twine &Suffix,

llvm/lib/Transforms/Scalar/GVNSink.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ class ValueTable {
514514

515515
class GVNSink {
516516
public:
517-
GVNSink() {}
517+
GVNSink() = default;
518518

519519
bool run(Function &F) {
520520
LLVM_DEBUG(dbgs() << "GVNSink: running on function @" << F.getName()

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ class VPIRMetadata {
939939
SmallVector<std::pair<unsigned, MDNode *>> Metadata;
940940

941941
public:
942-
VPIRMetadata() {}
942+
VPIRMetadata() = default;
943943

944944
/// Adds metatadata that can be preserved from the original instruction
945945
/// \p I.
@@ -950,12 +950,9 @@ class VPIRMetadata {
950950
VPIRMetadata(Instruction &I, LoopVersioning *LVer);
951951

952952
/// Copy constructor for cloning.
953-
VPIRMetadata(const VPIRMetadata &Other) : Metadata(Other.Metadata) {}
953+
VPIRMetadata(const VPIRMetadata &Other) = default;
954954

955-
VPIRMetadata &operator=(const VPIRMetadata &Other) {
956-
Metadata = Other.Metadata;
957-
return *this;
958-
}
955+
VPIRMetadata &operator=(const VPIRMetadata &Other) = default;
959956

960957
/// Add all metadata to \p I.
961958
void applyMetadata(Instruction &I) const;
@@ -3985,7 +3982,7 @@ class VPIRBasicBlock : public VPBasicBlock {
39853982
IRBB(IRBB) {}
39863983

39873984
public:
3988-
~VPIRBasicBlock() override {}
3985+
~VPIRBasicBlock() override = default;
39893986

39903987
static inline bool classof(const VPBlockBase *V) {
39913988
return V->getVPBlockID() == VPBlockBase::VPIRBasicBlockSC;
@@ -4037,7 +4034,7 @@ class LLVM_ABI_FOR_TEST VPRegionBlock : public VPBlockBase {
40374034
IsReplicator(IsReplicator) {}
40384035

40394036
public:
4040-
~VPRegionBlock() override {}
4037+
~VPRegionBlock() override = default;
40414038

40424039
/// Method to support type inquiry through isa, cast, and dyn_cast.
40434040
static inline bool classof(const VPBlockBase *V) {

0 commit comments

Comments
 (0)