aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-07-10 11:54:25 -0600
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-10-25 11:09:04 +0200
commit88715b94809895343caa405accb8f3c42c791853 (patch)
tree399f97aadc1a359906fbd7eb9ea8189986810cc0
parent125a6e41176b7584caf4cf01c5b2ce77c9f195d2 (diff)
downloadgcc-88715b94809895343caa405accb8f3c42c791853.zip
gcc-88715b94809895343caa405accb8f3c42c791853.tar.gz
gcc-88715b94809895343caa405accb8f3c42c791853.tar.bz2
ada: Mark some type decls as nameless
The types created by record_builtin_type and create_type_stub_decl can be marked as nameless when using minimal encodings. In this situation, gdb does not need these type names. gcc/ada/ChangeLog: * gcc-interface/utils.cc (record_builtin_type, create_type_stub_decl): Set DECL_NAMELESS on type decls.
-rw-r--r--gcc/ada/gcc-interface/utils.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc
index 9e2715a..a06366b 100644
--- a/gcc/ada/gcc-interface/utils.cc
+++ b/gcc/ada/gcc-interface/utils.cc
@@ -2019,6 +2019,8 @@ record_builtin_type (const char *name, tree type, bool artificial_p)
tree type_decl = build_decl (input_location,
TYPE_DECL, get_identifier (name), type);
DECL_ARTIFICIAL (type_decl) = artificial_p;
+ DECL_NAMELESS (type_decl) = (artificial_p
+ && gnat_encodings != DWARF_GNAT_ENCODINGS_ALL);
TYPE_ARTIFICIAL (type) = artificial_p;
gnat_pushdecl (type_decl, Empty);
@@ -2835,6 +2837,7 @@ create_type_stub_decl (tree name, tree type)
{
tree type_decl = build_decl (input_location, TYPE_DECL, name, type);
DECL_ARTIFICIAL (type_decl) = 1;
+ DECL_NAMELESS (type_decl) = gnat_encodings != DWARF_GNAT_ENCODINGS_ALL;
TYPE_ARTIFICIAL (type) = 1;
return type_decl;
}