[lldb] Default can_create to true in GetChildMemberWithName (NFC)

It turns out all existing callers of `GetChildMemberWithName` pass true for `can_create`.
This change makes `true` the default value, callers don't have to pass an opaque true.

Differential Revision: https://reviews.llvm.org/D151966
This commit is contained in:
Dave Lee
2023-05-28 18:48:32 -07:00
parent 2e69944a61
commit 7d4fcd411b
26 changed files with 117 additions and 133 deletions

View File

@@ -604,7 +604,7 @@ ValueObjectSP StackFrame::GetValueForVariableExpressionPath(
valobj_sp = GetValueObjectForFrameVariable(variable_sp, use_dynamic);
if (!valobj_sp)
return valobj_sp;
valobj_sp = valobj_sp->GetChildMemberWithName(name_const_string, true);
valobj_sp = valobj_sp->GetChildMemberWithName(name_const_string);
if (valobj_sp)
break;
}
@@ -705,13 +705,13 @@ ValueObjectSP StackFrame::GetValueForVariableExpressionPath(
return ValueObjectSP();
}
}
child_valobj_sp = valobj_sp->GetChildMemberWithName(child_name, true);
child_valobj_sp = valobj_sp->GetChildMemberWithName(child_name);
if (!child_valobj_sp) {
if (!no_synth_child) {
child_valobj_sp = valobj_sp->GetSyntheticValue();
if (child_valobj_sp)
child_valobj_sp =
child_valobj_sp->GetChildMemberWithName(child_name, true);
child_valobj_sp->GetChildMemberWithName(child_name);
}
if (no_synth_child || !child_valobj_sp) {