Skip to content

Commit 22d657c

Browse files
committed
rename "use objc" to "use object description"
1 parent 532bfea commit 22d657c

File tree

8 files changed

+28
-25
lines changed

8 files changed

+28
-25
lines changed

lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ class DumpValueObjectOptions {
7676

7777
DumpValueObjectOptions &SetShowLocation(bool show = false);
7878

79-
DumpValueObjectOptions &DisableObjectiveC();
79+
DumpValueObjectOptions &DisableObjectDescription();
8080

81-
DumpValueObjectOptions &SetUseObjectiveC(bool use = false);
81+
DumpValueObjectOptions &SetUseObjectDescription(bool use = false);
8282

8383
DumpValueObjectOptions &SetShowSummary(bool show = true);
8484

@@ -145,13 +145,14 @@ class DumpValueObjectOptions {
145145
ChildPrintingDecider m_child_printing_decider;
146146
PointerAsArraySettings m_pointer_as_array;
147147
unsigned m_expand_ptr_type_flags = 0;
148+
// The following flags commonly default to false.
148149
bool m_use_synthetic : 1;
149150
bool m_scope_already_checked : 1;
150151
bool m_flat_output : 1;
151152
bool m_ignore_cap : 1;
152153
bool m_show_types : 1;
153154
bool m_show_location : 1;
154-
bool m_use_objc : 1;
155+
bool m_use_object_desc : 1;
155156
bool m_hide_root_type : 1;
156157
bool m_hide_root_name : 1;
157158
bool m_hide_name : 1;

lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class OptionGroupValueObjectDisplay : public OptionGroup {
3131

3232
bool AnyOptionWasSet() const {
3333
return show_types || no_summary_depth != 0 || show_location ||
34-
flat_output || use_objc || max_depth != UINT32_MAX ||
34+
flat_output || use_object_desc || max_depth != UINT32_MAX ||
3535
ptr_depth != 0 || !use_synth || be_raw || ignore_cap ||
3636
run_validator;
3737
}
@@ -42,7 +42,7 @@ class OptionGroupValueObjectDisplay : public OptionGroup {
4242
lldb::Format format = lldb::eFormatDefault,
4343
lldb::TypeSummaryImplSP summary_sp = lldb::TypeSummaryImplSP());
4444

45-
bool show_types : 1, show_location : 1, flat_output : 1, use_objc : 1,
45+
bool show_types : 1, show_location : 1, flat_output : 1, use_object_desc : 1,
4646
use_synth : 1, be_raw : 1, ignore_cap : 1, run_validator : 1,
4747
max_depth_is_default : 1;
4848

lldb/source/Commands/CommandObjectDWIMPrint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void CommandObjectDWIMPrint::DoExecute(StringRef command,
9393
dump_options.SetHideRootName(suppress_result)
9494
.SetExpandPointerTypeFlags(lldb::eTypeIsObjC);
9595

96-
bool is_po = m_varobj_options.use_objc;
96+
bool is_po = m_varobj_options.use_object_desc;
9797

9898
StackFrame *frame = m_exe_ctx.GetFramePtr();
9999

lldb/source/Commands/CommandObjectExpression.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ EvaluateExpressionOptions
202202
CommandObjectExpression::CommandOptions::GetEvaluateExpressionOptions(
203203
const Target &target, const OptionGroupValueObjectDisplay &display_opts) {
204204
EvaluateExpressionOptions options;
205-
options.SetCoerceToId(display_opts.use_objc);
205+
options.SetCoerceToId(display_opts.use_object_desc);
206206
options.SetUnwindOnError(unwind_on_error);
207207
options.SetIgnoreBreakpoints(ignore_breakpoints);
208208
options.SetKeepInMemory(true);
@@ -241,11 +241,11 @@ CommandObjectExpression::CommandOptions::GetEvaluateExpressionOptions(
241241
bool CommandObjectExpression::CommandOptions::ShouldSuppressResult(
242242
const OptionGroupValueObjectDisplay &display_opts) const {
243243
// Explicitly disabling persistent results takes precedence over the
244-
// m_verbosity/use_objc logic.
244+
// m_verbosity/use_object_desc logic.
245245
if (suppress_persistent_result != eLazyBoolCalculate)
246246
return suppress_persistent_result == eLazyBoolYes;
247247

248-
return display_opts.use_objc &&
248+
return display_opts.use_object_desc &&
249249
m_verbosity == eLanguageRuntimeDescriptionDisplayVerbosityCompact;
250250
}
251251

@@ -332,7 +332,7 @@ Options *CommandObjectExpression::GetOptions() { return &m_option_group; }
332332

333333
void CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
334334
EvaluateExpressionOptions options;
335-
options.SetCoerceToId(m_varobj_options.use_objc);
335+
options.SetCoerceToId(m_varobj_options.use_object_desc);
336336
options.SetLanguage(m_command_options.language);
337337
options.SetExecutionPolicy(lldb_private::eExecutionPolicyNever);
338338
options.SetAutoApplyFixIts(false);

lldb/source/DataFormatters/DumpValueObjectOptions.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DumpValueObjectOptions::DumpValueObjectOptions()
1717
: m_summary_sp(), m_root_valobj_name(), m_decl_printing_helper(),
1818
m_child_printing_decider(), m_pointer_as_array(), m_use_synthetic(true),
1919
m_scope_already_checked(false), m_flat_output(false), m_ignore_cap(false),
20-
m_show_types(false), m_show_location(false), m_use_objc(false),
20+
m_show_types(false), m_show_location(false), m_use_object_desc(false),
2121
m_hide_root_type(false), m_hide_root_name(false), m_hide_name(false),
2222
m_hide_value(false), m_run_validator(false),
2323
m_use_type_display_name(true), m_allow_oneliner_mode(true),
@@ -65,18 +65,19 @@ DumpValueObjectOptions &DumpValueObjectOptions::SetShowLocation(bool show) {
6565
return *this;
6666
}
6767

68-
DumpValueObjectOptions &DumpValueObjectOptions::DisableObjectiveC() {
68+
DumpValueObjectOptions &DumpValueObjectOptions::DisableObjectDescription() {
6969
// Reset these options to their default values.
70-
SetUseObjectiveC(false);
70+
SetUseObjectDescription(false);
7171
SetHideRootType(false);
7272
SetHideName(false);
7373
SetHideValue(false);
7474
SetShowSummary(true);
7575
return *this;
7676
}
7777

78-
DumpValueObjectOptions &DumpValueObjectOptions::SetUseObjectiveC(bool use) {
79-
m_use_objc = use;
78+
DumpValueObjectOptions &
79+
DumpValueObjectOptions::SetUseObjectDescription(bool use) {
80+
m_use_object_desc = use;
8081
return *this;
8182
}
8283

lldb/source/DataFormatters/ValueObjectPrinter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static const char *maybeNewline(const std::string &s) {
7979
}
8080

8181
bool ValueObjectPrinter::ShouldPrintObjectDescription() {
82-
return ShouldPrintValueObject() && m_options.m_use_objc && !IsNil() &&
82+
return ShouldPrintValueObject() && m_options.m_use_object_desc && !IsNil() &&
8383
!IsUninitialized() && !m_options.m_pointer_as_array;
8484
}
8585

@@ -104,7 +104,7 @@ llvm::Error ValueObjectPrinter::PrintValueObject() {
104104
*m_stream << "error: " << error_msg << maybeNewline(error_msg);
105105

106106
// Print the value object directly.
107-
m_options.DisableObjectiveC();
107+
m_options.DisableObjectDescription();
108108
} else {
109109
object_desc = *object_desc_or_err;
110110
}
@@ -517,7 +517,7 @@ bool ValueObjectPrinter::ShouldPrintChildren(
517517
if (m_options.m_pointer_as_array)
518518
return true;
519519

520-
if (m_options.m_use_objc)
520+
if (m_options.m_use_object_desc)
521521
return false;
522522

523523
bool print_children = true;

lldb/source/Expression/REPL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void REPL::IOHandlerInputComplete(IOHandler &io_handler, std::string &code) {
321321
const bool colorize_err = error_sp->GetFile().GetIsTerminalWithColors();
322322

323323
EvaluateExpressionOptions expr_options = m_expr_options;
324-
expr_options.SetCoerceToId(m_varobj_options.use_objc);
324+
expr_options.SetCoerceToId(m_varobj_options.use_object_desc);
325325
expr_options.SetKeepInMemory(true);
326326
expr_options.SetUseDynamic(m_varobj_options.use_dynamic);
327327
expr_options.SetGenerateDebugInfo(true);

lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Status OptionGroupValueObjectDisplay::SetOptionValue(
9090
flat_output = true;
9191
break;
9292
case 'O':
93-
use_objc = true;
93+
use_object_desc = true;
9494
break;
9595
case 'R':
9696
be_raw = true;
@@ -163,7 +163,7 @@ void OptionGroupValueObjectDisplay::OptionParsingStarting(
163163
no_summary_depth = 0;
164164
show_location = false;
165165
flat_output = false;
166-
use_objc = false;
166+
use_object_desc = false;
167167
max_depth = UINT32_MAX;
168168
max_depth_is_default = true;
169169
ptr_depth = 0;
@@ -191,14 +191,14 @@ DumpValueObjectOptions OptionGroupValueObjectDisplay::GetAsDumpOptions(
191191
lldb::Format format, lldb::TypeSummaryImplSP summary_sp) {
192192
DumpValueObjectOptions options;
193193
options.SetMaximumPointerDepth(ptr_depth);
194-
if (use_objc)
194+
if (use_object_desc)
195195
options.SetShowSummary(false);
196196
else
197197
options.SetOmitSummaryDepth(no_summary_depth);
198198
options.SetMaximumDepth(max_depth, max_depth_is_default)
199199
.SetShowTypes(show_types)
200200
.SetShowLocation(show_location)
201-
.SetUseObjectiveC(use_objc)
201+
.SetUseObjectDescription(use_object_desc)
202202
.SetUseDynamicType(use_dynamic)
203203
.SetUseSyntheticValue(use_synth)
204204
.SetFlatOutput(flat_output)
@@ -208,8 +208,9 @@ DumpValueObjectOptions OptionGroupValueObjectDisplay::GetAsDumpOptions(
208208

209209
if (lang_descr_verbosity ==
210210
eLanguageRuntimeDescriptionDisplayVerbosityCompact)
211-
options.SetHideRootType(use_objc).SetHideName(use_objc).SetHideValue(
212-
use_objc);
211+
options.SetHideRootType(use_object_desc)
212+
.SetHideName(use_object_desc)
213+
.SetHideValue(use_object_desc);
213214

214215
if (be_raw)
215216
options.SetRawDisplay();

0 commit comments

Comments
 (0)