From: Ed Schonberg Date: Tue, 29 May 2018 09:42:39 +0000 (+0000) Subject: [Ada] Attach reference to finalizers to tree X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=795d00637d0a881b129c009e9f8bac4405c7035e;p=gcc.git [Ada] Attach reference to finalizers to tree 2018-05-29 Ed Schonberg gcc/ada/ * 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. From-SVN: r260887 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1ad345e3e0d..69c822d4872 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-05-29 Ed Schonberg + + * 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 * 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 de21674c446..004ae4161bf 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;