[Ada] Cleanups related to entry barrier conditions
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 7 Dec 2020 14:32:40 +0000 (15:32 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 28 Apr 2021 09:37:57 +0000 (05:37 -0400)
gcc/ada/

* exp_ch9.adb (Build_Barrier_Function): Refine type of a
protected type entity.
(Is_Pure_Barrier): Fix style.

gcc/ada/exp_ch9.adb

index b055b27..32bf11c 100644 (file)
@@ -120,7 +120,7 @@ package body Exp_Ch9 is
    function Build_Barrier_Function
      (N   : Node_Id;
       Ent : Entity_Id;
-      Pid : Node_Id) return Node_Id;
+      Pid : Entity_Id) return Node_Id;
    --  Build the function body returning the value of the barrier expression
    --  for the specified entry body.
 
@@ -1052,7 +1052,7 @@ package body Exp_Ch9 is
    function Build_Barrier_Function
      (N   : Node_Id;
       Ent : Entity_Id;
-      Pid : Node_Id) return Node_Id
+      Pid : Entity_Id) return Node_Id
    is
       Ent_Formals : constant Node_Id    := Entry_Body_Formal_Part (N);
       Cond        : constant Node_Id    := Condition (Ent_Formals);
@@ -6322,8 +6322,8 @@ package body Exp_Ch9 is
                end if;
 
             when N_Short_Circuit
-              | N_If_Expression
-              | N_Case_Expression
+               | N_If_Expression
+               | N_Case_Expression
             =>
                return OK;