Skip to content

Commit bcb621f

Browse files
authored
[lldb][DWARFASTParserClang][NFC] Remove redundant parameter to AddMethodToObjCObjectType (#73832)
1 parent afd9582 commit bcb621f

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,16 +1090,10 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
10901090
}
10911091

10921092
if (class_opaque_type) {
1093-
// If accessibility isn't set to anything valid, assume public
1094-
// for now...
1095-
if (attrs.accessibility == eAccessNone)
1096-
attrs.accessibility = eAccessPublic;
1097-
10981093
clang::ObjCMethodDecl *objc_method_decl =
10991094
m_ast.AddMethodToObjCObjectType(
11001095
class_opaque_type, attrs.name.GetCString(), clang_type,
1101-
attrs.accessibility, attrs.is_artificial, is_variadic,
1102-
attrs.is_objc_direct_call);
1096+
attrs.is_artificial, is_variadic, attrs.is_objc_direct_call);
11031097
type_handled = objc_method_decl != nullptr;
11041098
if (type_handled) {
11051099
LinkDeclContextToDIE(objc_method_decl, die);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8110,8 +8110,8 @@ clang::ObjCMethodDecl *TypeSystemClang::AddMethodToObjCObjectType(
81108110
const char *name, // the full symbol name as seen in the symbol table
81118111
// (lldb::opaque_compiler_type_t type, "-[NString
81128112
// stringWithCString:]")
8113-
const CompilerType &method_clang_type, lldb::AccessType access,
8114-
bool is_artificial, bool is_variadic, bool is_objc_direct_call) {
8113+
const CompilerType &method_clang_type, bool is_artificial, bool is_variadic,
8114+
bool is_objc_direct_call) {
81158115
if (!type || !method_clang_type.IsValid())
81168116
return nullptr;
81178117

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,8 +985,8 @@ class TypeSystemClang : public TypeSystem {
985985
const char *name, // the full symbol name as seen in the symbol table
986986
// (lldb::opaque_compiler_type_t type, "-[NString
987987
// stringWithCString:]")
988-
const CompilerType &method_compiler_type, lldb::AccessType access,
989-
bool is_artificial, bool is_variadic, bool is_objc_direct_call);
988+
const CompilerType &method_compiler_type, bool is_artificial,
989+
bool is_variadic, bool is_objc_direct_call);
990990

991991
static bool SetHasExternalStorage(lldb::opaque_compiler_type_t type,
992992
bool has_extern);

lldb/unittests/Symbol/TestTypeSystemClang.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,7 @@ TEST_F(TestTypeSystemClang, AddMethodToObjCObjectType) {
941941
bool artificial = false;
942942
bool objc_direct = false;
943943
clang::ObjCMethodDecl *method = TypeSystemClang::AddMethodToObjCObjectType(
944-
c, "-[A foo]", func_type, lldb::eAccessPublic, artificial, variadic,
945-
objc_direct);
944+
c, "-[A foo]", func_type, artificial, variadic, objc_direct);
946945
ASSERT_NE(method, nullptr);
947946

948947
// The interface decl should still have external lexical storage.

0 commit comments

Comments
 (0)