procedure Kill_Current_Values (Last_Assignment_Only : Boolean := False) is
S : Entity_Id;
- procedure Kill_Current_Values_For_Entity_Chain (E : Entity_Id);
- -- Clear current value for entity E and all entities chained to E
-
- ------------------------------------------
- -- Kill_Current_Values_For_Entity_Chain --
- ------------------------------------------
-
- procedure Kill_Current_Values_For_Entity_Chain (E : Entity_Id) is
- Ent : Entity_Id;
- begin
- Ent := E;
- while Present (Ent) loop
- Kill_Current_Values (Ent, Last_Assignment_Only);
- Next_Entity (Ent);
- end loop;
- end Kill_Current_Values_For_Entity_Chain;
-
- -- Start of processing for Kill_Current_Values
-
begin
-- Kill all saved checks, a special case of killing saved values
-- Clear current values of all entities in current scope
- Kill_Current_Values_For_Entity_Chain (First_Entity (S));
-
- -- If scope is a package, also clear current values of all private
- -- entities in the scope.
-
- if Is_Package_Or_Generic_Package (S)
- or else Is_Concurrent_Type (S)
- then
- Kill_Current_Values_For_Entity_Chain (First_Private_Entity (S));
- end if;
+ declare
+ Ent : Entity_Id;
+ begin
+ Ent := First_Entity (S);
+ while Present (Ent) loop
+ Kill_Current_Values (Ent, Last_Assignment_Only);
+ Next_Entity (Ent);
+ end loop;
+ end;
-- If this is a not a subprogram, deal with parents