Skip to content

Commit 158c052

Browse files
[LLDB][NFC] Remove dead code (#68927)
I found some type/typesystem code that is dead and some of it seems to have been replaced by the ValueObjectPrinter.
1 parent 7230796 commit 158c052

File tree

7 files changed

+2
-545
lines changed

7 files changed

+2
-545
lines changed

lldb/include/lldb/Symbol/CompilerType.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ class CompilerType {
146146

147147
bool IsConst() const;
148148

149-
bool IsCStringType(uint32_t &length) const;
150-
151149
bool IsDefined() const;
152150

153151
bool IsFloatingPointType(uint32_t &count, bool &is_complex) const;
@@ -437,21 +435,11 @@ class CompilerType {
437435
LLVM_DUMP_METHOD void dump() const;
438436
#endif
439437

440-
void DumpValue(ExecutionContext *exe_ctx, Stream *s, lldb::Format format,
441-
const DataExtractor &data, lldb::offset_t data_offset,
442-
size_t data_byte_size, uint32_t bitfield_bit_size,
443-
uint32_t bitfield_bit_offset, bool show_types,
444-
bool show_summary, bool verbose, uint32_t depth);
445-
446438
bool DumpTypeValue(Stream *s, lldb::Format format, const DataExtractor &data,
447439
lldb::offset_t data_offset, size_t data_byte_size,
448440
uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
449441
ExecutionContextScope *exe_scope);
450442

451-
void DumpSummary(ExecutionContext *exe_ctx, Stream *s,
452-
const DataExtractor &data, lldb::offset_t data_offset,
453-
size_t data_byte_size);
454-
455443
/// Dump to stdout.
456444
void DumpTypeDescription(lldb::DescriptionLevel level =
457445
lldb::eDescriptionLevelFull) const;

lldb/include/lldb/Symbol/Type.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,6 @@ class Type : public std::enable_shared_from_this<Type>, public UserID {
148148

149149
ConstString GetQualifiedName();
150150

151-
void DumpValue(ExecutionContext *exe_ctx, Stream *s,
152-
const DataExtractor &data, uint32_t data_offset,
153-
bool show_type, bool show_summary, bool verbose,
154-
lldb::Format format = lldb::eFormatDefault);
155-
156-
bool DumpValueInMemory(ExecutionContext *exe_ctx, Stream *s,
157-
lldb::addr_t address, AddressType address_type,
158-
bool show_types, bool show_summary, bool verbose);
159-
160151
bool ReadFromMemory(ExecutionContext *exe_ctx, lldb::addr_t address,
161152
AddressType address_type, DataExtractor &data);
162153

lldb/include/lldb/Symbol/TypeSystem.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,6 @@ class TypeSystem : public PluginInterface,
384384
dump(lldb::opaque_compiler_type_t type) const = 0;
385385
#endif
386386

387-
virtual void DumpValue(lldb::opaque_compiler_type_t type,
388-
ExecutionContext *exe_ctx, Stream &s,
389-
lldb::Format format, const DataExtractor &data,
390-
lldb::offset_t data_offset, size_t data_byte_size,
391-
uint32_t bitfield_bit_size,
392-
uint32_t bitfield_bit_offset, bool show_types,
393-
bool show_summary, bool verbose, uint32_t depth) = 0;
394-
395387
virtual bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream &s,
396388
lldb::Format format, const DataExtractor &data,
397389
lldb::offset_t data_offset, size_t data_byte_size,
@@ -418,26 +410,16 @@ class TypeSystem : public PluginInterface,
418410
/// This should not modify the state of the TypeSystem if possible.
419411
virtual void Dump(llvm::raw_ostream &output) = 0;
420412

421-
// TODO: These methods appear unused. Should they be removed?
422-
413+
/// This is used by swift.
423414
virtual bool IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type) = 0;
424415

425-
virtual void DumpSummary(lldb::opaque_compiler_type_t type,
426-
ExecutionContext *exe_ctx, Stream &s,
427-
const DataExtractor &data,
428-
lldb::offset_t data_offset,
429-
size_t data_byte_size) = 0;
430-
431416
// TODO: Determine if these methods should move to TypeSystemClang.
432417

433418
virtual bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
434419
CompilerType *pointee_type) = 0;
435420

436421
virtual unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) = 0;
437422

438-
virtual bool IsCStringType(lldb::opaque_compiler_type_t type,
439-
uint32_t &length) = 0;
440-
441423
virtual std::optional<size_t>
442424
GetTypeBitAlign(lldb::opaque_compiler_type_t type,
443425
ExecutionContextScope *exe_scope) = 0;

0 commit comments

Comments
 (0)