Skip to content

Commit 9caf018

Browse files
committed
[llvm-debuginfo-analyzer] Make LVObject::dump() non-virtual (NFC)
`LVObject::dump()` does not need to be virtual as it relays to `LVObject::print()` that is.
1 parent 8246858 commit 9caf018

File tree

7 files changed

+2
-26
lines changed

7 files changed

+2
-26
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ class LVLine : public LVElement {
104104

105105
void print(raw_ostream &OS, bool Full = true) const override;
106106
void printExtra(raw_ostream &OS, bool Full = true) const override {}
107-
108-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
109-
void dump() const override { print(dbgs()); }
110-
#endif
111107
};
112108

113109
// Class to represent a DWARF line record object.

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class LVOperation final {
5050
void print(raw_ostream &OS, bool Full = true) const;
5151

5252
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
53-
void dump() { print(dbgs()); }
53+
void dump() const { print(dbgs()); }
5454
#endif
5555
};
5656

@@ -158,10 +158,6 @@ class LVLocation : public LVObject {
158158

159159
void print(raw_ostream &OS, bool Full = true) const override;
160160
void printExtra(raw_ostream &OS, bool Full = true) const override;
161-
162-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
163-
void dump() const override { print(dbgs()); }
164-
#endif
165161
};
166162

167163
class LVLocationSymbol final : public LVLocation {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class LVObject {
312312
virtual void printExtra(raw_ostream &OS, bool Full = true) const {}
313313

314314
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
315-
virtual void dump() const { print(dbgs()); }
315+
void dump() const { print(dbgs()); }
316316
#endif
317317

318318
uint64_t getID() const {

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ class LVRange final : public LVObject {
8686

8787
void print(raw_ostream &OS, bool Full = true) const override;
8888
void printExtra(raw_ostream &OS, bool Full = true) const override {}
89-
90-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
91-
void dump() const override { print(dbgs()); }
92-
#endif
9389
};
9490

9591
} // end namespace logicalview

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ class LVScope : public LVElement {
324324
void printExtra(raw_ostream &OS, bool Full = true) const override;
325325
virtual void printWarnings(raw_ostream &OS, bool Full = true) const {}
326326
virtual void printMatchedElements(raw_ostream &OS, bool UseMatchedElements) {}
327-
328-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
329-
void dump() const override { print(dbgs()); }
330-
#endif
331327
};
332328

333329
// Class to represent a DWARF Union/Structure/Class.

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,6 @@ class LVSymbol final : public LVElement {
182182

183183
void print(raw_ostream &OS, bool Full = true) const override;
184184
void printExtra(raw_ostream &OS, bool Full = true) const override;
185-
186-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
187-
void dump() const override { print(dbgs()); }
188-
#endif
189185
};
190186

191187
} // end namespace logicalview

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ class LVType : public LVElement {
145145

146146
void print(raw_ostream &OS, bool Full = true) const override;
147147
void printExtra(raw_ostream &OS, bool Full = true) const override;
148-
149-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
150-
void dump() const override { print(dbgs()); }
151-
#endif
152148
};
153149

154150
// Class to represent DW_TAG_typedef_type.

0 commit comments

Comments
 (0)