diff options
author | Ed Schonberg <schonberg@adacore.com> | 2019-12-13 09:03:02 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-13 09:03:02 +0000 |
commit | b622076c56b245967a8e777cfd8fd049e7ed784c (patch) | |
tree | 6b13143f4908c6112bbb0822e91a16a1b6b24fec /gcc/ada/sinfo.adb | |
parent | db0aa34fb45afad19e56c573321d4c8ebaf56833 (diff) | |
download | gcc-b622076c56b245967a8e777cfd8fd049e7ed784c.zip gcc-b622076c56b245967a8e777cfd8fd049e7ed784c.tar.gz gcc-b622076c56b245967a8e777cfd8fd049e7ed784c.tar.bz2 |
[Ada] New flag to indicate whether aspect appears on partial view
2019-12-13 Ed Schonberg <schonberg@adacore.com>
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
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 16 |
1 files changed, 16 insertions, 0 deletions
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 |