[Ada] Tidy up freezing code for instantiations
commit49b8a94b8878438cb5a08704101aee6f7319bd8b
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 15 Nov 2021 15:04:25 +0000 (15 16:04 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 1 Dec 2021 10:24:42 +0000 (1 10:24 +0000)
treeaa337e88fcdd307112b44861fc4b8c9a69c21513
parent17fa48b12d42fe41c4cc8782645b30acfa764141
[Ada] Tidy up freezing code for instantiations

gcc/ada/

* sem_ch12.adb (Freeze_Subprogram_Body): Rename into...
(Freeze_Subprogram_Instance): ...this and change the name of the
first parameter and local variables for the sake of consistency.
(Insert_Freeze_Node_For_Instance): Use local variable Par_Inst.
(Install_Body): Rename into...
(Freeze_Package_Instance): ...this, remove first parameter and
change the name of local variables for the sake of consistency.
Do not deal with the special case of incomplete actual types here
and do not insert the body.
(Instantiate_Package_Body): Deal with the special case of incomplete
actual types here and insert the body.  Call Freeze_Package_Instance
only if expansion is done.
(Instantiate_Subprogram_Body): Minor consistency tweak.
gcc/ada/sem_ch12.adb