From b622076c56b245967a8e777cfd8fd049e7ed784c Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Fri, 13 Dec 2019 09:03:02 +0000 Subject: [Ada] New flag to indicate whether aspect appears on partial view 2019-12-13 Ed Schonberg gcc/ada/ * sinfo.ads, sinfo.adb (Aspect_On_Partial_View, Set_Aspect_On_Partial_View): New flag for use by SPARK, to indicate whether an aspect that appears on a type declaration applies to the partial view of that type. * sem_ch13.adb (Analyze_Aspect_Specification): Set new flag appropriately. From-SVN: r279339 --- gcc/ada/sinfo.adb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gcc/ada/sinfo.adb') diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index 2689ebe..b99a32d 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -269,6 +269,14 @@ package body Sinfo is return Node3 (N); end Array_Aggregate; + function Aspect_On_Partial_View + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Aspect_Specification); + return Flag18 (N); + end Aspect_On_Partial_View; + function Aspect_Rep_Item (N : Node_Id) return Node_Id is begin @@ -3763,6 +3771,14 @@ package body Sinfo is Set_Node3_With_Parent (N, Val); end Set_Array_Aggregate; + procedure Set_Aspect_On_Partial_View + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Aspect_Specification); + Set_Flag18 (N, Val); + end Set_Aspect_On_Partial_View; + procedure Set_Aspect_Rep_Item (N : Node_Id; Val : Node_Id) is begin -- cgit v1.1