diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1ad345e..69c822d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-05-29 Ed Schonberg <schonberg@adacore.com> + + * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to + the finalizer procedure in the At_End handler, for use in LLVM + generation. + 2018-05-29 Javier Miranda <miranda@adacore.com> * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index de21674..004ae41 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -3520,6 +3520,9 @@ package body Exp_Ch7 is Set_At_End_Proc (HSS, New_Occurrence_Of (Fin_Id, Loc)); + -- Attach reference to finalizer to tree, for LLVM use + Set_Parent (At_End_Proc (HSS), HSS); + Analyze (At_End_Proc (HSS)); Expand_At_End_Handler (HSS, Empty); end Build_Finalizer_Call;