diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-07-09 22:16:46 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-19 05:53:40 -0400 |
commit | e4a238d283078c7a51eb1cc066284525ff59bf5a (patch) | |
tree | 2de07cef22cb48245905211a7329a6a378551bde /gcc | |
parent | 5ad0303141a1632004ef0ba7f57e6a0253db0923 (diff) | |
download | gcc-e4a238d283078c7a51eb1cc066284525ff59bf5a.zip gcc-e4a238d283078c7a51eb1cc066284525ff59bf5a.tar.gz gcc-e4a238d283078c7a51eb1cc066284525ff59bf5a.tar.bz2 |
[Ada] Remove excessive guards in building predicate functions
gcc/ada/
* sem_ch13.adb (Add_Call): Remove excessive condition and
unnecessary call to Set_Has_Predicates.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index b40c575..8f02d07 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -9583,8 +9583,8 @@ package body Sem_Ch13 is -- Predicate_Function of the parent type, using Add_Call above. procedure Add_Call (T : Entity_Id); - -- Includes a call to the predicate function for type T in Expr if T - -- has predicates and Predicate_Function (T) is non-empty. + -- Includes a call to the predicate function for type T in Expr if + -- Predicate_Function (T) is non-empty. function Process_RE (N : Node_Id) return Traverse_Result; -- Used in Process REs, tests if node N is a raise expression, and if @@ -9608,8 +9608,8 @@ package body Sem_Ch13 is Exp : Node_Id; begin - if Present (T) and then Present (Predicate_Function (T)) then - Set_Has_Predicates (Typ); + if Present (Predicate_Function (T)) then + pragma Assert (Has_Predicates (Typ)); -- Build the call to the predicate function of T. The type may be -- derived, so use an unchecked conversion for the actual. |