forked from Imagelibrary/binutils-gdb
Simplify some symbol searches in Ada code
This changes some of the Ada code to simplify symbol searches. For example, if a function is being looked for, the search is narrowed to use SEARCH_FUNCTION_DOMAIN rather than SEARCH_VFT. In one spot, a search of the "struct" domain is removed, because Ada does not have a tag domain.
This commit is contained in:
@@ -7436,14 +7436,8 @@ field_alignment (struct type *type, int f)
|
||||
static struct symbol *
|
||||
ada_find_any_type_symbol (const char *name)
|
||||
{
|
||||
struct symbol *sym;
|
||||
|
||||
sym = standard_lookup (name, get_selected_block (NULL), SEARCH_VFT);
|
||||
if (sym != NULL && sym->aclass () == LOC_TYPEDEF)
|
||||
return sym;
|
||||
|
||||
sym = standard_lookup (name, NULL, SEARCH_STRUCT_DOMAIN);
|
||||
return sym;
|
||||
return standard_lookup (name, get_selected_block (nullptr),
|
||||
SEARCH_TYPE_DOMAIN);
|
||||
}
|
||||
|
||||
/* Find a type named NAME. Ignores ambiguity. This routine will look
|
||||
|
||||
Reference in New Issue
Block a user