aboutsummaryrefslogtreecommitdiff
path: root/gcc/btfout.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-11-24 16:26:00 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-12-19 15:27:48 +0100
commit6b92b664aa2c9ba541526266bfc8d57842d378e1 (patch)
treef76cec4e8d1bafa10e65751b2fbc411db13f3515 /gcc/btfout.cc
parentc3d97f236e942e7fd46d6ae8e0f684f9426f3ac7 (diff)
downloadgcc-6b92b664aa2c9ba541526266bfc8d57842d378e1.zip
gcc-6b92b664aa2c9ba541526266bfc8d57842d378e1.tar.gz
gcc-6b92b664aa2c9ba541526266bfc8d57842d378e1.tar.bz2
ada: Further cleanup in finalization machinery
This removes the setting of the Is_Ignored_Transient flag on the temporaries needing finalization created by Expand_Ctrl_Function_Call when invoked from within the dependent expressions of conditional expressions. This flag tells the general finalization machinery to disregard the object. But temporaries needing finalization present in action lists of dependent expressions are picked up by Process_Transients_In_Expression, which deals with their finalization and sets the Is_Finalized_Transient flag on them. Now this latter flag has exactly the same effect as Is_Ignored_Transient as far as the general finalization machinery is concerned, so setting the flag is unnecessary. In the end, the flag can be decoupled entirely from transient objects and renamed into Is_Ignored_For_Finalization. This also moves around the declaration of a local variable and turns a library-level procedure into a nested procedure. gcc/ada/ * einfo.ads (Is_Ignored_Transient): Rename into... (Is_Ignored_For_Finalization): ...this. * gen_il-fields.ads (Opt_Field_Enum): Adjust to above renaming. * gen_il-gen-gen_entities.adb (Object_Kind): Likewise. * exp_aggr.adb (Expand_Array_Aggregate): Likewise. * exp_ch7.adb (Build_Finalizer.Process_Declarations): Likewise. * exp_util.adb (Requires_Cleanup_Actions): Likewise. * exp_ch4.adb (Expand_N_If_Expression): Move down declaration of variable Optimize_Return_Stmt. (Process_Transient_In_Expression): Turn procedure into a child of... (Process_Transients_In_Expression): ...this procedure. * exp_ch6.adb (Expand_Ctrl_Function_Call): Remove obsolete setting of Is_Ignored_Transient flag on the temporary if within a dependent expression of a conditional expression.
Diffstat (limited to 'gcc/btfout.cc')
0 files changed, 0 insertions, 0 deletions