Skip to content

Commit 7dc0ef5

Browse files
committed
Hoist GetCompleteType from SwiftASTContext into TypeSystemSwift (NFC)
(cherry picked from commit 31a2317)
1 parent d98c0ad commit 7dc0ef5

File tree

5 files changed

+3
-14
lines changed

5 files changed

+3
-14
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5282,10 +5282,6 @@ SwiftASTContext::GetAllocationStrategy(opaque_compiler_type_t type) {
52825282
// Type Completion
52835283
//----------------------------------------------------------------------
52845284

5285-
bool SwiftASTContext::GetCompleteType(opaque_compiler_type_t type) {
5286-
return true;
5287-
}
5288-
52895285
ConstString SwiftASTContext::GetTypeName(opaque_compiler_type_t type) {
52905286
std::string type_name;
52915287
if (type) {

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,6 @@ class SwiftASTContext : public TypeSystemSwift {
509509
const CompilerType &type, NonTriviallyManagedReferenceStrategy &strategy,
510510
CompilerType *underlying_type = nullptr);
511511

512-
// Type Completion
513-
514-
bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
515-
516512
// AST related queries
517513

518514
uint32_t GetPointerByteSize() override;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ class TypeSystemSwift : public TypeSystem {
168168
bool IsBeingDefined(lldb::opaque_compiler_type_t type) override {
169169
return false;
170170
}
171+
bool GetCompleteType(lldb::opaque_compiler_type_t type) override {
172+
return true;
173+
}
171174
bool CanPassInRegisters(const CompilerType &type) override {
172175
// FIXME: Implement this. There was an abort() here to figure out which
173176
// tests where hitting this code. At least TestSwiftReturns and

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,10 +1383,6 @@ bool TypeSystemSwiftTypeRef::IsVoidType(opaque_compiler_type_t type) {
13831383
};
13841384
VALIDATE_AND_RETURN(impl, IsVoidType, type, (ReconstructType(type)));
13851385
}
1386-
// Type Completion
1387-
bool TypeSystemSwiftTypeRef::GetCompleteType(opaque_compiler_type_t type) {
1388-
return m_swift_ast_context->GetCompleteType(ReconstructType(type));
1389-
}
13901386
// AST related queries
13911387
uint32_t TypeSystemSwiftTypeRef::GetPointerByteSize() {
13921388
return m_swift_ast_context->GetPointerByteSize();

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ class TypeSystemSwiftTypeRef : public TypeSystemSwift {
101101
bool IsPointerType(lldb::opaque_compiler_type_t type,
102102
CompilerType *pointee_type) override;
103103
bool IsVoidType(lldb::opaque_compiler_type_t type) override;
104-
// Type Completion
105-
bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
106104
// AST related queries
107105
uint32_t GetPointerByteSize() override;
108106
// Accessors

0 commit comments

Comments
 (0)