]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Duplicated D lines in ali files
authorGhjuvan Lacambre <lacambre@adacore.com>
Thu, 27 May 2021 12:54:14 +0000 (14:54 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 8 Jul 2021 13:34:22 +0000 (13:34 +0000)
gcc/ada/

* lib-writ.ads: Mention SCOs dependency as reason for duplicates.
* lib.ads (Units): Update documentation to mention duplicated
units.

gcc/ada/lib-writ.ads
gcc/ada/lib.ads

index b8370fab42a08cbb4c0436d4be67307421b61875..ce5398b62591ce5a1301aec08e1a4a90be0fa2a0 100644 (file)
@@ -1053,6 +1053,9 @@ package Lib.Writ is
    --  The Object parameter is true if an object file is created, and false
    --  otherwise. Note that the pseudo-object file generated in GNATprove mode
    --  does count as an object file from this point of view.
+   --  May output duplicate D lines caused by generic instantiations. This is
+   --  by design as GNATcoverage relies on them for its coverage of generic
+   --  instantiations, although this may be revisited in the future.
 
    procedure Add_Preprocessing_Dependency (S : Source_File_Index);
    --  Indicate that there is a dependency to be added on a preprocessing data
index 1450124c99efa2e4c2d5dba03ef7c59f774e5362..f2c6ef3553cc444743128d0370228b15d3be67e1 100644 (file)
@@ -926,7 +926,9 @@ private
    --  The following table records a mapping between a name and the entry in
    --  the units table whose Unit_Name is this name. It is used to speed up
    --  the Is_Loaded function, whose original implementation (linear search)
-   --  could account for 2% of the time spent in the front end. Note that, in
+   --  could account for 2% of the time spent in the front end. When the unit
+   --  is an instance of a generic, the unit might get duplicated in the unit
+   --  table - see Make_Instance_Unit for more information. Note that, in
    --  the case of source files containing multiple units, the units table may
    --  temporarily contain two entries with the same Unit_Name during parsing,
    --  which means that the mapping must be to the first entry in the table.