aboutsummaryrefslogtreecommitdiff
path: root/gcc/ctfout.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-05-16 16:14:46 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-06-02 09:06:41 +0000
commit5a06e886ac86fd14e02eca0cf70360f1c2d9374f (patch)
tree8c68561bb5169f50eac157f08f854c70321b82c7 /gcc/ctfout.cc
parent57b522c58a03d66f7acd9f4acc7614626aad3280 (diff)
downloadgcc-5a06e886ac86fd14e02eca0cf70360f1c2d9374f.zip
gcc-5a06e886ac86fd14e02eca0cf70360f1c2d9374f.tar.gz
gcc-5a06e886ac86fd14e02eca0cf70360f1c2d9374f.tar.bz2
[Ada] Build static dispatch tables always at the end of declarative part
The static dispatch tables of library-level tagged types are either built on the first object declaration or at the end of the declarative part of the package spec or body. There is no real need for the former case, and the tables are not built for other constructs that freeze (tagged) types. Therefore this change removes the former case, thus causing the tables to be always built at the end of the declarative part; that's orthogonal to freezing and the tagged types are still frozen at the appropriate place. Moreover, it wraps the code in the Actions list of a freeze node (like for the nonstatic case) so that it is considered elaboration code by the processing done in Sem_Elab and does not disturb it. No functional changes. gcc/ada/ * exp_ch3.adb (Expand_Freeze_Record_Type): Adjust comment. (Expand_N_Object_Declaration): Do not build static dispatch tables. * exp_disp.adb (Make_And_Insert_Dispatch_Table): New procedure. (Build_Static_Dispatch_Tables): Call it to build the dispatch tables and wrap them in the Actions list of a freeze node.
Diffstat (limited to 'gcc/ctfout.cc')
0 files changed, 0 insertions, 0 deletions