[Ada] Simplify discarding nodes when processing aspect/pragma Priority

gcc/ada/

	* sem_ch13.adb (Analyze_Aspect_Specifications): Simplify code
	for aspect Priority.
	* sem_prag.adb (Analyze_Pragma): Simplify code for pragma
	Priority.
This commit is contained in:
Piotr Trojanek 2020-11-24 22:56:40 +01:00 committed by Pierre-Marie de Rodat
parent 2e188579aa
commit 958eed88b9
2 changed files with 10 additions and 19 deletions

View file

@ -3408,15 +3408,11 @@ package body Sem_Ch13 is
-- System.Tasking, but this package does not trigger the
-- required initialization of the run-time library.
declare
Discard : Entity_Id;
begin
if Restricted_Profile then
Discard := RTE (RE_Activate_Restricted_Tasks);
else
Discard := RTE (RE_Activate_Tasks);
end if;
end;
if Restricted_Profile then
Discard_Node (RTE (RE_Activate_Restricted_Tasks));
else
Discard_Node (RTE (RE_Activate_Tasks));
end if;
-- Handling for these aspects in subprograms is complete

View file

@ -21364,16 +21364,11 @@ package body Sem_Prag is
-- package does not trigger the required initialization of the
-- run-time library.
declare
Discard : Entity_Id;
pragma Warnings (Off, Discard);
begin
if Restricted_Profile then
Discard := RTE (RE_Activate_Restricted_Tasks);
else
Discard := RTE (RE_Activate_Tasks);
end if;
end;
if Restricted_Profile then
Discard_Node (RTE (RE_Activate_Restricted_Tasks));
else
Discard_Node (RTE (RE_Activate_Tasks));
end if;
-- Task or Protected, must be of type Integer