Code cleanup; semantics is unaffected.
gcc/ada/ChangeLog:
* exp_tss.adb (TSS): Refactor IF condition to make code smaller.
* lib.adb (Increment_Serial_Number, Synchronize_Serial_Number):
Use type of renamed object when creating renaming.
* lib.ads (Unit_Record): Refine subtype of dependency number.
Subp : Entity_Id;
begin
- if No (FN) then
- return Empty;
-
- elsif No (TSS_Elist (FN)) then
- return Empty;
-
- else
+ if Present (FN)
+ and then Present (TSS_Elist (FN))
+ then
Elmt := First_Elmt (TSS_Elist (FN));
while Present (Elmt) loop
if Is_TSS (Node (Elmt), Nam) then
-----------------------------
function Increment_Serial_Number return Nat is
- TSN : Int renames Units.Table (Current_Sem_Unit).Serial_Number;
+ TSN : Nat renames Units.Table (Current_Sem_Unit).Serial_Number;
begin
TSN := TSN + 1;
return TSN;
-------------------------------
procedure Synchronize_Serial_Number (SN : Nat) is
- TSN : Int renames Units.Table (Current_Sem_Unit).Serial_Number;
+ TSN : Nat renames Units.Table (Current_Sem_Unit).Serial_Number;
begin
-- We should not be trying to synchronize downward
Source_Index : Source_File_Index;
Cunit : Node_Id;
Cunit_Entity : Entity_Id;
- Dependency_Num : Int;
+ Dependency_Num : Nat;
Ident_String : Node_Id;
Main_Priority : Int;
Main_CPU : Int;