mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-07 16:13:03 +00:00
Only search types in lookup_typename
This changes lookup_typename to only look for types. The check for LOC_TYPEDEF can now also be removed, because only types will appear in TYPE_DOMAIN. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24870
This commit is contained in:
@@ -1655,9 +1655,9 @@ lookup_typename (const struct language_defn *language,
|
|||||||
{
|
{
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
|
|
||||||
sym = lookup_symbol_in_language (name, block, SEARCH_VFT,
|
sym = lookup_symbol_in_language (name, block, SEARCH_TYPE_DOMAIN,
|
||||||
language->la_language, NULL).symbol;
|
language->la_language, NULL).symbol;
|
||||||
if (sym != NULL && sym->aclass () == LOC_TYPEDEF)
|
if (sym != nullptr)
|
||||||
{
|
{
|
||||||
struct type *type = sym->type ();
|
struct type *type = sym->type ();
|
||||||
/* Ensure the length of TYPE is valid. */
|
/* Ensure the length of TYPE is valid. */
|
||||||
|
|||||||
Reference in New Issue
Block a user