[Ada] Simplify handling of Generate_Code flag for compilation units
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 18 May 2021 12:54:24 +0000 (14:54 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 7 Jul 2021 16:23:12 +0000 (16:23 +0000)
commit05435609367c0ae1398ac1b4becfae06d217552c
treeb0f112d482fd0b2c389dbafb6b87245d1037ae65
parentf3ff72939e52a381d28f3c4879f2eaa1d154ff73
[Ada] Simplify handling of Generate_Code flag for compilation units

gcc/ada/

* gnat1drv.adb (Gnat1drv): Remove flagging of main unit and its
corresponding spec as requiring code generation; now the flags
are set much earlier.
* lib-load.adb (Load_Main_Source): Set Generate_Code flag on the
main unit source.
(Make_Instance_Unit): Copy Generate_Code flag from the main unit
to instance units.
* lib-writ.adb (Write_ALI): Remove redundant condition;
Generate_Code flag is always set for the main unit.
* par-load.adb (Load): Set Generate_Code flag on the main unit's
corresponding spec, if any.
gcc/ada/gnat1drv.adb
gcc/ada/lib-load.adb
gcc/ada/lib-writ.adb
gcc/ada/par-load.adb