]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix invalid JSON for derived variant record with -gnatRj
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 11 Jun 2021 07:11:13 +0000 (09:11 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 9 Jul 2021 12:35:29 +0000 (12:35 +0000)
commit2390451ede49fa09bc0d9692802651aff66ae8a6
tree286003a293ba8de1824f3a86d90b282c31f9cf79
parent06fd120d19d2636a812c9ffe4b8871f3733ae213
[Ada] Fix invalid JSON for derived variant record with -gnatRj

gcc/ada/

* repinfo.ads (JSON output format): Document adjusted key name.
* repinfo.adb (List_Record_Layout): Use Original_Record_Component
if the normalized position of the component is not known.
(List_Structural_Record_Layout): Rename Outer_Ent parameter into
Ext_End and add Ext_Level parameter. In an extension, if the parent
subtype has static discriminants, call List_Record_Layout on it.
Output "parent_" prefixes before "variant" according to Ext_Level.
Adjust recursive calls throughout the procedure.
gcc/ada/repinfo.adb
gcc/ada/repinfo.ads