]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove a check of VAR_DOMAIN
authorTom Tromey <tom@tromey.com>
Sat, 11 Mar 2023 05:16:51 +0000 (22:16 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 28 Jan 2024 17:58:16 +0000 (10:58 -0700)
completion_list_add_symbol checks that the returned symbol has
VAR_DOMAIN, but also checks that its address class is LOC_BLOCK.  The
domain check is redundant -- only functions can possibly be LOC_BLOCK
-- and leaving this in place will cause a regression when combined
with a later patch in this series.  This patch preemptively removes
the redundant check.

gdb/symtab.c

index 7c56dbadf8cd20e6dba1b0c4ba0a5b4b59bffcac..76a771b11665ebbd9868b58d838aa9e095a33c00 100644 (file)
@@ -5631,7 +5631,6 @@ completion_list_add_symbol (completion_tracker &tracker,
      the msymbol name and removes the msymbol name from the completion
      tracker.  */
   if (sym->language () == language_cplus
-      && sym->domain () == VAR_DOMAIN
       && sym->aclass () == LOC_BLOCK)
     {
       /* The call to canonicalize returns the empty string if the input