[lld] 95a932f - Remove redundaunt override specifiers (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 24 22:28:22 PDT 2022
Author: Kazu Hirata
Date: 2022-07-24T22:28:11-07:00
New Revision: 95a932fb15960e66fdc43dc9821685addd5ee44d
URL: https://github.com/llvm/llvm-project/commit/95a932fb15960e66fdc43dc9821685addd5ee44d
DIFF: https://github.com/llvm/llvm-project/commit/95a932fb15960e66fdc43dc9821685addd5ee44d.diff
LOG: Remove redundaunt override specifiers (NFC)
Identified with modernize-use-override.
Added:
Modified:
clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp
clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
clang-tools-extra/clangd/refactor/tweaks/ExpandMacro.cpp
clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp
clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
clang-tools-extra/clangd/refactor/tweaks/SpecialMembers.cpp
clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
clang/include/clang/Frontend/Utils.h
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h
clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h
clang/include/clang/Tooling/Refactoring/RefactoringOptions.h
clang/lib/CodeGen/ABIInfo.h
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
lld/MachO/SyntheticSections.h
llvm/include/llvm/Analysis/DDG.h
llvm/lib/Target/SystemZ/SystemZRegisterInfo.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h b/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h
index def04c917bbc9..d00afecd495de 100644
--- a/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h
+++ b/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h
@@ -34,12 +34,11 @@ class RenamerClangTidyCheck : public ClangTidyCheck {
/// class will do the matching and call the derived class'
/// getDeclFailureInfo() and getMacroFailureInfo() for determining whether a
/// given identifier passes or fails the check.
- void registerMatchers(ast_matchers::MatchFinder *Finder) override final;
- void
- check(const ast_matchers::MatchFinder::MatchResult &Result) override final;
+ void registerMatchers(ast_matchers::MatchFinder *Finder) final;
+ void check(const ast_matchers::MatchFinder::MatchResult &Result) final;
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
- Preprocessor *ModuleExpanderPP) override final;
- void onEndOfTranslationUnit() override final;
+ Preprocessor *ModuleExpanderPP) final;
+ void onEndOfTranslationUnit() final;
/// Derived classes that override this function should call this method from
/// the overridden method.
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index b9998711f52e4..edbb1722ae38e 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -788,7 +788,7 @@ struct CompletionRecorder : public CodeCompleteConsumer {
void ProcessCodeCompleteResults(class Sema &S, CodeCompletionContext Context,
CodeCompletionResult *InResults,
- unsigned NumResults) override final {
+ unsigned NumResults) final {
// Results from recovery mode are generally useless, and the callback after
// recovery (if any) is usually more interesting. To make sure we handle the
// future callback from sema, we just ignore all callbacks in recovery mode,
diff --git a/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp b/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp
index 1383560ad4656..2a34e43f980ba 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp
@@ -23,7 +23,7 @@ namespace {
/// void /* entity.name.function.cpp */ f() { int /* variable.cpp */ abc; }
class AnnotateHighlightings : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override { return true; }
Expected<Effect> apply(const Selection &Inputs) override;
diff --git a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
index 9812cfcf3c626..96d0a194fb892 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
@@ -385,7 +385,7 @@ addInlineIfInHeader(const FunctionDecl *FD) {
///
class DefineInline : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
diff --git a/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp b/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
index d0c06f80ce6b3..f2ae97c080693 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
@@ -31,7 +31,7 @@ namespace {
/// `-StringLiteral "foo"
class DumpAST : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override {
for (auto *N = Inputs.ASTSelection.commonAncestor(); N && !Node;
@@ -84,7 +84,7 @@ llvm::Expected<Tweak::Effect> DumpAST::apply(const Selection &Inputs) {
/// *IntegerLiteral 2
class ShowSelectionTree : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override { return true; }
Expected<Effect> apply(const Selection &Inputs) override {
@@ -104,7 +104,7 @@ REGISTER_TWEAK(ShowSelectionTree)
/// foo -
/// {"containerName":null,"id":"CA2EBE44A1D76D2A","name":"foo","usr":"c:@F at foo#"}
class DumpSymbol : public Tweak {
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override { return true; }
Expected<Effect> apply(const Selection &Inputs) override {
std::string Storage;
@@ -133,7 +133,7 @@ REGISTER_TWEAK(DumpSymbol)
/// | nvsize=4, nvalign=4]
class DumpRecordLayout : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override {
if (auto *Node = Inputs.ASTSelection.commonAncestor())
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExpandMacro.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExpandMacro.cpp
index fad3a3c3d20df..29e681c3d44f7 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExpandMacro.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExpandMacro.cpp
@@ -30,7 +30,7 @@ namespace {
/// 10*a+10*a
class ExpandMacro : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
}
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
index adfc42a851b02..66fe4fdbfa2d3 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
@@ -796,7 +796,7 @@ llvm::Expected<NewFunction> getExtractedFunction(ExtractionZone &ExtZone,
class ExtractFunction : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override;
Expected<Effect> apply(const Selection &Inputs) override;
std::string title() const override { return "Extract to function"; }
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
index 5efe09fb3cb27..aac017c0725d4 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
@@ -485,7 +485,7 @@ const SelectionTree::Node *computeExtractedExpr(const SelectionTree::Node *N) {
/// int x = placeholder * 3;
class ExtractVariable : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override;
Expected<Effect> apply(const Selection &Inputs) override;
std::string title() const override {
diff --git a/clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp b/clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp
index bc0f4e1ce2569..9bb8ca96a8b61 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp
@@ -32,7 +32,7 @@ namespace {
// We place the constructor inline, other tweaks are available to outline it.
class MemberwiseConstructor : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
}
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp b/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
index 1e2d6c31fc454..62995840ac24a 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
@@ -30,7 +30,7 @@ namespace {
/// NSLocalizedString(@"description", @"")
class ObjCLocalizeStringLiteral : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
}
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp b/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
index 30ff058619550..c129428991d46 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
@@ -172,7 +172,7 @@ initializerForParams(const SmallVector<MethodParameter, 8> &Params,
/// properties and instance variables.
class ObjCMemberwiseInitializer : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
}
diff --git a/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp b/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
index 4185127d1f017..f5021b820f38d 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
@@ -28,7 +28,7 @@ namespace {
/// b)");
class RawStringLiteral : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override;
Expected<Effect> apply(const Selection &Inputs) override;
diff --git a/clang-tools-extra/clangd/refactor/tweaks/SpecialMembers.cpp b/clang-tools-extra/clangd/refactor/tweaks/SpecialMembers.cpp
index 7d5b41abe5fc5..e15605191c752 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/SpecialMembers.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/SpecialMembers.cpp
@@ -86,7 +86,7 @@ std::string buildSpecialMemberDeclarations(const CXXRecordDecl &Class) {
// - as a baseline for explicit modification
class DeclareCopyMove : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
}
diff --git a/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp b/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
index 5c829cb348878..b59f1d63f3f0e 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
@@ -31,7 +31,7 @@ namespace {
/// if (foo) { continue; } else { return 10; }
class SwapIfBranches : public Tweak {
public:
- const char *id() const override final;
+ const char *id() const final;
bool prepare(const Selection &Inputs) override;
Expected<Effect> apply(const Selection &Inputs) override;
diff --git a/clang/include/clang/Frontend/Utils.h b/clang/include/clang/Frontend/Utils.h
index 240624d5408f1..143cf4359f00b 100644
--- a/clang/include/clang/Frontend/Utils.h
+++ b/clang/include/clang/Frontend/Utils.h
@@ -107,10 +107,10 @@ class DependencyFileGenerator : public DependencyCollector {
void finishedMainFile(DiagnosticsEngine &Diags) override;
- bool needSystemDependencies() final override { return IncludeSystemHeaders; }
+ bool needSystemDependencies() final { return IncludeSystemHeaders; }
bool sawDependency(StringRef Filename, bool FromModule, bool IsSystem,
- bool IsModuleFile, bool IsMissing) final override;
+ bool IsModuleFile, bool IsMissing) final;
protected:
void outputDependencyFile(llvm::raw_ostream &OS);
diff --git a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
index 685dc66182ef4..48da56c00f7a3 100644
--- a/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
+++ b/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
@@ -731,7 +731,7 @@ class NoStateChangeFuncVisitor : public BugReporterVisitor {
PathDiagnosticPieceRef VisitNode(const ExplodedNode *N,
BugReporterContext &BR,
- PathSensitiveBugReport &R) override final;
+ PathSensitiveBugReport &R) final;
};
} // namespace ento
diff --git a/clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h b/clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h
index 49e4a0c149f14..1a318da3acca1 100644
--- a/clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h
+++ b/clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h
@@ -98,7 +98,7 @@ class OptionRequirement : public RefactoringOptionsRequirement {
OptionRequirement() : Opt(createRefactoringOption<OptionType>()) {}
ArrayRef<std::shared_ptr<RefactoringOption>>
- getRefactoringOptions() const final override {
+ getRefactoringOptions() const final {
return Opt;
}
diff --git a/clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h b/clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h
index 86fcc6ad0a799..5cb051d534338 100644
--- a/clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h
+++ b/clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h
@@ -52,7 +52,7 @@ using RefactoringActionRules =
class SourceChangeRefactoringRule : public RefactoringActionRuleBase {
public:
void invoke(RefactoringResultConsumer &Consumer,
- RefactoringRuleContext &Context) final override {
+ RefactoringRuleContext &Context) final {
Expected<AtomicChanges> Changes = createSourceReplacements(Context);
if (!Changes)
Consumer.handleError(Changes.takeError());
@@ -74,7 +74,7 @@ class SourceChangeRefactoringRule : public RefactoringActionRuleBase {
class FindSymbolOccurrencesRefactoringRule : public RefactoringActionRuleBase {
public:
void invoke(RefactoringResultConsumer &Consumer,
- RefactoringRuleContext &Context) final override {
+ RefactoringRuleContext &Context) final {
Expected<SymbolOccurrences> Occurrences = findSymbolOccurrences(Context);
if (!Occurrences)
Consumer.handleError(Occurrences.takeError());
diff --git a/clang/include/clang/Tooling/Refactoring/RefactoringOptions.h b/clang/include/clang/Tooling/Refactoring/RefactoringOptions.h
index 1575a136b11cf..75bd91d150165 100644
--- a/clang/include/clang/Tooling/Refactoring/RefactoringOptions.h
+++ b/clang/include/clang/Tooling/Refactoring/RefactoringOptions.h
@@ -24,7 +24,7 @@ template <typename T,
typename = std::enable_if_t<traits::IsValidOptionType<T>::value>>
class OptionalRefactoringOption : public RefactoringOption {
public:
- void passToVisitor(RefactoringOptionVisitor &Visitor) final override {
+ void passToVisitor(RefactoringOptionVisitor &Visitor) final {
Visitor.visit(*this, Value);
}
@@ -48,7 +48,7 @@ class RequiredRefactoringOption : public OptionalRefactoringOption<T> {
const ValueType &getValue() const {
return *OptionalRefactoringOption<T>::Value;
}
- bool isRequired() const final override { return true; }
+ bool isRequired() const final { return true; }
};
} // end namespace tooling
diff --git a/clang/lib/CodeGen/ABIInfo.h b/clang/lib/CodeGen/ABIInfo.h
index fe6cc7a2b1c75..c1eb8a9757962 100644
--- a/clang/lib/CodeGen/ABIInfo.h
+++ b/clang/lib/CodeGen/ABIInfo.h
@@ -127,7 +127,7 @@ namespace CodeGen {
public:
SwiftABIInfo(CodeGen::CodeGenTypes &cgt) : ABIInfo(cgt) {}
- bool supportsSwift() const final override { return true; }
+ bool supportsSwift() const final { return true; }
virtual bool shouldPassIndirectlyForSwift(ArrayRef<llvm::Type*> types,
bool asReturnValue) const = 0;
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index 2caa5bbc16df1..b99c219673d6f 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
@@ -547,19 +547,17 @@ class NoStoreFuncVisitor final : public NoStateChangeFuncVisitor {
// Region of interest corresponds to an IVar, exiting a method
// which could have written into that IVar, but did not.
- virtual PathDiagnosticPieceRef
- maybeEmitNoteForObjCSelf(PathSensitiveBugReport &R,
- const ObjCMethodCall &Call,
- const ExplodedNode *N) override final;
+ PathDiagnosticPieceRef maybeEmitNoteForObjCSelf(PathSensitiveBugReport &R,
+ const ObjCMethodCall &Call,
+ const ExplodedNode *N) final;
- virtual PathDiagnosticPieceRef
- maybeEmitNoteForCXXThis(PathSensitiveBugReport &R,
- const CXXConstructorCall &Call,
- const ExplodedNode *N) override final;
+ PathDiagnosticPieceRef maybeEmitNoteForCXXThis(PathSensitiveBugReport &R,
+ const CXXConstructorCall &Call,
+ const ExplodedNode *N) final;
- virtual PathDiagnosticPieceRef
+ PathDiagnosticPieceRef
maybeEmitNoteForParameters(PathSensitiveBugReport &R, const CallEvent &Call,
- const ExplodedNode *N) override final;
+ const ExplodedNode *N) final;
/// Consume the information on the no-store stack frame in order to
/// either emit a note or suppress the report enirely.
diff --git a/lld/MachO/SyntheticSections.h b/lld/MachO/SyntheticSections.h
index afdd46d8a7de4..29c2d98c6625c 100644
--- a/lld/MachO/SyntheticSections.h
+++ b/lld/MachO/SyntheticSections.h
@@ -70,7 +70,7 @@ class LinkEditSection : public SyntheticSection {
// Sections in __LINKEDIT are special: their offsets are recorded in the
// load commands like LC_DYLD_INFO_ONLY and LC_SYMTAB, instead of in section
// headers.
- bool isHidden() const override final { return true; }
+ bool isHidden() const final { return true; }
virtual uint64_t getRawSize() const = 0;
@@ -80,9 +80,7 @@ class LinkEditSection : public SyntheticSection {
//
// NOTE: This assumes that the extra bytes required for alignment can be
// zero-valued bytes.
- uint64_t getSize() const override final {
- return llvm::alignTo(getRawSize(), align);
- }
+ uint64_t getSize() const final { return llvm::alignTo(getRawSize(), align); }
};
// The header of the Mach-O file, which must have a file offset of zero.
diff --git a/llvm/include/llvm/Analysis/DDG.h b/llvm/include/llvm/Analysis/DDG.h
index 7649e630b23d7..bc599cb1f9a15 100644
--- a/llvm/include/llvm/Analysis/DDG.h
+++ b/llvm/include/llvm/Analysis/DDG.h
@@ -348,37 +348,37 @@ class DDGBuilder : public AbstractDependenceGraphBuilder<DataDependenceGraph> {
DDGBuilder(DataDependenceGraph &G, DependenceInfo &D,
const BasicBlockListType &BBs)
: AbstractDependenceGraphBuilder(G, D, BBs) {}
- DDGNode &createRootNode() final override {
+ DDGNode &createRootNode() final {
auto *RN = new RootDDGNode();
assert(RN && "Failed to allocate memory for DDG root node.");
Graph.addNode(*RN);
return *RN;
}
- DDGNode &createFineGrainedNode(Instruction &I) final override {
+ DDGNode &createFineGrainedNode(Instruction &I) final {
auto *SN = new SimpleDDGNode(I);
assert(SN && "Failed to allocate memory for simple DDG node.");
Graph.addNode(*SN);
return *SN;
}
- DDGNode &createPiBlock(const NodeListType &L) final override {
+ DDGNode &createPiBlock(const NodeListType &L) final {
auto *Pi = new PiBlockDDGNode(L);
assert(Pi && "Failed to allocate memory for pi-block node.");
Graph.addNode(*Pi);
return *Pi;
}
- DDGEdge &createDefUseEdge(DDGNode &Src, DDGNode &Tgt) final override {
+ DDGEdge &createDefUseEdge(DDGNode &Src, DDGNode &Tgt) final {
auto *E = new DDGEdge(Tgt, DDGEdge::EdgeKind::RegisterDefUse);
assert(E && "Failed to allocate memory for edge");
Graph.connect(Src, Tgt, *E);
return *E;
}
- DDGEdge &createMemoryEdge(DDGNode &Src, DDGNode &Tgt) final override {
+ DDGEdge &createMemoryEdge(DDGNode &Src, DDGNode &Tgt) final {
auto *E = new DDGEdge(Tgt, DDGEdge::EdgeKind::MemoryDependence);
assert(E && "Failed to allocate memory for edge");
Graph.connect(Src, Tgt, *E);
return *E;
}
- DDGEdge &createRootedEdge(DDGNode &Src, DDGNode &Tgt) final override {
+ DDGEdge &createRootedEdge(DDGNode &Src, DDGNode &Tgt) final {
auto *E = new DDGEdge(Tgt, DDGEdge::EdgeKind::Rooted);
assert(E && "Failed to allocate memory for edge");
assert(isa<RootDDGNode>(Src) && "Expected root node");
@@ -386,7 +386,7 @@ class DDGBuilder : public AbstractDependenceGraphBuilder<DataDependenceGraph> {
return *E;
}
- const NodeListType &getNodesInPiBlock(const DDGNode &N) final override {
+ const NodeListType &getNodesInPiBlock(const DDGNode &N) final {
auto *PiNode = dyn_cast<const PiBlockDDGNode>(&N);
assert(PiNode && "Expected a pi-block node.");
return PiNode->getNodes();
@@ -394,11 +394,10 @@ class DDGBuilder : public AbstractDependenceGraphBuilder<DataDependenceGraph> {
/// Return true if the two nodes \pSrc and \pTgt are both simple nodes and
/// the consecutive instructions after merging belong to the same basic block.
- bool areNodesMergeable(const DDGNode &Src,
- const DDGNode &Tgt) const final override;
- void mergeNodes(DDGNode &Src, DDGNode &Tgt) final override;
- bool shouldSimplify() const final override;
- bool shouldCreatePiBlocks() const final override;
+ bool areNodesMergeable(const DDGNode &Src, const DDGNode &Tgt) const final;
+ void mergeNodes(DDGNode &Src, DDGNode &Tgt) final;
+ bool shouldSimplify() const final;
+ bool shouldCreatePiBlocks() const final;
};
raw_ostream &operator<<(raw_ostream &OS, const DDGNode &N);
diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h
index 93ffa9847f066..db0936f3f56b8 100644
--- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h
+++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h
@@ -81,25 +81,22 @@ class SystemZCallingConventionRegisters {
/// Particular to z/OS when in 64 bit mode
class SystemZXPLINK64Registers : public SystemZCallingConventionRegisters {
public:
- int getReturnFunctionAddressRegister() override final {
- return SystemZ::R7D;
- };
+ int getReturnFunctionAddressRegister() final { return SystemZ::R7D; };
- int getStackPointerRegister() override final { return SystemZ::R4D; };
+ int getStackPointerRegister() final { return SystemZ::R4D; };
- int getFramePointerRegister() override final { return SystemZ::R8D; };
+ int getFramePointerRegister() final { return SystemZ::R8D; };
int getAddressOfCalleeRegister() { return SystemZ::R6D; };
- const MCPhysReg *
- getCalleeSavedRegs(const MachineFunction *MF) const override final;
+ const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const final;
const uint32_t *getCallPreservedMask(const MachineFunction &MF,
- CallingConv::ID CC) const override final;
+ CallingConv::ID CC) const final;
- int getCallFrameSize() override final { return 128; }
+ int getCallFrameSize() final { return 128; }
- int getStackPointerBias() override final { return 2048; }
+ int getStackPointerBias() final { return 2048; }
/// Destroys the object. Bogus destructor overriding base class destructor
~SystemZXPLINK64Registers() = default;
@@ -109,23 +106,20 @@ class SystemZXPLINK64Registers : public SystemZCallingConventionRegisters {
/// Particular when on zLinux in 64 bit mode
class SystemZELFRegisters : public SystemZCallingConventionRegisters {
public:
- int getReturnFunctionAddressRegister() override final {
- return SystemZ::R14D;
- };
+ int getReturnFunctionAddressRegister() final { return SystemZ::R14D; };
- int getStackPointerRegister() override final { return SystemZ::R15D; };
+ int getStackPointerRegister() final { return SystemZ::R15D; };
- int getFramePointerRegister() override final { return SystemZ::R11D; };
+ int getFramePointerRegister() final { return SystemZ::R11D; };
- const MCPhysReg *
- getCalleeSavedRegs(const MachineFunction *MF) const override final;
+ const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const final;
const uint32_t *getCallPreservedMask(const MachineFunction &MF,
- CallingConv::ID CC) const override final;
+ CallingConv::ID CC) const final;
- int getCallFrameSize() override final { return SystemZMC::ELFCallFrameSize; }
+ int getCallFrameSize() final { return SystemZMC::ELFCallFrameSize; }
- int getStackPointerBias() override final { return 0; }
+ int getStackPointerBias() final { return 0; }
/// Destroys the object. Bogus destructor overriding base class destructor
~SystemZELFRegisters() = default;
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index b887ea41676be..238b074089aa1 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -798,8 +798,7 @@ class InnerLoopAndEpilogueVectorizer : public InnerLoopVectorizer {
// Override this function to handle the more complex control flow around the
// three loops.
- std::pair<BasicBlock *, Value *>
- createVectorizedLoopSkeleton() final override {
+ std::pair<BasicBlock *, Value *> createVectorizedLoopSkeleton() final {
return createEpilogueVectorizedLoopSkeleton();
}
@@ -835,8 +834,7 @@ class EpilogueVectorizerMainLoop : public InnerLoopAndEpilogueVectorizer {
EPI, LVL, CM, BFI, PSI, Check) {}
/// Implements the interface for creating a vectorized skeleton using the
/// *main loop* strategy (ie the first pass of vplan execution).
- std::pair<BasicBlock *, Value *>
- createEpilogueVectorizedLoopSkeleton() final override;
+ std::pair<BasicBlock *, Value *> createEpilogueVectorizedLoopSkeleton() final;
protected:
/// Emits an iteration count bypass check once for the main loop (when \p
@@ -866,8 +864,7 @@ class EpilogueVectorizerEpilogueLoop : public InnerLoopAndEpilogueVectorizer {
}
/// Implements the interface for creating a vectorized skeleton using the
/// *epilogue loop* strategy (ie the second pass of vplan execution).
- std::pair<BasicBlock *, Value *>
- createEpilogueVectorizedLoopSkeleton() final override;
+ std::pair<BasicBlock *, Value *> createEpilogueVectorizedLoopSkeleton() final;
protected:
/// Emits an iteration count bypass check after the main vector loop has
More information about the llvm-commits
mailing list