Skip to content

Commit 3c6d4b1

Browse files
committed
[lldb] Move DumpSummary implementation to TypeSystemSwift
DumpSummary appears to be unused, and it has an empty implementation on SwiftASTContext. Move it to TypeSystemSwift so it's shared to TypeSystemSwiftTypeRef as well.
1 parent 818339f commit 3c6d4b1

File tree

5 files changed

+6
-25
lines changed

5 files changed

+6
-25
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8064,12 +8064,6 @@ std::string SwiftASTContext::ImportName(const clang::NamedDecl *clang_decl) {
80648064
return clang_decl->getName().str();
80658065
}
80668066

8067-
void SwiftASTContext::DumpSummary(opaque_compiler_type_t type,
8068-
ExecutionContext *exe_ctx, Stream *s,
8069-
const lldb_private::DataExtractor &data,
8070-
lldb::offset_t data_byte_offset,
8071-
size_t data_byte_size) {}
8072-
80738067
void SwiftASTContext::DumpTypeDescription(opaque_compiler_type_t type,
80748068
lldb::DescriptionLevel level) {
80758069
StreamFile s(stdout, false);

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,6 @@ class SwiftASTContext : public TypeSystemSwift {
709709
bool print_help_if_available, bool print_extensions_if_available,
710710
lldb::DescriptionLevel level = lldb::eDescriptionLevelFull) override;
711711

712-
// TODO: These methods appear unused. Should they be removed?
713-
714-
void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
715-
Stream *s, const DataExtractor &data,
716-
lldb::offset_t data_offset, size_t data_byte_size) override;
717-
718712
// TODO: Determine if these methods should move to TypeSystemClang.
719713

720714
bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ class TypeSystemSwift : public TypeSystem {
289289
return {};
290290
}
291291

292+
// TODO: This method appear unused. Should they be removed?
293+
void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
294+
Stream *s, const DataExtractor &data,
295+
lldb::offset_t data_offset, size_t data_byte_size) override {
296+
}
292297
/// \}
293298
protected:
294299
/// Used in the logs.

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,16 +3393,6 @@ void TypeSystemSwiftTypeRef::DumpTypeDescription(opaque_compiler_type_t type,
33933393
return swift_ast_context->DumpTypeDescription(ReconstructType(type), s,
33943394
level);
33953395
}
3396-
void TypeSystemSwiftTypeRef::DumpSummary(opaque_compiler_type_t type,
3397-
ExecutionContext *exe_ctx, Stream *s,
3398-
const DataExtractor &data,
3399-
lldb::offset_t data_offset,
3400-
size_t data_byte_size) {
3401-
LLDB_SCOPED_TIMER();
3402-
if (auto *swift_ast_context = GetSwiftASTContext())
3403-
return swift_ast_context->DumpSummary(ReconstructType(type), exe_ctx, s,
3404-
data, data_offset, data_byte_size);
3405-
}
34063396
bool TypeSystemSwiftTypeRef::IsPointerOrReferenceType(
34073397
opaque_compiler_type_t type, CompilerType *pointee_type) {
34083398
auto impl = [&]() {

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,7 @@ class TypeSystemSwiftTypeRef : public TypeSystemSwift {
214214
void DumpTypeDescription(
215215
lldb::opaque_compiler_type_t type, Stream *s,
216216
lldb::DescriptionLevel level = lldb::eDescriptionLevelFull) override;
217-
void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
218-
Stream *s, const DataExtractor &data,
219-
lldb::offset_t data_offset, size_t data_byte_size) override;
217+
220218
bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
221219
CompilerType *pointee_type) override;
222220
llvm::Optional<size_t>

0 commit comments

Comments
 (0)