Skip to content

Commit 520eecb

Browse files
authored
Merge pull request #258 from Teemperor/MoveGetUnboundTypeMaster
[upstreaming] Move GetUnboundType to SwiftASTContext
2 parents 0db9065 + 0c1580f commit 520eecb

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
@@ -692,8 +692,6 @@ class ClangASTContext : public TypeSystem {
692692
// If the current object represents a typedef type, get the underlying type
693693
CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) override;
694694

695-
CompilerType GetUnboundType(lldb::opaque_compiler_type_t type) override;
696-
697695
static CompilerType RemoveFastQualifiers(const CompilerType &type);
698696

699697
// 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
@@ -241,8 +241,6 @@ class CompilerType {
241241
// If the current object represents a typedef type, get the underlying type
242242
CompilerType GetTypedefedType() const;
243243

244-
CompilerType GetUnboundType() const;
245-
246244
// Create related types using the current type's AST
247245
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const;
248246

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
@@ -460,8 +460,6 @@ class TypeSystem : public PluginInterface {
460460
// If the current object represents a typedef type, get the underlying type
461461
virtual CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) = 0;
462462

463-
virtual CompilerType GetUnboundType(lldb::opaque_compiler_type_t type) = 0;
464-
465463
virtual bool IsVectorType(lldb::opaque_compiler_type_t type,
466464
CompilerType *element_type, uint64_t *size) = 0;
467465

lldb/source/Symbol/ClangASTContext.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4997,11 +4997,6 @@ ClangASTContext::GetTypedefedType(lldb::opaque_compiler_type_t type) {
49974997
return CompilerType();
49984998
}
49994999

5000-
CompilerType
5001-
ClangASTContext::GetUnboundType(lldb::opaque_compiler_type_t type) {
5002-
return CompilerType(this, GetQualType(type).getAsOpaquePtr());
5003-
}
5004-
50055000
//----------------------------------------------------------------------
50065001
// Create related types using the current type's AST
50075002

lldb/source/Symbol/CompilerType.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,6 @@ CompilerType CompilerType::GetTypedefedType() const {
486486
return CompilerType();
487487
}
488488

489-
CompilerType CompilerType::GetUnboundType() const {
490-
if (IsValid())
491-
return m_type_system->GetUnboundType(m_type);
492-
return CompilerType();
493-
}
494-
495489
//----------------------------------------------------------------------
496490
// Create related types using the current type's AST
497491

lldb/source/Symbol/SwiftASTContext.cpp

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

66996699
/// Retrieve the printable name of a type referenced as a superclass.
6700-
static std::string GetSuperclassName(const CompilerType &superclass_type) {
6701-
return superclass_type.GetUnboundType().GetTypeName().AsCString(
6700+
std::string SwiftASTContext::GetSuperclassName(const CompilerType &superclass_type) {
6701+
return GetUnboundType(superclass_type.GetOpaqueQualType()).GetTypeName().AsCString(
67026702
"<no type name>");
67036703
}
67046704

0 commit comments

Comments
 (0)