diff options
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 100 |
1 files changed, 73 insertions, 27 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index 6d0f28917bf..58ae0456f3c 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -727,14 +727,6 @@ package body Sinfo is return Node4 (N); end Delay_Alternative; - function Delay_Finalize_Attach - (N : Node_Id) return Boolean is - begin - pragma Assert (False - or else NT (N).Nkind = N_Object_Declaration); - return Flag14 (N); - end Delay_Finalize_Attach; - function Delay_Statement (N : Node_Id) return Node_Id is begin @@ -1101,11 +1093,12 @@ package body Sinfo is (N : Node_Id) return Boolean is begin pragma Assert (False + or else NT (N).Nkind = N_Block_Statement or else NT (N).Nkind = N_Goto_Statement or else NT (N).Nkind = N_Label or else NT (N).Nkind = N_Object_Declaration or else NT (N).Nkind = N_Subtype_Declaration); - return Flag7 (N); + return Flag8 (N); end Exception_Junk; function Exception_Label @@ -1360,6 +1353,22 @@ package body Sinfo is return Flag12 (N); end Has_Dynamic_Range_Check; + function Has_Init_Expression + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Object_Declaration); + return Flag14 (N); + end Has_Init_Expression; + + function Has_Local_Raise + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Exception_Handler); + return Flag8 (N); + end Has_Local_Raise; + function Has_No_Elaboration_Code (N : Node_Id) return Boolean is begin @@ -1629,6 +1638,14 @@ package body Sinfo is return Flag7 (N); end Is_Protected_Subprogram_Body; + function Is_Static_Coextension + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Allocator); + return Flag14 (N); + end Is_Static_Coextension; + function Is_Static_Expression (N : Node_Id) return Boolean is begin @@ -1900,8 +1917,7 @@ package body Sinfo is or else NT (N).Nkind = N_Subprogram_Renaming_Declaration or else NT (N).Nkind = N_Subunit or else NT (N).Nkind = N_Variant_Part - or else NT (N).Nkind = N_With_Clause - or else NT (N).Nkind = N_With_Type_Clause); + or else NT (N).Nkind = N_With_Clause); return Node2 (N); end Name; @@ -2348,6 +2364,14 @@ package body Sinfo is return Flag13 (N); end Redundant_Use; + function Renaming_Exception + (N : Node_Id) return Node_Id is + begin + pragma Assert (False + or else NT (N).Nkind = N_Exception_Declaration); + return Node2 (N); + end Renaming_Exception; + function Result_Definition (N : Node_Id) return Node_Id is begin @@ -2576,8 +2600,7 @@ package body Sinfo is or else NT (N).Nkind = N_Formal_Private_Type_Definition or else NT (N).Nkind = N_Incomplete_Type_Declaration or else NT (N).Nkind = N_Private_Type_Declaration - or else NT (N).Nkind = N_Record_Definition - or else NT (N).Nkind = N_With_Type_Clause); + or else NT (N).Nkind = N_Record_Definition); return Flag15 (N); end Tagged_Present; @@ -3412,14 +3435,6 @@ package body Sinfo is Set_Node4_With_Parent (N, Val); end Set_Delay_Alternative; - procedure Set_Delay_Finalize_Attach - (N : Node_Id; Val : Boolean := True) is - begin - pragma Assert (False - or else NT (N).Nkind = N_Object_Declaration); - Set_Flag14 (N, Val); - end Set_Delay_Finalize_Attach; - procedure Set_Delay_Statement (N : Node_Id; Val : Node_Id) is begin @@ -3777,11 +3792,12 @@ package body Sinfo is (N : Node_Id; Val : Boolean := True) is begin pragma Assert (False + or else NT (N).Nkind = N_Block_Statement or else NT (N).Nkind = N_Goto_Statement or else NT (N).Nkind = N_Label or else NT (N).Nkind = N_Object_Declaration or else NT (N).Nkind = N_Subtype_Declaration); - Set_Flag7 (N, Val); + Set_Flag8 (N, Val); end Set_Exception_Junk; procedure Set_Exception_Label @@ -4036,6 +4052,22 @@ package body Sinfo is Set_Flag12 (N, Val); end Set_Has_Dynamic_Range_Check; + procedure Set_Has_Init_Expression + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Object_Declaration); + Set_Flag14 (N, Val); + end Set_Has_Init_Expression; + + procedure Set_Has_Local_Raise + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Exception_Handler); + Set_Flag8 (N, Val); + end Set_Has_Local_Raise; + procedure Set_Has_No_Elaboration_Code (N : Node_Id; Val : Boolean := True) is begin @@ -4305,6 +4337,14 @@ package body Sinfo is Set_Flag7 (N, Val); end Set_Is_Protected_Subprogram_Body; + procedure Set_Is_Static_Coextension + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Allocator); + Set_Flag14 (N, Val); + end Set_Is_Static_Coextension; + procedure Set_Is_Static_Expression (N : Node_Id; Val : Boolean := True) is begin @@ -4576,8 +4616,7 @@ package body Sinfo is or else NT (N).Nkind = N_Subprogram_Renaming_Declaration or else NT (N).Nkind = N_Subunit or else NT (N).Nkind = N_Variant_Part - or else NT (N).Nkind = N_With_Clause - or else NT (N).Nkind = N_With_Type_Clause); + or else NT (N).Nkind = N_With_Clause); Set_Node2_With_Parent (N, Val); end Set_Name; @@ -5024,6 +5063,14 @@ package body Sinfo is Set_Flag13 (N, Val); end Set_Redundant_Use; + procedure Set_Renaming_Exception + (N : Node_Id; Val : Node_Id) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Exception_Declaration); + Set_Node2 (N, Val); + end Set_Renaming_Exception; + procedure Set_Result_Definition (N : Node_Id; Val : Node_Id) is begin @@ -5252,8 +5299,7 @@ package body Sinfo is or else NT (N).Nkind = N_Formal_Private_Type_Definition or else NT (N).Nkind = N_Incomplete_Type_Declaration or else NT (N).Nkind = N_Private_Type_Declaration - or else NT (N).Nkind = N_Record_Definition - or else NT (N).Nkind = N_With_Type_Clause); + or else NT (N).Nkind = N_Record_Definition); Set_Flag15 (N, Val); end Set_Tagged_Present; |