Remove last Ada cleanups

This removes the last cleanups from the Ada code by changing
ada_lookup_symbol_list's out parameter to be a std::vector, and then
fixing up the fallout.

This is a relatively shallow change.  Deeper changes are possible, for
example (1) changing various other functions to accept a vector rather
than a pointer, or (2) changing ada_lookup_symbol_list to return the
vector and omitting the length entirely.

Tested by the buildbot, but I'll wait for Joel to test these as well.

gdb/ChangeLog
2018-06-04  Tom Tromey  <tom@tromey.com>

	* ada-lang.h (ada_lookup_symbol_list): Update.
	* ada-lang.c (resolve_subexp): Update.
	(symbols_are_identical_enums): Change type of syms.  Remove nsyms
	parameter.
	(remove_extra_symbols, remove_irrelevant_renamings): Likewise.
	(ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
	results parameter to std::vector.
	(ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
	Update.
	* ada-exp.y (block_lookup): Update.
	(select_possible_type_sym): Change type of syms.  Remove nsyms
	parameter.
	(write_var_or_type, write_name_assoc): Update.
This commit is contained in:
Tom Tromey 2018-05-25 13:32:20 -06:00
parent 178d6a6386
commit 54d343a240
4 changed files with 108 additions and 144 deletions

View file

@ -232,7 +232,8 @@ extern const char *ada_decode (const char*);
extern enum language ada_update_initial_language (enum language);
extern int ada_lookup_symbol_list (const char *, const struct block *,
domain_enum, struct block_symbol**);
domain_enum,
std::vector<struct block_symbol> *);
extern char *ada_fold_name (const char *);