1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- G E N _ I L . F I E L D S --
9 -- Copyright (C) 2020-2024, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 package Gen_IL
.Fields
is
28 -- The following is "optional field enumeration" -- i.e. it is Field_Enum
29 -- (declared below) plus the special null value No_Field. See the spec of
30 -- Gen_IL.Gen for how to modify this. (Of course, in Ada we have to define
31 -- this backwards from the above conceptual description.)
33 -- Note that there are various subranges of this type declared below,
34 -- which might need to be kept in sync when modifying this.
36 -- Be sure to put new fields in the appropriate subrange (Field_Enum,
37 -- Node_Field, Entity_Field -- search for comments below).
39 type Opt_Field_Enum
is
42 -- Start of node fields:
53 Is_Ignored_Ghost_Node
,
59 Accept_Handler_Records
,
62 Access_To_Subprogram_Definition
,
63 Access_Types_To_Process
,
65 Activation_Chain_Entity
,
67 Actual_Designated_Subtype
,
68 Address_Warning_Posted
,
69 Aggregate_Bounds_Or_Ancestor_Type
,
77 Aspect_On_Partial_View
,
79 Aspect_Specifications
,
93 Check_Address_Alignment
,
99 Comes_From_Check_Or_Contract
,
100 Comes_From_Extended_Return_Statement
,
103 Compile_Time_Known_Aggregate
,
104 Component_Associations
,
106 Component_Definition
,
110 Componentwise_Assignment
,
121 Controlling_Argument
,
123 Corresponding_Aspect
,
125 Corresponding_Entry_Body
,
126 Corresponding_Formal_Spec
,
127 Corresponding_Generic_Association
,
128 Corresponding_Integer_Value
,
130 Corresponding_Spec_Of_Stub
,
135 Default_Storage_Pool
,
137 Default_Subtype_Mark
,
144 Discr_Check_Funcs_Built
,
147 Discrete_Subtype_Definition
,
148 Discrete_Subtype_Definitions
,
149 Discriminant_Specifications
,
151 Do_Discriminant_Check
,
157 Elaborate_All_Desirable
,
158 Elaborate_All_Present
,
167 Entity_Or_Associated_Node
,
168 Entry_Body_Formal_Part
,
169 Entry_Call_Alternative
,
170 Entry_Call_Statement
,
173 Entry_Index_Specification
,
180 Explicit_Actual_Parameter
,
181 Explicit_Generic_Actual_Parameter
,
186 First_Inlined_Subprogram
,
191 Formal_Type_Definition
,
193 For_Special_Return_Object
,
194 From_Aspect_Specification
,
196 From_Conditional_Expression
,
198 Generalized_Indexing
,
199 Generic_Associations
,
200 Generic_Formal_Declarations
,
203 Handled_Statement_Sequence
,
205 Has_Created_Identifier
,
206 Has_Dereference_Action
,
207 Has_Dynamic_Length_Check
,
210 Has_No_Elaboration_Code
,
211 Has_Pragma_Suppress_All
,
213 Has_Relative_Deadline_Pragma
,
214 Has_Secondary_Private_View
,
217 Has_Storage_Size_Pragma
,
220 Has_Wide_Wide_Character
,
222 Hidden_By_Use_Clause
,
228 Import_Interface_Present
,
232 Inherited_Discriminant
,
236 Is_Accessibility_Actual
,
238 Is_Asynchronous_Call_Block
,
241 Is_Checked_Ghost_Pragma
,
242 Is_Component_Left_Opnd
,
243 Is_Component_Right_Opnd
,
244 Is_Controlling_Actual
,
245 Is_Declaration_Level_Node
,
249 Is_Dynamic_Coextension
,
250 Is_Effective_Use_Clause
,
251 Is_Elaboration_Checks_OK_Node
,
253 Is_Elaboration_Warnings_OK_Node
,
255 Is_Entry_Barrier_Function
,
256 Is_Expanded_Build_In_Place_Call
,
258 Is_Generic_Contract_Pragma
,
259 Is_Homogeneous_Aggregate
,
260 Is_Parenthesis_Aggregate
,
262 Is_Ignored_Ghost_Pragma
,
263 Is_In_Discriminant_Check
,
265 Is_Initialization_Block
,
266 Is_Known_Guaranteed_ABE
,
270 Is_Power_Of_2_For_Shift
,
271 Is_Preelaborable_Call
,
273 Is_Protected_Subprogram_Body
,
274 Is_Qualified_Universal_Literal
,
277 Is_SPARK_Mode_On_Node
,
278 Is_Static_Coextension
,
279 Is_Static_Expression
,
280 Is_Subprogram_Descriptor
,
281 Is_Task_Allocation_Block
,
282 Is_Task_Body_Procedure
,
287 Iterator_Specification
,
296 Limited_View_Installed
,
300 Local_Raise_Statements
,
302 Loop_Parameter_Specification
,
306 Multidefined_Bindings
,
307 Must_Be_Byte_Aligned
,
321 No_Elaboration_Check
,
322 No_Entities_Ref_In_Spec
,
325 No_Minimize_Eliminate
,
327 Null_Excluding_Subtype
,
328 Null_Exclusion_Present
,
329 Null_Exclusion_In_Return_Present
,
335 Original_Discriminant
,
337 Others_Discrete_Choices
,
339 Parameter_Associations
,
340 Parameter_Specifications
,
345 Pragma_Argument_Associations
,
356 Private_Declarations
,
360 Protected_Definition
,
362 Raises_Constraint_Error
,
365 Real_Range_Specification
,
368 Record_Extension_Part
,
372 Return_Object_Declarations
,
373 Return_Statement_Entity
,
377 Save_Invocation_Graph_Of_Body
,
378 SCIL_Controlling_Tag
,
396 Suppress_Assignment_Checks
,
397 Suppress_Loop_Warnings
,
398 Synchronized_Present
,
406 Triggering_Alternative
,
407 Triggering_Statement
,
413 Unknown_Discriminants_Present
,
414 Unreferenced_In_Spec
,
417 Visible_Declarations
,
418 Uninitialized_Variable
,
420 Was_Attribute_Reference
,
421 Was_Default_Init_Box_Association
,
422 Was_Expression_Function
,
425 -- End of node fields.
427 Between_Node_And_Entity_Fields
,
429 -- Start of entity fields:
436 Access_Disp_Table_Elab_Flag
,
437 Access_Subprogram_Wrapper
,
438 Activation_Record_Component
,
442 Anonymous_Collections
,
443 Anonymous_Designated_Type
,
446 Associated_Formal_Package
,
447 Associated_Node_For_Itype
,
448 Associated_Storage_Pool
,
450 BIP_Initialization_Call
,
453 Body_Needed_For_Inlining
,
458 Can_Use_Internal_Rep
,
459 Checks_May_Be_Suppressed
,
460 Class_Postconditions
,
462 Class_Preconditions_Subprogram
,
463 Class_Wide_Equivalent_Type
,
467 Component_Bit_Offset
,
473 Corresponding_Concurrent_Type
,
474 Corresponding_Discriminant
,
475 Corresponding_Equality
,
476 Corresponding_Record_Component
,
477 Corresponding_Record_Type
,
478 Corresponding_Remote_Type
,
484 Default_Aspect_Component_Value
,
485 Default_Aspect_Value
,
486 Default_Expr_Function
,
487 Default_Expressions_Processed
,
497 Direct_Primitive_Operations
,
498 Directly_Designated_Type
,
503 Discriminant_Checking_Func
,
504 Discriminant_Constraint
,
505 Discriminant_Default_Value
,
507 Dispatch_Table_Wrappers
,
510 DT_Offset_To_Top_Func
,
513 Elaborate_Body_Desirable
,
515 Elaboration_Entity_Required
,
520 Entry_Cancel_Parameter
,
523 Entry_Index_Constant
,
524 Entry_Max_Queue_Lengths_Array
,
525 Entry_Parameters_Type
,
529 Enumeration_Rep_Expr
,
533 Extra_Accessibility_Of_Result
,
537 Finalization_Collection
,
538 Finalization_Master_Node
,
539 Finalize_Storage_Only
,
542 First_Exit_Statement
,
545 First_Private_Entity
,
553 Has_Aliased_Components
,
554 Has_Alignment_Clause
,
555 Has_All_Calls_Remote
,
556 Has_Atomic_Components
,
557 Has_Biased_Representation
,
559 Has_Completion_In_Body
,
560 Has_Complex_Representation
,
561 Has_Component_Size_Clause
,
562 Has_Constrained_Partial_View
,
564 Has_Controlled_Component
,
565 Has_Controlling_Result
,
566 Has_Convention_Pragma
,
570 Has_Delayed_Rep_Aspects
,
573 Has_Dynamic_Predicate_Aspect
,
574 Has_Enumeration_Rep_Clause
,
576 Has_Expanded_Contract
,
577 Has_Forward_Instantiation
,
578 Has_Fully_Qualified_Name
,
579 Has_Ghost_Predicate_Aspect
,
582 Has_Implicit_Dereference
,
583 Has_Independent_Components
,
584 Has_Inheritable_Invariants
,
586 Has_Inherited_Invariants
,
588 Has_Loop_Entry_Attributes
,
589 Has_Machine_Radix_Clause
,
592 Has_Nested_Block_With_Handler
,
593 Has_Nested_Subprogram
,
594 Has_Non_Standard_Rep
,
595 Has_Object_Size_Clause
,
596 Has_Out_Or_In_Out_Parameter
,
599 Has_Partial_Visible_Refinement
,
600 Has_Per_Object_Constraint
,
601 Has_Pragma_Controlled
,
602 Has_Pragma_Elaborate_Body
,
604 Has_Pragma_Inline_Always
,
605 Has_Pragma_No_Inline
,
608 Has_Pragma_Preelab_Init
,
610 Has_Pragma_Pure_Function
,
611 Has_Pragma_Thread_Local_Storage
,
612 Has_Pragma_Unmodified
,
613 Has_Pragma_Unreferenced
,
614 Has_Pragma_Unreferenced_Objects
,
617 Has_Primitive_Operations
,
618 Has_Private_Ancestor
,
619 Has_Private_Declaration
,
620 Has_Private_Extension
,
624 Has_Record_Rep_Clause
,
626 Has_Relaxed_Finalization
,
630 Has_Specified_Layout
,
631 Has_Specified_Stream_Input
,
632 Has_Specified_Stream_Output
,
633 Has_Specified_Stream_Read
,
634 Has_Specified_Stream_Write
,
635 Has_Static_Discriminants
,
636 Has_Static_Predicate
,
637 Has_Static_Predicate_Aspect
,
638 Has_Storage_Size_Clause
,
639 Has_Stream_Size_Clause
,
644 Has_Unknown_Discriminants
,
645 Has_Visible_Refinement
,
646 Has_Volatile_Components
,
649 Hiding_Loop_Variable
,
650 Hidden_In_Formal_Instance
,
652 Ignored_Class_Postconditions
,
653 Ignored_Class_Preconditions
,
654 Ignore_SPARK_Mode_Pragmas
,
657 Indirect_Call_Wrapper
,
661 Initialization_Statements
,
666 Is_Abstract_Subprogram
,
669 Is_Activation_Record
,
680 Is_Checked_Ghost_Entity
,
682 Is_Class_Wide_Equivalent_Type
,
683 Is_Class_Wide_Wrapper
,
685 Is_Completely_Hidden
,
686 Is_Concurrent_Record_Type
,
687 Is_Constr_Array_Subt_With_Bounds
,
688 Is_Constr_Subt_For_U_Nominal
,
691 Is_Controlled_Active
,
692 Is_Controlling_Formal
,
695 Is_Descendant_Of_Address
,
697 Is_Discrim_SO_Function
,
698 Is_Discriminant_Check_Function
,
699 Is_Dispatch_Table_Entity
,
700 Is_Dispatch_Table_Wrapper
,
701 Is_Dispatching_Operation
,
702 Is_Elaboration_Checks_OK_Id
,
703 Is_Elaboration_Warnings_OK_Id
,
707 Is_Exception_Handler
,
709 Is_Finalized_Transient
,
711 Is_Fixed_Lower_Bound_Array_Subtype
,
712 Is_Fixed_Lower_Bound_Index_Subtype
,
713 Is_Formal_Subprogram
,
715 Is_Generic_Actual_Subprogram
,
716 Is_Generic_Actual_Type
,
720 Is_Hidden_Non_Overridden_Subpgm
,
721 Is_Hidden_Open_Scope
,
722 Is_Ignored_For_Finalization
,
723 Is_Ignored_Ghost_Entity
,
724 Is_Immediately_Visible
,
725 Is_Implementation_Defined
,
728 Is_Initial_Condition_Procedure
,
734 Is_Interrupt_Handler
,
735 Is_Intrinsic_Subprogram
,
736 Is_Invariant_Procedure
,
741 Is_Limited_Composite
,
742 Is_Limited_Interface
,
744 Is_Local_Anonymous_Access
,
746 Is_Machine_Code_Subprogram
,
747 Is_Mutably_Tagged_Type
,
748 Is_Non_Static_Subtype
,
751 Is_Only_Out_Parameter
,
752 Is_Package_Body_Entity
,
754 Is_Packed_Array_Impl_Type
,
756 Is_Param_Block_Component_Type
,
757 Is_Partial_Invariant_Procedure
,
758 Is_Potentially_Use_Visible
,
759 Is_Predicate_Function
,
762 Is_Primitive_Wrapper
,
763 Is_Private_Composite
,
764 Is_Private_Descendant
,
765 Is_Private_Primitive
,
768 Is_Pure_Unit_Access_Type
,
771 Is_Remote_Call_Interface
,
773 Is_Renaming_Of_Object
,
775 Is_Safe_To_Reevaluate
,
778 Is_Statically_Allocated
,
782 Is_Trivial_Subprogram
,
785 Is_Underlying_Full_View
,
786 Is_Underlying_Record_View
,
789 Is_Uplevel_Referenced_Entity
,
795 Is_Volatile_Full_Access
,
798 Kill_Elaboration_Checks
,
800 Known_To_Have_Preelab_Init
,
801 Last_Aggregate_Assignment
,
805 Linker_Section_Pragma
,
814 May_Inherit_Delayed_Rep_Aspects
,
816 Minimum_Accessibility
,
818 Must_Be_On_Byte_Boundary
,
819 Must_Have_Preelab_Init
,
820 Needs_Activation_Record
,
824 Next_Inlined_Subprogram
,
825 No_Dynamic_Predicate_On_Actual
,
827 No_Predicate_On_Actual
,
831 No_Tagged_Streams_Pragma
,
835 Normalized_First_Bit
,
838 Optimize_Alignment_Space
,
839 Optimize_Alignment_Time
,
840 Original_Access_Type
,
842 Original_Protected_Subprogram
,
843 Original_Record_Component
,
845 Overridden_Operation
,
846 Package_Instantiation
,
847 Packed_Array_Impl_Type
,
849 Part_Of_Constituents
,
851 Partial_View_Has_Unknown_Discr
,
852 Predicate_Expression
,
857 Protected_Body_Subprogram
,
859 Protected_Subprogram
,
865 Referenced_As_Out_Parameter
,
866 Refinement_Constituents
,
867 Register_Exception_Call
,
868 Related_Array_Object
,
872 Relative_Deadline_Variable
,
874 Renamed_Or_Alias
, -- Shared among Alias, Renamed_Entity, Renamed_Object
881 Reverse_Storage_Order
,
886 Sec_Stack_Needed_For_Return
,
887 Shared_Var_Procs_Instance
,
889 Size_Depends_On_Discriminant
,
890 Size_Known_At_Compile_Time
,
893 SPARK_Aux_Pragma_Inherited
,
895 SPARK_Pragma_Inherited
,
897 SSO_Set_High_By_Default
,
898 SSO_Set_Low_By_Default
,
900 Static_Discrete_Predicate
,
901 Static_Elaboration_Desired
,
902 Static_Initialization
,
903 Static_Real_Or_String_Predicate
,
904 Storage_Size_Variable
,
906 Stores_Attribute_Old_Prefix
,
908 String_Literal_Length
,
909 String_Literal_Low_Bound
,
910 Subprograms_For_Type
,
912 Suppress_Elaboration_Warnings
,
913 Suppress_Initialization
,
914 Suppress_Style_Checks
,
915 Suppress_Value_Tracking_On_Call
,
919 Underlying_Full_View
,
920 Underlying_Record_View
,
923 Used_As_Generic_Actual
,
929 Warnings_Off_Used_Unmodified
,
930 Warnings_Off_Used_Unreferenced
,
935 -- End of entity fields.
938 subtype Field_Enum
is Opt_Field_Enum
939 range Opt_Field_Enum
'Succ (No_Field
) .. Opt_Field_Enum
'Last;
940 -- Enumeration of fields -- Opt_Field_Enum without the special null value