From: Piotr Trojanek Date: Tue, 11 May 2021 14:53:36 +0000 (+0200) Subject: [Ada] Simplify code by removing local constant X-Git-Tag: basepoints/gcc-13~6237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=435e79cbe51e8f7e587b9dc7da794e82fba55932;p=thirdparty%2Fgcc.git [Ada] Simplify code by removing local constant gcc/ada/ * uname.adb (Add_Node_Name): Replace local constant whose initial expression was evaluated even when unnecessary with just that expression that is evaluated at most once and only when needed. --- diff --git a/gcc/ada/uname.adb b/gcc/ada/uname.adb index 3192c3da6d2a..5dc8ac6d5f32 100644 --- a/gcc/ada/uname.adb +++ b/gcc/ada/uname.adb @@ -223,8 +223,6 @@ package body Uname is ------------------- procedure Add_Node_Name (Node : Node_Id) is - Kind : constant Node_Kind := Nkind (Node); - begin -- Just ignore an error node (someone else will give a message) @@ -234,7 +232,7 @@ package body Uname is -- Otherwise see what kind of node we have else - case Kind is + case Nkind (Node) is when N_Defining_Identifier | N_Defining_Operator_Symbol | N_Identifier