diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-12-01 15:30:46 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-05 11:32:35 +0000 |
commit | 1702fb6bf95de5461f896cf69832edc0e2e40cc5 (patch) | |
tree | 662df9a9679cf976386edaa505aeaf52c65f3af0 | |
parent | c239773dd1892ede85ed936029fd2bf863fbe93a (diff) | |
download | gcc-1702fb6bf95de5461f896cf69832edc0e2e40cc5.zip gcc-1702fb6bf95de5461f896cf69832edc0e2e40cc5.tar.gz gcc-1702fb6bf95de5461f896cf69832edc0e2e40cc5.tar.bz2 |
[Ada] Remove unnecessary check for missing parameter specifications
gcc/ada/
* exp_disp.adb (Gen_Parameters_Profile): Remove redundant guard.
-rw-r--r-- | gcc/ada/exp_disp.adb | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index de2ba7a..c8e2ade 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -8065,19 +8065,17 @@ package body Exp_Disp is Out_Present => True, Parameter_Type => New_Occurrence_Of (Typ, Loc))); - if Present (Parameter_Specifications (Parent (E))) then - P := First (Parameter_Specifications (Parent (E))); - while Present (P) loop - Append_To (Parms, - Make_Parameter_Specification (Loc, - Defining_Identifier => - Make_Defining_Identifier (Loc, - Chars => Chars (Defining_Identifier (P))), - Parameter_Type => New_Copy_Tree (Parameter_Type (P)), - Expression => New_Copy_Tree (Expression (P)))); - Next (P); - end loop; - end if; + P := First (Parameter_Specifications (Parent (E))); + while Present (P) loop + Append_To (Parms, + Make_Parameter_Specification (Loc, + Defining_Identifier => + Make_Defining_Identifier (Loc, + Chars => Chars (Defining_Identifier (P))), + Parameter_Type => New_Copy_Tree (Parameter_Type (P)), + Expression => New_Copy_Tree (Expression (P)))); + Next (P); + end loop; return Parms; end Gen_Parameters_Profile; |