Skip to content

Commit ba08e51

Browse files
committed
Rename child_* variables and arguments to deref_*
1 parent f17d1c2 commit ba08e51

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

lldb/include/lldb/Symbol/CompilerType.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ class CompilerType {
434434
CompilerDecl GetStaticFieldWithName(llvm::StringRef name) const;
435435

436436
llvm::Expected<CompilerType>
437-
GetDereferencedType(ExecutionContext *exe_ctx, std::string &child_name,
438-
uint32_t &child_byte_size, int32_t &child_byte_offset,
437+
GetDereferencedType(ExecutionContext *exe_ctx, std::string &deref_name,
438+
uint32_t &deref_byte_size, int32_t &deref_byte_offset,
439439
ValueObject *valobj, uint64_t &language_flags) const;
440440

441441
llvm::Expected<CompilerType> GetChildCompilerTypeAtIndex(

lldb/include/lldb/Symbol/TypeSystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ class TypeSystem : public PluginInterface,
366366

367367
virtual llvm::Expected<CompilerType>
368368
GetDereferencedType(lldb::opaque_compiler_type_t type,
369-
ExecutionContext *exe_ctx, std::string &child_name,
370-
uint32_t &child_byte_size, int32_t &child_byte_offset,
369+
ExecutionContext *exe_ctx, std::string &deref_name,
370+
uint32_t &deref_byte_size, int32_t &deref_byte_offset,
371371
ValueObject *valobj, uint64_t &language_flags) = 0;
372372

373373
virtual llvm::Expected<CompilerType> GetChildCompilerTypeAtIndex(

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6186,8 +6186,8 @@ uint32_t TypeSystemClang::GetNumPointeeChildren(clang::QualType type) {
61866186

61876187
llvm::Expected<CompilerType> TypeSystemClang::GetDereferencedType(
61886188
lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
6189-
std::string &child_name, uint32_t &child_byte_size,
6190-
int32_t &child_byte_offset, ValueObject *valobj, uint64_t &language_flags) {
6189+
std::string &deref_name, uint32_t &deref_byte_size,
6190+
int32_t &deref_byte_offset, ValueObject *valobj, uint64_t &language_flags) {
61916191
bool type_valid = IsPointerOrReferenceType(type, nullptr) ||
61926192
IsArrayType(type, nullptr, nullptr, nullptr);
61936193
if (!type_valid)
@@ -6197,8 +6197,8 @@ llvm::Expected<CompilerType> TypeSystemClang::GetDereferencedType(
61976197
bool child_is_base_class;
61986198
bool child_is_deref_of_parent;
61996199
return GetChildCompilerTypeAtIndex(
6200-
type, exe_ctx, 0, false, true, false, child_name, child_byte_size,
6201-
child_byte_offset, child_bitfield_bit_size, child_bitfield_bit_offset,
6200+
type, exe_ctx, 0, false, true, false, deref_name, deref_byte_size,
6201+
deref_byte_offset, child_bitfield_bit_size, child_bitfield_bit_offset,
62026202
child_is_base_class, child_is_deref_of_parent, valobj, language_flags);
62036203
}
62046204

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,8 @@ class TypeSystemClang : public TypeSystem {
891891

892892
llvm::Expected<CompilerType>
893893
GetDereferencedType(lldb::opaque_compiler_type_t type,
894-
ExecutionContext *exe_ctx, std::string &child_name,
895-
uint32_t &child_byte_size, int32_t &child_byte_offset,
894+
ExecutionContext *exe_ctx, std::string &deref_name,
895+
uint32_t &deref_byte_size, int32_t &deref_byte_offset,
896896
ValueObject *valobj, uint64_t &language_flags) override;
897897

898898
llvm::Expected<CompilerType> GetChildCompilerTypeAtIndex(

lldb/source/Symbol/CompilerType.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,13 +894,13 @@ CompilerDecl CompilerType::GetStaticFieldWithName(llvm::StringRef name) const {
894894
}
895895

896896
llvm::Expected<CompilerType> CompilerType::GetDereferencedType(
897-
ExecutionContext *exe_ctx, std::string &child_name,
898-
uint32_t &child_byte_size, int32_t &child_byte_offset, ValueObject *valobj,
897+
ExecutionContext *exe_ctx, std::string &deref_name,
898+
uint32_t &deref_byte_size, int32_t &deref_byte_offset, ValueObject *valobj,
899899
uint64_t &language_flags) const {
900900
if (IsValid())
901901
if (auto type_system_sp = GetTypeSystem())
902902
return type_system_sp->GetDereferencedType(
903-
m_type, exe_ctx, child_name, child_byte_size, child_byte_offset,
903+
m_type, exe_ctx, deref_name, deref_byte_size, deref_byte_offset,
904904
valobj, language_flags);
905905
return CompilerType();
906906
}

lldb/source/ValueObject/ValueObject.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,56 +2794,56 @@ ValueObjectSP ValueObject::Dereference(Status &error) {
27942794
if (m_deref_valobj)
27952795
return m_deref_valobj->GetSP();
27962796

2797-
std::string child_name_str;
2798-
uint32_t child_byte_size = 0;
2799-
int32_t child_byte_offset = 0;
2797+
std::string deref_name_str;
2798+
uint32_t deref_byte_size = 0;
2799+
int32_t deref_byte_offset = 0;
28002800
CompilerType compiler_type = GetCompilerType();
28012801
uint64_t language_flags = 0;
28022802

28032803
ExecutionContext exe_ctx(GetExecutionContextRef());
28042804

2805-
CompilerType child_compiler_type;
2806-
auto child_compiler_type_or_err = compiler_type.GetDereferencedType(
2807-
&exe_ctx, child_name_str, child_byte_size, child_byte_offset, this,
2805+
CompilerType deref_compiler_type;
2806+
auto deref_compiler_type_or_err = compiler_type.GetDereferencedType(
2807+
&exe_ctx, deref_name_str, deref_byte_size, deref_byte_offset, this,
28082808
language_flags);
28092809

28102810
std::string deref_error;
2811-
if (child_compiler_type_or_err) {
2812-
child_compiler_type = *child_compiler_type_or_err;
2813-
if (child_compiler_type && child_byte_size) {
2814-
ConstString child_name;
2815-
if (!child_name_str.empty())
2816-
child_name.SetCString(child_name_str.c_str());
2811+
if (deref_compiler_type_or_err) {
2812+
deref_compiler_type = *deref_compiler_type_or_err;
2813+
if (deref_compiler_type && deref_byte_size) {
2814+
ConstString deref_name;
2815+
if (!deref_name_str.empty())
2816+
deref_name.SetCString(deref_name_str.c_str());
28172817

28182818
m_deref_valobj =
2819-
new ValueObjectChild(*this, child_compiler_type, child_name,
2820-
child_byte_size, child_byte_offset, 0, 0, false,
2819+
new ValueObjectChild(*this, deref_compiler_type, deref_name,
2820+
deref_byte_size, deref_byte_offset, 0, 0, false,
28212821
true, eAddressTypeInvalid, language_flags);
28222822
}
28232823

2824-
// In case of incomplete child compiler type, use the pointee type and try
2824+
// In case of incomplete deref compiler type, use the pointee type and try
28252825
// to recreate a new ValueObjectChild using it.
28262826
if (!m_deref_valobj) {
28272827
// FIXME(#59012): C++ stdlib formatters break with incomplete types (e.g.
28282828
// `std::vector<int> &`). Remove ObjC restriction once that's resolved.
28292829
if (Language::LanguageIsObjC(GetPreferredDisplayLanguage()) &&
28302830
HasSyntheticValue()) {
2831-
child_compiler_type = compiler_type.GetPointeeType();
2831+
deref_compiler_type = compiler_type.GetPointeeType();
28322832

2833-
if (child_compiler_type) {
2834-
ConstString child_name;
2835-
if (!child_name_str.empty())
2836-
child_name.SetCString(child_name_str.c_str());
2833+
if (deref_compiler_type) {
2834+
ConstString deref_name;
2835+
if (!deref_name_str.empty())
2836+
deref_name.SetCString(deref_name_str.c_str());
28372837

28382838
m_deref_valobj = new ValueObjectChild(
2839-
*this, child_compiler_type, child_name, child_byte_size,
2840-
child_byte_offset, 0, 0, false, true, eAddressTypeInvalid,
2839+
*this, deref_compiler_type, deref_name, deref_byte_size,
2840+
deref_byte_offset, 0, 0, false, true, eAddressTypeInvalid,
28412841
language_flags);
28422842
}
28432843
}
28442844
}
28452845
} else {
2846-
deref_error = llvm::toString(child_compiler_type_or_err.takeError());
2846+
deref_error = llvm::toString(deref_compiler_type_or_err.takeError());
28472847
LLDB_LOG(GetLog(LLDBLog::Types), "could not find child: {0}", deref_error);
28482848
if (IsSynthetic()) {
28492849
m_deref_valobj = GetChildMemberWithName("$$dereference$$").get();

0 commit comments

Comments
 (0)