diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-12-25 22:25:21 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-01-09 15:42:23 +0100 |
commit | d4eaf83d6eff980ec001bd54f2c4e87b34057bf6 (patch) | |
tree | 20c6dcccd41d97fe319e521314182d8447ac0258 /gcc/toplev.h | |
parent | 46034c46f82dec169fe7fc7c2d82d8321d9a9512 (diff) | |
download | gcc-d4eaf83d6eff980ec001bd54f2c4e87b34057bf6.zip gcc-d4eaf83d6eff980ec001bd54f2c4e87b34057bf6.tar.gz gcc-d4eaf83d6eff980ec001bd54f2c4e87b34057bf6.tar.bz2 |
ada: Simplify finalization of temporaries created for interface objects
The expansion of (class-wide) interface objects generates a temporary that
holds the actual data and the objects are rewritten as the renaming of the
dereference at the interface tag present in it. These temporaries may need
to be finalized and this is currently done through the renamings, by using
pattern matching to recognize the original source constructs.
Now these temporaries may also need to be adjusted and this is currently
done "naturally", i.e. by using the standard machinery for them, so there
is no fundamental reason why the finalization cannot be done this way too.
Therefore this changes removes the special machinery implemented for their
finalization and let them be handled by the standard one instead.
gcc/ada/
* exp_util.ads (Is_Tag_To_Class_Wide_Conversion): Delete.
(Is_Displacement_Of_Object_Or_Function_Result): Likewise.
* exp_util.adb (Is_Tag_To_Class_Wide_Conversion): Rename to...
(Is_Temporary_For_Interface_Object): ...this.
(Is_Finalizable_Transient): Adjust call to above renaming.
(Is_Displacement_Of_Object_Or_Function_Result): Delete.
(Requires_Cleanup_Actions): Remove special handling of the
temporaries created for interface objects.
* exp_ch7.adb (Build_Finalizer): Likewise.
Diffstat (limited to 'gcc/toplev.h')
0 files changed, 0 insertions, 0 deletions