Skip to content

Commit f2a1320

Browse files
committed
[lldb] De-virtualize applicable functions in ValueObject (NFC)
Remove `virtual` from `ValueObject` functions that aren't overridden. One such function, `IsArrayItemForPointer`, is not called and so is instead deleted. Differential Revision: https://reviews.llvm.org/D153088
1 parent 530db6a commit f2a1320

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

lldb/include/lldb/Core/ValueObject.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -370,26 +370,26 @@ class ValueObject {
370370
return GetCompilerType().GetTypeName();
371371
}
372372

373-
virtual lldb::LanguageType GetObjectRuntimeLanguage() {
373+
lldb::LanguageType GetObjectRuntimeLanguage() {
374374
return GetCompilerType().GetMinimumLanguage();
375375
}
376376

377-
virtual uint32_t
377+
uint32_t
378378
GetTypeInfo(CompilerType *pointee_or_element_compiler_type = nullptr) {
379379
return GetCompilerType().GetTypeInfo(pointee_or_element_compiler_type);
380380
}
381381

382-
virtual bool IsPointerType() { return GetCompilerType().IsPointerType(); }
382+
bool IsPointerType() { return GetCompilerType().IsPointerType(); }
383383

384-
virtual bool IsArrayType() { return GetCompilerType().IsArrayType(); }
384+
bool IsArrayType() { return GetCompilerType().IsArrayType(); }
385385

386-
virtual bool IsScalarType() { return GetCompilerType().IsScalarType(); }
386+
bool IsScalarType() { return GetCompilerType().IsScalarType(); }
387387

388-
virtual bool IsPointerOrReferenceType() {
388+
bool IsPointerOrReferenceType() {
389389
return GetCompilerType().IsPointerOrReferenceType();
390390
}
391391

392-
virtual bool IsPossibleDynamicType();
392+
bool IsPossibleDynamicType();
393393

394394
bool IsNilReference();
395395

@@ -429,10 +429,6 @@ class ValueObject {
429429
return (GetBitfieldBitSize() != 0) || (GetBitfieldBitOffset() != 0);
430430
}
431431

432-
virtual bool IsArrayItemForPointer() {
433-
return m_flags.m_is_array_item_for_pointer;
434-
}
435-
436432
virtual const char *GetValueAsCString();
437433

438434
virtual bool GetValueAsCString(const lldb_private::TypeFormatImpl &format,
@@ -628,7 +624,7 @@ class ValueObject {
628624

629625
// The backing bits of this value object were updated, clear any descriptive
630626
// string, so we know we have to refetch them.
631-
virtual void ValueUpdated() {
627+
void ValueUpdated() {
632628
ClearUserVisibleData(eClearUserVisibleDataItemsValue |
633629
eClearUserVisibleDataItemsSummary |
634630
eClearUserVisibleDataItemsDescription);

0 commit comments

Comments
 (0)