]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Don't add type linkage names to cooked index
authorTom Tromey <tromey@adacore.com>
Fri, 14 Oct 2022 13:08:57 +0000 (07:08 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 17 Oct 2022 14:01:39 +0000 (08:01 -0600)
The compiler will sometimes emit a linkage name for a type, like:

    <1d3>   DW_AT_linkage_name: (indirect string, offset: 0x106f): 11__mbstate_t

These names aren't very useful, and this patch changes the DWARF
reader so that they are ignored by the cooked index.

gdb/dwarf2/read.c

index e62f9752a803b200952d58b1cd39669482d41d8d..33dfd52b362941d609ee94fdbe95b69da69e1a65 100644 (file)
@@ -17991,11 +17991,6 @@ tag_can_have_linkage_name (enum dwarf_tag tag)
 {
   switch (tag)
     {
-      /* We include types here because an anonymous C++ type might
-        have a name for linkage purposes.  */
-    case DW_TAG_class_type:
-    case DW_TAG_structure_type:
-    case DW_TAG_union_type:
     case DW_TAG_variable:
     case DW_TAG_subprogram:
       return true;