]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Pass artificial_p to create_type_decl
authorTom Tromey <tromey@adacore.com>
Fri, 15 Nov 2024 17:12:28 +0000 (10:12 -0700)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 13 Dec 2024 08:36:02 +0000 (09:36 +0100)
The recent "nameless types" change to gcc-interface caused the gdb
pretty-printer for VSS to fail.  This happens because one call to
create_type_decl unconditionally passes "true" as the "artificial_p"
parameter.  This patch changes this call to instead pass the entity's
local artificial_p value instead.  This makes sense, I think, because
the type decl being created for debug purposes (as the comment says)
is there to represent the relevant entity from the source.

gcc/ada/ChangeLog:

* gcc-interface/decl.cc (gnat_to_gnu_entity): Pass artificial_p to
create_type_decl.

gcc/ada/gcc-interface/decl.cc

index 024bf456bc9fe0842401a5a76551dcfa17a5a598..8f20de2c9b74250e65e7c319a5ad5c395b3c3136 100644 (file)
@@ -4558,8 +4558,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
                                     false, definition, false);
 
          if (gnu_type != orig_type && !gnu_decl)
-           create_type_decl (gnu_entity_name, orig_type, true, debug_info_p,
-                             gnat_entity);
+           create_type_decl (gnu_entity_name, orig_type, artificial_p,
+                             debug_info_p, gnat_entity);
        }
 
       /* Now set the RM size of the type.  We cannot do it before padding