function First_Private_Entity (Id : E) return E is
begin
+ pragma Assert (Ekind (Id) = E_Package
+ or else Ekind (Id) = E_Generic_Package
+ or else Ekind (Id) = E_Protected_Type
+ or else Ekind (Id) = E_Protected_Subtype
+ or else Ekind (Id) = E_Task_Type
+ or else Ekind (Id) = E_Task_Subtype);
return Node16 (Id);
end First_Private_Entity;
procedure Set_First_Private_Entity (Id : E; V : E) is
begin
- pragma Assert (Nkind (Id) in N_Entity);
+ pragma Assert (Ekind (Id) = E_Package
+ or else Ekind (Id) = E_Generic_Package
+ or else Ekind (Id) = E_Protected_Type
+ or else Ekind (Id) = E_Protected_Subtype
+ or else Ekind (Id) = E_Task_Type
+ or else Ekind (Id) = E_Task_Subtype);
Set_Node16 (Id, V);
end Set_First_Private_Entity;
while Present (Actual_Ent)
and then Present (Formal_Node)
- and then Actual_Ent /= First_Private_Entity (Act_Ent)
+ and then Actual_Ent /= First_Private_Entity (Act_Pkg)
loop
-- ??? Are the following calls also needed here:
--
----------------------------------
procedure Install_Visible_Declarations (P : Entity_Id) is
- Id : Entity_Id;
+ Id : Entity_Id;
+ Last_Entity : Entity_Id;
begin
+ pragma Assert (Is_Package (P) or else Is_Record_Type (P));
+
+ if Is_Package (P) then
+ Last_Entity := First_Private_Entity (P);
+ else
+ Last_Entity := Empty;
+ end if;
+
Id := First_Entity (P);
- while Present (Id) and then Id /= First_Private_Entity (P) loop
+ while Present (Id) and then Id /= Last_Entity loop
Install_Package_Entity (Id);
Next_Entity (Id);
end loop;