Skip to content

Commit 0c1580f

Browse files
committed
[upstreaming] Move GetUnboundType to SwiftASTContext
1 parent 535d747 commit 0c1580f

File tree

7 files changed

+5
-20
lines changed

7 files changed

+5
-20
lines changed

lldb/include/lldb/Symbol/ClangASTContext.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,6 @@ class ClangASTContext : public TypeSystem {
700700
// If the current object represents a typedef type, get the underlying type
701701
CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) override;
702702

703-
CompilerType GetUnboundType(lldb::opaque_compiler_type_t type) override;
704-
705703
static CompilerType RemoveFastQualifiers(const CompilerType &type);
706704

707705
// Create related types using the current type's AST

lldb/include/lldb/Symbol/CompilerType.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ class CompilerType {
244244
// If the current object represents a typedef type, get the underlying type
245245
CompilerType GetTypedefedType() const;
246246

247-
CompilerType GetUnboundType() const;
248-
249247
// Create related types using the current type's AST
250248
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const;
251249

lldb/include/lldb/Symbol/SwiftASTContext.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,9 @@ class SwiftASTContext : public TypeSystem {
682682
// If the current object represents a typedef type, get the underlying type
683683
CompilerType GetTypedefedType(void *type) override;
684684

685-
CompilerType GetUnboundType(lldb::opaque_compiler_type_t type) override;
685+
CompilerType GetUnboundType(lldb::opaque_compiler_type_t type);
686+
687+
std::string GetSuperclassName(const CompilerType &superclass_type);
686688

687689
CompilerType GetTypeForDecl(void *opaque_decl) override;
688690

lldb/include/lldb/Symbol/TypeSystem.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,6 @@ class TypeSystem : public PluginInterface {
464464
// If the current object represents a typedef type, get the underlying type
465465
virtual CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) = 0;
466466

467-
virtual CompilerType GetUnboundType(lldb::opaque_compiler_type_t type) = 0;
468-
469467
virtual bool IsVectorType(lldb::opaque_compiler_type_t type,
470468
CompilerType *element_type, uint64_t *size) = 0;
471469

lldb/source/Symbol/ClangASTContext.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5003,11 +5003,6 @@ ClangASTContext::GetTypedefedType(lldb::opaque_compiler_type_t type) {
50035003
return CompilerType();
50045004
}
50055005

5006-
CompilerType
5007-
ClangASTContext::GetUnboundType(lldb::opaque_compiler_type_t type) {
5008-
return CompilerType(this, GetQualType(type).getAsOpaquePtr());
5009-
}
5010-
50115006
//----------------------------------------------------------------------
50125007
// Create related types using the current type's AST
50135008

lldb/source/Symbol/CompilerType.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -492,12 +492,6 @@ CompilerType CompilerType::GetTypedefedType() const {
492492
return CompilerType();
493493
}
494494

495-
CompilerType CompilerType::GetUnboundType() const {
496-
if (IsValid())
497-
return m_type_system->GetUnboundType(m_type);
498-
return CompilerType();
499-
}
500-
501495
//----------------------------------------------------------------------
502496
// Create related types using the current type's AST
503497

lldb/source/Symbol/SwiftASTContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6682,8 +6682,8 @@ static std::string GetTupleElementName(const swift::TupleType *tuple_type,
66826682
}
66836683

66846684
/// Retrieve the printable name of a type referenced as a superclass.
6685-
static std::string GetSuperclassName(const CompilerType &superclass_type) {
6686-
return superclass_type.GetUnboundType().GetTypeName().AsCString(
6685+
std::string SwiftASTContext::GetSuperclassName(const CompilerType &superclass_type) {
6686+
return GetUnboundType(superclass_type.GetOpaqueQualType()).GetTypeName().AsCString(
66876687
"<no type name>");
66886688
}
66896689

0 commit comments

Comments
 (0)