mirror of git://gcc.gnu.org/git/gcc.git
[Ada] Revert recent changes in the generation of deps in ali files
Following the discovery of regressions in GPRbuild, this reverts both r263100 and r264608: 2019-01-08 Justin Squirek <squirek@adacore.com> Revert: 2018-07-31 Justin Squirek <squirek@adacore.com> gcc/ada/ * lib-writ.adb (Write_With_Lines): Modfiy the generation of dependencies within ali files so that source unit bodies are properly listed even if said bodies are missing. Perform legacy behavior in GNATprove mode. * lib-writ.ads: Modify documentation to reflect current behavior. and: 2018-09-26 Justin Squirek <squirek@adacore.com> gcc/ada/ * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add documentation and an extra conditional check for RCI units so that generated ali files will list the spec only instead of a body when a body is not found. From-SVN: r267680
This commit is contained in:
parent
30fa2068a3
commit
713125282e
|
|
@ -1,3 +1,29 @@
|
||||||
|
2019-01-08 Justin Squirek <squirek@adacore.com>
|
||||||
|
|
||||||
|
Revert:
|
||||||
|
|
||||||
|
2018-07-31 Justin Squirek <squirek@adacore.com>
|
||||||
|
|
||||||
|
gcc/ada/
|
||||||
|
|
||||||
|
* lib-writ.adb (Write_With_Lines): Modfiy the generation
|
||||||
|
of dependencies within ali files so that source unit
|
||||||
|
bodies are properly listed even if said bodies are
|
||||||
|
missing. Perform legacy behavior in GNATprove mode.
|
||||||
|
* lib-writ.ads: Modify documentation to reflect current
|
||||||
|
behavior.
|
||||||
|
|
||||||
|
and:
|
||||||
|
|
||||||
|
2018-09-26 Justin Squirek <squirek@adacore.com>
|
||||||
|
|
||||||
|
gcc/ada/
|
||||||
|
|
||||||
|
* lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
|
||||||
|
documentation and an extra conditional check for RCI
|
||||||
|
units so that generated ali files will list the spec
|
||||||
|
only instead of a body when a body is not found.
|
||||||
|
|
||||||
2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
|
2019-01-04 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gnatvsn.ads: Bump copyright year.
|
* gnatvsn.ads: Bump copyright year.
|
||||||
|
|
|
||||||
|
|
@ -953,42 +953,17 @@ package body Lib.Writ is
|
||||||
Write_Info_Tab (25);
|
Write_Info_Tab (25);
|
||||||
|
|
||||||
if Is_Spec_Name (Uname) then
|
if Is_Spec_Name (Uname) then
|
||||||
|
Body_Fname :=
|
||||||
|
Get_File_Name
|
||||||
|
(Uname => Get_Body_Name (Uname),
|
||||||
|
Subunit => False,
|
||||||
|
May_Fail => True);
|
||||||
|
|
||||||
-- In GNATprove mode we must write the spec of a unit which
|
Body_Index := Get_Unit_Index (Get_Body_Name (Uname));
|
||||||
-- requires a body if that body is not found. This will
|
|
||||||
-- allow partial analysis on incomplete sources. Also, in
|
|
||||||
-- the case of a unit that is a remote call interface, the
|
|
||||||
-- bodies of packages may not exist but still may form a
|
|
||||||
-- valid program - so we handle that here as well.
|
|
||||||
|
|
||||||
if GNATprove_Mode
|
if Body_Fname = No_File then
|
||||||
or else Is_Remote_Call_Interface (Cunit_Entity (Unum))
|
Body_Fname := Get_File_Name (Uname, Subunit => False);
|
||||||
then
|
Body_Index := Get_Unit_Index (Uname);
|
||||||
Body_Fname :=
|
|
||||||
Get_File_Name
|
|
||||||
(Uname => Get_Body_Name (Uname),
|
|
||||||
Subunit => False,
|
|
||||||
May_Fail => True);
|
|
||||||
|
|
||||||
Body_Index := Get_Unit_Index (Get_Body_Name (Uname));
|
|
||||||
|
|
||||||
if Body_Fname = No_File then
|
|
||||||
Body_Fname := Get_File_Name (Uname, Subunit => False);
|
|
||||||
Body_Index := Get_Unit_Index (Uname);
|
|
||||||
end if;
|
|
||||||
|
|
||||||
-- In the normal path we don't allow failure in fetching the
|
|
||||||
-- name of the desired body unit so that it may be properly
|
|
||||||
-- referenced in the output ali - even if it is missing.
|
|
||||||
|
|
||||||
else
|
|
||||||
Body_Fname :=
|
|
||||||
Get_File_Name
|
|
||||||
(Uname => Get_Body_Name (Uname),
|
|
||||||
Subunit => False,
|
|
||||||
May_Fail => False);
|
|
||||||
|
|
||||||
Body_Index := Get_Unit_Index (Get_Body_Name (Uname));
|
|
||||||
end if;
|
end if;
|
||||||
else
|
else
|
||||||
Body_Fname := Get_File_Name (Uname, Subunit => False);
|
Body_Fname := Get_File_Name (Uname, Subunit => False);
|
||||||
|
|
|
||||||
|
|
@ -629,14 +629,13 @@ package Lib.Writ is
|
||||||
-- by the current unit. One Z line is present for each unit that is
|
-- by the current unit. One Z line is present for each unit that is
|
||||||
-- only implicitly withed by the current unit. The first parameter is
|
-- only implicitly withed by the current unit. The first parameter is
|
||||||
-- the unit name in internal format. The second parameter is the file
|
-- the unit name in internal format. The second parameter is the file
|
||||||
-- name of the body unit on which the current compilation unit depends,
|
-- name of the file that must be compiled to compile this unit. It is
|
||||||
-- except when in GNATprove mode or when the unit is a remote call
|
-- usually the file for the body, except for packages which have no
|
||||||
-- interface. In these cases, when packages that require a body have
|
-- body. For units that need a body, if the source file for the body
|
||||||
-- no associated source file, the file name of the spec is used instead
|
-- cannot be found, the file name of the spec is used instead. The
|
||||||
-- to allow partial analysis of incomplete sources. The third parameter
|
-- third parameter is the file name of the library information file
|
||||||
-- is the file name of the library information file that contains the
|
-- that contains the results of compiling this unit. The optional
|
||||||
-- results of compiling this unit. The optional modifiers are used as
|
-- modifiers are used as follows:
|
||||||
-- follows:
|
|
||||||
|
|
||||||
-- E pragma Elaborate applies to this unit
|
-- E pragma Elaborate applies to this unit
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue