[COMMITTED,31/35] ada: Mark XUB types as nameless

Message ID 20241025091107.485741-31-poulhies@adacore.com
State Committed
Commit 0eb688077f50d24e2fe21e7c9385b74b81e0a925
Headers
Series [COMMITTED,01/35] ada: Pass parameters of full access unconstrained array types by copy in calls |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Marc Poulhiès Oct. 25, 2024, 9:11 a.m. UTC
  From: Tom Tromey <tromey@adacore.com>

gdb does not need the name of XUB types.  This patch changes the
compiler to omit these names from the DWARF when minimal encodings are
in use.

gcc/ada/ChangeLog:

	* gcc-interface/decl.cc (gnat_to_gnu_entity): Set TYPE_NAMELESS on
	XUB types.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gcc-interface/decl.cc | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 14b39b336bd..256541df411 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -2393,6 +2393,8 @@  gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	/* Install all the fields into the template.  */
 	TYPE_NAME (gnu_template_type)
 	  = create_concat_name (gnat_entity, "XUB");
+	TYPE_NAMELESS (gnu_template_type)
+	  = gnat_encodings != DWARF_GNAT_ENCODINGS_ALL;
 	gnu_template_fields = NULL_TREE;
 	for (index = 0; index < ndim; index++)
 	  gnu_template_fields