Skip to content

Commit 1456a4f

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 bc5d827 commit 1456a4f

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
@@ -105,10 +105,6 @@ class LLVM_ABI LVLine : public LVElement {
105105

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

114110
// 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
@@ -51,7 +51,7 @@ class LVOperation final {
5151
LLVM_ABI void print(raw_ostream &OS, bool Full = true) const;
5252

5353
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
54-
void dump() { print(dbgs()); }
54+
void dump() const { print(dbgs()); }
5555
#endif
5656
};
5757

@@ -159,10 +159,6 @@ class LLVM_ABI LVLocation : public LVObject {
159159

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

168164
class LLVM_ABI 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
@@ -313,7 +313,7 @@ class LLVM_ABI LVObject {
313313
virtual void printExtra(raw_ostream &OS, bool Full = true) const {}
314314

315315
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
316-
virtual void dump() const { print(dbgs()); }
316+
void dump() const { print(dbgs()); }
317317
#endif
318318

319319
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
@@ -87,10 +87,6 @@ class LLVM_ABI LVRange final : public LVObject {
8787

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

9692
} // 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
@@ -325,10 +325,6 @@ class LLVM_ABI LVScope : public LVElement {
325325
void printExtra(raw_ostream &OS, bool Full = true) const override;
326326
virtual void printWarnings(raw_ostream &OS, bool Full = true) const {}
327327
virtual void printMatchedElements(raw_ostream &OS, bool UseMatchedElements) {}
328-
329-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
330-
void dump() const override { print(dbgs()); }
331-
#endif
332328
};
333329

334330
// 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
@@ -183,10 +183,6 @@ class LLVM_ABI LVSymbol final : public LVElement {
183183

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

192188
} // 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
@@ -146,10 +146,6 @@ class LLVM_ABI LVType : public LVElement {
146146

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

155151
// Class to represent DW_TAG_typedef_type.

0 commit comments

Comments
 (0)