Skip to content

Hoist GetCompleteType from SwiftASTContext into TypeSystemSwift (NFC) #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5330,10 +5330,6 @@ SwiftASTContext::GetAllocationStrategy(opaque_compiler_type_t type) {
// Type Completion
//----------------------------------------------------------------------

bool SwiftASTContext::GetCompleteType(opaque_compiler_type_t type) {
return true;
}

ConstString SwiftASTContext::GetTypeName(opaque_compiler_type_t type) {
std::string type_name;
if (type) {
Expand Down
4 changes: 0 additions & 4 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,6 @@ class SwiftASTContext : public TypeSystemSwift {
const CompilerType &type, NonTriviallyManagedReferenceStrategy &strategy,
CompilerType *underlying_type = nullptr);

// Type Completion

bool GetCompleteType(lldb::opaque_compiler_type_t type) override;

// AST related queries

uint32_t GetPointerByteSize() override;
Expand Down
3 changes: 3 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ class TypeSystemSwift : public TypeSystem {
bool IsBeingDefined(lldb::opaque_compiler_type_t type) override {
return false;
}
bool GetCompleteType(lldb::opaque_compiler_type_t type) override {
return true;
}
bool CanPassInRegisters(const CompilerType &type) override {
// FIXME: Implement this. There was an abort() here to figure out which
// tests where hitting this code. At least TestSwiftReturns and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1377,10 +1377,6 @@ bool TypeSystemSwiftTypeRef::IsVoidType(opaque_compiler_type_t type) {
};
VALIDATE_AND_RETURN(impl, IsVoidType, type, (ReconstructType(type)));
}
// Type Completion
bool TypeSystemSwiftTypeRef::GetCompleteType(opaque_compiler_type_t type) {
return m_swift_ast_context->GetCompleteType(ReconstructType(type));
}
// AST related queries
uint32_t TypeSystemSwiftTypeRef::GetPointerByteSize() {
return m_swift_ast_context->GetPointerByteSize();
Expand Down
2 changes: 0 additions & 2 deletions lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ class TypeSystemSwiftTypeRef : public TypeSystemSwift {
bool IsPointerType(lldb::opaque_compiler_type_t type,
CompilerType *pointee_type) override;
bool IsVoidType(lldb::opaque_compiler_type_t type) override;
// Type Completion
bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
// AST related queries
uint32_t GetPointerByteSize() override;
// Accessors
Expand Down