[Ada] Remove duplicated routines for getting homonym number
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 19 Sep 2019 08:13:25 +0000 (08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 19 Sep 2019 08:13:25 +0000 (08:13 +0000)
commitc4f372c54f24fd24f1092fb6a09c31c7733ce8cc
tree3e158cd7eb87635e806b4203f28e331135a1e9ef
parent890cde5319470afab7e96e3b7953075681c015f5
[Ada] Remove duplicated routines for getting homonym number

Routines Homonym_Number and Get_Homonym_Number were exactly the same,
except for minor style differences. Keep the one in Exp_Util; remove the
one in Exp_Dbug. No test attached, because semantics is unaffected.

2019-09-19  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Remove.
(Append_Homonym_Number): Use Homonym_Number instead of
Get_Homonym_Number.
* exp_util.ads, exp_util.adb (Homonym_Number): Mirror style of
the removed Get_Homonym_Number routine, i.e. initialize local
objects at declaration and refine the type of result.
* sem_util.adb (Add_Homonym_Suffix): Use Homonym_Number instead
of Get_Homonym_Number.

From-SVN: r275940
gcc/ada/ChangeLog
gcc/ada/exp_dbug.adb
gcc/ada/exp_dbug.ads
gcc/ada/exp_util.adb
gcc/ada/exp_util.ads
gcc/ada/sem_util.adb