[COMMITTED,32/35] ada: Mark XUA types as artificial

Message ID 20241025091107.485741-32-poulhies@adacore.com
State Committed
Commit 125a6e41176b7584caf4cf01c5b2ce77c9f195d2
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 XUA types.  This patch changes the
compiler to unconditionally mark these as artificial; a subsequent
patch will arrange for the name to be omitted.

gcc/ada/ChangeLog:

	* gcc-interface/decl.cc (gnat_to_gnu_entity): Pass 'true' to
	create_type_decl when creating XUA type.

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

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

Patch

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 256541df411..ba75fa33093 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -2483,7 +2483,7 @@  gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	/* See the above description for the rationale.  */
 	tree gnu_tmp_decl
 	  = create_type_decl (create_concat_name (gnat_entity, "XUA"), tem,
-			      artificial_p, debug_info_p, gnat_entity);
+			      true, debug_info_p, gnat_entity);
 	TYPE_CONTEXT (tem) = gnu_fat_type;
 	TYPE_CONTEXT (TYPE_POINTER_TO (tem)) = gnu_fat_type;