Skip to content

Commit 5d9bb9c

Browse files
committed
[lldb] Remove dead code in TypeSystemClang (NFC)
1 parent 882e733 commit 5d9bb9c

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5303,16 +5303,12 @@ lldb::Format TypeSystemClang::GetFormat(lldb::opaque_compiler_type_t type) {
53035303
return lldb::eFormatBytes;
53045304
}
53055305

5306-
static bool ObjCDeclHasIVars(clang::ObjCInterfaceDecl *class_interface_decl,
5307-
bool check_superclass) {
5306+
static bool ObjCDeclHasIVars(clang::ObjCInterfaceDecl *class_interface_decl) {
53085307
while (class_interface_decl) {
53095308
if (class_interface_decl->ivar_size() > 0)
53105309
return true;
53115310

5312-
if (check_superclass)
5313-
class_interface_decl = class_interface_decl->getSuperClass();
5314-
else
5315-
break;
5311+
class_interface_decl = class_interface_decl->getSuperClass();
53165312
}
53175313
return false;
53185314
}
@@ -5387,7 +5383,7 @@ TypeSystemClang::GetNumChildren(lldb::opaque_compiler_type_t type,
53875383
class_interface_decl->getSuperClass();
53885384
if (superclass_interface_decl) {
53895385
if (omit_empty_base_classes) {
5390-
if (ObjCDeclHasIVars(superclass_interface_decl, true))
5386+
if (ObjCDeclHasIVars(superclass_interface_decl))
53915387
++num_children;
53925388
} else
53935389
++num_children;
@@ -6841,7 +6837,7 @@ size_t TypeSystemClang::GetIndexOfChildMemberWithName(
68416837
if (ivar_decl->getName() == name_sref) {
68426838
if ((!omit_empty_base_classes && superclass_interface_decl) ||
68436839
(omit_empty_base_classes &&
6844-
ObjCDeclHasIVars(superclass_interface_decl, true)))
6840+
ObjCDeclHasIVars(superclass_interface_decl)))
68456841
++child_idx;
68466842

68476843
child_indexes.push_back(child_idx);
@@ -6997,7 +6993,7 @@ TypeSystemClang::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
69976993
if (ivar_decl->getName() == name) {
69986994
if ((!omit_empty_base_classes && superclass_interface_decl) ||
69996995
(omit_empty_base_classes &&
7000-
ObjCDeclHasIVars(superclass_interface_decl, true)))
6996+
ObjCDeclHasIVars(superclass_interface_decl)))
70016997
++child_idx;
70026998

70036999
return child_idx;
@@ -8118,14 +8114,6 @@ bool TypeSystemClang::AddObjCClassProperty(
81188114
return true;
81198115
}
81208116

8121-
bool TypeSystemClang::IsObjCClassTypeAndHasIVars(const CompilerType &type,
8122-
bool check_superclass) {
8123-
clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type);
8124-
if (class_interface_decl)
8125-
return ObjCDeclHasIVars(class_interface_decl, check_superclass);
8126-
return false;
8127-
}
8128-
81298117
clang::ObjCMethodDecl *TypeSystemClang::AddMethodToObjCObjectType(
81308118
const CompilerType &type,
81318119
const char *name, // the full symbol name as seen in the symbol table

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,6 @@ class TypeSystemClang : public TypeSystem {
687687

688688
static bool IsObjCClassType(const CompilerType &type);
689689

690-
static bool IsObjCClassTypeAndHasIVars(const CompilerType &type,
691-
bool check_superclass);
692-
693690
static bool IsObjCObjectOrInterfaceType(const CompilerType &type);
694691

695692
static bool IsObjCObjectPointerType(const CompilerType &type,

0 commit comments

Comments
 (0)