procedure Preserve_Comes_From_Source (NewN, OldN : Node_Id) is
begin
- Nodes.Table (NewN).Comes_From_Source :=
- Nodes.Table (OldN).Comes_From_Source;
+ Set_Comes_From_Source (NewN, Comes_From_Source (OldN));
end Preserve_Comes_From_Source;
----------------------
-- the original allocator node. This is for proper handling of
-- restriction No_Implicit_Heap_Allocations.
- Set_Comes_From_Source
- (Expression (Temp_Decl), Comes_From_Source (N));
+ Preserve_Comes_From_Source
+ (Expression (Temp_Decl), N);
Set_No_Initialization (Expression (Temp_Decl));
Insert_Action (N, Temp_Decl);
-- specific to pure if statements, however (see
-- Sem_Ch5.Analyze_If_Statement).
- Set_Comes_From_Source (New_If, Comes_From_Source (N));
+ Preserve_Comes_From_Source (New_If, N);
return;
-- No special processing for that elsif part, move to next
-- Subprogram instance comes from source only if generic does
- Set_Comes_From_Source (Act_Decl_Id, Comes_From_Source (Gen_Unit));
+ Preserve_Comes_From_Source (Act_Decl_Id, Gen_Unit);
-- If the instance is a child unit, mark the Id accordingly. Mark
-- the anonymous entity as well, which is the real subprogram and
Act_Body_Id :=
Make_Defining_Identifier (Sloc (Act_Decl_Id), Chars (Act_Decl_Id));
- Set_Comes_From_Source (Act_Body_Id, Comes_From_Source (Act_Decl_Id));
+ Preserve_Comes_From_Source (Act_Body_Id, Act_Decl_Id);
-- Some attributes of spec entity are not inherited by body entity
Act_Body_Id :=
Make_Defining_Identifier (Sloc (Act_Decl_Id), Chars (Act_Decl_Id));
- Set_Comes_From_Source (Act_Body_Id, Comes_From_Source (Act_Decl_Id));
+ Preserve_Comes_From_Source (Act_Body_Id, Act_Decl_Id);
Set_Defining_Unit_Name (Specification (Act_Body), Act_Body_Id);
Set_Corresponding_Spec (Act_Body, Act_Decl_Id);
-- To ensure proper coverage when body is inlined, indicate
-- whether the subprogram comes from source.
- Set_Comes_From_Source (Subp, Comes_From_Source (N));
+ Preserve_Comes_From_Source (Subp, N);
if Present (First_Formal (Body_Id)) then
Plist := Copy_Parameter_List (Body_Id);
-- Set Comes_From_Source on L to preserve warnings for unset
-- reference.
- Set_Comes_From_Source (L, Comes_From_Source (Reloc_L));
+ Preserve_Comes_From_Source (L, Reloc_L);
end;
end if;