ada: Create operator nodes in functional style
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 2 Sep 2022 11:32:27 +0000 (13:32 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 7 Nov 2022 08:36:30 +0000 (09:36 +0100)
commitc7e9b5e2d5c7b0e57b127d5c6bb57d3b5bfb6ce1
treeaebfb75b143909f01f1542cca47b6a6c1665a741
parent03b4e4ae3b0d647a44c3dac09e27ab4151a84e85
ada: Create operator nodes in functional style

A recent patch removed two rewritings, where we kept the operator node
but replaced its operands. This patch removes explicit setting of the
operands; instead, the operator is already created together with its
operands, which seems a bit safer and more consistent with how we
typically create operator nodes.

It is a cleanup only; semantics is unaffected.

gcc/ada/

* exp_ch4.adb
(Expand_Modular_Addition): Rewrite using Make_XXX calls.
(Expand_Modular_Op): Likewise.
(Expand_Modular_Subtraction): Likewise.
* exp_imgv.adb
(Expand_User_Defined_Enumeration_Image): Likewise.
gcc/ada/exp_ch4.adb
gcc/ada/exp_imgv.adb