+2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch4.adb (Expand_Concatenate): Use the proper routine to
+ set the need for debug info.
+ * exp_dbug.adb (Build_Subprogram_Instance_Renamings): Use the
+ proper routine to set the need for debug info.
+ * exp_prag.adb (Expand_Pragma_Initial_Condition): Use the proper
+ routine to set the need for debug info.
+ * exp_util.adb (Build_DIC_Procedure_Declaration): Use the proper
+ routine to set the need for debug info.
+ (Build_Invariant_Procedure_Declaration): Use the proper routine
+ to set the need for debug info.
+ * ghost.adb (Record_Ignored_Ghost_Node): Add statements as a
+ whole class to the list of top level ignored Ghost nodes.
+ * sem_util.adb (Set_Debug_Info_Needed): Do not generate debug
+ info for an ignored Ghost entity.
+
2018-11-14 Piotr Trojanek <trojanek@adacore.com>
* bindgen.adb, exp_cg.adb, repinfo.adb, sprint.adb: Minor reuse
-- entity, we make sure we have debug information for the result.
Ent := Make_Temporary (Loc, 'S');
- Set_Is_Internal (Ent);
- Set_Needs_Debug_Info (Ent);
+ Set_Is_Internal (Ent);
+ Set_Debug_Info_Needed (Ent);
-- If the bound is statically known to be out of range, we do not want
-- to abort, we want a warning and a runtime constraint error. Note that
Name => New_Occurrence_Of (E, Loc));
Append (Decl, Declarations (N));
- Set_Needs_Debug_Info (Defining_Identifier (Decl));
+ Set_Debug_Info_Needed (Defining_Identifier (Decl));
end if;
Next_Entity (E);
-- condition is subject to Source Coverage Obligations.
if Generate_SCO then
- Set_Needs_Debug_Info (Proc_Id);
+ Set_Debug_Info_Needed (Proc_Id);
end if;
-- Generate:
Proc_Body_Id := Defining_Entity (Proc_Body);
if Generate_SCO then
- Set_Needs_Debug_Info (Proc_Body_Id);
+ Set_Debug_Info_Needed (Proc_Body_Id);
end if;
-- The location of the initial condition procedure call must be as close
-- is subject to Source Coverage Obligations.
if Generate_SCO then
- Set_Needs_Debug_Info (Proc_Id);
+ Set_Debug_Info_Needed (Proc_Id);
end if;
-- Obtain all views of the input type
-- subject to Source Coverage Obligations.
if Generate_SCO then
- Set_Needs_Debug_Info (Proc_Id);
+ Set_Debug_Info_Needed (Proc_Id);
end if;
-- Obtain all views of the input type
or else Nkind (N) in N_Push_Pop_xxx_Label
or else Nkind (N) in N_Raise_xxx_Error
or else Nkind (N) in N_Representation_Clause
- or else Nkind_In (N, N_Assignment_Statement,
- N_Call_Marker,
+ or else Nkind (N) in N_Statement_Other_Than_Procedure_Call
+ or else Nkind_In (N, N_Call_Marker,
N_Freeze_Entity,
N_Freeze_Generic_Entity,
N_Itype_Reference,
-- Start of processing for Set_Debug_Info_Needed
begin
- -- Nothing to do if argument is Empty or has Debug_Info_Off set, which
- -- indicates that Debug_Info_Needed is never required for the entity.
+ -- Nothing to do if there is no available entity
+
+ if No (T) then
+ return;
+
+ -- Nothing to do for an entity with suppressed debug information
+
+ elsif Debug_Info_Off (T) then
+ return;
+
+ -- Nothing to do for an ignored Ghost entity because the entity will be
+ -- eliminated from the tree.
+
+ elsif Is_Ignored_Ghost_Entity (T) then
+ return;
+
-- Nothing to do if entity comes from a predefined file. Library files
-- are compiled without debug information, but inlined bodies of these
-- routines may appear in user code, and debug information on them ends
-- up complicating debugging the user code.
- if No (T)
- or else Debug_Info_Off (T)
- then
- return;
-
elsif In_Inlined_Body and then In_Predefined_Unit (T) then
Set_Needs_Debug_Info (T, False);
end if;