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
,
257 Is_Expanded_Contract
,
259 Is_Generic_Contract_Pragma
,
260 Is_Homogeneous_Aggregate
,
261 Is_Parenthesis_Aggregate
,
262 Is_Enum_Array_Aggregate
,
264 Is_Ignored_Ghost_Pragma
,
265 Is_In_Discriminant_Check
,
267 Is_Initialization_Block
,
268 Is_Known_Guaranteed_ABE
,
272 Is_Power_Of_2_For_Shift
,
273 Is_Preelaborable_Call
,
275 Is_Protected_Subprogram_Body
,
276 Is_Qualified_Universal_Literal
,
279 Is_SPARK_Mode_On_Node
,
280 Is_Static_Coextension
,
281 Is_Static_Expression
,
282 Is_Subprogram_Descriptor
,
283 Is_Task_Allocation_Block
,
284 Is_Task_Body_Procedure
,
289 Iterator_Specification
,
298 Limited_View_Installed
,
302 Local_Raise_Statements
,
304 Loop_Parameter_Specification
,
308 Multidefined_Bindings
,
309 Must_Be_Byte_Aligned
,
323 No_Elaboration_Check
,
324 No_Entities_Ref_In_Spec
,
327 No_Minimize_Eliminate
,
329 Null_Excluding_Subtype
,
330 Null_Exclusion_Present
,
331 Null_Exclusion_In_Return_Present
,
337 Original_Discriminant
,
339 Others_Discrete_Choices
,
341 Parameter_Associations
,
342 Parameter_Specifications
,
347 Pragma_Argument_Associations
,
358 Private_Declarations
,
362 Protected_Definition
,
364 Raises_Constraint_Error
,
367 Real_Range_Specification
,
370 Record_Extension_Part
,
374 Return_Object_Declarations
,
375 Return_Statement_Entity
,
379 Save_Invocation_Graph_Of_Body
,
380 SCIL_Controlling_Tag
,
399 Suppress_Assignment_Checks
,
400 Suppress_Loop_Warnings
,
401 Synchronized_Present
,
409 Triggering_Alternative
,
410 Triggering_Statement
,
416 Unknown_Discriminants_Present
,
417 Unreferenced_In_Spec
,
420 Visible_Declarations
,
421 Uninitialized_Variable
,
423 Was_Attribute_Reference
,
424 Was_Default_Init_Box_Association
,
425 Was_Expression_Function
,
428 -- End of node fields.
430 Between_Node_And_Entity_Fields
,
432 -- Start of entity fields:
439 Access_Disp_Table_Elab_Flag
,
440 Access_Subprogram_Wrapper
,
441 Activation_Record_Component
,
445 Anonymous_Designated_Type
,
449 Associated_Formal_Package
,
450 Associated_Node_For_Itype
,
451 Associated_Storage_Pool
,
453 BIP_Initialization_Call
,
456 Body_Needed_For_Inlining
,
461 Can_Use_Internal_Rep
,
462 Checks_May_Be_Suppressed
,
463 Class_Postconditions
,
465 Class_Preconditions_Subprogram
,
469 Component_Bit_Offset
,
475 Corresponding_Concurrent_Type
,
476 Corresponding_Discriminant
,
477 Corresponding_Equality
,
478 Corresponding_Function
,
479 Corresponding_Procedure
,
480 Corresponding_Record_Component
,
481 Corresponding_Record_Type
,
482 Corresponding_Remote_Type
,
488 Default_Aspect_Component_Value
,
489 Default_Aspect_Value
,
490 Default_Expr_Function
,
491 Default_Expressions_Processed
,
501 Direct_Primitive_Operations
,
502 Directly_Designated_Type
,
507 Discriminant_Checking_Func
,
508 Discriminant_Constraint
,
509 Discriminant_Default_Value
,
511 Dispatch_Table_Wrappers
,
514 DT_Offset_To_Top_Func
,
517 Elaborate_Body_Desirable
,
519 Elaboration_Entity_Required
,
524 Entry_Cancel_Parameter
,
527 Entry_Index_Constant
,
528 Entry_Max_Queue_Lengths_Array
,
529 Entry_Parameters_Type
,
533 Enumeration_Rep_Expr
,
537 Extra_Accessibility_Of_Result
,
542 Finalize_Storage_Only
,
545 First_Exit_Statement
,
548 First_Private_Entity
,
556 Has_Aliased_Components
,
557 Has_Alignment_Clause
,
558 Has_All_Calls_Remote
,
559 Has_Atomic_Components
,
560 Has_Biased_Representation
,
562 Has_Completion_In_Body
,
563 Has_Complex_Representation
,
564 Has_Component_Size_Clause
,
565 Has_Constrained_Partial_View
,
567 Has_Controlled_Component
,
568 Has_Controlling_Result
,
569 Has_Convention_Pragma
,
573 Has_Delayed_Rep_Aspects
,
576 Has_Dynamic_Predicate_Aspect
,
577 Has_Enumeration_Rep_Clause
,
579 Has_Expanded_Contract
,
580 Has_Forward_Instantiation
,
581 Has_Fully_Qualified_Name
,
582 Has_Ghost_Predicate_Aspect
,
585 Has_Implicit_Dereference
,
586 Has_Independent_Components
,
587 Has_Inheritable_Invariants
,
589 Has_Inherited_Invariants
,
591 Has_Loop_Entry_Attributes
,
592 Has_Machine_Radix_Clause
,
595 Has_Nested_Block_With_Handler
,
596 Has_Nested_Subprogram
,
597 Has_Non_Standard_Rep
,
598 Has_Object_Size_Clause
,
599 Has_Out_Or_In_Out_Parameter
,
602 Has_Partial_Visible_Refinement
,
603 Has_Per_Object_Constraint
,
604 Has_Pragma_Controlled
,
605 Has_Pragma_Elaborate_Body
,
607 Has_Pragma_Inline_Always
,
608 Has_Pragma_No_Inline
,
611 Has_Pragma_Preelab_Init
,
613 Has_Pragma_Pure_Function
,
614 Has_Pragma_Thread_Local_Storage
,
615 Has_Pragma_Unmodified
,
616 Has_Pragma_Unreferenced
,
617 Has_Pragma_Unreferenced_Objects
,
620 Has_Primitive_Operations
,
621 Has_Private_Ancestor
,
622 Has_Private_Declaration
,
623 Has_Private_Extension
,
627 Has_Record_Rep_Clause
,
632 Has_Specified_Layout
,
633 Has_Specified_Stream_Input
,
634 Has_Specified_Stream_Output
,
635 Has_Specified_Stream_Read
,
636 Has_Specified_Stream_Write
,
637 Has_Static_Discriminants
,
638 Has_Static_Predicate
,
639 Has_Static_Predicate_Aspect
,
640 Has_Storage_Size_Clause
,
641 Has_Stream_Size_Clause
,
646 Has_Unknown_Discriminants
,
647 Has_Visible_Refinement
,
648 Has_Volatile_Components
,
651 Hiding_Loop_Variable
,
652 Hidden_In_Formal_Instance
,
654 Ignored_Class_Postconditions
,
655 Ignored_Class_Preconditions
,
656 Ignore_SPARK_Mode_Pragmas
,
659 Indirect_Call_Wrapper
,
663 Initialization_Statements
,
668 Is_Abstract_Subprogram
,
671 Is_Activation_Record
,
682 Is_Checked_Ghost_Entity
,
684 Is_Class_Wide_Equivalent_Type
,
685 Is_Class_Wide_Wrapper
,
687 Is_Completely_Hidden
,
688 Is_Concurrent_Record_Type
,
689 Is_Constr_Array_Subt_With_Bounds
,
690 Is_Constr_Subt_For_U_Nominal
,
693 Is_Controlled_Active
,
694 Is_Controlling_Formal
,
697 Is_Descendant_Of_Address
,
699 Is_Discrim_SO_Function
,
700 Is_Discriminant_Check_Function
,
701 Is_Dispatch_Table_Entity
,
702 Is_Dispatch_Table_Wrapper
,
703 Is_Dispatching_Operation
,
704 Is_Elaboration_Checks_OK_Id
,
705 Is_Elaboration_Warnings_OK_Id
,
709 Is_Exception_Handler
,
711 Is_Finalized_Transient
,
713 Is_Fixed_Lower_Bound_Array_Subtype
,
714 Is_Fixed_Lower_Bound_Index_Subtype
,
715 Is_Formal_Subprogram
,
717 Is_Generic_Actual_Subprogram
,
718 Is_Generic_Actual_Type
,
722 Is_Hidden_Non_Overridden_Subpgm
,
723 Is_Hidden_Open_Scope
,
724 Is_Ignored_For_Finalization
,
725 Is_Ignored_Ghost_Entity
,
726 Is_Immediately_Visible
,
727 Is_Implementation_Defined
,
730 Is_Initial_Condition_Procedure
,
736 Is_Interrupt_Handler
,
737 Is_Intrinsic_Subprogram
,
738 Is_Invariant_Procedure
,
743 Is_Limited_Composite
,
744 Is_Limited_Interface
,
746 Is_Local_Anonymous_Access
,
748 Is_Machine_Code_Subprogram
,
749 Is_Non_Static_Subtype
,
752 Is_Only_Out_Parameter
,
753 Is_Package_Body_Entity
,
755 Is_Packed_Array_Impl_Type
,
757 Is_Param_Block_Component_Type
,
758 Is_Partial_Invariant_Procedure
,
759 Is_Potentially_Use_Visible
,
760 Is_Predicate_Function
,
763 Is_Primitive_Wrapper
,
764 Is_Private_Composite
,
765 Is_Private_Descendant
,
766 Is_Private_Primitive
,
769 Is_Pure_Unit_Access_Type
,
772 Is_Remote_Call_Interface
,
774 Is_Renaming_Of_Object
,
776 Is_Safe_To_Reevaluate
,
779 Is_Statically_Allocated
,
783 Is_Trivial_Subprogram
,
786 Is_Underlying_Full_View
,
787 Is_Underlying_Record_View
,
790 Is_Uplevel_Referenced_Entity
,
796 Is_Volatile_Full_Access
,
799 Kill_Elaboration_Checks
,
801 Known_To_Have_Preelab_Init
,
802 Last_Aggregate_Assignment
,
806 Linker_Section_Pragma
,
815 May_Inherit_Delayed_Rep_Aspects
,
817 Minimum_Accessibility
,
819 Must_Be_On_Byte_Boundary
,
820 Must_Have_Preelab_Init
,
821 Needs_Activation_Record
,
825 Next_Inlined_Subprogram
,
826 No_Dynamic_Predicate_On_Actual
,
828 No_Predicate_On_Actual
,
832 No_Tagged_Streams_Pragma
,
836 Normalized_First_Bit
,
839 Optimize_Alignment_Space
,
840 Optimize_Alignment_Time
,
841 Original_Access_Type
,
843 Original_Protected_Subprogram
,
844 Original_Record_Component
,
846 Overridden_Operation
,
847 Package_Instantiation
,
848 Packed_Array_Impl_Type
,
850 Part_Of_Constituents
,
852 Partial_View_Has_Unknown_Discr
,
853 Pending_Access_Types
,
855 Predicate_Expression
,
860 Protected_Body_Subprogram
,
862 Protected_Subprogram
,
868 Referenced_As_Out_Parameter
,
869 Refinement_Constituents
,
870 Register_Exception_Call
,
871 Related_Array_Object
,
875 Relative_Deadline_Variable
,
877 Renamed_Or_Alias
, -- Shared among Alias, Renamed_Entity, Renamed_Object
884 Reverse_Storage_Order
,
890 Sec_Stack_Needed_For_Return
,
891 Shared_Var_Procs_Instance
,
893 Size_Depends_On_Discriminant
,
894 Size_Known_At_Compile_Time
,
897 SPARK_Aux_Pragma_Inherited
,
899 SPARK_Pragma_Inherited
,
901 SSO_Set_High_By_Default
,
902 SSO_Set_Low_By_Default
,
904 Static_Discrete_Predicate
,
905 Static_Elaboration_Desired
,
906 Static_Initialization
,
907 Static_Real_Or_String_Predicate
,
908 Status_Flag_Or_Transient_Decl
,
909 Storage_Size_Variable
,
911 Stores_Attribute_Old_Prefix
,
913 String_Literal_Length
,
914 String_Literal_Low_Bound
,
915 Subprograms_For_Type
,
917 Suppress_Elaboration_Warnings
,
918 Suppress_Initialization
,
919 Suppress_Style_Checks
,
920 Suppress_Value_Tracking_On_Call
,
924 Underlying_Full_View
,
925 Underlying_Record_View
,
928 Used_As_Generic_Actual
,
934 Warnings_Off_Used_Unmodified
,
935 Warnings_Off_Used_Unreferenced
,
940 -- End of entity fields.
943 subtype Field_Enum
is Opt_Field_Enum
944 range Opt_Field_Enum
'Succ (No_Field
) .. Opt_Field_Enum
'Last;
945 -- Enumeration of fields -- Opt_Field_Enum without the special null value