diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-05-11 16:53:36 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-06 14:46:58 +0000 |
commit | 435e79cbe51e8f7e587b9dc7da794e82fba55932 (patch) | |
tree | f5261d70767f684c3ceacaec742dbabdf829b19c /gcc/ada/uname.adb | |
parent | b1c4989d174cb22297a88f8873be95430ad62bcd (diff) | |
download | gcc-435e79cbe51e8f7e587b9dc7da794e82fba55932.zip gcc-435e79cbe51e8f7e587b9dc7da794e82fba55932.tar.gz gcc-435e79cbe51e8f7e587b9dc7da794e82fba55932.tar.bz2 |
[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.
Diffstat (limited to 'gcc/ada/uname.adb')
-rw-r--r-- | gcc/ada/uname.adb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/ada/uname.adb b/gcc/ada/uname.adb index 3192c3d..5dc8ac6 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 |