[Ada] Move duplicated routines for building itypes to Sem_Util
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 17 Mar 2020 13:16:28 +0000 (14:16 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 11 Jun 2020 09:53:44 +0000 (05:53 -0400)
commitc5b55e683cace7be98536c413a70f854a70faaa7
treecf0c02c04ef34d4f11d43489c9e7bc57f6f26afc
parent38f44fd6af098d4d09bcf91039b4ce989b0d0791
[Ada] Move duplicated routines for building itypes to Sem_Util

2020-06-11  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem_aggr.adb (Build_Constrained_Itype): Move to Sem_Util.
* sem_ch3.adb (Build_Subtype, Inherit_Predicate_Flags): Move...
* sem_util.adb (Build_Subtype): Here.  Add parameters for
references to objects previously declared in enclosing scopes.
(Inherit_Predicate_Flags): And here, because it is called by
Build_Subtype.
* sem_util.ads (Build_Overriding_Spec): Reorder alphabetically.
(Build_Subtype): Moved from Sem_Ch3; comments updated.
(Build_Constrained_Itype): Moved from Sem_Aggr; comments
updated.
gcc/ada/sem_aggr.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads