Consistently generate debug info for elaboration variables
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 21 May 2021 09:19:32 +0000 (11:19 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 21 May 2021 09:19:32 +0000 (11:19 +0200)
commit3553d8c2fecbe8d831538c661c9e58e7ae50c385
treee300ee094019d4bd238780856d54f50c2fd2d955
parent4a29b8d62726d100e1c5ea1e3401309a1437c6be
Consistently generate debug info for elaboration variables

This makes sure that debug info is generated for elaboration variables,
even if the variables are not generated exclusively for this purpose.

gcc/ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_Integer>: Do
not pass default value in call to create_var_decl.
<E_Variable>: Likewise.
<E_Record_Subtype>: Both pass true for const_flag and false for
const_decl_allowed_p in call to create_var_decl.
Small tweaks in the generic record type case.
(elaborate_expression): Rename need_debug into need_for_debug and
adjust throughout.
(elaborate_expression_1): Likewise.  Pass Needs_Debug_Info instead
of need_for_debug in call to create_var_decl.
(elaborate_expression_2): Likewise.
* gcc-interface/utils.c (maybe_pad_type): Pass false for
const_decl_allowed_p in call to create_var_decl.
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/utils.c