[CodeGen] Use = default (NFC)

Identified with modernize-use-equals-default
This commit is contained in:
Kazu Hirata 2022-02-06 10:54:44 -08:00
parent 631b94cc22
commit 3a8c51480f
20 changed files with 22 additions and 26 deletions

View File

@ -28,7 +28,7 @@ using namespace llvm;
ARMException::ARMException(AsmPrinter *A) : DwarfCFIExceptionBase(A) {}
ARMException::~ARMException() {}
ARMException::~ARMException() = default;
ARMTargetStreamer &ARMException::getTargetStreamer() {
MCTargetStreamer &TS = *Asm->OutStreamer->getTargetStreamer();

View File

@ -53,7 +53,7 @@ void DwarfCFIExceptionBase::endFragment() {
DwarfCFIException::DwarfCFIException(AsmPrinter *A)
: DwarfCFIExceptionBase(A) {}
DwarfCFIException::~DwarfCFIException() {}
DwarfCFIException::~DwarfCFIException() = default;
/// endModule - Emit all exception information that should come after the
/// content.

View File

@ -80,7 +80,7 @@ private:
public:
DbgEntity(const DINode *N, const DILocation *IA, DbgEntityKind ID)
: Entity(N), InlinedAt(IA), SubclassID(ID) {}
virtual ~DbgEntity() {}
virtual ~DbgEntity() = default;
/// Accessors.
/// @{

View File

@ -29,7 +29,7 @@ using namespace llvm;
WinCFGuard::WinCFGuard(AsmPrinter *A) : Asm(A) {}
WinCFGuard::~WinCFGuard() {}
WinCFGuard::~WinCFGuard() = default;
void WinCFGuard::endFunction(const MachineFunction *MF) {

View File

@ -46,7 +46,7 @@ WinException::WinException(AsmPrinter *A) : EHStreamer(A) {
isThumb = Asm->TM.getTargetTriple().isThumb();
}
WinException::~WinException() {}
WinException::~WinException() = default;
/// endModule - Emit all exception information that should come after the
/// content.

View File

@ -88,7 +88,7 @@ void GISelCSEInfo::setMF(MachineFunction &MF) {
this->MRI = &MF.getRegInfo();
}
GISelCSEInfo::~GISelCSEInfo() {}
GISelCSEInfo::~GISelCSEInfo() = default;
bool GISelCSEInfo::isUniqueMachineInstValid(
const UniqueMachineInstr &UMI) const {

View File

@ -57,8 +57,7 @@ class WorkListMaintainer : public GISelChangeObserver {
public:
WorkListMaintainer(WorkListTy &WorkList) : WorkList(WorkList) {}
virtual ~WorkListMaintainer() {
}
virtual ~WorkListMaintainer() = default;
void erasingInstr(MachineInstr &MI) override {
LLVM_DEBUG(dbgs() << "Erasing: " << MI << "\n");

View File

@ -37,7 +37,7 @@ class LLVM_LIBRARY_VISIBILITY InterferenceCache {
SlotIndex First;
SlotIndex Last;
BlockInterference() {}
BlockInterference() = default;
};
/// Entry - A cache entry containing interference information for all aliases

View File

@ -899,7 +899,7 @@ MachineInstrBuilder MLocTracker::emitLoc(Optional<LocIdx> MLoc,
}
/// Default construct and initialize the pass.
InstrRefBasedLDV::InstrRefBasedLDV() {}
InstrRefBasedLDV::InstrRefBasedLDV() = default;
bool InstrRefBasedLDV::isCalleeSaved(LocIdx L) const {
unsigned Reg = MTracker->LocIdxToLocID[L];

View File

@ -65,7 +65,7 @@ public:
static char ID;
LiveDebugValues();
~LiveDebugValues() {}
~LiveDebugValues() = default;
/// Calculate the liveness information for the given machine function.
bool runOnMachineFunction(MachineFunction &MF) override;

View File

@ -28,7 +28,7 @@ public:
virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree,
TargetPassConfig *TPC, unsigned InputBBLimit,
unsigned InputDbgValLimit) = 0;
virtual ~LDVImpl() {}
virtual ~LDVImpl() = default;
};
} // namespace SharedLiveDebugValues

View File

@ -1035,9 +1035,9 @@ public:
// Implementation
//===----------------------------------------------------------------------===//
VarLocBasedLDV::VarLocBasedLDV() { }
VarLocBasedLDV::VarLocBasedLDV() = default;
VarLocBasedLDV::~VarLocBasedLDV() { }
VarLocBasedLDV::~VarLocBasedLDV() = default;
/// Erase a variable from the set of open ranges, and additionally erase any
/// fragments that may overlap it. If the VarLoc is a backup location, erase

View File

@ -1023,7 +1023,7 @@ SMDiagnostic MIRParserImpl::diagFromBlockStringDiag(const SMDiagnostic &Error,
MIRParser::MIRParser(std::unique_ptr<MIRParserImpl> Impl)
: Impl(std::move(Impl)) {}
MIRParser::~MIRParser() {}
MIRParser::~MIRParser() = default;
std::unique_ptr<Module>
MIRParser::parseIRModule(DataLayoutCallbackTy DataLayoutCallback) {

View File

@ -53,8 +53,7 @@ MachineBasicBlock::MachineBasicBlock(MachineFunction &MF, const BasicBlock *B)
IrrLoopHeaderWeight = B->getIrrLoopHeaderWeight();
}
MachineBasicBlock::~MachineBasicBlock() {
}
MachineBasicBlock::~MachineBasicBlock() = default;
/// Return the MCSymbol for this basic block.
MCSymbol *MachineBasicBlock::getSymbol() const {

View File

@ -810,7 +810,7 @@ protected:
unsigned CurrentSrcIdx = 0; ///< The index of the source being rewritten.
public:
Rewriter(MachineInstr &CopyLike) : CopyLike(CopyLike) {}
virtual ~Rewriter() {}
virtual ~Rewriter() = default;
/// Get the next rewritable source (SrcReg, SrcSubReg) and
/// the related value that it affects (DstReg, DstSubReg).

View File

@ -72,7 +72,7 @@ DebugMod("postra-sched-debugmod",
cl::desc("Debug control MBBs that are scheduled"),
cl::init(0), cl::Hidden);
AntiDepBreaker::~AntiDepBreaker() { }
AntiDepBreaker::~AntiDepBreaker() = default;
namespace {
class PostRAScheduler : public MachineFunctionPass {

View File

@ -29,8 +29,7 @@ PseudoSourceValue::PseudoSourceValue(unsigned Kind, const TargetInstrInfo &TII)
AddressSpace = TII.getAddressSpaceForPseudoSourceKind(Kind);
}
PseudoSourceValue::~PseudoSourceValue() {}
PseudoSourceValue::~PseudoSourceValue() = default;
void PseudoSourceValue::printCustom(raw_ostream &O) const {
if (Kind < TargetCustom)

View File

@ -41,8 +41,7 @@ static cl::opt<bool> DisableHazardRecognizer(
"disable-sched-hazard", cl::Hidden, cl::init(false),
cl::desc("Disable hazard detection during preRA scheduling"));
TargetInstrInfo::~TargetInstrInfo() {
}
TargetInstrInfo::~TargetInstrInfo() = default;
const TargetRegisterClass*
TargetInstrInfo::getRegClass(const MCInstrDesc &MCID, unsigned OpNum,
@ -1402,7 +1401,7 @@ std::string TargetInstrInfo::createMIROperandComment(
return OS.str();
}
TargetInstrInfo::PipelinerLoopInfo::~PipelinerLoopInfo() {}
TargetInstrInfo::PipelinerLoopInfo::~PipelinerLoopInfo() = default;
void TargetInstrInfo::mergeOutliningCandidateAttributes(
Function &F, std::vector<outliner::Candidate> &Candidates) const {

View File

@ -2547,7 +2547,7 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForTOCEntry(
//===----------------------------------------------------------------------===//
// GOFF
//===----------------------------------------------------------------------===//
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() {}
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default;
MCSection *TargetLoweringObjectFileGOFF::getExplicitSectionGlobal(
const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {

View File

@ -1256,4 +1256,4 @@ void WinEHFuncInfo::addIPToStateRange(const InvokeInst *II,
LabelToStateMap[InvokeBegin] = std::make_pair(InvokeStateMap[II], InvokeEnd);
}
WinEHFuncInfo::WinEHFuncInfo() {}
WinEHFuncInfo::WinEHFuncInfo() = default;