Skip to content

Commit 7e76473

Browse files
[DebugInfo] Add "override" where appropriate (NFC) (#164929)
Note that "override" makes "virtual" redundant. Identified with modernize-use-override.
1 parent b4d11c9 commit 7e76473

20 files changed

+43
-43
lines changed

llvm/include/llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LLVM_ABI AppendingTypeTableBuilder : public TypeCollection {
3434

3535
public:
3636
explicit AppendingTypeTableBuilder(BumpPtrAllocator &Storage);
37-
~AppendingTypeTableBuilder();
37+
~AppendingTypeTableBuilder() override;
3838

3939
// TypeCollection overrides
4040
std::optional<TypeIndex> getFirst() override;

llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class LLVM_ABI GlobalTypeTableBuilder : public TypeCollection {
4747

4848
public:
4949
explicit GlobalTypeTableBuilder(BumpPtrAllocator &Storage);
50-
~GlobalTypeTableBuilder();
50+
~GlobalTypeTableBuilder() override;
5151

5252
// TypeCollection overrides
5353
std::optional<TypeIndex> getFirst() override;

llvm/include/llvm/DebugInfo/CodeView/MergingTypeTableBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class LLVM_ABI MergingTypeTableBuilder : public TypeCollection {
4343

4444
public:
4545
explicit MergingTypeTableBuilder(BumpPtrAllocator &Storage);
46-
~MergingTypeTableBuilder();
46+
~MergingTypeTableBuilder() override;
4747

4848
// TypeCollection overrides
4949
std::optional<TypeIndex> getFirst() override;

llvm/include/llvm/DebugInfo/GSYM/GsymContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class GsymReader;
3030
class GsymContext : public DIContext {
3131
public:
3232
GsymContext(std::unique_ptr<GsymReader> Reader);
33-
~GsymContext();
33+
~GsymContext() override;
3434

3535
GsymContext(GsymContext &) = delete;
3636
GsymContext &operator=(GsymContext &) = delete;

llvm/include/llvm/DebugInfo/LogicalView/Core/LVElement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class LLVM_ABI LVElement : public LVObject {
143143
VirtualityCode(0) {}
144144
LVElement(const LVElement &) = delete;
145145
LVElement &operator=(const LVElement &) = delete;
146-
virtual ~LVElement() = default;
146+
~LVElement() override = default;
147147

148148
LVSubclassID getSubclassID() const { return SubclassID; }
149149

llvm/include/llvm/DebugInfo/LogicalView/Core/LVLine.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class LLVM_ABI LVLine : public LVElement {
5353
}
5454
LVLine(const LVLine &) = delete;
5555
LVLine &operator=(const LVLine &) = delete;
56-
virtual ~LVLine() = default;
56+
~LVLine() override = default;
5757

5858
static bool classof(const LVElement *Element) {
5959
return Element->getSubclassID() == LVSubclassID::LV_LINE;
@@ -117,7 +117,7 @@ class LLVM_ABI LVLineDebug final : public LVLine {
117117
LVLineDebug() : LVLine() { setIsLineDebug(); }
118118
LVLineDebug(const LVLineDebug &) = delete;
119119
LVLineDebug &operator=(const LVLineDebug &) = delete;
120-
~LVLineDebug() = default;
120+
~LVLineDebug() override = default;
121121

122122
// Additional line information. It includes attributes that describes
123123
// states in the machine instructions (basic block, end prologue, etc).
@@ -142,7 +142,7 @@ class LLVM_ABI LVLineAssembler final : public LVLine {
142142
LVLineAssembler() : LVLine() { setIsLineAssembler(); }
143143
LVLineAssembler(const LVLineAssembler &) = delete;
144144
LVLineAssembler &operator=(const LVLineAssembler &) = delete;
145-
~LVLineAssembler() = default;
145+
~LVLineAssembler() override = default;
146146

147147
// Print blanks as the line number.
148148
std::string noLineAsString(bool ShowZero) const override {

llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class LLVM_ABI LVLocation : public LVObject {
100100
LVLocation() : LVObject() { setIsLocation(); }
101101
LVLocation(const LVLocation &) = delete;
102102
LVLocation &operator=(const LVLocation &) = delete;
103-
virtual ~LVLocation() = default;
103+
~LVLocation() override = default;
104104

105105
PROPERTY(Property, IsAddressRange);
106106
PROPERTY(Property, IsBaseClassOffset);
@@ -171,7 +171,7 @@ class LLVM_ABI LVLocationSymbol final : public LVLocation {
171171
LVLocationSymbol() : LVLocation() {}
172172
LVLocationSymbol(const LVLocationSymbol &) = delete;
173173
LVLocationSymbol &operator=(const LVLocationSymbol &) = delete;
174-
~LVLocationSymbol() = default;
174+
~LVLocationSymbol() override = default;
175175

176176
void addObject(LVAddress LowPC, LVAddress HighPC, LVUnsigned SectionOffset,
177177
uint64_t LocDescOffset) override;

llvm/include/llvm/DebugInfo/LogicalView/Core/LVRange.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class LLVM_ABI LVRange final : public LVObject {
6262
LVRange() : LVObject(), RangesTree(Allocator) {}
6363
LVRange(const LVRange &) = delete;
6464
LVRange &operator=(const LVRange &) = delete;
65-
~LVRange() = default;
65+
~LVRange() override = default;
6666

6767
void addEntry(LVScope *Scope, LVAddress LowerAddress, LVAddress UpperAddress);
6868
void addEntry(LVScope *Scope);

llvm/include/llvm/DebugInfo/LogicalView/Core/LVScope.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class LLVM_ABI LVScope : public LVElement {
153153
}
154154
LVScope(const LVScope &) = delete;
155155
LVScope &operator=(const LVScope &) = delete;
156-
virtual ~LVScope() = default;
156+
~LVScope() override = default;
157157

158158
static bool classof(const LVElement *Element) {
159159
return Element->getSubclassID() == LVSubclassID::LV_SCOPE;
@@ -349,7 +349,7 @@ class LLVM_ABI LVScopeAggregate final : public LVScope {
349349
LVScopeAggregate() : LVScope() {}
350350
LVScopeAggregate(const LVScopeAggregate &) = delete;
351351
LVScopeAggregate &operator=(const LVScopeAggregate &) = delete;
352-
~LVScopeAggregate() = default;
352+
~LVScopeAggregate() override = default;
353353

354354
// DW_AT_specification, DW_AT_abstract_origin.
355355
LVScope *getReference() const override { return Reference; }
@@ -387,7 +387,7 @@ class LLVM_ABI LVScopeAlias final : public LVScope {
387387
}
388388
LVScopeAlias(const LVScopeAlias &) = delete;
389389
LVScopeAlias &operator=(const LVScopeAlias &) = delete;
390-
~LVScopeAlias() = default;
390+
~LVScopeAlias() override = default;
391391

392392
// Returns true if current scope is logically equal to the given 'Scope'.
393393
bool equals(const LVScope *Scope) const override;
@@ -401,7 +401,7 @@ class LLVM_ABI LVScopeArray final : public LVScope {
401401
LVScopeArray() : LVScope() { setIsArray(); }
402402
LVScopeArray(const LVScopeArray &) = delete;
403403
LVScopeArray &operator=(const LVScopeArray &) = delete;
404-
~LVScopeArray() = default;
404+
~LVScopeArray() override = default;
405405

406406
void resolveExtra() override;
407407

@@ -513,7 +513,7 @@ class LLVM_ABI LVScopeCompileUnit final : public LVScope {
513513
}
514514
LVScopeCompileUnit(const LVScopeCompileUnit &) = delete;
515515
LVScopeCompileUnit &operator=(const LVScopeCompileUnit &) = delete;
516-
~LVScopeCompileUnit() = default;
516+
~LVScopeCompileUnit() override = default;
517517

518518
LVScope *getCompileUnitParent() const override {
519519
return static_cast<LVScope *>(const_cast<LVScopeCompileUnit *>(this));
@@ -643,7 +643,7 @@ class LLVM_ABI LVScopeEnumeration final : public LVScope {
643643
LVScopeEnumeration() : LVScope() { setIsEnumeration(); }
644644
LVScopeEnumeration(const LVScopeEnumeration &) = delete;
645645
LVScopeEnumeration &operator=(const LVScopeEnumeration &) = delete;
646-
~LVScopeEnumeration() = default;
646+
~LVScopeEnumeration() override = default;
647647

648648
// Returns true if current scope is logically equal to the given 'Scope'.
649649
bool equals(const LVScope *Scope) const override;
@@ -658,7 +658,7 @@ class LLVM_ABI LVScopeFormalPack final : public LVScope {
658658
LVScopeFormalPack() : LVScope() { setIsTemplatePack(); }
659659
LVScopeFormalPack(const LVScopeFormalPack &) = delete;
660660
LVScopeFormalPack &operator=(const LVScopeFormalPack &) = delete;
661-
~LVScopeFormalPack() = default;
661+
~LVScopeFormalPack() override = default;
662662

663663
// Returns true if current scope is logically equal to the given 'Scope'.
664664
bool equals(const LVScope *Scope) const override;
@@ -676,7 +676,7 @@ class LLVM_ABI LVScopeFunction : public LVScope {
676676
LVScopeFunction() : LVScope() {}
677677
LVScopeFunction(const LVScopeFunction &) = delete;
678678
LVScopeFunction &operator=(const LVScopeFunction &) = delete;
679-
virtual ~LVScopeFunction() = default;
679+
~LVScopeFunction() override = default;
680680

681681
// DW_AT_specification, DW_AT_abstract_origin.
682682
LVScope *getReference() const override { return Reference; }
@@ -728,7 +728,7 @@ class LLVM_ABI LVScopeFunctionInlined final : public LVScopeFunction {
728728
LVScopeFunctionInlined() : LVScopeFunction() { setIsInlinedFunction(); }
729729
LVScopeFunctionInlined(const LVScopeFunctionInlined &) = delete;
730730
LVScopeFunctionInlined &operator=(const LVScopeFunctionInlined &) = delete;
731-
~LVScopeFunctionInlined() = default;
731+
~LVScopeFunctionInlined() override = default;
732732

733733
uint32_t getDiscriminator() const override { return Discriminator; }
734734
void setDiscriminator(uint32_t Value) override {
@@ -767,7 +767,7 @@ class LLVM_ABI LVScopeFunctionType final : public LVScopeFunction {
767767
LVScopeFunctionType() : LVScopeFunction() { setIsFunctionType(); }
768768
LVScopeFunctionType(const LVScopeFunctionType &) = delete;
769769
LVScopeFunctionType &operator=(const LVScopeFunctionType &) = delete;
770-
~LVScopeFunctionType() = default;
770+
~LVScopeFunctionType() override = default;
771771

772772
void resolveExtra() override;
773773
};
@@ -781,7 +781,7 @@ class LLVM_ABI LVScopeModule final : public LVScope {
781781
}
782782
LVScopeModule(const LVScopeModule &) = delete;
783783
LVScopeModule &operator=(const LVScopeModule &) = delete;
784-
~LVScopeModule() = default;
784+
~LVScopeModule() override = default;
785785

786786
// Returns true if current scope is logically equal to the given 'Scope'.
787787
bool equals(const LVScope *Scope) const override;
@@ -797,7 +797,7 @@ class LLVM_ABI LVScopeNamespace final : public LVScope {
797797
LVScopeNamespace() : LVScope() { setIsNamespace(); }
798798
LVScopeNamespace(const LVScopeNamespace &) = delete;
799799
LVScopeNamespace &operator=(const LVScopeNamespace &) = delete;
800-
~LVScopeNamespace() = default;
800+
~LVScopeNamespace() override = default;
801801

802802
// Access DW_AT_extension reference.
803803
LVScope *getReference() const override { return Reference; }
@@ -827,7 +827,7 @@ class LLVM_ABI LVScopeRoot final : public LVScope {
827827
LVScopeRoot() : LVScope() { setIsRoot(); }
828828
LVScopeRoot(const LVScopeRoot &) = delete;
829829
LVScopeRoot &operator=(const LVScopeRoot &) = delete;
830-
~LVScopeRoot() = default;
830+
~LVScopeRoot() override = default;
831831

832832
StringRef getFileFormatName() const {
833833
return getStringPool().getString(FileFormatNameIndex);
@@ -859,7 +859,7 @@ class LLVM_ABI LVScopeTemplatePack final : public LVScope {
859859
LVScopeTemplatePack() : LVScope() { setIsTemplatePack(); }
860860
LVScopeTemplatePack(const LVScopeTemplatePack &) = delete;
861861
LVScopeTemplatePack &operator=(const LVScopeTemplatePack &) = delete;
862-
~LVScopeTemplatePack() = default;
862+
~LVScopeTemplatePack() override = default;
863863

864864
// Returns true if current scope is logically equal to the given 'Scope'.
865865
bool equals(const LVScope *Scope) const override;

llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class LLVM_ABI LVSymbol final : public LVElement {
7474
}
7575
LVSymbol(const LVSymbol &) = delete;
7676
LVSymbol &operator=(const LVSymbol &) = delete;
77-
~LVSymbol() = default;
77+
~LVSymbol() override = default;
7878

7979
static bool classof(const LVElement *Element) {
8080
return Element->getSubclassID() == LVSubclassID::LV_SYMBOL;

0 commit comments

Comments
 (0)