+2021-03-04 Tom Tromey <tromey@adacore.com>
+
+ * ada-lang.c (struct match_data) <found_sym>: Now bool.
+ (aux_add_nonlocal_symbols): Update.
+ (ada_add_block_symbols): Change "found_sym" to bool.
+
2021-03-03 Tom Tromey <tromey@adacore.com>
* ada-lang.c (ada_resolve_function): Update comment.
struct objfile *objfile = nullptr;
std::vector<struct block_symbol> *resultp;
struct symbol *arg_sym = nullptr;
- int found_sym = 0;
+ bool found_sym = false;
};
/* A callback for add_nonlocal_symbols that adds symbol, found in BSYM,
add_defn_to_vec (*data->resultp,
fixup_symbol_section (data->arg_sym, data->objfile),
block);
- data->found_sym = 0;
+ data->found_sym = false;
data->arg_sym = NULL;
}
else
data->arg_sym = sym;
else
{
- data->found_sym = 1;
+ data->found_sym = true;
add_defn_to_vec (*data->resultp,
fixup_symbol_section (sym, data->objfile),
block);
if (ada_add_block_renamings (result, global_block, lookup_name,
domain))
- data.found_sym = 1;
+ data.found_sym = true;
}
}
/* A matching argument symbol, if any. */
struct symbol *arg_sym;
/* Set true when we find a matching non-argument symbol. */
- int found_sym;
+ bool found_sym;
struct symbol *sym;
arg_sym = NULL;
- found_sym = 0;
+ found_sym = false;
for (sym = block_iter_match_first (block, lookup_name, &iter);
sym != NULL;
sym = block_iter_match_next (lookup_name, &iter))
arg_sym = sym;
else
{
- found_sym = 1;
+ found_sym = true;
add_defn_to_vec (result,
fixup_symbol_section (sym, objfile),
block);
/* Handle renamings. */
if (ada_add_block_renamings (result, block, lookup_name, domain))
- found_sym = 1;
+ found_sym = true;
if (!found_sym && arg_sym != NULL)
{
if (!lookup_name.ada ().wild_match_p ())
{
arg_sym = NULL;
- found_sym = 0;
+ found_sym = false;
const std::string &ada_lookup_name = lookup_name.ada ().lookup_name ();
const char *name = ada_lookup_name.c_str ();
size_t name_len = ada_lookup_name.size ();
arg_sym = sym;
else
{
- found_sym = 1;
+ found_sym = true;
add_defn_to_vec (result,
fixup_symbol_section (sym, objfile),
block);