[clang-tools-extra] 3f3930a - Remove redundaunt virtual specifiers (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 23:01:18 PDT 2022
Author: Kazu Hirata
Date: 2022-07-25T23:00:59-07:00
New Revision: 3f3930a451e118e82885a6dd20e3918427b816c2
URL: https://github.com/llvm/llvm-project/commit/3f3930a451e118e82885a6dd20e3918427b816c2
DIFF: https://github.com/llvm/llvm-project/commit/3f3930a451e118e82885a6dd20e3918427b816c2.diff
LOG: Remove redundaunt virtual specifiers (NFC)
Identified with tidy-modernize-use-override.
Added:
Modified:
clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
clang-tools-extra/clangd/AST.cpp
clang-tools-extra/clangd/support/ThreadsafeFS.cpp
clang/lib/Basic/Targets/X86.h
clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/Sema/Sema.cpp
clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/lib/MC/ELFObjectWriter.cpp
llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.h
llvm/lib/Target/X86/X86InstrInfo.h
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
polly/include/polly/CodeGen/BlockGenerators.h
polly/include/polly/CodeGen/LoopGeneratorsGOMP.h
polly/include/polly/CodeGen/LoopGeneratorsKMP.h
polly/include/polly/ScopPass.h
polly/lib/CodeGen/CodegenCleanup.cpp
polly/lib/Support/DumpFunctionPass.cpp
polly/lib/Support/DumpModulePass.cpp
polly/lib/Transform/DeLICM.cpp
polly/lib/Transform/FlattenSchedule.cpp
polly/lib/Transform/Simplify.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h b/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
index bb549c5a2c695..95b8e22588a50 100644
--- a/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/SharedPtrArrayMismatchCheck.h
@@ -28,7 +28,7 @@ class SharedPtrArrayMismatchCheck : public SmartPtrArrayMismatchCheck {
SharedPtrArrayMismatchCheck(StringRef Name, ClangTidyContext *Context);
protected:
- virtual SmartPtrClassMatcher getSmartPointerClassMatcher() const override;
+ SmartPtrClassMatcher getSmartPointerClassMatcher() const override;
};
} // namespace bugprone
diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp
index 0c67c548e6c20..f7d526fab0963 100644
--- a/clang-tools-extra/clangd/AST.cpp
+++ b/clang-tools-extra/clangd/AST.cpp
@@ -368,7 +368,7 @@ std::string printType(const QualType QT, const DeclContext &CurContext,
public:
PrintCB(const DeclContext *CurContext) : CurContext(CurContext) {}
virtual ~PrintCB() {}
- virtual bool isScopeVisible(const DeclContext *DC) const override {
+ bool isScopeVisible(const DeclContext *DC) const override {
return DC->Encloses(CurContext);
}
diff --git a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp
index efd7e8cc6079c..dca04762b49a6 100644
--- a/clang-tools-extra/clangd/support/ThreadsafeFS.cpp
+++ b/clang-tools-extra/clangd/support/ThreadsafeFS.cpp
@@ -53,7 +53,7 @@ class VolatileFileSystem : public llvm::vfs::ProxyFileSystem {
assert(this->Wrapped);
}
- virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
getBuffer(const llvm::Twine &Name, int64_t FileSize,
bool RequiresNullTerminator, bool /*IsVolatile*/) override {
return Wrapped->getBuffer(Name, FileSize, RequiresNullTerminator,
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h
index ea98dcf42de65..0affa58b2f4c0 100644
--- a/clang/lib/Basic/Targets/X86.h
+++ b/clang/lib/Basic/Targets/X86.h
@@ -229,12 +229,12 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
bool validateInputSize(const llvm::StringMap<bool> &FeatureMap,
StringRef Constraint, unsigned Size) const override;
- virtual bool
+ bool
checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const override {
return true;
};
- virtual bool
+ bool
checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const override {
return true;
};
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
index 1d30c5061743a..ff585efa3fce2 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
+++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
@@ -186,17 +186,16 @@ class CGOpenMPRuntimeGPU : public CGOpenMPRuntime {
/// Emit call to void __kmpc_push_proc_bind(ident_t *loc, kmp_int32
/// global_tid, int proc_bind) to generate code for 'proc_bind' clause.
- virtual void emitProcBindClause(CodeGenFunction &CGF,
- llvm::omp::ProcBindKind ProcBind,
- SourceLocation Loc) override;
+ void emitProcBindClause(CodeGenFunction &CGF,
+ llvm::omp::ProcBindKind ProcBind,
+ SourceLocation Loc) override;
/// Emits call to void __kmpc_push_num_threads(ident_t *loc, kmp_int32
/// global_tid, kmp_int32 num_threads) to generate code for 'num_threads'
/// clause.
/// \param NumThreads An integer value of threads.
- virtual void emitNumThreadsClause(CodeGenFunction &CGF,
- llvm::Value *NumThreads,
- SourceLocation Loc) override;
+ void emitNumThreadsClause(CodeGenFunction &CGF, llvm::Value *NumThreads,
+ SourceLocation Loc) override;
/// This function ought to emit, in the general case, a call to
// the openmp runtime kmpc_push_num_teams. In NVPTX backend it is not needed
@@ -300,12 +299,12 @@ class CGOpenMPRuntimeGPU : public CGOpenMPRuntime {
/// SimpleReduction Emit reduction operation only. Used for omp simd
/// directive on the host.
/// ReductionKind The kind of reduction to perform.
- virtual void emitReduction(CodeGenFunction &CGF, SourceLocation Loc,
- ArrayRef<const Expr *> Privates,
- ArrayRef<const Expr *> LHSExprs,
- ArrayRef<const Expr *> RHSExprs,
- ArrayRef<const Expr *> ReductionOps,
- ReductionOptionsTy Options) override;
+ void emitReduction(CodeGenFunction &CGF, SourceLocation Loc,
+ ArrayRef<const Expr *> Privates,
+ ArrayRef<const Expr *> LHSExprs,
+ ArrayRef<const Expr *> RHSExprs,
+ ArrayRef<const Expr *> ReductionOps,
+ ReductionOptionsTy Options) override;
/// Returns specified OpenMP runtime function for the current OpenMP
/// implementation. Specialized for the NVPTX device.
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 2bc1e8e8c5b9f..f0c45654f8d9b 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -782,7 +782,7 @@ class MicrosoftCXXABI : public CGCXXABI {
LoadVTablePtr(CodeGenFunction &CGF, Address This,
const CXXRecordDecl *RD) override;
- virtual bool
+ bool
isPermittedToBeHomogeneousAggregate(const CXXRecordDecl *RD) const override;
private:
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 326010d4d93fd..95bc13f451f1b 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -137,9 +137,9 @@ class SemaPPCallbacks : public PPCallbacks {
void reset() { S = nullptr; }
- virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
- SrcMgr::CharacteristicKind FileType,
- FileID PrevFID) override {
+ void FileChanged(SourceLocation Loc, FileChangeReason Reason,
+ SrcMgr::CharacteristicKind FileType,
+ FileID PrevFID) override {
if (!S)
return;
switch (Reason) {
diff --git a/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
index 895212d134b88..b673b51c46232 100644
--- a/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
@@ -55,9 +55,9 @@ class InnerPointerChecker
ID.AddPointer(getTag());
}
- virtual PathDiagnosticPieceRef
- VisitNode(const ExplodedNode *N, BugReporterContext &BRC,
- PathSensitiveBugReport &BR) override;
+ PathDiagnosticPieceRef VisitNode(const ExplodedNode *N,
+ BugReporterContext &BRC,
+ PathSensitiveBugReport &BR) override;
// FIXME: Scan the map once in the visitor's constructor and do a direct
// lookup by region.
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 36464707d06a3..adedc9c30fad5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -852,9 +852,8 @@ class NoOwnershipChangeVisitor final : public NoStateChangeFuncVisitor {
return false;
}
- virtual bool
- wasModifiedInFunction(const ExplodedNode *CallEnterN,
- const ExplodedNode *CallExitEndN) override {
+ bool wasModifiedInFunction(const ExplodedNode *CallEnterN,
+ const ExplodedNode *CallExitEndN) override {
if (!doesFnIntendToHandleOwnership(
CallExitEndN->getFirstPred()->getLocationContext()->getDecl(),
CallExitEndN->getState()->getAnalysisManager().getASTContext()))
@@ -885,7 +884,7 @@ class NoOwnershipChangeVisitor final : public NoStateChangeFuncVisitor {
"later deallocation");
}
- virtual PathDiagnosticPieceRef
+ PathDiagnosticPieceRef
maybeEmitNoteForObjCSelf(PathSensitiveBugReport &R,
const ObjCMethodCall &Call,
const ExplodedNode *N) override {
@@ -893,7 +892,7 @@ class NoOwnershipChangeVisitor final : public NoStateChangeFuncVisitor {
return nullptr;
}
- virtual PathDiagnosticPieceRef
+ PathDiagnosticPieceRef
maybeEmitNoteForCXXThis(PathSensitiveBugReport &R,
const CXXConstructorCall &Call,
const ExplodedNode *N) override {
@@ -901,7 +900,7 @@ class NoOwnershipChangeVisitor final : public NoStateChangeFuncVisitor {
return nullptr;
}
- virtual PathDiagnosticPieceRef
+ PathDiagnosticPieceRef
maybeEmitNoteForParameters(PathSensitiveBugReport &R, const CallEvent &Call,
const ExplodedNode *N) override {
// TODO: Factor the logic of "what constitutes as an entity being passed
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index b99c219673d6f..3a90c37a36dab 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
@@ -530,9 +530,8 @@ class NoStoreFuncVisitor final : public NoStateChangeFuncVisitor {
private:
/// \return Whether \c RegionOfInterest was modified at \p CurrN compared to
/// the value it holds in \p CallExitBeginN.
- virtual bool
- wasModifiedBeforeCallExit(const ExplodedNode *CurrN,
- const ExplodedNode *CallExitBeginN) override;
+ bool wasModifiedBeforeCallExit(const ExplodedNode *CurrN,
+ const ExplodedNode *CallExitBeginN) override;
/// Attempts to find the region of interest in a given record decl,
/// by either following the base classes or fields.
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index 4a3ab00614b38..d1915fd4e7aee 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -198,7 +198,7 @@ class SelectionDAGBuilder {
SDAGSwitchLowering(SelectionDAGBuilder *sdb, FunctionLoweringInfo &funcinfo)
: SwitchCG::SwitchLowering(funcinfo), SDB(sdb) {}
- virtual void addSuccessorWithProb(
+ void addSuccessorWithProb(
MachineBasicBlock *Src, MachineBasicBlock *Dst,
BranchProbability Prob = BranchProbability::getUnknown()) override {
SDB->addSuccessorWithProb(Src, Dst, Prob);
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 0b4e9866d50af..f6360c4e2f21b 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -293,9 +293,8 @@ class ELFDwoObjectWriter : public ELFObjectWriter {
: ELFObjectWriter(std::move(MOTW)), OS(OS), DwoOS(DwoOS),
IsLittleEndian(IsLittleEndian) {}
- virtual bool checkRelocation(MCContext &Ctx, SMLoc Loc,
- const MCSectionELF *From,
- const MCSectionELF *To) override {
+ bool checkRelocation(MCContext &Ctx, SMLoc Loc, const MCSectionELF *From,
+ const MCSectionELF *To) override {
if (isDwoSection(*From)) {
Ctx.reportError(Loc, "A dwo section may not contain relocations");
return false;
diff --git a/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp b/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
index cb6d53ec0a124..5dc2bf07ddd5e 100644
--- a/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
+++ b/llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp
@@ -31,8 +31,8 @@ class MipsPreLegalizerCombinerInfo : public CombinerInfo {
: CombinerInfo(/*AllowIllegalOps*/ true, /*ShouldLegalizeIllegal*/ false,
/*LegalizerInfo*/ nullptr, /*EnableOpt*/ false,
/*EnableOptSize*/ false, /*EnableMinSize*/ false) {}
- virtual bool combine(GISelChangeObserver &Observer, MachineInstr &MI,
- MachineIRBuilder &B) const override;
+ bool combine(GISelChangeObserver &Observer, MachineInstr &MI,
+ MachineIRBuilder &B) const override;
};
bool MipsPreLegalizerCombinerInfo::combine(GISelChangeObserver &Observer,
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.h b/llvm/lib/Target/RISCV/RISCVInstrInfo.h
index 506a0a4946650..beb49f5f62491 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.h
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.h
@@ -149,17 +149,15 @@ class RISCVInstrInfo : public RISCVGenInstrInfo {
std::vector<outliner::Candidate> &RepeatedSequenceLocs) const override;
// Return if/how a given MachineInstr should be outlined.
- virtual outliner::InstrType
- getOutliningType(MachineBasicBlock::iterator &MBBI,
- unsigned Flags) const override;
+ outliner::InstrType getOutliningType(MachineBasicBlock::iterator &MBBI,
+ unsigned Flags) const override;
// Insert a custom frame for outlined functions.
- virtual void
- buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF,
- const outliner::OutlinedFunction &OF) const override;
+ void buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF,
+ const outliner::OutlinedFunction &OF) const override;
// Insert a call to an outlined function into a given basic block.
- virtual MachineBasicBlock::iterator
+ MachineBasicBlock::iterator
insertOutlinedCall(Module &M, MachineBasicBlock &MBB,
MachineBasicBlock::iterator &It, MachineFunction &MF,
outliner::Candidate &C) const override;
diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h
index 98da00c39bdbd..81729e3618d88 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.h
+++ b/llvm/lib/Target/X86/X86InstrInfo.h
@@ -544,7 +544,7 @@ class X86InstrInfo final : public X86GenInstrInfo {
ArrayRef<std::pair<unsigned, const char *>>
getSerializableDirectMachineOperandTargetFlags() const override;
- virtual outliner::OutlinedFunction getOutliningCandidateInfo(
+ outliner::OutlinedFunction getOutliningCandidateInfo(
std::vector<outliner::Candidate> &RepeatedSequenceLocs) const override;
bool isFunctionSafeToOutlineFrom(MachineFunction &MF,
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 589bcb414e101..83252fec3ea89 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -4500,9 +4500,8 @@ struct AAAlignImpl : AAAlign {
// to avoid making the alignment explicit if it did not improve.
/// See AbstractAttribute::getDeducedAttributes
- virtual void
- getDeducedAttributes(LLVMContext &Ctx,
- SmallVectorImpl<Attribute> &Attrs) const override {
+ void getDeducedAttributes(LLVMContext &Ctx,
+ SmallVectorImpl<Attribute> &Attrs) const override {
if (getAssumedAlign() > 1)
Attrs.emplace_back(
Attribute::getWithAlignment(Ctx, Align(getAssumedAlign())));
@@ -4972,9 +4971,8 @@ struct AANoCaptureImpl : public AANoCapture {
ChangeStatus updateImpl(Attributor &A) override;
/// see AbstractAttribute::isAssumedNoCaptureMaybeReturned(...).
- virtual void
- getDeducedAttributes(LLVMContext &Ctx,
- SmallVectorImpl<Attribute> &Attrs) const override {
+ void getDeducedAttributes(LLVMContext &Ctx,
+ SmallVectorImpl<Attribute> &Attrs) const override {
if (!isAssumedNoCaptureMaybeReturned())
return;
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 827b25533513d..664226ec187b2 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -597,10 +597,9 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
/// demanded bits.
bool SimplifyDemandedInstructionBits(Instruction &Inst);
- virtual Value *
- SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, APInt &UndefElts,
- unsigned Depth = 0,
- bool AllowMultipleUsers = false) override;
+ Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
+ APInt &UndefElts, unsigned Depth = 0,
+ bool AllowMultipleUsers = false) override;
/// Canonicalize the position of binops relative to shufflevector.
Instruction *foldVectorBinop(BinaryOperator &Inst);
diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h
index 1fc5a4c39b812..a30eb8b4bb931 100644
--- a/polly/include/polly/CodeGen/BlockGenerators.h
+++ b/polly/include/polly/CodeGen/BlockGenerators.h
@@ -974,7 +974,7 @@ class RegionGenerator final : BlockGenerator {
/// @param BBMap A mapping from old values to their new values in this block.
/// @param LTS A mapping from loops virtual canonical induction variable to
/// their new values.
- virtual void
+ void
generateScalarStores(ScopStmt &Stmt, LoopToScevMapT <S, ValueMapT &BBMAp,
__isl_keep isl_id_to_ast_expr *NewAccesses) override;
@@ -988,9 +988,8 @@ class RegionGenerator final : BlockGenerator {
/// @param BBMap A mapping from old values to their new values
/// (for values recalculated within this basic block).
/// @param LTS A map from old loops to new induction variables as SCEVs.
- virtual void copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst,
- ValueMapT &BBMap,
- LoopToScevMapT <S) override;
+ void copyPHIInstruction(ScopStmt &Stmt, PHINode *Inst, ValueMapT &BBMap,
+ LoopToScevMapT <S) override;
};
} // namespace polly
#endif
diff --git a/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h b/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h
index 83d9b4be96ddb..4cc4f394f3631 100644
--- a/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h
+++ b/polly/include/polly/CodeGen/LoopGeneratorsGOMP.h
@@ -47,7 +47,7 @@ class ParallelLoopGeneratorGOMP final : public ParallelLoopGenerator {
void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB,
Value *UB, Value *Stride) override;
- virtual Function *prepareSubFnDefinition(Function *F) const override;
+ Function *prepareSubFnDefinition(Function *F) const override;
std::tuple<Value *, Function *> createSubFn(Value *Stride, AllocaInst *Struct,
SetVector<Value *> UsedValues,
diff --git a/polly/include/polly/CodeGen/LoopGeneratorsKMP.h b/polly/include/polly/CodeGen/LoopGeneratorsKMP.h
index 9a7c75613d041..245a63c7bae50 100644
--- a/polly/include/polly/CodeGen/LoopGeneratorsKMP.h
+++ b/polly/include/polly/CodeGen/LoopGeneratorsKMP.h
@@ -73,7 +73,7 @@ class ParallelLoopGeneratorKMP final : public ParallelLoopGenerator {
void deployParallelExecution(Function *SubFn, Value *SubFnParam, Value *LB,
Value *UB, Value *Stride) override;
- virtual Function *prepareSubFnDefinition(Function *F) const override;
+ Function *prepareSubFnDefinition(Function *F) const override;
std::tuple<Value *, Function *> createSubFn(Value *Stride, AllocaInst *Struct,
SetVector<Value *> UsedValues,
diff --git a/polly/include/polly/ScopPass.h b/polly/include/polly/ScopPass.h
index c9d325a7e2a6f..144cfd1364393 100644
--- a/polly/include/polly/ScopPass.h
+++ b/polly/include/polly/ScopPass.h
@@ -175,7 +175,7 @@ class ScopPass : public RegionPass {
/// getAnalysisUsage - Subclasses that override getAnalysisUsage
/// must call this.
///
- virtual void getAnalysisUsage(AnalysisUsage &AU) const override;
+ void getAnalysisUsage(AnalysisUsage &AU) const override;
private:
bool runOnRegion(Region *R, RGPassManager &RGM) override;
diff --git a/polly/lib/CodeGen/CodegenCleanup.cpp b/polly/lib/CodeGen/CodegenCleanup.cpp
index 6ecb1f454b8da..100bc93a06d56 100644
--- a/polly/lib/CodeGen/CodegenCleanup.cpp
+++ b/polly/lib/CodeGen/CodegenCleanup.cpp
@@ -40,9 +40,9 @@ class CodegenCleanup final : public FunctionPass {
/// @name FunctionPass interface
//@{
- virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {}
+ void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {}
- virtual bool doInitialization(Module &M) override {
+ bool doInitialization(Module &M) override {
assert(!FPM);
FPM = new llvm::legacy::FunctionPassManager(&M);
@@ -106,7 +106,7 @@ class CodegenCleanup final : public FunctionPass {
return FPM->doInitialization();
}
- virtual bool doFinalization(Module &M) override {
+ bool doFinalization(Module &M) override {
bool Result = FPM->doFinalization();
delete FPM;
@@ -115,7 +115,7 @@ class CodegenCleanup final : public FunctionPass {
return Result;
}
- virtual bool runOnFunction(llvm::Function &F) override {
+ bool runOnFunction(llvm::Function &F) override {
if (!F.hasFnAttribute("polly-optimized")) {
LLVM_DEBUG(
dbgs() << F.getName()
diff --git a/polly/lib/Support/DumpFunctionPass.cpp b/polly/lib/Support/DumpFunctionPass.cpp
index 9256f12d76621..b4a10ab6849d3 100644
--- a/polly/lib/Support/DumpFunctionPass.cpp
+++ b/polly/lib/Support/DumpFunctionPass.cpp
@@ -100,11 +100,11 @@ class DumpFunctionWrapperPass final : public FunctionPass {
/// @name FunctionPass interface
//@{
- virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
+ void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
- virtual bool runOnFunction(llvm::Function &F) override {
+ bool runOnFunction(llvm::Function &F) override {
runDumpFunction(F, Suffix);
return false;
}
diff --git a/polly/lib/Support/DumpModulePass.cpp b/polly/lib/Support/DumpModulePass.cpp
index 5df74b2df43bb..c1c27ef6ac757 100644
--- a/polly/lib/Support/DumpModulePass.cpp
+++ b/polly/lib/Support/DumpModulePass.cpp
@@ -71,11 +71,11 @@ class DumpModuleWrapperPass final : public ModulePass {
/// @name ModulePass interface
//@{
- virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
+ void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
- virtual bool runOnModule(llvm::Module &M) override {
+ bool runOnModule(llvm::Module &M) override {
runDumpModule(M, Filename, IsSuffix);
return false;
}
diff --git a/polly/lib/Transform/DeLICM.cpp b/polly/lib/Transform/DeLICM.cpp
index 9948e08971d89..51e701346563a 100644
--- a/polly/lib/Transform/DeLICM.cpp
+++ b/polly/lib/Transform/DeLICM.cpp
@@ -1428,13 +1428,13 @@ class DeLICMWrapperPass final : public ScopPass {
static char ID;
explicit DeLICMWrapperPass() : ScopPass(ID) {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequiredTransitive<ScopInfoRegionPass>();
AU.addRequired<LoopInfoWrapperPass>();
AU.setPreservesAll();
}
- virtual bool runOnScop(Scop &S) override {
+ bool runOnScop(Scop &S) override {
// Free resources for previous scop's computation, if not yet done.
releaseMemory();
@@ -1444,7 +1444,7 @@ class DeLICMWrapperPass final : public ScopPass {
return Impl->isModified();
}
- virtual void printScop(raw_ostream &OS, Scop &S) const override {
+ void printScop(raw_ostream &OS, Scop &S) const override {
if (!Impl)
return;
assert(Impl->getScop() == &S);
@@ -1453,7 +1453,7 @@ class DeLICMWrapperPass final : public ScopPass {
Impl->print(OS);
}
- virtual void releaseMemory() override { Impl.reset(); }
+ void releaseMemory() override { Impl.reset(); }
};
char DeLICMWrapperPass::ID;
diff --git a/polly/lib/Transform/FlattenSchedule.cpp b/polly/lib/Transform/FlattenSchedule.cpp
index 27de81f433b82..53e230be7a694 100644
--- a/polly/lib/Transform/FlattenSchedule.cpp
+++ b/polly/lib/Transform/FlattenSchedule.cpp
@@ -47,12 +47,12 @@ class FlattenSchedule final : public ScopPass {
static char ID;
explicit FlattenSchedule() : ScopPass(ID) {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequiredTransitive<ScopInfoRegionPass>();
AU.setPreservesAll();
}
- virtual bool runOnScop(Scop &S) override {
+ bool runOnScop(Scop &S) override {
// Keep a reference to isl_ctx to ensure that it is not freed before we free
// OldSchedule.
IslCtx = S.getSharedIslCtx();
@@ -79,7 +79,7 @@ class FlattenSchedule final : public ScopPass {
return false;
}
- virtual void printScop(raw_ostream &OS, Scop &S) const override {
+ void printScop(raw_ostream &OS, Scop &S) const override {
OS << "Schedule before flattening {\n";
printSchedule(OS, OldSchedule, 4);
OS << "}\n\n";
@@ -89,7 +89,7 @@ class FlattenSchedule final : public ScopPass {
OS << "}\n";
}
- virtual void releaseMemory() override {
+ void releaseMemory() override {
OldSchedule = {};
IslCtx.reset();
}
diff --git a/polly/lib/Transform/Simplify.cpp b/polly/lib/Transform/Simplify.cpp
index f6cbfceb1c273..27e865a93dd59 100644
--- a/polly/lib/Transform/Simplify.cpp
+++ b/polly/lib/Transform/Simplify.cpp
@@ -762,13 +762,13 @@ class SimplifyWrapperPass final : public ScopPass {
explicit SimplifyWrapperPass(int CallNo = 0) : ScopPass(ID), CallNo(CallNo) {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequiredTransitive<ScopInfoRegionPass>();
AU.addRequired<LoopInfoWrapperPass>();
AU.setPreservesAll();
}
- virtual bool runOnScop(Scop &S) override {
+ bool runOnScop(Scop &S) override {
LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
Impl.emplace(CallNo);
@@ -777,12 +777,12 @@ class SimplifyWrapperPass final : public ScopPass {
return false;
}
- virtual void printScop(raw_ostream &OS, Scop &S) const override {
+ void printScop(raw_ostream &OS, Scop &S) const override {
if (Impl)
Impl->printScop(OS, S);
}
- virtual void releaseMemory() override { Impl.reset(); }
+ void releaseMemory() override { Impl.reset(); }
};
char SimplifyWrapperPass::ID;
More information about the cfe-commits
mailing list