[Ada] Attach reference to finalizers to tree
authorEd Schonberg <schonberg@adacore.com>
Tue, 29 May 2018 09:42:39 +0000 (09:42 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 29 May 2018 09:42:39 +0000 (09:42 +0000)
2018-05-29  Ed Schonberg  <schonberg@adacore.com>

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

gcc/ada/ChangeLog
gcc/ada/exp_ch7.adb

index 1ad345e3e0dcaaa44a4acb15bca9fdf133826096..69c822d4872d01c8270f537cde2e575e7996bee7 100644 (file)
@@ -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
index de21674c4463e66be8f1d949ed846e51a707410c..004ae4161bf00ca48fd67c2b32d6b2a7144db69b 100644 (file)
@@ -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;