1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- G E N _ I L . F I E L D S --
9 -- Copyright (C) 2020-2023, 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:
54 Is_Ignored_Ghost_Node
,
60 Accept_Handler_Records
,
63 Access_To_Subprogram_Definition
,
64 Access_Types_To_Process
,
66 Activation_Chain_Entity
,
68 Actual_Designated_Subtype
,
69 Address_Warning_Posted
,
78 Aspect_On_Partial_View
,
92 Check_Address_Alignment
,
98 Comes_From_Check_Or_Contract
,
99 Comes_From_Extended_Return_Statement
,
101 Compile_Time_Known_Aggregate
,
102 Component_Associations
,
104 Component_Definition
,
108 Componentwise_Assignment
,
119 Controlling_Argument
,
121 Corresponding_Aspect
,
123 Corresponding_Entry_Body
,
124 Corresponding_Formal_Spec
,
125 Corresponding_Generic_Association
,
126 Corresponding_Integer_Value
,
128 Corresponding_Spec_Of_Stub
,
133 Default_Storage_Pool
,
135 Default_Subtype_Mark
,
142 Discr_Check_Funcs_Built
,
145 Discrete_Subtype_Definition
,
146 Discrete_Subtype_Definitions
,
147 Discriminant_Specifications
,
149 Do_Discriminant_Check
,
155 Elaborate_All_Desirable
,
156 Elaborate_All_Present
,
165 Entity_Or_Associated_Node
,
166 Entry_Body_Formal_Part
,
167 Entry_Call_Alternative
,
168 Entry_Call_Statement
,
171 Entry_Index_Specification
,
178 Explicit_Actual_Parameter
,
179 Explicit_Generic_Actual_Parameter
,
184 First_Inlined_Subprogram
,
189 Formal_Type_Definition
,
191 For_Special_Return_Object
,
192 From_Aspect_Specification
,
194 From_Conditional_Expression
,
196 Generalized_Indexing
,
197 Generic_Associations
,
198 Generic_Formal_Declarations
,
201 Handled_Statement_Sequence
,
203 Has_Created_Identifier
,
204 Has_Dereference_Action
,
205 Has_Dynamic_Length_Check
,
208 Has_No_Elaboration_Code
,
209 Has_Pragma_Suppress_All
,
211 Has_Relative_Deadline_Pragma
,
214 Has_Storage_Size_Pragma
,
217 Has_Wide_Wide_Character
,
219 Hidden_By_Use_Clause
,
225 Import_Interface_Present
,
229 Inherited_Discriminant
,
233 Is_Accessibility_Actual
,
235 Is_Asynchronous_Call_Block
,
238 Is_Checked_Ghost_Pragma
,
239 Is_Component_Left_Opnd
,
240 Is_Component_Right_Opnd
,
241 Is_Controlling_Actual
,
242 Is_Declaration_Level_Node
,
246 Is_Dynamic_Coextension
,
247 Is_Effective_Use_Clause
,
248 Is_Elaboration_Checks_OK_Node
,
250 Is_Elaboration_Warnings_OK_Node
,
252 Is_Entry_Barrier_Function
,
253 Is_Expanded_Build_In_Place_Call
,
254 Is_Expanded_Contract
,
255 Is_Finalization_Wrapper
,
257 Is_Generic_Contract_Pragma
,
258 Is_Homogeneous_Aggregate
,
259 Is_Parenthesis_Aggregate
,
260 Is_Enum_Array_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
,
324 No_Minimize_Eliminate
,
325 No_Side_Effect_Removal
,
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
,
397 Suppress_Assignment_Checks
,
398 Suppress_Loop_Warnings
,
399 Synchronized_Present
,
407 Triggering_Alternative
,
408 Triggering_Statement
,
414 Unknown_Discriminants_Present
,
415 Unreferenced_In_Spec
,
418 Visible_Declarations
,
419 Uninitialized_Variable
,
421 Was_Attribute_Reference
,
422 Was_Default_Init_Box_Association
,
423 Was_Expression_Function
,
426 -- End of node fields.
428 Between_Node_And_Entity_Fields
,
430 -- Start of entity fields:
437 Access_Disp_Table_Elab_Flag
,
438 Access_Subprogram_Wrapper
,
439 Activation_Record_Component
,
443 Anonymous_Designated_Type
,
447 Associated_Formal_Package
,
448 Associated_Node_For_Itype
,
449 Associated_Storage_Pool
,
451 BIP_Initialization_Call
,
454 Body_Needed_For_Inlining
,
459 Can_Use_Internal_Rep
,
460 Checks_May_Be_Suppressed
,
461 Class_Postconditions
,
463 Class_Preconditions_Subprogram
,
467 Component_Bit_Offset
,
473 Corresponding_Concurrent_Type
,
474 Corresponding_Discriminant
,
475 Corresponding_Equality
,
476 Corresponding_Function
,
477 Corresponding_Procedure
,
478 Corresponding_Record_Component
,
479 Corresponding_Record_Type
,
480 Corresponding_Remote_Type
,
486 Default_Aspect_Component_Value
,
487 Default_Aspect_Value
,
488 Default_Expr_Function
,
489 Default_Expressions_Processed
,
492 Delay_Subprogram_Descriptors
,
500 Direct_Primitive_Operations
,
501 Directly_Designated_Type
,
506 Discriminant_Checking_Func
,
507 Discriminant_Constraint
,
508 Discriminant_Default_Value
,
510 Dispatch_Table_Wrappers
,
513 DT_Offset_To_Top_Func
,
516 Elaborate_Body_Desirable
,
518 Elaboration_Entity_Required
,
523 Entry_Cancel_Parameter
,
526 Entry_Index_Constant
,
527 Entry_Max_Queue_Lengths_Array
,
528 Entry_Parameters_Type
,
532 Enumeration_Rep_Expr
,
536 Extra_Accessibility_Of_Result
,
541 Finalize_Storage_Only
,
544 First_Exit_Statement
,
547 First_Private_Entity
,
555 Has_Aliased_Components
,
556 Has_Alignment_Clause
,
557 Has_All_Calls_Remote
,
558 Has_Atomic_Components
,
559 Has_Biased_Representation
,
561 Has_Completion_In_Body
,
562 Has_Complex_Representation
,
563 Has_Component_Size_Clause
,
564 Has_Constrained_Partial_View
,
566 Has_Controlled_Component
,
567 Has_Controlling_Result
,
568 Has_Convention_Pragma
,
572 Has_Delayed_Rep_Aspects
,
575 Has_Dynamic_Predicate_Aspect
,
576 Has_Enumeration_Rep_Clause
,
578 Has_Expanded_Contract
,
579 Has_Forward_Instantiation
,
580 Has_Fully_Qualified_Name
,
583 Has_Implicit_Dereference
,
584 Has_Independent_Components
,
585 Has_Inheritable_Invariants
,
587 Has_Inherited_Invariants
,
589 Has_Loop_Entry_Attributes
,
590 Has_Machine_Radix_Clause
,
593 Has_Nested_Block_With_Handler
,
594 Has_Nested_Subprogram
,
595 Has_Non_Standard_Rep
,
596 Has_Object_Size_Clause
,
597 Has_Out_Or_In_Out_Parameter
,
600 Has_Partial_Visible_Refinement
,
601 Has_Per_Object_Constraint
,
602 Has_Pragma_Controlled
,
603 Has_Pragma_Elaborate_Body
,
605 Has_Pragma_Inline_Always
,
606 Has_Pragma_No_Inline
,
609 Has_Pragma_Preelab_Init
,
611 Has_Pragma_Pure_Function
,
612 Has_Pragma_Thread_Local_Storage
,
613 Has_Pragma_Unmodified
,
614 Has_Pragma_Unreferenced
,
615 Has_Pragma_Unreferenced_Objects
,
618 Has_Primitive_Operations
,
619 Has_Private_Ancestor
,
620 Has_Private_Declaration
,
621 Has_Private_Extension
,
625 Has_Record_Rep_Clause
,
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_Subt_For_U_Nominal
,
688 Is_Constr_Subt_For_UN_Aliased
,
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_Ghost_Entity
,
723 Is_Ignored_Transient
,
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_Non_Static_Subtype
,
750 Is_Only_Out_Parameter
,
751 Is_Package_Body_Entity
,
753 Is_Packed_Array_Impl_Type
,
754 Is_Param_Block_Component_Type
,
755 Is_Partial_Invariant_Procedure
,
756 Is_Potentially_Use_Visible
,
757 Is_Predicate_Function
,
760 Is_Primitive_Wrapper
,
761 Is_Private_Composite
,
762 Is_Private_Descendant
,
763 Is_Private_Primitive
,
766 Is_Pure_Unit_Access_Type
,
769 Is_Remote_Call_Interface
,
771 Is_Renaming_Of_Object
,
773 Is_Safe_To_Reevaluate
,
776 Is_Statically_Allocated
,
780 Is_Trivial_Subprogram
,
783 Is_Underlying_Full_View
,
784 Is_Underlying_Record_View
,
787 Is_Uplevel_Referenced_Entity
,
793 Is_Volatile_Full_Access
,
796 Kill_Elaboration_Checks
,
798 Known_To_Have_Preelab_Init
,
799 Last_Aggregate_Assignment
,
803 Linker_Section_Pragma
,
812 May_Inherit_Delayed_Rep_Aspects
,
814 Minimum_Accessibility
,
816 Must_Be_On_Byte_Boundary
,
817 Must_Have_Preelab_Init
,
818 Needs_Activation_Record
,
822 Next_Inlined_Subprogram
,
823 No_Dynamic_Predicate_On_Actual
,
825 No_Predicate_On_Actual
,
829 No_Tagged_Streams_Pragma
,
833 Normalized_First_Bit
,
836 Optimize_Alignment_Space
,
837 Optimize_Alignment_Time
,
838 Original_Access_Type
,
840 Original_Protected_Subprogram
,
841 Original_Record_Component
,
843 Overridden_Operation
,
844 Package_Instantiation
,
845 Packed_Array_Impl_Type
,
847 Part_Of_Constituents
,
849 Partial_View_Has_Unknown_Discr
,
850 Pending_Access_Types
,
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
,
887 Sec_Stack_Needed_For_Return
,
888 Shared_Var_Procs_Instance
,
890 Size_Depends_On_Discriminant
,
891 Size_Known_At_Compile_Time
,
894 SPARK_Aux_Pragma_Inherited
,
896 SPARK_Pragma_Inherited
,
898 SSO_Set_High_By_Default
,
899 SSO_Set_Low_By_Default
,
901 Static_Discrete_Predicate
,
902 Static_Elaboration_Desired
,
903 Static_Initialization
,
904 Static_Real_Or_String_Predicate
,
905 Status_Flag_Or_Transient_Decl
,
906 Storage_Size_Variable
,
908 Stores_Attribute_Old_Prefix
,
910 String_Literal_Length
,
911 String_Literal_Low_Bound
,
912 Subprograms_For_Type
,
914 Suppress_Elaboration_Warnings
,
915 Suppress_Initialization
,
916 Suppress_Style_Checks
,
917 Suppress_Value_Tracking_On_Call
,
921 Underlying_Full_View
,
922 Underlying_Record_View
,
925 Used_As_Generic_Actual
,
931 Warnings_Off_Used_Unmodified
,
932 Warnings_Off_Used_Unreferenced
,
937 -- End of entity fields.
940 subtype Field_Enum
is Opt_Field_Enum
941 range Opt_Field_Enum
'Succ (No_Field
) .. Opt_Field_Enum
'Last;
942 -- Enumeration of fields -- Opt_Field_Enum without the special null value