+2018-09-26 Justin Squirek <squirek@adacore.com>
+
+ * 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.
+
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (error_gnat_node): Delete.
-- In GNATprove mode we must write the spec of a unit which
-- requires a body if that body is not found. This will
- -- allow partial analysis on incomplete sources.
-
- if GNATprove_Mode then
+ -- 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
+ or else Is_Remote_Call_Interface (Cunit_Entity (Unum))
+ then
Body_Fname :=
Get_File_Name
(Uname => Get_Body_Name (Uname),
-- Z unit-name [source-name lib-name] [E] [EA] [ED] [AD]
-- One W line is present for each unit that is mentioned in an explicit
- -- non-limited with clause by the current unit. One Y line is present
+ -- nonlimited with clause by the current unit. One Y line is present
-- for each unit that is mentioned in an explicit limited with clause
-- 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
-- the unit name in internal format. The second parameter is the file
- -- name of the body unit on which the current compliation depends -
- -- except when in GNATprove mode. In GNATprove mode, when packages
- -- which require a body have no associated source file, the file name
- -- of the spec is used instead to allow partial analysis of incomplete
- -- sources. The third parameter is the file name of the library
- -- information file that contains the results of compiling this unit.
- -- The optional modifiers are used as follows:
+ -- name of the body unit on which the current compilation unit depends,
+ -- except when in GNATprove mode or when the unit is a remote call
+ -- interface. In these cases, when packages that require a body have
+ -- no associated source file, the file name of the spec is used instead
+ -- to allow partial analysis of incomplete sources. The third parameter
+ -- is the file name of the library information file that contains the
+ -- results of compiling this unit. The optional modifiers are used as
+ -- follows:
-- E pragma Elaborate applies to this unit