return FLOAT;
}
- int_storage.emplace_back (new gdb_mpz (std::move (result)));
- const gdb_mpz *value = int_storage.back ().get ();
+ const gdb_mpz *value
+ = int_storage.emplace_back (new gdb_mpz (std::move (result))).get ();
int int_bits = gdbarch_int_bit (par_state->gdbarch ());
int long_bits = gdbarch_long_bit (par_state->gdbarch ());
insn_offset = prev->insn_offset + ftrace_call_num_insn (prev);
}
- btinfo->functions.emplace_back (mfun, fun, number, insn_offset, level);
- return &btinfo->functions.back ();
+ return &btinfo->functions.emplace_back (mfun, fun, number, insn_offset,
+ level);
}
/* Update the UP field of a function segment. */
return;
}
- subfile->line_vector_entries.emplace_back ();
- linetable_entry &e = subfile->line_vector_entries.back ();
+ linetable_entry &e = subfile->line_vector_entries.emplace_back ();
e.line = line;
e.is_stmt = (flags & LEF_IS_STMT) != 0;
e.set_unrelocated_pc (pc);
struct context_stack *
buildsym_compunit::push_context (int desc, CORE_ADDR valu)
{
- m_context_stack.emplace_back ();
- struct context_stack *newobj = &m_context_stack.back ();
+ struct context_stack *newobj = &m_context_stack.emplace_back ();
newobj->depth = desc;
newobj->locals = m_local_symbols;
void
dwarf_expr_context::add_piece (ULONGEST size, ULONGEST offset)
{
- this->m_pieces.emplace_back ();
- dwarf_expr_piece &p = this->m_pieces.back ();
+ dwarf_expr_piece &p = this->m_pieces.emplace_back ();
p.location = this->m_location;
p.size = size;
const char *fieldname = "";
if (die->tag == DW_TAG_inheritance)
- {
- fip->baseclasses.emplace_back ();
- new_field = &fip->baseclasses.back ();
- }
+ new_field = &fip->baseclasses.emplace_back ();
else
- {
- fip->fields.emplace_back ();
- new_field = &fip->fields.back ();
- }
+ new_field = &fip->fields.emplace_back ();
new_field->offset = die->sect_off;
/* Create a new fnfieldlist if necessary. */
if (flp == nullptr)
{
- fip->fnfieldlists.emplace_back ();
- flp = &fip->fnfieldlists.back ();
+ flp = &fip->fnfieldlists.emplace_back ();
flp->name = fieldname;
i = fip->fnfieldlists.size () - 1;
}
/* Create a new member function field and add it to the vector of
fnfieldlists. */
- flp->fnfields.emplace_back ();
- fnp = &flp->fnfields.back ();
+ fnp = &flp->fnfields.emplace_back ();
/* Delay processing of the physname until later. */
if (cu->lang () == language_cplus)
{
variant_part_builder *new_part;
if (fi->current_variant_part == nullptr)
- {
- fi->variant_parts.emplace_back ();
- new_part = &fi->variant_parts.back ();
- }
+ new_part = &fi->variant_parts.emplace_back ();
else if (!fi->current_variant_part->processing_variant)
{
complaint (_("nested DW_TAG_variant_part seen "
else
{
variant_field ¤t = fi->current_variant_part->variants.back ();
- current.variant_parts.emplace_back ();
- new_part = ¤t.variant_parts.back ();
+ new_part = ¤t.variant_parts.emplace_back ();
}
/* When we recurse, we want callees to add to this new variant
= make_scoped_restore (&fi->current_variant_part->processing_variant,
true);
- fi->current_variant_part->variants.emplace_back ();
- variant_field &variant = fi->current_variant_part->variants.back ();
+ variant_field &variant = fi->current_variant_part->variants.emplace_back ();
variant.first_field = fi->fields.size ();
/* In a variant we want to get the discriminant and also add a
flag_enum = 0;
}
- fields.emplace_back ();
- struct field &field = fields.back ();
+ struct field &field = fields.emplace_back ();
field.set_name (dwarf2_physname (name, child_die, cu));
field.set_loc_enumval (value);
}
for (;;)
{
- shared_macro_buffer *arg;
int depth;
/* Initialize the next argument. */
- args.emplace_back ();
- arg = &args.back ();
+ shared_macro_buffer *arg = &args.emplace_back ();
set_token (arg, src->text, src->text);
/* Gather the argument's tokens. */
missing. Add an empty argument in this case. */
if (nargs != -1 && args.size () == nargs - 1)
{
- args.emplace_back ();
- arg = &args.back ();
+ arg = &args.emplace_back ();
set_token (arg, src->text, src->text);
}
char *id = (char *) xml_find_attribute (attributes, "id")->value.get ();
ptid_t ptid = read_ptid (id, NULL);
- data->items.emplace_back (ptid);
- thread_item &item = data->items.back ();
+ thread_item &item = data->items.emplace_back (ptid);
attr = xml_find_attribute (attributes, "core");
if (attr != NULL)
error (_("target_get_bookmark failed."));
/* Set up a bookmark struct. */
- all_bookmarks.emplace_back ();
- bookmark &b = all_bookmarks.back ();
+ bookmark &b = all_bookmarks.emplace_back ();
b.number = ++bookmark_count;
b.pc = regcache_read_pc (regcache);
b.sal = find_pc_line (b.pc, 0);
struct trace_state_variable *
create_trace_state_variable (const char *name)
{
- tvariables.emplace_back (name, next_tsv_number++);
- return &tvariables.back ();
+ return &tvariables.emplace_back (name, next_tsv_number++);
}
/* Look for a trace state variable of the given name. */
&& m_buffered_output.back ().m_msg.back () != '\n')
m_buffered_output.back ().m_msg.append (msg);
else
- {
- m_buffered_output.emplace_back (msg);
- m_buffered_output.back ().m_stream = stream;
- }
+ m_buffered_output.emplace_back (msg).m_stream = stream;
prev = cur + 1;
}
}
void
buffer_group::wrap_here (int indent, ui_file *stream)
{
- m_buffered_output.emplace_back ("", indent);
- m_buffered_output.back ().m_stream = stream;
+ m_buffered_output.emplace_back ("", indent).m_stream = stream;
}
/* See ui-out.h. */
void
buffer_group::flush_here (ui_file *stream)
{
- m_buffered_output.emplace_back ("", -1, true);
- m_buffered_output.back ().m_stream = stream;
+ m_buffered_output.emplace_back ("", -1, true).m_stream = stream;
}
/* See ui-out.h. */
}
}
#endif
- windows_process.solibs.emplace_back ();
- windows_solib *so = &windows_process.solibs.back ();
+ windows_solib *so = &windows_process.solibs.emplace_back ();
so->load_addr = load_addr;
so->original_name = name;
#ifndef __CYGWIN__
if (old_linetable[ii].line == 0)
{
/* Function entry found. */
- fentries.emplace_back ();
- linetable_entry &e = fentries.back ();
+ linetable_entry &e = fentries.emplace_back ();
e.line = ii;
e.is_stmt = true;
e.set_unrelocated_pc (old_linetable[ii].unrelocated_pc ());