Add constructor to bound_minimal_symbol

This adds a constructor to bound_minimal_symbol, to avoid a build
failure with clang that Simon pointed out.

I also took the opportunity to remove some redundant initializations,
and to change one use of push_back to emplace_back, as suggested by
Simon.
This commit is contained in:
Tom Tromey
2022-02-15 09:04:01 -07:00
parent 5c14cc552d
commit f6b3ad5440
6 changed files with 20 additions and 13 deletions

View File

@@ -2531,7 +2531,7 @@ struct bound_minimal_symbol
hppa_lookup_stub_minimal_symbol (const char *name,
enum unwind_stub_types stub_type)
{
struct bound_minimal_symbol result = { NULL, NULL };
struct bound_minimal_symbol result;
for (objfile *objfile : current_program_space->objfiles ())
{