Skip to content

Commit 4210652

Browse files
committed
fixup! remove redundant HasChildren check; fix 'const' placement
1 parent 975a8c2 commit 4210652

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,14 @@ static bool TagIsRecordType(dw_tag_t tag) {
165165
/// parameter exists for the given \c subprogram.
166166
static DWARFDIE
167167
GetCXXObjectParameter(const DWARFDIE &subprogram,
168-
clang::DeclContext const &containing_decl_ctx) {
168+
const clang::DeclContext &containing_decl_ctx) {
169169
assert(subprogram.Tag() == DW_TAG_subprogram ||
170170
subprogram.Tag() == DW_TAG_inlined_subroutine ||
171171
subprogram.Tag() == DW_TAG_subroutine_type);
172172

173173
if (!DeclKindIsCXXClass(containing_decl_ctx.getDeclKind()))
174174
return {};
175175

176-
if (!subprogram.HasChildren())
177-
return {};
178-
179176
// FIXME: if subprogram has a explicit DW_AT_object_pointer, use it.
180177

181178
// If no DW_AT_object_pointer was specified, assume the implicit object
@@ -197,7 +194,7 @@ GetCXXObjectParameter(const DWARFDIE &subprogram,
197194
// Often times compilers omit the "this" name for the
198195
// specification DIEs, so we can't rely upon the name being in
199196
// the formal parameter DIE...
200-
if (char const *name = object_pointer.GetName();
197+
if (const char *name = object_pointer.GetName();
201198
name && ::strcmp(name, "this") != 0)
202199
return {};
203200

@@ -207,8 +204,8 @@ GetCXXObjectParameter(const DWARFDIE &subprogram,
207204
/// In order to determine the CV-qualifiers for a C++ class
208205
/// method in DWARF, we have to look at the CV-qualifiers of
209206
/// the object parameter's type.
210-
static unsigned GetCXXMethodCVQuals(DWARFDIE const &subprogram,
211-
DWARFDIE const &object_parameter) {
207+
static unsigned GetCXXMethodCVQuals(const DWARFDIE &subprogram,
208+
const DWARFDIE &object_parameter) {
212209
if (!subprogram || !object_parameter)
213210
return 0;
214211

0 commit comments

Comments
 (0)