[Ada] More complete information level for -gnatR4 output
This instructs -gnatR4 to also list the Etype of components in user-declared record types if it is compiler-generated, for example in: package P3 is type idx is range 1 .. 100; type Arr is array (Idx range <>) of Character; type Rec is record C : Arr (1 .. 5); end record; end P3; 2019-08-21 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * repinfo.adb (List_Array_Info): In -gnatR4 mode, set the relevant flag on the component type here instead of... (List_Object_Info): Likewise for the object type. (List_Entities): ...here. In -gnatR4 mode, recurse into entities local to a record type. (List_Component_Layout): In -gnatR4 mode, mark the type as relevant. From-SVN: r274786
This commit is contained in:
parent
abdeafa67a
commit
3c488e6c86
|
@ -1,3 +1,13 @@
|
||||||
|
2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* repinfo.adb (List_Array_Info): In -gnatR4 mode, set the
|
||||||
|
relevant flag on the component type here instead of...
|
||||||
|
(List_Object_Info): Likewise for the object type.
|
||||||
|
(List_Entities): ...here. In -gnatR4 mode, recurse into
|
||||||
|
entities local to a record type.
|
||||||
|
(List_Component_Layout): In -gnatR4 mode, mark the type as
|
||||||
|
relevant.
|
||||||
|
|
||||||
2019-08-21 Bob Duff <duff@adacore.com>
|
2019-08-21 Bob Duff <duff@adacore.com>
|
||||||
|
|
||||||
* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
|
* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-bitutil.o and
|
||||||
|
|
|
@ -357,6 +357,14 @@ package body Repinfo is
|
||||||
Write_Eol;
|
Write_Eol;
|
||||||
Write_Line ("}");
|
Write_Line ("}");
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
-- The component type is relevant for an array
|
||||||
|
|
||||||
|
if List_Representation_Info = 4
|
||||||
|
and then Is_Itype (Component_Type (Base_Type (Ent)))
|
||||||
|
then
|
||||||
|
Relevant_Entities.Set (Component_Type (Base_Type (Ent)), True);
|
||||||
|
end if;
|
||||||
end List_Array_Info;
|
end List_Array_Info;
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
@ -539,20 +547,17 @@ package body Repinfo is
|
||||||
List_Record_Info (E, Bytes_Big_Endian);
|
List_Record_Info (E, Bytes_Big_Endian);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
-- Recurse into entities local to a record type
|
||||||
|
|
||||||
|
if List_Representation_Info = 4 then
|
||||||
|
List_Entities (E, Bytes_Big_Endian, False);
|
||||||
|
end if;
|
||||||
|
|
||||||
elsif Is_Array_Type (E) then
|
elsif Is_Array_Type (E) then
|
||||||
if List_Representation_Info >= 1 then
|
if List_Representation_Info >= 1 then
|
||||||
List_Array_Info (E, Bytes_Big_Endian);
|
List_Array_Info (E, Bytes_Big_Endian);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- The component type is relevant for an array
|
|
||||||
|
|
||||||
if List_Representation_Info = 4
|
|
||||||
and then Is_Itype (Component_Type (Base_Type (E)))
|
|
||||||
then
|
|
||||||
Relevant_Entities.Set
|
|
||||||
(Component_Type (Base_Type (E)), True);
|
|
||||||
end if;
|
|
||||||
|
|
||||||
elsif Is_Type (E) then
|
elsif Is_Type (E) then
|
||||||
if List_Representation_Info >= 2 then
|
if List_Representation_Info >= 2 then
|
||||||
List_Type_Info (E);
|
List_Type_Info (E);
|
||||||
|
@ -564,13 +569,6 @@ package body Repinfo is
|
||||||
E_Loop_Parameter,
|
E_Loop_Parameter,
|
||||||
E_Variable)
|
E_Variable)
|
||||||
then
|
then
|
||||||
-- The type is relevant for an object
|
|
||||||
|
|
||||||
if List_Representation_Info = 4 and then Is_Itype (Etype (E))
|
|
||||||
then
|
|
||||||
Relevant_Entities.Set (Etype (E), True);
|
|
||||||
end if;
|
|
||||||
|
|
||||||
if List_Representation_Info >= 2 then
|
if List_Representation_Info >= 2 then
|
||||||
List_Object_Info (E);
|
List_Object_Info (E);
|
||||||
end if;
|
end if;
|
||||||
|
@ -975,6 +973,12 @@ package body Repinfo is
|
||||||
|
|
||||||
List_Linker_Section (Ent);
|
List_Linker_Section (Ent);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
-- The type is relevant for an object
|
||||||
|
|
||||||
|
if List_Representation_Info = 4 and then Is_Itype (Etype (Ent)) then
|
||||||
|
Relevant_Entities.Set (Etype (Ent), True);
|
||||||
|
end if;
|
||||||
end List_Object_Info;
|
end List_Object_Info;
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -1283,6 +1287,12 @@ package body Repinfo is
|
||||||
else
|
else
|
||||||
Write_Line (";");
|
Write_Line (";");
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
-- The type is relevant for a component
|
||||||
|
|
||||||
|
if List_Representation_Info = 4 and then Is_Itype (Etype (Ent)) then
|
||||||
|
Relevant_Entities.Set (Etype (Ent), True);
|
||||||
|
end if;
|
||||||
end List_Component_Layout;
|
end List_Component_Layout;
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
|
|
Loading…
Reference in New Issue