diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-11-24 22:56:40 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-12-15 06:41:54 -0500 |
commit | 958eed88b933a7275c83ff11f7140c3f7ae7aeac (patch) | |
tree | 1de28a900f930a5c1e2220d060df1fbdd51cafba /gcc | |
parent | 2e188579aaa928bd60af6dc49434edf17c546ba1 (diff) | |
download | gcc-958eed88b933a7275c83ff11f7140c3f7ae7aeac.zip gcc-958eed88b933a7275c83ff11f7140c3f7ae7aeac.tar.gz gcc-958eed88b933a7275c83ff11f7140c3f7ae7aeac.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 14 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 15 |
2 files changed, 10 insertions, 19 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index b48aeb4..1327d31 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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 diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 1ffe513..b093808 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -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 |