Skip to content

Commit 7a80a8b

Browse files
authored
[lldb] Remove some dead code in TypeSystemClang (NFC) (#142056)
1 parent 9bd63b1 commit 7a80a8b

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
@@ -5302,16 +5302,12 @@ lldb::Format TypeSystemClang::GetFormat(lldb::opaque_compiler_type_t type) {
53025302
return lldb::eFormatBytes;
53035303
}
53045304

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

5311-
if (check_superclass)
5312-
class_interface_decl = class_interface_decl->getSuperClass();
5313-
else
5314-
break;
5310+
class_interface_decl = class_interface_decl->getSuperClass();
53155311
}
53165312
return false;
53175313
}
@@ -5386,7 +5382,7 @@ TypeSystemClang::GetNumChildren(lldb::opaque_compiler_type_t type,
53865382
class_interface_decl->getSuperClass();
53875383
if (superclass_interface_decl) {
53885384
if (omit_empty_base_classes) {
5389-
if (ObjCDeclHasIVars(superclass_interface_decl, true))
5385+
if (ObjCDeclHasIVars(superclass_interface_decl))
53905386
++num_children;
53915387
} else
53925388
++num_children;
@@ -6840,7 +6836,7 @@ size_t TypeSystemClang::GetIndexOfChildMemberWithName(
68406836
if (ivar_decl->getName() == name_sref) {
68416837
if ((!omit_empty_base_classes && superclass_interface_decl) ||
68426838
(omit_empty_base_classes &&
6843-
ObjCDeclHasIVars(superclass_interface_decl, true)))
6839+
ObjCDeclHasIVars(superclass_interface_decl)))
68446840
++child_idx;
68456841

68466842
child_indexes.push_back(child_idx);
@@ -6996,7 +6992,7 @@ TypeSystemClang::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
69966992
if (ivar_decl->getName() == name) {
69976993
if ((!omit_empty_base_classes && superclass_interface_decl) ||
69986994
(omit_empty_base_classes &&
6999-
ObjCDeclHasIVars(superclass_interface_decl, true)))
6995+
ObjCDeclHasIVars(superclass_interface_decl)))
70006996
++child_idx;
70016997

70026998
return child_idx;
@@ -8117,14 +8113,6 @@ bool TypeSystemClang::AddObjCClassProperty(
81178113
return true;
81188114
}
81198115

8120-
bool TypeSystemClang::IsObjCClassTypeAndHasIVars(const CompilerType &type,
8121-
bool check_superclass) {
8122-
clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type);
8123-
if (class_interface_decl)
8124-
return ObjCDeclHasIVars(class_interface_decl, check_superclass);
8125-
return false;
8126-
}
8127-
81288116
clang::ObjCMethodDecl *TypeSystemClang::AddMethodToObjCObjectType(
81298117
const CompilerType &type,
81308118
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)