if (from < to)
{
- /* For historical reasons this might emit a list or a tuple, so
- we construct one or the other. */
- gdb::optional<ui_out_emit_tuple> tuple_emitter;
- gdb::optional<ui_out_emit_list> list_emitter;
-
- if (mi_version (uiout) == 1)
- tuple_emitter.emplace (uiout, "children");
- else
- list_emitter.emplace (uiout, "children");
+ ui_out_emit_list list_emitter (uiout, "children");
for (int ix = from; ix < to && ix < children.size (); ix++)
{
ui_out_emit_tuple child_emitter (uiout, "child");
else
print_values = PRINT_NO_VALUES;
- /* For historical reasons this might emit a list or a tuple, so we
- construct one or the other. */
- gdb::optional<ui_out_emit_tuple> tuple_emitter;
- gdb::optional<ui_out_emit_list> list_emitter;
-
- if (mi_version (uiout) <= 1)
- tuple_emitter.emplace (uiout, "changelist");
- else
- list_emitter.emplace (uiout, "changelist");
+ ui_out_emit_list list_emitter (uiout, "changelist");
/* Check if the parameter is a "*", which means that we want to
update all variables. */
{
int from, to;
- gdb::optional<ui_out_emit_tuple> tuple_emitter;
- if (mi_version (uiout) > 1)
- tuple_emitter.emplace (uiout, nullptr);
+ ui_out_emit_tuple tuple_emitter (uiout, nullptr);
uiout->field_string ("name", varobj_get_objname (r.varobj));
switch (r.status)