1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, 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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Namet; use Namet;
37 with Nlists; use Nlists;
38 with Output; use Output;
39 with Sinfo; use Sinfo;
40 with Stand; use Stand;
44 use Atree.Unchecked_Access;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
70 -- First_Rep_Item Node6
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
79 -- Integrity_Level Uint8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Refined_State Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Loop_Entry_Attributes Elist10
96 -- Normalized_Position_Max Uint10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
151 -- Non_Limited_View Node17
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Protected_Entry Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Parent_Subtype Node19
171 -- Size_Check_Code Node19
172 -- Spec_Entity Node19
173 -- Underlying_Full_View Node19
175 -- Component_Type Node20
176 -- Default_Value Node20
177 -- Directly_Designated_Type Node20
178 -- Discriminant_Checking_Func Node20
179 -- Discriminant_Default_Value Node20
180 -- Last_Entity Node20
181 -- Prival_Link Node20
182 -- Register_Exception_Call Node20
183 -- Scalar_Range Node20
185 -- Accept_Address Elist21
186 -- Default_Expr_Function Node21
187 -- Discriminant_Constraint Elist21
188 -- Interface_Name Node21
189 -- Original_Array_Type Node21
190 -- Small_Value Ureal21
192 -- Associated_Storage_Pool Node22
193 -- Component_Size Uint22
194 -- Corresponding_Remote_Type Node22
195 -- Enumeration_Rep_Expr Node22
196 -- Exception_Code Uint22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
267 -- Note: Flag1-Flag3 are not used, for historical reasons
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
274 -- Is_Potentially_Use_Visible Flag9
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
317 -- In_Package_Body Flag48
319 -- Delay_Subprogram_Descriptors Flag50
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_With_Type Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- Has_Pragma_No_Inline Flag201
487 -- Itype_Printed Flag202
488 -- Has_Pragma_Pure Flag203
489 -- Is_Known_Null Flag204
490 -- Low_Bound_Tested Flag205
491 -- Is_Visible_Formal Flag206
492 -- Known_To_Have_Preelab_Init Flag207
493 -- Must_Have_Preelab_Init Flag208
494 -- Is_Return_Object Flag209
495 -- Elaborate_Body_Desirable Flag210
497 -- Has_Static_Discriminants Flag211
498 -- Has_Pragma_Unreferenced_Objects Flag212
499 -- Requires_Overriding Flag213
501 -- Has_Up_Level_Access Flag215
502 -- Universal_Aliasing Flag216
503 -- Suppress_Value_Tracking_On_Call Flag217
504 -- Is_Primitive Flag218
505 -- Has_Initial_Value Flag219
506 -- Has_Dispatch_Table Flag220
508 -- Has_Pragma_Preelab_Init Flag221
509 -- Used_As_Generic_Actual Flag222
510 -- Is_Descendent_Of_Address Flag223
513 -- Is_Only_Out_Parameter Flag226
514 -- Referenced_As_Out_Parameter Flag227
515 -- Has_Thunks Flag228
516 -- Can_Use_Internal_Rep Flag229
517 -- Has_Pragma_Inline_Always Flag230
519 -- Renamed_In_Spec Flag231
520 -- Has_Invariants Flag232
521 -- Has_Pragma_Unmodified Flag233
522 -- Is_Dispatch_Table_Entity Flag234
523 -- Is_Trivial_Subprogram Flag235
524 -- Warnings_Off_Used Flag236
525 -- Warnings_Off_Used_Unmodified Flag237
526 -- Warnings_Off_Used_Unreferenced Flag238
527 -- OK_To_Reorder_Components Flag239
528 -- Has_Postconditions Flag240
530 -- Optimize_Alignment_Space Flag241
531 -- Optimize_Alignment_Time Flag242
532 -- Overlays_Constant Flag243
533 -- Is_RACW_Stub_Type Flag244
534 -- Is_Private_Primitive Flag245
535 -- Is_Underlying_Record_View Flag246
536 -- OK_To_Rename Flag247
537 -- Has_Inheritable_Invariants Flag248
538 -- Is_Safe_To_Reevaluate Flag249
539 -- Has_Predicates Flag250
541 -- Has_Implicit_Dereference Flag251
542 -- Is_Processed_Transient Flag252
543 -- Has_Anonymous_Master Flag253
544 -- Is_Implementation_Defined Flag254
616 -----------------------
617 -- Local subprograms --
618 -----------------------
620 function Has_Property
622 Prop_Nam : Name_Id) return Boolean;
623 -- Determine whether abstract state State has a particular property denoted
624 -- by the name Prop_Nam.
626 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
627 -- Returns the attribute definition clause for Id whose name is Rep_Name.
628 -- Returns Empty if no matching attribute definition clause found for Id.
634 function Float_Rep (Id : E) return F is
635 pragma Assert (Is_Floating_Point_Type (Id));
637 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
644 function Has_Property
646 Prop_Nam : Name_Id) return Boolean
648 Par : constant Node_Id := Parent (State);
652 pragma Assert (Ekind (State) = E_Abstract_State);
654 -- States with properties appear as extension aggregates in the tree
656 if Nkind (Par) = N_Extension_Aggregate then
657 if Prop_Nam = Name_Integrity then
658 return Present (Component_Associations (Par));
661 Prop := First (Expressions (Par));
662 while Present (Prop) loop
663 if Chars (Prop) = Prop_Nam then
679 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
683 Ritem := First_Rep_Item (Id);
684 while Present (Ritem) loop
685 if Nkind (Ritem) = N_Attribute_Definition_Clause
686 and then Chars (Ritem) = Rep_Name
690 Next_Rep_Item (Ritem);
697 --------------------------------
698 -- Attribute Access Functions --
699 --------------------------------
701 function Abstract_States (Id : E) return L is
703 pragma Assert (Ekind (Id) = E_Package);
707 function Accept_Address (Id : E) return L is
712 function Access_Disp_Table (Id : E) return L is
714 pragma Assert (Ekind_In (Id, E_Record_Type,
716 return Elist16 (Implementation_Base_Type (Id));
717 end Access_Disp_Table;
719 function Actual_Subtype (Id : E) return E is
722 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
723 or else Is_Formal (Id));
727 function Address_Taken (Id : E) return B is
732 function Alias (Id : E) return E is
735 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
739 function Alignment (Id : E) return U is
741 pragma Assert (Is_Type (Id)
742 or else Is_Formal (Id)
743 or else Ekind_In (Id, E_Loop_Parameter,
750 function Associated_Formal_Package (Id : E) return E is
752 pragma Assert (Ekind (Id) = E_Package);
754 end Associated_Formal_Package;
756 function Associated_Node_For_Itype (Id : E) return N is
759 end Associated_Node_For_Itype;
761 function Associated_Storage_Pool (Id : E) return E is
763 pragma Assert (Is_Access_Type (Id));
764 return Node22 (Root_Type (Id));
765 end Associated_Storage_Pool;
767 function Barrier_Function (Id : E) return N is
769 pragma Assert (Is_Entry (Id));
771 end Barrier_Function;
773 function Block_Node (Id : E) return N is
775 pragma Assert (Ekind (Id) = E_Block);
779 function Body_Entity (Id : E) return E is
781 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
785 function Body_Needed_For_SAL (Id : E) return B is
788 (Ekind (Id) = E_Package
789 or else Is_Subprogram (Id)
790 or else Is_Generic_Unit (Id));
792 end Body_Needed_For_SAL;
794 function C_Pass_By_Copy (Id : E) return B is
796 pragma Assert (Is_Record_Type (Id));
797 return Flag125 (Implementation_Base_Type (Id));
800 function Can_Never_Be_Null (Id : E) return B is
803 end Can_Never_Be_Null;
805 function Checks_May_Be_Suppressed (Id : E) return B is
808 end Checks_May_Be_Suppressed;
810 function Class_Wide_Type (Id : E) return E is
812 pragma Assert (Is_Type (Id));
816 function Cloned_Subtype (Id : E) return E is
818 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
822 function Component_Bit_Offset (Id : E) return U is
824 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
826 end Component_Bit_Offset;
828 function Component_Clause (Id : E) return N is
830 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
832 end Component_Clause;
834 function Component_Size (Id : E) return U is
836 pragma Assert (Is_Array_Type (Id));
837 return Uint22 (Implementation_Base_Type (Id));
840 function Component_Type (Id : E) return E is
842 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
843 return Node20 (Implementation_Base_Type (Id));
846 function Corresponding_Concurrent_Type (Id : E) return E is
848 pragma Assert (Ekind (Id) = E_Record_Type);
850 end Corresponding_Concurrent_Type;
852 function Corresponding_Discriminant (Id : E) return E is
854 pragma Assert (Ekind (Id) = E_Discriminant);
856 end Corresponding_Discriminant;
858 function Corresponding_Equality (Id : E) return E is
861 (Ekind (Id) = E_Function
862 and then not Comes_From_Source (Id)
863 and then Chars (Id) = Name_Op_Ne);
865 end Corresponding_Equality;
867 function Corresponding_Protected_Entry (Id : E) return E is
869 pragma Assert (Ekind (Id) = E_Subprogram_Body);
871 end Corresponding_Protected_Entry;
873 function Corresponding_Record_Type (Id : E) return E is
875 pragma Assert (Is_Concurrent_Type (Id));
877 end Corresponding_Record_Type;
879 function Corresponding_Remote_Type (Id : E) return E is
882 end Corresponding_Remote_Type;
884 function Current_Use_Clause (Id : E) return E is
886 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
888 end Current_Use_Clause;
890 function Current_Value (Id : E) return N is
892 pragma Assert (Ekind (Id) in Object_Kind);
896 function CR_Discriminant (Id : E) return E is
901 function Debug_Info_Off (Id : E) return B is
906 function Debug_Renaming_Link (Id : E) return E is
909 end Debug_Renaming_Link;
911 function Default_Aspect_Component_Value (Id : E) return N is
913 pragma Assert (Is_Array_Type (Id));
915 end Default_Aspect_Component_Value;
917 function Default_Aspect_Value (Id : E) return N is
919 pragma Assert (Is_Scalar_Type (Id));
921 end Default_Aspect_Value;
923 function Default_Expr_Function (Id : E) return E is
925 pragma Assert (Is_Formal (Id));
927 end Default_Expr_Function;
929 function Default_Expressions_Processed (Id : E) return B is
932 end Default_Expressions_Processed;
934 function Default_Value (Id : E) return N is
936 pragma Assert (Is_Formal (Id));
940 function Delay_Cleanups (Id : E) return B is
945 function Delay_Subprogram_Descriptors (Id : E) return B is
948 end Delay_Subprogram_Descriptors;
950 function Delta_Value (Id : E) return R is
952 pragma Assert (Is_Fixed_Point_Type (Id));
956 function Dependent_Instances (Id : E) return L is
958 pragma Assert (Is_Generic_Instance (Id));
960 end Dependent_Instances;
962 function Depends_On_Private (Id : E) return B is
964 pragma Assert (Nkind (Id) in N_Entity);
966 end Depends_On_Private;
968 function Digits_Value (Id : E) return U is
971 (Is_Floating_Point_Type (Id)
972 or else Is_Decimal_Fixed_Point_Type (Id));
976 function Direct_Primitive_Operations (Id : E) return L is
978 pragma Assert (Is_Tagged_Type (Id));
980 end Direct_Primitive_Operations;
982 function Directly_Designated_Type (Id : E) return E is
984 pragma Assert (Is_Access_Type (Id));
986 end Directly_Designated_Type;
988 function Discard_Names (Id : E) return B is
993 function Discriminal (Id : E) return E is
995 pragma Assert (Ekind (Id) = E_Discriminant);
999 function Discriminal_Link (Id : E) return N is
1002 end Discriminal_Link;
1004 function Discriminant_Checking_Func (Id : E) return E is
1006 pragma Assert (Ekind (Id) = E_Component);
1008 end Discriminant_Checking_Func;
1010 function Discriminant_Constraint (Id : E) return L is
1012 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1013 return Elist21 (Id);
1014 end Discriminant_Constraint;
1016 function Discriminant_Default_Value (Id : E) return N is
1018 pragma Assert (Ekind (Id) = E_Discriminant);
1020 end Discriminant_Default_Value;
1022 function Discriminant_Number (Id : E) return U is
1024 pragma Assert (Ekind (Id) = E_Discriminant);
1026 end Discriminant_Number;
1028 function Dispatch_Table_Wrappers (Id : E) return L is
1030 pragma Assert (Ekind_In (Id, E_Record_Type,
1032 return Elist26 (Implementation_Base_Type (Id));
1033 end Dispatch_Table_Wrappers;
1035 function DT_Entry_Count (Id : E) return U is
1037 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1041 function DT_Offset_To_Top_Func (Id : E) return E is
1043 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1045 end DT_Offset_To_Top_Func;
1047 function DT_Position (Id : E) return U is
1049 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1050 and then Present (DTC_Entity (Id)));
1054 function DTC_Entity (Id : E) return E is
1056 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1060 function Elaborate_Body_Desirable (Id : E) return B is
1062 pragma Assert (Ekind (Id) = E_Package);
1063 return Flag210 (Id);
1064 end Elaborate_Body_Desirable;
1066 function Elaboration_Entity (Id : E) return E is
1071 Ekind (Id) = E_Package
1073 Is_Generic_Unit (Id));
1075 end Elaboration_Entity;
1077 function Elaboration_Entity_Required (Id : E) return B is
1082 Ekind (Id) = E_Package
1084 Is_Generic_Unit (Id));
1085 return Flag174 (Id);
1086 end Elaboration_Entity_Required;
1088 function Enclosing_Scope (Id : E) return E is
1091 end Enclosing_Scope;
1093 function Entry_Accepted (Id : E) return B is
1095 pragma Assert (Is_Entry (Id));
1096 return Flag152 (Id);
1099 function Entry_Bodies_Array (Id : E) return E is
1102 end Entry_Bodies_Array;
1104 function Entry_Cancel_Parameter (Id : E) return E is
1107 end Entry_Cancel_Parameter;
1109 function Entry_Component (Id : E) return E is
1112 end Entry_Component;
1114 function Entry_Formal (Id : E) return E is
1119 function Entry_Index_Constant (Id : E) return N is
1121 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1123 end Entry_Index_Constant;
1125 function Contract (Id : E) return N is
1128 (Ekind_In (Id, E_Entry, E_Entry_Family)
1129 or else Is_Subprogram (Id)
1130 or else Is_Generic_Subprogram (Id));
1134 function Entry_Parameters_Type (Id : E) return E is
1137 end Entry_Parameters_Type;
1139 function Enum_Pos_To_Rep (Id : E) return E is
1141 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1143 end Enum_Pos_To_Rep;
1145 function Enumeration_Pos (Id : E) return Uint is
1147 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1149 end Enumeration_Pos;
1151 function Enumeration_Rep (Id : E) return U is
1153 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1155 end Enumeration_Rep;
1157 function Enumeration_Rep_Expr (Id : E) return N is
1159 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1161 end Enumeration_Rep_Expr;
1163 function Equivalent_Type (Id : E) return E is
1166 (Ekind_In (Id, E_Class_Wide_Type,
1167 E_Class_Wide_Subtype,
1168 E_Access_Protected_Subprogram_Type,
1169 E_Anonymous_Access_Protected_Subprogram_Type,
1170 E_Access_Subprogram_Type,
1173 end Equivalent_Type;
1175 function Esize (Id : E) return Uint is
1180 function Exception_Code (Id : E) return Uint is
1182 pragma Assert (Ekind (Id) = E_Exception);
1186 function Extra_Accessibility (Id : E) return E is
1189 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1191 end Extra_Accessibility;
1193 function Extra_Accessibility_Of_Result (Id : E) return E is
1195 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1197 end Extra_Accessibility_Of_Result;
1199 function Extra_Constrained (Id : E) return E is
1201 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1203 end Extra_Constrained;
1205 function Extra_Formal (Id : E) return E is
1210 function Extra_Formals (Id : E) return E is
1213 (Is_Overloadable (Id)
1214 or else Ekind_In (Id, E_Entry_Family,
1216 E_Subprogram_Type));
1220 function Can_Use_Internal_Rep (Id : E) return B is
1222 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1223 return Flag229 (Base_Type (Id));
1224 end Can_Use_Internal_Rep;
1226 function Finalization_Master (Id : E) return E is
1228 pragma Assert (Is_Access_Type (Id));
1229 return Node23 (Root_Type (Id));
1230 end Finalization_Master;
1232 function Finalize_Storage_Only (Id : E) return B is
1234 pragma Assert (Is_Type (Id));
1235 return Flag158 (Base_Type (Id));
1236 end Finalize_Storage_Only;
1238 function Finalizer (Id : E) return E is
1241 (Ekind (Id) = E_Package
1242 or else Ekind (Id) = E_Package_Body);
1246 function First_Entity (Id : E) return E is
1251 function First_Exit_Statement (Id : E) return N is
1253 pragma Assert (Ekind (Id) = E_Loop);
1255 end First_Exit_Statement;
1257 function First_Index (Id : E) return N is
1259 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1263 function First_Literal (Id : E) return E is
1265 pragma Assert (Is_Enumeration_Type (Id));
1269 function First_Optional_Parameter (Id : E) return E is
1271 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1273 end First_Optional_Parameter;
1275 function First_Private_Entity (Id : E) return E is
1277 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1278 or else Ekind (Id) in Concurrent_Kind);
1280 end First_Private_Entity;
1282 function First_Rep_Item (Id : E) return E is
1287 function Freeze_Node (Id : E) return N is
1292 function From_With_Type (Id : E) return B is
1294 return Flag159 (Id);
1297 function Full_View (Id : E) return E is
1299 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1303 function Generic_Homonym (Id : E) return E is
1305 pragma Assert (Ekind (Id) = E_Generic_Package);
1307 end Generic_Homonym;
1309 function Generic_Renamings (Id : E) return L is
1311 return Elist23 (Id);
1312 end Generic_Renamings;
1314 function Handler_Records (Id : E) return S is
1317 end Handler_Records;
1319 function Has_Aliased_Components (Id : E) return B is
1321 return Flag135 (Implementation_Base_Type (Id));
1322 end Has_Aliased_Components;
1324 function Has_Alignment_Clause (Id : E) return B is
1327 end Has_Alignment_Clause;
1329 function Has_All_Calls_Remote (Id : E) return B is
1332 end Has_All_Calls_Remote;
1334 function Has_Anonymous_Master (Id : E) return B is
1337 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1338 return Flag253 (Id);
1339 end Has_Anonymous_Master;
1341 function Has_Atomic_Components (Id : E) return B is
1343 return Flag86 (Implementation_Base_Type (Id));
1344 end Has_Atomic_Components;
1346 function Has_Biased_Representation (Id : E) return B is
1348 return Flag139 (Id);
1349 end Has_Biased_Representation;
1351 function Has_Completion (Id : E) return B is
1356 function Has_Completion_In_Body (Id : E) return B is
1358 pragma Assert (Is_Type (Id));
1360 end Has_Completion_In_Body;
1362 function Has_Complex_Representation (Id : E) return B is
1364 pragma Assert (Is_Type (Id));
1365 return Flag140 (Implementation_Base_Type (Id));
1366 end Has_Complex_Representation;
1368 function Has_Component_Size_Clause (Id : E) return B is
1370 pragma Assert (Is_Array_Type (Id));
1371 return Flag68 (Implementation_Base_Type (Id));
1372 end Has_Component_Size_Clause;
1374 function Has_Constrained_Partial_View (Id : E) return B is
1376 pragma Assert (Is_Type (Id));
1377 return Flag187 (Id);
1378 end Has_Constrained_Partial_View;
1380 function Has_Controlled_Component (Id : E) return B is
1382 return Flag43 (Base_Type (Id));
1383 end Has_Controlled_Component;
1385 function Has_Contiguous_Rep (Id : E) return B is
1387 return Flag181 (Id);
1388 end Has_Contiguous_Rep;
1390 function Has_Controlling_Result (Id : E) return B is
1393 end Has_Controlling_Result;
1395 function Has_Convention_Pragma (Id : E) return B is
1397 return Flag119 (Id);
1398 end Has_Convention_Pragma;
1400 function Has_Default_Aspect (Id : E) return B is
1402 return Flag39 (Base_Type (Id));
1403 end Has_Default_Aspect;
1405 function Has_Delayed_Aspects (Id : E) return B is
1407 pragma Assert (Nkind (Id) in N_Entity);
1408 return Flag200 (Id);
1409 end Has_Delayed_Aspects;
1411 function Has_Delayed_Freeze (Id : E) return B is
1413 pragma Assert (Nkind (Id) in N_Entity);
1415 end Has_Delayed_Freeze;
1417 function Has_Discriminants (Id : E) return B is
1419 pragma Assert (Nkind (Id) in N_Entity);
1421 end Has_Discriminants;
1423 function Has_Dispatch_Table (Id : E) return B is
1425 pragma Assert (Is_Tagged_Type (Id));
1426 return Flag220 (Id);
1427 end Has_Dispatch_Table;
1429 function Has_Enumeration_Rep_Clause (Id : E) return B is
1431 pragma Assert (Is_Enumeration_Type (Id));
1433 end Has_Enumeration_Rep_Clause;
1435 function Has_Exit (Id : E) return B is
1440 function Has_External_Tag_Rep_Clause (Id : E) return B is
1442 pragma Assert (Is_Tagged_Type (Id));
1443 return Flag110 (Id);
1444 end Has_External_Tag_Rep_Clause;
1446 function Has_Forward_Instantiation (Id : E) return B is
1448 return Flag175 (Id);
1449 end Has_Forward_Instantiation;
1451 function Has_Fully_Qualified_Name (Id : E) return B is
1453 return Flag173 (Id);
1454 end Has_Fully_Qualified_Name;
1456 function Has_Gigi_Rep_Item (Id : E) return B is
1459 end Has_Gigi_Rep_Item;
1461 function Has_Homonym (Id : E) return B is
1466 function Has_Implicit_Dereference (Id : E) return B is
1468 return Flag251 (Id);
1469 end Has_Implicit_Dereference;
1471 function Has_Independent_Components (Id : E) return B is
1473 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1475 end Has_Independent_Components;
1477 function Has_Inheritable_Invariants (Id : E) return B is
1479 pragma Assert (Is_Type (Id));
1480 return Flag248 (Id);
1481 end Has_Inheritable_Invariants;
1483 function Has_Initial_Value (Id : E) return B is
1485 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1486 return Flag219 (Id);
1487 end Has_Initial_Value;
1489 function Has_Invariants (Id : E) return B is
1491 pragma Assert (Is_Type (Id)
1492 or else Ekind (Id) = E_Procedure
1493 or else Ekind (Id) = E_Generic_Procedure);
1494 return Flag232 (Id);
1497 function Has_Machine_Radix_Clause (Id : E) return B is
1499 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1501 end Has_Machine_Radix_Clause;
1503 function Has_Master_Entity (Id : E) return B is
1506 end Has_Master_Entity;
1508 function Has_Missing_Return (Id : E) return B is
1510 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1511 return Flag142 (Id);
1512 end Has_Missing_Return;
1514 function Has_Nested_Block_With_Handler (Id : E) return B is
1516 return Flag101 (Id);
1517 end Has_Nested_Block_With_Handler;
1519 function Has_Non_Standard_Rep (Id : E) return B is
1521 return Flag75 (Implementation_Base_Type (Id));
1522 end Has_Non_Standard_Rep;
1524 function Has_Object_Size_Clause (Id : E) return B is
1526 pragma Assert (Is_Type (Id));
1527 return Flag172 (Id);
1528 end Has_Object_Size_Clause;
1530 function Has_Per_Object_Constraint (Id : E) return B is
1532 return Flag154 (Id);
1533 end Has_Per_Object_Constraint;
1535 function Has_Postconditions (Id : E) return B is
1537 pragma Assert (Is_Subprogram (Id));
1538 return Flag240 (Id);
1539 end Has_Postconditions;
1541 function Has_Pragma_Controlled (Id : E) return B is
1543 pragma Assert (Is_Access_Type (Id));
1544 return Flag27 (Implementation_Base_Type (Id));
1545 end Has_Pragma_Controlled;
1547 function Has_Pragma_Elaborate_Body (Id : E) return B is
1549 return Flag150 (Id);
1550 end Has_Pragma_Elaborate_Body;
1552 function Has_Pragma_Inline (Id : E) return B is
1554 return Flag157 (Id);
1555 end Has_Pragma_Inline;
1557 function Has_Pragma_Inline_Always (Id : E) return B is
1559 return Flag230 (Id);
1560 end Has_Pragma_Inline_Always;
1562 function Has_Pragma_No_Inline (Id : E) return B is
1564 return Flag201 (Id);
1565 end Has_Pragma_No_Inline;
1567 function Has_Pragma_Ordered (Id : E) return B is
1569 pragma Assert (Is_Enumeration_Type (Id));
1570 return Flag198 (Implementation_Base_Type (Id));
1571 end Has_Pragma_Ordered;
1573 function Has_Pragma_Pack (Id : E) return B is
1575 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1576 return Flag121 (Implementation_Base_Type (Id));
1577 end Has_Pragma_Pack;
1579 function Has_Pragma_Preelab_Init (Id : E) return B is
1581 return Flag221 (Id);
1582 end Has_Pragma_Preelab_Init;
1584 function Has_Pragma_Pure (Id : E) return B is
1586 return Flag203 (Id);
1587 end Has_Pragma_Pure;
1589 function Has_Pragma_Pure_Function (Id : E) return B is
1591 return Flag179 (Id);
1592 end Has_Pragma_Pure_Function;
1594 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1596 return Flag169 (Id);
1597 end Has_Pragma_Thread_Local_Storage;
1599 function Has_Pragma_Unmodified (Id : E) return B is
1601 return Flag233 (Id);
1602 end Has_Pragma_Unmodified;
1604 function Has_Pragma_Unreferenced (Id : E) return B is
1606 return Flag180 (Id);
1607 end Has_Pragma_Unreferenced;
1609 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1611 pragma Assert (Is_Type (Id));
1612 return Flag212 (Id);
1613 end Has_Pragma_Unreferenced_Objects;
1615 function Has_Predicates (Id : E) return B is
1617 return Flag250 (Id);
1620 function Has_Primitive_Operations (Id : E) return B is
1622 pragma Assert (Is_Type (Id));
1623 return Flag120 (Base_Type (Id));
1624 end Has_Primitive_Operations;
1626 function Has_Private_Ancestor (Id : E) return B is
1628 return Flag151 (Id);
1629 end Has_Private_Ancestor;
1631 function Has_Private_Declaration (Id : E) return B is
1633 return Flag155 (Id);
1634 end Has_Private_Declaration;
1636 function Has_Qualified_Name (Id : E) return B is
1638 return Flag161 (Id);
1639 end Has_Qualified_Name;
1641 function Has_RACW (Id : E) return B is
1643 pragma Assert (Ekind (Id) = E_Package);
1644 return Flag214 (Id);
1647 function Has_Record_Rep_Clause (Id : E) return B is
1649 pragma Assert (Is_Record_Type (Id));
1650 return Flag65 (Implementation_Base_Type (Id));
1651 end Has_Record_Rep_Clause;
1653 function Has_Recursive_Call (Id : E) return B is
1655 pragma Assert (Is_Subprogram (Id));
1656 return Flag143 (Id);
1657 end Has_Recursive_Call;
1659 function Has_Size_Clause (Id : E) return B is
1662 end Has_Size_Clause;
1664 function Has_Small_Clause (Id : E) return B is
1667 end Has_Small_Clause;
1669 function Has_Specified_Layout (Id : E) return B is
1671 pragma Assert (Is_Type (Id));
1672 return Flag100 (Implementation_Base_Type (Id));
1673 end Has_Specified_Layout;
1675 function Has_Specified_Stream_Input (Id : E) return B is
1677 pragma Assert (Is_Type (Id));
1678 return Flag190 (Id);
1679 end Has_Specified_Stream_Input;
1681 function Has_Specified_Stream_Output (Id : E) return B is
1683 pragma Assert (Is_Type (Id));
1684 return Flag191 (Id);
1685 end Has_Specified_Stream_Output;
1687 function Has_Specified_Stream_Read (Id : E) return B is
1689 pragma Assert (Is_Type (Id));
1690 return Flag192 (Id);
1691 end Has_Specified_Stream_Read;
1693 function Has_Specified_Stream_Write (Id : E) return B is
1695 pragma Assert (Is_Type (Id));
1696 return Flag193 (Id);
1697 end Has_Specified_Stream_Write;
1699 function Has_Static_Discriminants (Id : E) return B is
1701 pragma Assert (Is_Type (Id));
1702 return Flag211 (Id);
1703 end Has_Static_Discriminants;
1705 function Has_Storage_Size_Clause (Id : E) return B is
1707 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1708 return Flag23 (Implementation_Base_Type (Id));
1709 end Has_Storage_Size_Clause;
1711 function Has_Stream_Size_Clause (Id : E) return B is
1713 return Flag184 (Id);
1714 end Has_Stream_Size_Clause;
1716 function Has_Task (Id : E) return B is
1718 return Flag30 (Base_Type (Id));
1721 function Has_Thunks (Id : E) return B is
1723 return Flag228 (Id);
1726 function Has_Unchecked_Union (Id : E) return B is
1728 return Flag123 (Base_Type (Id));
1729 end Has_Unchecked_Union;
1731 function Has_Unknown_Discriminants (Id : E) return B is
1733 pragma Assert (Is_Type (Id));
1735 end Has_Unknown_Discriminants;
1737 function Has_Up_Level_Access (Id : E) return B is
1740 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1741 return Flag215 (Id);
1742 end Has_Up_Level_Access;
1744 function Has_Volatile_Components (Id : E) return B is
1746 return Flag87 (Implementation_Base_Type (Id));
1747 end Has_Volatile_Components;
1749 function Has_Xref_Entry (Id : E) return B is
1751 return Flag182 (Id);
1754 function Hiding_Loop_Variable (Id : E) return E is
1756 pragma Assert (Ekind (Id) = E_Variable);
1758 end Hiding_Loop_Variable;
1760 function Homonym (Id : E) return E is
1765 function Interface_Alias (Id : E) return E is
1767 pragma Assert (Is_Subprogram (Id));
1769 end Interface_Alias;
1771 function Interfaces (Id : E) return L is
1773 pragma Assert (Is_Record_Type (Id));
1774 return Elist25 (Id);
1777 function In_Package_Body (Id : E) return B is
1780 end In_Package_Body;
1782 function In_Private_Part (Id : E) return B is
1785 end In_Private_Part;
1787 function In_Use (Id : E) return B is
1789 pragma Assert (Nkind (Id) in N_Entity);
1793 function Initialization_Statements (Id : E) return N is
1795 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1797 end Initialization_Statements;
1799 function Integrity_Level (Id : E) return U is
1801 pragma Assert (Ekind (Id) = E_Abstract_State);
1803 end Integrity_Level;
1805 function Inner_Instances (Id : E) return L is
1807 return Elist23 (Id);
1808 end Inner_Instances;
1810 function Interface_Name (Id : E) return N is
1815 function Is_Abstract_Subprogram (Id : E) return B is
1817 pragma Assert (Is_Overloadable (Id));
1819 end Is_Abstract_Subprogram;
1821 function Is_Abstract_Type (Id : E) return B is
1823 pragma Assert (Is_Type (Id));
1824 return Flag146 (Id);
1825 end Is_Abstract_Type;
1827 function Is_Local_Anonymous_Access (Id : E) return B is
1829 pragma Assert (Is_Access_Type (Id));
1830 return Flag194 (Id);
1831 end Is_Local_Anonymous_Access;
1833 function Is_Access_Constant (Id : E) return B is
1835 pragma Assert (Is_Access_Type (Id));
1837 end Is_Access_Constant;
1839 function Is_Ada_2005_Only (Id : E) return B is
1841 return Flag185 (Id);
1842 end Is_Ada_2005_Only;
1844 function Is_Ada_2012_Only (Id : E) return B is
1846 return Flag199 (Id);
1847 end Is_Ada_2012_Only;
1849 function Is_Aliased (Id : E) return B is
1851 pragma Assert (Nkind (Id) in N_Entity);
1855 function Is_AST_Entry (Id : E) return B is
1857 pragma Assert (Is_Entry (Id));
1858 return Flag132 (Id);
1861 function Is_Asynchronous (Id : E) return B is
1863 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1865 end Is_Asynchronous;
1867 function Is_Atomic (Id : E) return B is
1872 function Is_Bit_Packed_Array (Id : E) return B is
1874 return Flag122 (Implementation_Base_Type (Id));
1875 end Is_Bit_Packed_Array;
1877 function Is_Called (Id : E) return B is
1879 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1880 return Flag102 (Id);
1883 function Is_Character_Type (Id : E) return B is
1886 end Is_Character_Type;
1888 function Is_Child_Unit (Id : E) return B is
1893 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1896 end Is_Class_Wide_Equivalent_Type;
1898 function Is_Compilation_Unit (Id : E) return B is
1900 return Flag149 (Id);
1901 end Is_Compilation_Unit;
1903 function Is_Completely_Hidden (Id : E) return B is
1905 pragma Assert (Ekind (Id) = E_Discriminant);
1906 return Flag103 (Id);
1907 end Is_Completely_Hidden;
1909 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1912 end Is_Constr_Subt_For_U_Nominal;
1914 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1916 return Flag141 (Id);
1917 end Is_Constr_Subt_For_UN_Aliased;
1919 function Is_Constrained (Id : E) return B is
1921 pragma Assert (Nkind (Id) in N_Entity);
1925 function Is_Constructor (Id : E) return B is
1930 function Is_Controlled (Id : E) return B is
1932 return Flag42 (Base_Type (Id));
1935 function Is_Controlling_Formal (Id : E) return B is
1937 pragma Assert (Is_Formal (Id));
1939 end Is_Controlling_Formal;
1941 function Is_CPP_Class (Id : E) return B is
1946 function Is_Descendent_Of_Address (Id : E) return B is
1948 pragma Assert (Is_Type (Id));
1949 return Flag223 (Id);
1950 end Is_Descendent_Of_Address;
1952 function Is_Discrim_SO_Function (Id : E) return B is
1954 return Flag176 (Id);
1955 end Is_Discrim_SO_Function;
1957 function Is_Dispatch_Table_Entity (Id : E) return B is
1959 return Flag234 (Id);
1960 end Is_Dispatch_Table_Entity;
1962 function Is_Dispatching_Operation (Id : E) return B is
1964 pragma Assert (Nkind (Id) in N_Entity);
1966 end Is_Dispatching_Operation;
1968 function Is_Eliminated (Id : E) return B is
1970 return Flag124 (Id);
1973 function Is_Entry_Formal (Id : E) return B is
1976 end Is_Entry_Formal;
1978 function Is_Exported (Id : E) return B is
1983 function Is_First_Subtype (Id : E) return B is
1986 end Is_First_Subtype;
1988 function Is_For_Access_Subtype (Id : E) return B is
1990 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1991 return Flag118 (Id);
1992 end Is_For_Access_Subtype;
1994 function Is_Formal_Subprogram (Id : E) return B is
1996 return Flag111 (Id);
1997 end Is_Formal_Subprogram;
1999 function Is_Frozen (Id : E) return B is
2004 function Is_Generic_Actual_Type (Id : E) return B is
2006 pragma Assert (Is_Type (Id));
2008 end Is_Generic_Actual_Type;
2010 function Is_Generic_Instance (Id : E) return B is
2012 return Flag130 (Id);
2013 end Is_Generic_Instance;
2015 function Is_Generic_Type (Id : E) return B is
2017 pragma Assert (Nkind (Id) in N_Entity);
2019 end Is_Generic_Type;
2021 function Is_Hidden (Id : E) return B is
2026 function Is_Hidden_Open_Scope (Id : E) return B is
2028 return Flag171 (Id);
2029 end Is_Hidden_Open_Scope;
2031 function Is_Immediately_Visible (Id : E) return B is
2033 pragma Assert (Nkind (Id) in N_Entity);
2035 end Is_Immediately_Visible;
2037 function Is_Implementation_Defined (Id : E) return B is
2039 return Flag254 (Id);
2040 end Is_Implementation_Defined;
2042 function Is_Imported (Id : E) return B is
2047 function Is_Inlined (Id : E) return B is
2052 function Is_Interface (Id : E) return B is
2054 return Flag186 (Id);
2057 function Is_Instantiated (Id : E) return B is
2059 return Flag126 (Id);
2060 end Is_Instantiated;
2062 function Is_Internal (Id : E) return B is
2064 pragma Assert (Nkind (Id) in N_Entity);
2068 function Is_Interrupt_Handler (Id : E) return B is
2070 pragma Assert (Nkind (Id) in N_Entity);
2072 end Is_Interrupt_Handler;
2074 function Is_Intrinsic_Subprogram (Id : E) return B is
2077 end Is_Intrinsic_Subprogram;
2079 function Is_Itype (Id : E) return B is
2084 function Is_Known_Non_Null (Id : E) return B is
2087 end Is_Known_Non_Null;
2089 function Is_Known_Null (Id : E) return B is
2091 return Flag204 (Id);
2094 function Is_Known_Valid (Id : E) return B is
2096 return Flag170 (Id);
2099 function Is_Limited_Composite (Id : E) return B is
2101 return Flag106 (Id);
2102 end Is_Limited_Composite;
2104 function Is_Limited_Interface (Id : E) return B is
2106 return Flag197 (Id);
2107 end Is_Limited_Interface;
2109 function Is_Limited_Record (Id : E) return B is
2112 end Is_Limited_Record;
2114 function Is_Machine_Code_Subprogram (Id : E) return B is
2116 pragma Assert (Is_Subprogram (Id));
2117 return Flag137 (Id);
2118 end Is_Machine_Code_Subprogram;
2120 function Is_Non_Static_Subtype (Id : E) return B is
2122 pragma Assert (Is_Type (Id));
2123 return Flag109 (Id);
2124 end Is_Non_Static_Subtype;
2126 function Is_Null_Init_Proc (Id : E) return B is
2128 pragma Assert (Ekind (Id) = E_Procedure);
2129 return Flag178 (Id);
2130 end Is_Null_Init_Proc;
2132 function Is_Obsolescent (Id : E) return B is
2134 return Flag153 (Id);
2137 function Is_Only_Out_Parameter (Id : E) return B is
2139 pragma Assert (Is_Formal (Id));
2140 return Flag226 (Id);
2141 end Is_Only_Out_Parameter;
2143 function Is_Optional_Parameter (Id : E) return B is
2145 pragma Assert (Is_Formal (Id));
2146 return Flag134 (Id);
2147 end Is_Optional_Parameter;
2149 function Is_Package_Body_Entity (Id : E) return B is
2151 return Flag160 (Id);
2152 end Is_Package_Body_Entity;
2154 function Is_Packed (Id : E) return B is
2156 return Flag51 (Implementation_Base_Type (Id));
2159 function Is_Packed_Array_Type (Id : E) return B is
2161 return Flag138 (Id);
2162 end Is_Packed_Array_Type;
2164 function Is_Potentially_Use_Visible (Id : E) return B is
2166 pragma Assert (Nkind (Id) in N_Entity);
2168 end Is_Potentially_Use_Visible;
2170 function Is_Preelaborated (Id : E) return B is
2173 end Is_Preelaborated;
2175 function Is_Primitive (Id : E) return B is
2178 (Is_Overloadable (Id)
2179 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2180 return Flag218 (Id);
2183 function Is_Primitive_Wrapper (Id : E) return B is
2185 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2186 return Flag195 (Id);
2187 end Is_Primitive_Wrapper;
2189 function Is_Private_Composite (Id : E) return B is
2191 pragma Assert (Is_Type (Id));
2192 return Flag107 (Id);
2193 end Is_Private_Composite;
2195 function Is_Private_Descendant (Id : E) return B is
2198 end Is_Private_Descendant;
2200 function Is_Private_Primitive (Id : E) return B is
2202 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2203 return Flag245 (Id);
2204 end Is_Private_Primitive;
2206 function Is_Processed_Transient (Id : E) return B is
2208 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2209 return Flag252 (Id);
2210 end Is_Processed_Transient;
2212 function Is_Public (Id : E) return B is
2214 pragma Assert (Nkind (Id) in N_Entity);
2218 function Is_Pure (Id : E) return B is
2223 function Is_Pure_Unit_Access_Type (Id : E) return B is
2225 pragma Assert (Is_Access_Type (Id));
2226 return Flag189 (Id);
2227 end Is_Pure_Unit_Access_Type;
2229 function Is_RACW_Stub_Type (Id : E) return B is
2231 pragma Assert (Is_Type (Id));
2232 return Flag244 (Id);
2233 end Is_RACW_Stub_Type;
2235 function Is_Raised (Id : E) return B is
2237 pragma Assert (Ekind (Id) = E_Exception);
2238 return Flag224 (Id);
2241 function Is_Remote_Call_Interface (Id : E) return B is
2244 end Is_Remote_Call_Interface;
2246 function Is_Remote_Types (Id : E) return B is
2249 end Is_Remote_Types;
2251 function Is_Renaming_Of_Object (Id : E) return B is
2253 return Flag112 (Id);
2254 end Is_Renaming_Of_Object;
2256 function Is_Return_Object (Id : E) return B is
2258 return Flag209 (Id);
2259 end Is_Return_Object;
2261 function Is_Safe_To_Reevaluate (Id : E) return B is
2263 return Flag249 (Id);
2264 end Is_Safe_To_Reevaluate;
2266 function Is_Shared_Passive (Id : E) return B is
2269 end Is_Shared_Passive;
2271 function Is_Statically_Allocated (Id : E) return B is
2274 end Is_Statically_Allocated;
2276 function Is_Tag (Id : E) return B is
2278 pragma Assert (Nkind (Id) in N_Entity);
2282 function Is_Tagged_Type (Id : E) return B is
2287 function Is_Thunk (Id : E) return B is
2289 pragma Assert (Is_Subprogram (Id));
2290 return Flag225 (Id);
2293 function Is_Trivial_Subprogram (Id : E) return B is
2295 return Flag235 (Id);
2296 end Is_Trivial_Subprogram;
2298 function Is_True_Constant (Id : E) return B is
2300 return Flag163 (Id);
2301 end Is_True_Constant;
2303 function Is_Unchecked_Union (Id : E) return B is
2305 return Flag117 (Implementation_Base_Type (Id));
2306 end Is_Unchecked_Union;
2308 function Is_Underlying_Record_View (Id : E) return B is
2310 return Flag246 (Id);
2311 end Is_Underlying_Record_View;
2313 function Is_Unsigned_Type (Id : E) return B is
2315 pragma Assert (Is_Type (Id));
2316 return Flag144 (Id);
2317 end Is_Unsigned_Type;
2319 function Is_Valued_Procedure (Id : E) return B is
2321 pragma Assert (Ekind (Id) = E_Procedure);
2322 return Flag127 (Id);
2323 end Is_Valued_Procedure;
2325 function Is_Visible_Formal (Id : E) return B is
2327 return Flag206 (Id);
2328 end Is_Visible_Formal;
2330 function Is_Visible_Lib_Unit (Id : E) return B is
2332 return Flag116 (Id);
2333 end Is_Visible_Lib_Unit;
2335 function Is_VMS_Exception (Id : E) return B is
2337 return Flag133 (Id);
2338 end Is_VMS_Exception;
2340 function Is_Volatile (Id : E) return B is
2342 pragma Assert (Nkind (Id) in N_Entity);
2344 if Is_Type (Id) then
2345 return Flag16 (Base_Type (Id));
2351 function Itype_Printed (Id : E) return B is
2353 pragma Assert (Is_Itype (Id));
2354 return Flag202 (Id);
2357 function Kill_Elaboration_Checks (Id : E) return B is
2360 end Kill_Elaboration_Checks;
2362 function Kill_Range_Checks (Id : E) return B is
2365 end Kill_Range_Checks;
2367 function Known_To_Have_Preelab_Init (Id : E) return B is
2369 pragma Assert (Is_Type (Id));
2370 return Flag207 (Id);
2371 end Known_To_Have_Preelab_Init;
2373 function Last_Assignment (Id : E) return N is
2375 pragma Assert (Is_Assignable (Id));
2377 end Last_Assignment;
2379 function Last_Entity (Id : E) return E is
2384 function Limited_View (Id : E) return E is
2386 pragma Assert (Ekind (Id) = E_Package);
2390 function Lit_Indexes (Id : E) return E is
2392 pragma Assert (Is_Enumeration_Type (Id));
2396 function Lit_Strings (Id : E) return E is
2398 pragma Assert (Is_Enumeration_Type (Id));
2402 function Loop_Entry_Attributes (Id : E) return L is
2404 pragma Assert (Ekind (Id) = E_Loop);
2405 return Elist10 (Id);
2406 end Loop_Entry_Attributes;
2408 function Low_Bound_Tested (Id : E) return B is
2410 return Flag205 (Id);
2411 end Low_Bound_Tested;
2413 function Machine_Radix_10 (Id : E) return B is
2415 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2417 end Machine_Radix_10;
2419 function Master_Id (Id : E) return E is
2421 pragma Assert (Is_Access_Type (Id));
2425 function Materialize_Entity (Id : E) return B is
2427 return Flag168 (Id);
2428 end Materialize_Entity;
2430 function Mechanism (Id : E) return M is
2432 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2433 return UI_To_Int (Uint8 (Id));
2436 function Modulus (Id : E) return Uint is
2438 pragma Assert (Is_Modular_Integer_Type (Id));
2439 return Uint17 (Base_Type (Id));
2442 function Must_Be_On_Byte_Boundary (Id : E) return B is
2444 pragma Assert (Is_Type (Id));
2445 return Flag183 (Id);
2446 end Must_Be_On_Byte_Boundary;
2448 function Must_Have_Preelab_Init (Id : E) return B is
2450 pragma Assert (Is_Type (Id));
2451 return Flag208 (Id);
2452 end Must_Have_Preelab_Init;
2454 function Needs_Debug_Info (Id : E) return B is
2456 return Flag147 (Id);
2457 end Needs_Debug_Info;
2459 function Needs_No_Actuals (Id : E) return B is
2462 (Is_Overloadable (Id)
2463 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2465 end Needs_No_Actuals;
2467 function Never_Set_In_Source (Id : E) return B is
2469 return Flag115 (Id);
2470 end Never_Set_In_Source;
2472 function Next_Inlined_Subprogram (Id : E) return E is
2475 end Next_Inlined_Subprogram;
2477 function No_Pool_Assigned (Id : E) return B is
2479 pragma Assert (Is_Access_Type (Id));
2480 return Flag131 (Root_Type (Id));
2481 end No_Pool_Assigned;
2483 function No_Return (Id : E) return B is
2485 return Flag113 (Id);
2488 function No_Strict_Aliasing (Id : E) return B is
2490 pragma Assert (Is_Access_Type (Id));
2491 return Flag136 (Base_Type (Id));
2492 end No_Strict_Aliasing;
2494 function Non_Binary_Modulus (Id : E) return B is
2496 pragma Assert (Is_Type (Id));
2497 return Flag58 (Base_Type (Id));
2498 end Non_Binary_Modulus;
2500 function Non_Limited_View (Id : E) return E is
2502 pragma Assert (Ekind (Id) in Incomplete_Kind);
2504 end Non_Limited_View;
2506 function Nonzero_Is_True (Id : E) return B is
2508 pragma Assert (Root_Type (Id) = Standard_Boolean);
2509 return Flag162 (Base_Type (Id));
2510 end Nonzero_Is_True;
2512 function Normalized_First_Bit (Id : E) return U is
2514 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2516 end Normalized_First_Bit;
2518 function Normalized_Position (Id : E) return U is
2520 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2522 end Normalized_Position;
2524 function Normalized_Position_Max (Id : E) return U is
2526 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2528 end Normalized_Position_Max;
2530 function OK_To_Rename (Id : E) return B is
2532 pragma Assert (Ekind (Id) = E_Variable);
2533 return Flag247 (Id);
2536 function OK_To_Reorder_Components (Id : E) return B is
2538 pragma Assert (Is_Record_Type (Id));
2539 return Flag239 (Base_Type (Id));
2540 end OK_To_Reorder_Components;
2542 function Optimize_Alignment_Space (Id : E) return B is
2545 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2546 return Flag241 (Id);
2547 end Optimize_Alignment_Space;
2549 function Optimize_Alignment_Time (Id : E) return B is
2552 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2553 return Flag242 (Id);
2554 end Optimize_Alignment_Time;
2556 function Original_Access_Type (Id : E) return E is
2558 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2560 end Original_Access_Type;
2562 function Original_Array_Type (Id : E) return E is
2564 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2566 end Original_Array_Type;
2568 function Original_Record_Component (Id : E) return E is
2570 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2572 end Original_Record_Component;
2574 function Overlays_Constant (Id : E) return B is
2576 return Flag243 (Id);
2577 end Overlays_Constant;
2579 function Overridden_Operation (Id : E) return E is
2582 end Overridden_Operation;
2584 function Package_Instantiation (Id : E) return N is
2586 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2588 end Package_Instantiation;
2590 function Packed_Array_Type (Id : E) return E is
2592 pragma Assert (Is_Array_Type (Id));
2594 end Packed_Array_Type;
2596 function Parent_Subtype (Id : E) return E is
2598 pragma Assert (Is_Record_Type (Id));
2599 return Node19 (Base_Type (Id));
2602 function Postcondition_Proc (Id : E) return E is
2604 pragma Assert (Ekind (Id) = E_Procedure);
2606 end Postcondition_Proc;
2608 function PPC_Wrapper (Id : E) return E is
2610 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2614 function Prival (Id : E) return E is
2616 pragma Assert (Is_Protected_Component (Id));
2620 function Prival_Link (Id : E) return E is
2622 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2626 function Private_Dependents (Id : E) return L is
2628 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2629 return Elist18 (Id);
2630 end Private_Dependents;
2632 function Private_View (Id : E) return N is
2634 pragma Assert (Is_Private_Type (Id));
2638 function Protected_Body_Subprogram (Id : E) return E is
2640 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2642 end Protected_Body_Subprogram;
2644 function Protected_Formal (Id : E) return E is
2646 pragma Assert (Is_Formal (Id));
2648 end Protected_Formal;
2650 function Protection_Object (Id : E) return E is
2653 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2655 end Protection_Object;
2657 function Reachable (Id : E) return B is
2662 function Referenced (Id : E) return B is
2664 return Flag156 (Id);
2667 function Referenced_As_LHS (Id : E) return B is
2670 end Referenced_As_LHS;
2672 function Referenced_As_Out_Parameter (Id : E) return B is
2674 return Flag227 (Id);
2675 end Referenced_As_Out_Parameter;
2677 function Refined_State (Id : E) return E is
2679 pragma Assert (Ekind (Id) = E_Abstract_State);
2683 function Register_Exception_Call (Id : E) return N is
2685 pragma Assert (Ekind (Id) = E_Exception);
2687 end Register_Exception_Call;
2689 function Related_Array_Object (Id : E) return E is
2691 pragma Assert (Is_Array_Type (Id));
2693 end Related_Array_Object;
2695 function Related_Expression (Id : E) return N is
2697 pragma Assert (Ekind (Id) in Type_Kind
2698 or else Ekind_In (Id, E_Constant, E_Variable));
2700 end Related_Expression;
2702 function Related_Instance (Id : E) return E is
2704 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2706 end Related_Instance;
2708 function Related_Type (Id : E) return E is
2710 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2714 function Relative_Deadline_Variable (Id : E) return E is
2716 pragma Assert (Is_Task_Type (Id));
2717 return Node26 (Implementation_Base_Type (Id));
2718 end Relative_Deadline_Variable;
2720 function Renamed_Entity (Id : E) return N is
2725 function Renamed_In_Spec (Id : E) return B is
2727 pragma Assert (Ekind (Id) = E_Package);
2728 return Flag231 (Id);
2729 end Renamed_In_Spec;
2731 function Renamed_Object (Id : E) return N is
2736 function Renaming_Map (Id : E) return U is
2741 function Requires_Overriding (Id : E) return B is
2743 pragma Assert (Is_Overloadable (Id));
2744 return Flag213 (Id);
2745 end Requires_Overriding;
2747 function Return_Present (Id : E) return B is
2752 function Return_Applies_To (Id : E) return N is
2755 end Return_Applies_To;
2757 function Returns_By_Ref (Id : E) return B is
2762 function Reverse_Bit_Order (Id : E) return B is
2764 pragma Assert (Is_Record_Type (Id));
2765 return Flag164 (Base_Type (Id));
2766 end Reverse_Bit_Order;
2768 function Reverse_Storage_Order (Id : E) return B is
2770 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2771 return Flag93 (Base_Type (Id));
2772 end Reverse_Storage_Order;
2774 function RM_Size (Id : E) return U is
2776 pragma Assert (Is_Type (Id));
2780 function Scalar_Range (Id : E) return N is
2785 function Scale_Value (Id : E) return U is
2790 function Scope_Depth_Value (Id : E) return U is
2793 end Scope_Depth_Value;
2795 function Sec_Stack_Needed_For_Return (Id : E) return B is
2797 return Flag167 (Id);
2798 end Sec_Stack_Needed_For_Return;
2800 function Shadow_Entities (Id : E) return S is
2802 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2804 end Shadow_Entities;
2806 function Shared_Var_Procs_Instance (Id : E) return E is
2808 pragma Assert (Ekind (Id) = E_Variable);
2810 end Shared_Var_Procs_Instance;
2812 function Size_Check_Code (Id : E) return N is
2814 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2816 end Size_Check_Code;
2818 function Size_Depends_On_Discriminant (Id : E) return B is
2820 return Flag177 (Id);
2821 end Size_Depends_On_Discriminant;
2823 function Size_Known_At_Compile_Time (Id : E) return B is
2826 end Size_Known_At_Compile_Time;
2828 function Small_Value (Id : E) return R is
2830 pragma Assert (Is_Fixed_Point_Type (Id));
2831 return Ureal21 (Id);
2834 function Spec_Entity (Id : E) return E is
2836 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2840 function Static_Predicate (Id : E) return S is
2842 pragma Assert (Is_Discrete_Type (Id));
2844 end Static_Predicate;
2846 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2848 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2850 end Status_Flag_Or_Transient_Decl;
2852 function Storage_Size_Variable (Id : E) return E is
2854 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2855 return Node15 (Implementation_Base_Type (Id));
2856 end Storage_Size_Variable;
2858 function Static_Elaboration_Desired (Id : E) return B is
2860 pragma Assert (Ekind (Id) = E_Package);
2862 end Static_Elaboration_Desired;
2864 function Static_Initialization (Id : E) return N is
2867 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2869 end Static_Initialization;
2871 function Stored_Constraint (Id : E) return L is
2874 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2875 return Elist23 (Id);
2876 end Stored_Constraint;
2878 function Strict_Alignment (Id : E) return B is
2880 return Flag145 (Implementation_Base_Type (Id));
2881 end Strict_Alignment;
2883 function String_Literal_Length (Id : E) return U is
2886 end String_Literal_Length;
2888 function String_Literal_Low_Bound (Id : E) return N is
2891 end String_Literal_Low_Bound;
2893 function Subprograms_For_Type (Id : E) return E is
2895 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2897 end Subprograms_For_Type;
2899 function Suppress_Elaboration_Warnings (Id : E) return B is
2901 return Flag148 (Id);
2902 end Suppress_Elaboration_Warnings;
2904 function Suppress_Initialization (Id : E) return B is
2906 pragma Assert (Is_Type (Id));
2907 return Flag105 (Id);
2908 end Suppress_Initialization;
2910 function Suppress_Style_Checks (Id : E) return B is
2912 return Flag165 (Id);
2913 end Suppress_Style_Checks;
2915 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2917 return Flag217 (Id);
2918 end Suppress_Value_Tracking_On_Call;
2920 function Task_Body_Procedure (Id : E) return N is
2922 pragma Assert (Ekind (Id) in Task_Kind);
2924 end Task_Body_Procedure;
2926 function Treat_As_Volatile (Id : E) return B is
2929 end Treat_As_Volatile;
2931 function Underlying_Full_View (Id : E) return E is
2933 pragma Assert (Ekind (Id) in Private_Kind);
2935 end Underlying_Full_View;
2937 function Underlying_Record_View (Id : E) return E is
2940 end Underlying_Record_View;
2942 function Universal_Aliasing (Id : E) return B is
2944 pragma Assert (Is_Type (Id));
2945 return Flag216 (Implementation_Base_Type (Id));
2946 end Universal_Aliasing;
2948 function Unset_Reference (Id : E) return N is
2951 end Unset_Reference;
2953 function Used_As_Generic_Actual (Id : E) return B is
2955 return Flag222 (Id);
2956 end Used_As_Generic_Actual;
2958 function Uses_Lock_Free (Id : E) return B is
2960 pragma Assert (Is_Protected_Type (Id));
2961 return Flag188 (Id);
2964 function Uses_Sec_Stack (Id : E) return B is
2969 function Warnings_Off (Id : E) return B is
2974 function Warnings_Off_Used (Id : E) return B is
2976 return Flag236 (Id);
2977 end Warnings_Off_Used;
2979 function Warnings_Off_Used_Unmodified (Id : E) return B is
2981 return Flag237 (Id);
2982 end Warnings_Off_Used_Unmodified;
2984 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2986 return Flag238 (Id);
2987 end Warnings_Off_Used_Unreferenced;
2989 function Wrapped_Entity (Id : E) return E is
2991 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2992 and then Is_Primitive_Wrapper (Id));
2996 function Was_Hidden (Id : E) return B is
2998 return Flag196 (Id);
3001 ------------------------------
3002 -- Classification Functions --
3003 ------------------------------
3005 function Is_Access_Type (Id : E) return B is
3007 return Ekind (Id) in Access_Kind;
3010 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3012 return Ekind (Id) in Access_Protected_Kind;
3013 end Is_Access_Protected_Subprogram_Type;
3015 function Is_Access_Subprogram_Type (Id : E) return B is
3017 return Ekind (Id) in Access_Subprogram_Kind;
3018 end Is_Access_Subprogram_Type;
3020 function Is_Aggregate_Type (Id : E) return B is
3022 return Ekind (Id) in Aggregate_Kind;
3023 end Is_Aggregate_Type;
3025 function Is_Array_Type (Id : E) return B is
3027 return Ekind (Id) in Array_Kind;
3030 function Is_Assignable (Id : E) return B is
3032 return Ekind (Id) in Assignable_Kind;
3035 function Is_Class_Wide_Type (Id : E) return B is
3037 return Ekind (Id) in Class_Wide_Kind;
3038 end Is_Class_Wide_Type;
3040 function Is_Composite_Type (Id : E) return B is
3042 return Ekind (Id) in Composite_Kind;
3043 end Is_Composite_Type;
3045 function Is_Concurrent_Body (Id : E) return B is
3047 return Ekind (Id) in
3048 Concurrent_Body_Kind;
3049 end Is_Concurrent_Body;
3051 function Is_Concurrent_Record_Type (Id : E) return B is
3054 end Is_Concurrent_Record_Type;
3056 function Is_Concurrent_Type (Id : E) return B is
3058 return Ekind (Id) in Concurrent_Kind;
3059 end Is_Concurrent_Type;
3061 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3063 return Ekind (Id) in
3064 Decimal_Fixed_Point_Kind;
3065 end Is_Decimal_Fixed_Point_Type;
3067 function Is_Digits_Type (Id : E) return B is
3069 return Ekind (Id) in Digits_Kind;
3072 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3074 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3075 end Is_Discrete_Or_Fixed_Point_Type;
3077 function Is_Discrete_Type (Id : E) return B is
3079 return Ekind (Id) in Discrete_Kind;
3080 end Is_Discrete_Type;
3082 function Is_Elementary_Type (Id : E) return B is
3084 return Ekind (Id) in Elementary_Kind;
3085 end Is_Elementary_Type;
3087 function Is_Entry (Id : E) return B is
3089 return Ekind (Id) in Entry_Kind;
3092 function Is_Enumeration_Type (Id : E) return B is
3094 return Ekind (Id) in
3096 end Is_Enumeration_Type;
3098 function Is_Fixed_Point_Type (Id : E) return B is
3100 return Ekind (Id) in
3102 end Is_Fixed_Point_Type;
3104 function Is_Floating_Point_Type (Id : E) return B is
3106 return Ekind (Id) in Float_Kind;
3107 end Is_Floating_Point_Type;
3109 function Is_Formal (Id : E) return B is
3111 return Ekind (Id) in Formal_Kind;
3114 function Is_Formal_Object (Id : E) return B is
3116 return Ekind (Id) in Formal_Object_Kind;
3117 end Is_Formal_Object;
3119 function Is_Generic_Subprogram (Id : E) return B is
3121 return Ekind (Id) in Generic_Subprogram_Kind;
3122 end Is_Generic_Subprogram;
3124 function Is_Generic_Unit (Id : E) return B is
3126 return Ekind (Id) in Generic_Unit_Kind;
3127 end Is_Generic_Unit;
3129 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3131 return Ekind (Id) in
3132 Incomplete_Or_Private_Kind;
3133 end Is_Incomplete_Or_Private_Type;
3135 function Is_Incomplete_Type (Id : E) return B is
3137 return Ekind (Id) in
3139 end Is_Incomplete_Type;
3141 function Is_Integer_Type (Id : E) return B is
3143 return Ekind (Id) in Integer_Kind;
3144 end Is_Integer_Type;
3146 function Is_Modular_Integer_Type (Id : E) return B is
3148 return Ekind (Id) in
3149 Modular_Integer_Kind;
3150 end Is_Modular_Integer_Type;
3152 function Is_Named_Number (Id : E) return B is
3154 return Ekind (Id) in Named_Kind;
3155 end Is_Named_Number;
3157 function Is_Numeric_Type (Id : E) return B is
3159 return Ekind (Id) in Numeric_Kind;
3160 end Is_Numeric_Type;
3162 function Is_Object (Id : E) return B is
3164 return Ekind (Id) in Object_Kind;
3167 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3169 return Ekind (Id) in
3170 Ordinary_Fixed_Point_Kind;
3171 end Is_Ordinary_Fixed_Point_Type;
3173 function Is_Overloadable (Id : E) return B is
3175 return Ekind (Id) in Overloadable_Kind;
3176 end Is_Overloadable;
3178 function Is_Private_Type (Id : E) return B is
3180 return Ekind (Id) in Private_Kind;
3181 end Is_Private_Type;
3183 function Is_Protected_Type (Id : E) return B is
3185 return Ekind (Id) in Protected_Kind;
3186 end Is_Protected_Type;
3188 function Is_Real_Type (Id : E) return B is
3190 return Ekind (Id) in Real_Kind;
3193 function Is_Record_Type (Id : E) return B is
3195 return Ekind (Id) in Record_Kind;
3198 function Is_Scalar_Type (Id : E) return B is
3200 return Ekind (Id) in Scalar_Kind;
3203 function Is_Signed_Integer_Type (Id : E) return B is
3205 return Ekind (Id) in Signed_Integer_Kind;
3206 end Is_Signed_Integer_Type;
3208 function Is_Subprogram (Id : E) return B is
3210 return Ekind (Id) in Subprogram_Kind;
3213 function Is_Task_Type (Id : E) return B is
3215 return Ekind (Id) in Task_Kind;
3218 function Is_Type (Id : E) return B is
3220 return Ekind (Id) in Type_Kind;
3223 ------------------------------
3224 -- Attribute Set Procedures --
3225 ------------------------------
3227 -- Note: in many of these set procedures an "obvious" assertion is missing.
3228 -- The reason for this is that in many cases, a field is set before the
3229 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3230 -- it is possible to add assertions that specifically include the E_Void
3231 -- possibility, but in some cases, we just omit the assertions.
3233 procedure Set_Abstract_States (Id : E; V : L) is
3235 pragma Assert (Ekind (Id) = E_Package);
3236 Set_Elist25 (Id, V);
3237 end Set_Abstract_States;
3239 procedure Set_Accept_Address (Id : E; V : L) is
3241 Set_Elist21 (Id, V);
3242 end Set_Accept_Address;
3244 procedure Set_Access_Disp_Table (Id : E; V : L) is
3246 pragma Assert (Ekind (Id) = E_Record_Type
3247 and then Id = Implementation_Base_Type (Id));
3248 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3249 Set_Elist16 (Id, V);
3250 end Set_Access_Disp_Table;
3252 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3255 end Set_Associated_Formal_Package;
3257 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3260 end Set_Associated_Node_For_Itype;
3262 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3264 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3266 end Set_Associated_Storage_Pool;
3268 procedure Set_Actual_Subtype (Id : E; V : E) is
3271 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3272 or else Is_Formal (Id));
3274 end Set_Actual_Subtype;
3276 procedure Set_Address_Taken (Id : E; V : B := True) is
3278 Set_Flag104 (Id, V);
3279 end Set_Address_Taken;
3281 procedure Set_Alias (Id : E; V : E) is
3284 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3288 procedure Set_Alignment (Id : E; V : U) is
3290 pragma Assert (Is_Type (Id)
3291 or else Is_Formal (Id)
3292 or else Ekind_In (Id, E_Loop_Parameter,
3299 procedure Set_Barrier_Function (Id : E; V : N) is
3301 pragma Assert (Is_Entry (Id));
3303 end Set_Barrier_Function;
3305 procedure Set_Block_Node (Id : E; V : N) is
3307 pragma Assert (Ekind (Id) = E_Block);
3311 procedure Set_Body_Entity (Id : E; V : E) is
3313 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3315 end Set_Body_Entity;
3317 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3320 (Ekind (Id) = E_Package
3321 or else Is_Subprogram (Id)
3322 or else Is_Generic_Unit (Id));
3324 end Set_Body_Needed_For_SAL;
3326 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3328 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3329 Set_Flag125 (Id, V);
3330 end Set_C_Pass_By_Copy;
3332 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3335 end Set_Can_Never_Be_Null;
3337 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3340 end Set_Checks_May_Be_Suppressed;
3342 procedure Set_Class_Wide_Type (Id : E; V : E) is
3344 pragma Assert (Is_Type (Id));
3346 end Set_Class_Wide_Type;
3348 procedure Set_Cloned_Subtype (Id : E; V : E) is
3350 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3352 end Set_Cloned_Subtype;
3354 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3356 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3358 end Set_Component_Bit_Offset;
3360 procedure Set_Component_Clause (Id : E; V : N) is
3362 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3364 end Set_Component_Clause;
3366 procedure Set_Component_Size (Id : E; V : U) is
3368 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3370 end Set_Component_Size;
3372 procedure Set_Component_Type (Id : E; V : E) is
3374 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3376 end Set_Component_Type;
3378 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3381 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3383 end Set_Corresponding_Concurrent_Type;
3385 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3387 pragma Assert (Ekind (Id) = E_Discriminant);
3389 end Set_Corresponding_Discriminant;
3391 procedure Set_Corresponding_Equality (Id : E; V : E) is
3394 (Ekind (Id) = E_Function
3395 and then not Comes_From_Source (Id)
3396 and then Chars (Id) = Name_Op_Ne);
3398 end Set_Corresponding_Equality;
3400 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3402 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3404 end Set_Corresponding_Protected_Entry;
3406 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3408 pragma Assert (Is_Concurrent_Type (Id));
3410 end Set_Corresponding_Record_Type;
3412 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3415 end Set_Corresponding_Remote_Type;
3417 procedure Set_Current_Use_Clause (Id : E; V : E) is
3419 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3421 end Set_Current_Use_Clause;
3423 procedure Set_Current_Value (Id : E; V : N) is
3425 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3427 end Set_Current_Value;
3429 procedure Set_CR_Discriminant (Id : E; V : E) is
3432 end Set_CR_Discriminant;
3434 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3436 Set_Flag166 (Id, V);
3437 end Set_Debug_Info_Off;
3439 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3442 end Set_Debug_Renaming_Link;
3444 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3446 pragma Assert (Is_Array_Type (Id));
3448 end Set_Default_Aspect_Component_Value;
3450 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3452 pragma Assert (Is_Scalar_Type (Id));
3454 end Set_Default_Aspect_Value;
3456 procedure Set_Default_Expr_Function (Id : E; V : E) is
3458 pragma Assert (Is_Formal (Id));
3460 end Set_Default_Expr_Function;
3462 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3464 Set_Flag108 (Id, V);
3465 end Set_Default_Expressions_Processed;
3467 procedure Set_Default_Value (Id : E; V : N) is
3469 pragma Assert (Is_Formal (Id));
3471 end Set_Default_Value;
3473 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3477 or else Is_Task_Type (Id)
3478 or else Ekind (Id) = E_Block);
3479 Set_Flag114 (Id, V);
3480 end Set_Delay_Cleanups;
3482 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3485 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3488 end Set_Delay_Subprogram_Descriptors;
3490 procedure Set_Delta_Value (Id : E; V : R) is
3492 pragma Assert (Is_Fixed_Point_Type (Id));
3493 Set_Ureal18 (Id, V);
3494 end Set_Delta_Value;
3496 procedure Set_Dependent_Instances (Id : E; V : L) is
3498 pragma Assert (Is_Generic_Instance (Id));
3500 end Set_Dependent_Instances;
3502 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3504 pragma Assert (Nkind (Id) in N_Entity);
3506 end Set_Depends_On_Private;
3508 procedure Set_Digits_Value (Id : E; V : U) is
3511 (Is_Floating_Point_Type (Id)
3512 or else Is_Decimal_Fixed_Point_Type (Id));
3514 end Set_Digits_Value;
3516 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3519 end Set_Directly_Designated_Type;
3521 procedure Set_Discard_Names (Id : E; V : B := True) is
3524 end Set_Discard_Names;
3526 procedure Set_Discriminal (Id : E; V : E) is
3528 pragma Assert (Ekind (Id) = E_Discriminant);
3530 end Set_Discriminal;
3532 procedure Set_Discriminal_Link (Id : E; V : E) is
3535 end Set_Discriminal_Link;
3537 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3539 pragma Assert (Ekind (Id) = E_Component);
3541 end Set_Discriminant_Checking_Func;
3543 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3545 pragma Assert (Nkind (Id) in N_Entity);
3546 Set_Elist21 (Id, V);
3547 end Set_Discriminant_Constraint;
3549 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3552 end Set_Discriminant_Default_Value;
3554 procedure Set_Discriminant_Number (Id : E; V : U) is
3557 end Set_Discriminant_Number;
3559 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3561 pragma Assert (Ekind (Id) = E_Record_Type
3562 and then Id = Implementation_Base_Type (Id));
3563 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3564 Set_Elist26 (Id, V);
3565 end Set_Dispatch_Table_Wrappers;
3567 procedure Set_DT_Entry_Count (Id : E; V : U) is
3569 pragma Assert (Ekind (Id) = E_Component);
3571 end Set_DT_Entry_Count;
3573 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3575 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3577 end Set_DT_Offset_To_Top_Func;
3579 procedure Set_DT_Position (Id : E; V : U) is
3581 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3583 end Set_DT_Position;
3585 procedure Set_DTC_Entity (Id : E; V : E) is
3587 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3591 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3593 pragma Assert (Ekind (Id) = E_Package);
3594 Set_Flag210 (Id, V);
3595 end Set_Elaborate_Body_Desirable;
3597 procedure Set_Elaboration_Entity (Id : E; V : E) is
3602 Ekind (Id) = E_Package
3604 Is_Generic_Unit (Id));
3606 end Set_Elaboration_Entity;
3608 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3613 Ekind (Id) = E_Package
3615 Is_Generic_Unit (Id));
3616 Set_Flag174 (Id, V);
3617 end Set_Elaboration_Entity_Required;
3619 procedure Set_Enclosing_Scope (Id : E; V : E) is
3622 end Set_Enclosing_Scope;
3624 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3626 pragma Assert (Is_Entry (Id));
3627 Set_Flag152 (Id, V);
3628 end Set_Entry_Accepted;
3630 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3633 end Set_Entry_Bodies_Array;
3635 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3638 end Set_Entry_Cancel_Parameter;
3640 procedure Set_Entry_Component (Id : E; V : E) is
3643 end Set_Entry_Component;
3645 procedure Set_Entry_Formal (Id : E; V : E) is
3648 end Set_Entry_Formal;
3650 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3652 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3654 end Set_Entry_Index_Constant;
3656 procedure Set_Contract (Id : E; V : N) is
3659 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3660 or else Is_Subprogram (Id)
3661 or else Is_Generic_Subprogram (Id));
3665 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3668 end Set_Entry_Parameters_Type;
3670 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3672 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3674 end Set_Enum_Pos_To_Rep;
3676 procedure Set_Enumeration_Pos (Id : E; V : U) is
3678 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3680 end Set_Enumeration_Pos;
3682 procedure Set_Enumeration_Rep (Id : E; V : U) is
3684 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3686 end Set_Enumeration_Rep;
3688 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3690 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3692 end Set_Enumeration_Rep_Expr;
3694 procedure Set_Equivalent_Type (Id : E; V : E) is
3697 (Ekind_In (Id, E_Class_Wide_Type,
3698 E_Class_Wide_Subtype,
3699 E_Access_Protected_Subprogram_Type,
3700 E_Anonymous_Access_Protected_Subprogram_Type,
3701 E_Access_Subprogram_Type,
3704 end Set_Equivalent_Type;
3706 procedure Set_Esize (Id : E; V : U) is
3711 procedure Set_Exception_Code (Id : E; V : U) is
3713 pragma Assert (Ekind (Id) = E_Exception);
3715 end Set_Exception_Code;
3717 procedure Set_Extra_Accessibility (Id : E; V : E) is
3720 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3722 end Set_Extra_Accessibility;
3724 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3726 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3728 end Set_Extra_Accessibility_Of_Result;
3730 procedure Set_Extra_Constrained (Id : E; V : E) is
3732 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3734 end Set_Extra_Constrained;
3736 procedure Set_Extra_Formal (Id : E; V : E) is
3739 end Set_Extra_Formal;
3741 procedure Set_Extra_Formals (Id : E; V : E) is
3744 (Is_Overloadable (Id)
3745 or else Ekind_In (Id, E_Entry_Family,
3747 E_Subprogram_Type));
3749 end Set_Extra_Formals;
3751 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3754 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3755 Set_Flag229 (Id, V);
3756 end Set_Can_Use_Internal_Rep;
3758 procedure Set_Finalization_Master (Id : E; V : E) is
3760 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3762 end Set_Finalization_Master;
3764 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3766 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3767 Set_Flag158 (Id, V);
3768 end Set_Finalize_Storage_Only;
3770 procedure Set_Finalizer (Id : E; V : E) is
3773 (Ekind (Id) = E_Package
3774 or else Ekind (Id) = E_Package_Body);
3778 procedure Set_First_Entity (Id : E; V : E) is
3781 end Set_First_Entity;
3783 procedure Set_First_Exit_Statement (Id : E; V : N) is
3785 pragma Assert (Ekind (Id) = E_Loop);
3787 end Set_First_Exit_Statement;
3789 procedure Set_First_Index (Id : E; V : N) is
3791 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3793 end Set_First_Index;
3795 procedure Set_First_Literal (Id : E; V : E) is
3797 pragma Assert (Is_Enumeration_Type (Id));
3799 end Set_First_Literal;
3801 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3803 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3805 end Set_First_Optional_Parameter;
3807 procedure Set_First_Private_Entity (Id : E; V : E) is
3809 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3810 or else Ekind (Id) in Concurrent_Kind);
3812 end Set_First_Private_Entity;
3814 procedure Set_First_Rep_Item (Id : E; V : N) is
3817 end Set_First_Rep_Item;
3819 procedure Set_Float_Rep (Id : E; V : F) is
3820 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3822 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3825 procedure Set_Freeze_Node (Id : E; V : N) is
3828 end Set_Freeze_Node;
3830 procedure Set_From_With_Type (Id : E; V : B := True) is
3834 or else Ekind (Id) = E_Package);
3835 Set_Flag159 (Id, V);
3836 end Set_From_With_Type;
3838 procedure Set_Full_View (Id : E; V : E) is
3840 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3844 procedure Set_Generic_Homonym (Id : E; V : E) is
3847 end Set_Generic_Homonym;
3849 procedure Set_Generic_Renamings (Id : E; V : L) is
3851 Set_Elist23 (Id, V);
3852 end Set_Generic_Renamings;
3854 procedure Set_Handler_Records (Id : E; V : S) is
3857 end Set_Handler_Records;
3859 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3861 pragma Assert (Id = Base_Type (Id));
3862 Set_Flag135 (Id, V);
3863 end Set_Has_Aliased_Components;
3865 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3868 end Set_Has_Alignment_Clause;
3870 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3873 end Set_Has_All_Calls_Remote;
3875 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3878 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3879 Set_Flag253 (Id, V);
3880 end Set_Has_Anonymous_Master;
3882 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3884 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3886 end Set_Has_Atomic_Components;
3888 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3891 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3892 Set_Flag139 (Id, V);
3893 end Set_Has_Biased_Representation;
3895 procedure Set_Has_Completion (Id : E; V : B := True) is
3898 end Set_Has_Completion;
3900 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3902 pragma Assert (Is_Type (Id));
3904 end Set_Has_Completion_In_Body;
3906 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3908 pragma Assert (Ekind (Id) = E_Record_Type);
3909 Set_Flag140 (Id, V);
3910 end Set_Has_Complex_Representation;
3912 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3914 pragma Assert (Ekind (Id) = E_Array_Type);
3916 end Set_Has_Component_Size_Clause;
3918 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3920 pragma Assert (Is_Type (Id));
3921 Set_Flag187 (Id, V);
3922 end Set_Has_Constrained_Partial_View;
3924 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3926 Set_Flag181 (Id, V);
3927 end Set_Has_Contiguous_Rep;
3929 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3931 pragma Assert (Id = Base_Type (Id));
3933 end Set_Has_Controlled_Component;
3935 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3938 end Set_Has_Controlling_Result;
3940 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3942 Set_Flag119 (Id, V);
3943 end Set_Has_Convention_Pragma;
3945 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3948 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3949 and then Is_Base_Type (Id));
3951 end Set_Has_Default_Aspect;
3953 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3955 pragma Assert (Nkind (Id) in N_Entity);
3956 Set_Flag200 (Id, V);
3957 end Set_Has_Delayed_Aspects;
3959 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3961 pragma Assert (Nkind (Id) in N_Entity);
3963 end Set_Has_Delayed_Freeze;
3965 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3967 pragma Assert (Nkind (Id) in N_Entity);
3969 end Set_Has_Discriminants;
3971 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3973 pragma Assert (Ekind (Id) = E_Record_Type
3974 and then Is_Tagged_Type (Id));
3975 Set_Flag220 (Id, V);
3976 end Set_Has_Dispatch_Table;
3978 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3980 pragma Assert (Is_Enumeration_Type (Id));
3982 end Set_Has_Enumeration_Rep_Clause;
3984 procedure Set_Has_Exit (Id : E; V : B := True) is
3989 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3991 pragma Assert (Is_Tagged_Type (Id));
3992 Set_Flag110 (Id, V);
3993 end Set_Has_External_Tag_Rep_Clause;
3995 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3997 Set_Flag175 (Id, V);
3998 end Set_Has_Forward_Instantiation;
4000 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4002 Set_Flag173 (Id, V);
4003 end Set_Has_Fully_Qualified_Name;
4005 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4008 end Set_Has_Gigi_Rep_Item;
4010 procedure Set_Has_Homonym (Id : E; V : B := True) is
4013 end Set_Has_Homonym;
4015 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4017 Set_Flag251 (Id, V);
4018 end Set_Has_Implicit_Dereference;
4020 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4022 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4024 end Set_Has_Independent_Components;
4026 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4028 pragma Assert (Is_Type (Id));
4029 Set_Flag248 (Id, V);
4030 end Set_Has_Inheritable_Invariants;
4032 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4034 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4035 Set_Flag219 (Id, V);
4036 end Set_Has_Initial_Value;
4038 procedure Set_Has_Invariants (Id : E; V : B := True) is
4040 pragma Assert (Is_Type (Id)
4041 or else Ekind (Id) = E_Procedure
4042 or else Ekind (Id) = E_Void);
4043 Set_Flag232 (Id, V);
4044 end Set_Has_Invariants;
4046 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4048 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4050 end Set_Has_Machine_Radix_Clause;
4052 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4055 end Set_Has_Master_Entity;
4057 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4059 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4060 Set_Flag142 (Id, V);
4061 end Set_Has_Missing_Return;
4063 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4065 Set_Flag101 (Id, V);
4066 end Set_Has_Nested_Block_With_Handler;
4068 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4070 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4071 Set_Flag215 (Id, V);
4072 end Set_Has_Up_Level_Access;
4074 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4076 pragma Assert (Id = Base_Type (Id));
4078 end Set_Has_Non_Standard_Rep;
4080 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4082 pragma Assert (Is_Type (Id));
4083 Set_Flag172 (Id, V);
4084 end Set_Has_Object_Size_Clause;
4086 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4088 Set_Flag154 (Id, V);
4089 end Set_Has_Per_Object_Constraint;
4091 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4093 pragma Assert (Is_Subprogram (Id));
4094 Set_Flag240 (Id, V);
4095 end Set_Has_Postconditions;
4097 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4099 pragma Assert (Is_Access_Type (Id));
4100 Set_Flag27 (Base_Type (Id), V);
4101 end Set_Has_Pragma_Controlled;
4103 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4105 Set_Flag150 (Id, V);
4106 end Set_Has_Pragma_Elaborate_Body;
4108 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4110 Set_Flag157 (Id, V);
4111 end Set_Has_Pragma_Inline;
4113 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4115 Set_Flag230 (Id, V);
4116 end Set_Has_Pragma_Inline_Always;
4118 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4120 Set_Flag201 (Id, V);
4121 end Set_Has_Pragma_No_Inline;
4123 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4125 pragma Assert (Is_Enumeration_Type (Id));
4126 pragma Assert (Id = Base_Type (Id));
4127 Set_Flag198 (Id, V);
4128 end Set_Has_Pragma_Ordered;
4130 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4132 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4133 pragma Assert (Id = Base_Type (Id));
4134 Set_Flag121 (Id, V);
4135 end Set_Has_Pragma_Pack;
4137 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4139 Set_Flag221 (Id, V);
4140 end Set_Has_Pragma_Preelab_Init;
4142 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4144 Set_Flag203 (Id, V);
4145 end Set_Has_Pragma_Pure;
4147 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4149 Set_Flag179 (Id, V);
4150 end Set_Has_Pragma_Pure_Function;
4152 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4154 Set_Flag169 (Id, V);
4155 end Set_Has_Pragma_Thread_Local_Storage;
4157 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4159 Set_Flag233 (Id, V);
4160 end Set_Has_Pragma_Unmodified;
4162 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4164 Set_Flag180 (Id, V);
4165 end Set_Has_Pragma_Unreferenced;
4167 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4169 pragma Assert (Is_Type (Id));
4170 Set_Flag212 (Id, V);
4171 end Set_Has_Pragma_Unreferenced_Objects;
4173 procedure Set_Has_Predicates (Id : E; V : B := True) is
4175 Set_Flag250 (Id, V);
4176 end Set_Has_Predicates;
4178 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4180 pragma Assert (Id = Base_Type (Id));
4181 Set_Flag120 (Id, V);
4182 end Set_Has_Primitive_Operations;
4184 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4186 pragma Assert (Is_Type (Id));
4187 Set_Flag151 (Id, V);
4188 end Set_Has_Private_Ancestor;
4190 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4192 Set_Flag155 (Id, V);
4193 end Set_Has_Private_Declaration;
4195 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4197 Set_Flag161 (Id, V);
4198 end Set_Has_Qualified_Name;
4200 procedure Set_Has_RACW (Id : E; V : B := True) is
4202 pragma Assert (Ekind (Id) = E_Package);
4203 Set_Flag214 (Id, V);
4206 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4208 pragma Assert (Id = Base_Type (Id));
4210 end Set_Has_Record_Rep_Clause;
4212 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4214 pragma Assert (Is_Subprogram (Id));
4215 Set_Flag143 (Id, V);
4216 end Set_Has_Recursive_Call;
4218 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4221 end Set_Has_Size_Clause;
4223 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4226 end Set_Has_Small_Clause;
4228 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4230 pragma Assert (Id = Base_Type (Id));
4231 Set_Flag100 (Id, V);
4232 end Set_Has_Specified_Layout;
4234 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4236 pragma Assert (Is_Type (Id));
4237 Set_Flag190 (Id, V);
4238 end Set_Has_Specified_Stream_Input;
4240 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4242 pragma Assert (Is_Type (Id));
4243 Set_Flag191 (Id, V);
4244 end Set_Has_Specified_Stream_Output;
4246 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4248 pragma Assert (Is_Type (Id));
4249 Set_Flag192 (Id, V);
4250 end Set_Has_Specified_Stream_Read;
4252 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4254 pragma Assert (Is_Type (Id));
4255 Set_Flag193 (Id, V);
4256 end Set_Has_Specified_Stream_Write;
4258 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4260 Set_Flag211 (Id, V);
4261 end Set_Has_Static_Discriminants;
4263 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4265 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4266 pragma Assert (Id = Base_Type (Id));
4268 end Set_Has_Storage_Size_Clause;
4270 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4272 pragma Assert (Is_Elementary_Type (Id));
4273 Set_Flag184 (Id, V);
4274 end Set_Has_Stream_Size_Clause;
4276 procedure Set_Has_Task (Id : E; V : B := True) is
4278 pragma Assert (Id = Base_Type (Id));
4282 procedure Set_Has_Thunks (Id : E; V : B := True) is
4284 pragma Assert (Is_Tag (Id));
4285 Set_Flag228 (Id, V);
4288 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4290 pragma Assert (Id = Base_Type (Id));
4291 Set_Flag123 (Id, V);
4292 end Set_Has_Unchecked_Union;
4294 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4296 pragma Assert (Is_Type (Id));
4298 end Set_Has_Unknown_Discriminants;
4300 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4302 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4304 end Set_Has_Volatile_Components;
4306 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4308 Set_Flag182 (Id, V);
4309 end Set_Has_Xref_Entry;
4311 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4313 pragma Assert (Ekind (Id) = E_Variable);
4315 end Set_Hiding_Loop_Variable;
4317 procedure Set_Homonym (Id : E; V : E) is
4319 pragma Assert (Id /= V);
4323 procedure Set_Interface_Alias (Id : E; V : E) is
4327 and then Is_Hidden (Id)
4328 and then (Ekind_In (Id, E_Procedure, E_Function)));
4330 end Set_Interface_Alias;
4332 procedure Set_Interfaces (Id : E; V : L) is
4334 pragma Assert (Is_Record_Type (Id));
4335 Set_Elist25 (Id, V);
4338 procedure Set_In_Package_Body (Id : E; V : B := True) is
4341 end Set_In_Package_Body;
4343 procedure Set_In_Private_Part (Id : E; V : B := True) is
4346 end Set_In_Private_Part;
4348 procedure Set_In_Use (Id : E; V : B := True) is
4350 pragma Assert (Nkind (Id) in N_Entity);
4354 procedure Set_Initialization_Statements (Id : E; V : N) is
4356 -- Tolerate an E_Void entity since this can be called while resolving
4357 -- an aggregate used as the initialization expression for an object
4358 -- declaration, and this occurs before the Ekind for the object is set.
4360 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4362 end Set_Initialization_Statements;
4364 procedure Set_Integrity_Level (Id : E; V : Uint) is
4366 pragma Assert (Ekind (Id) = E_Abstract_State);
4368 end Set_Integrity_Level;
4370 procedure Set_Inner_Instances (Id : E; V : L) is
4372 Set_Elist23 (Id, V);
4373 end Set_Inner_Instances;
4375 procedure Set_Interface_Name (Id : E; V : N) is
4378 end Set_Interface_Name;
4380 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4382 pragma Assert (Is_Overloadable (Id));
4384 end Set_Is_Abstract_Subprogram;
4386 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4388 pragma Assert (Is_Type (Id));
4389 Set_Flag146 (Id, V);
4390 end Set_Is_Abstract_Type;
4392 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4394 pragma Assert (Is_Access_Type (Id));
4395 Set_Flag194 (Id, V);
4396 end Set_Is_Local_Anonymous_Access;
4398 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4400 pragma Assert (Is_Access_Type (Id));
4402 end Set_Is_Access_Constant;
4404 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4406 Set_Flag185 (Id, V);
4407 end Set_Is_Ada_2005_Only;
4409 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4411 Set_Flag199 (Id, V);
4412 end Set_Is_Ada_2012_Only;
4414 procedure Set_Is_Aliased (Id : E; V : B := True) is
4416 pragma Assert (Nkind (Id) in N_Entity);
4420 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4422 pragma Assert (Is_Entry (Id));
4423 Set_Flag132 (Id, V);
4424 end Set_Is_AST_Entry;
4426 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4429 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4431 end Set_Is_Asynchronous;
4433 procedure Set_Is_Atomic (Id : E; V : B := True) is
4438 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4440 pragma Assert ((not V)
4441 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4442 Set_Flag122 (Id, V);
4443 end Set_Is_Bit_Packed_Array;
4445 procedure Set_Is_Called (Id : E; V : B := True) is
4447 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4448 Set_Flag102 (Id, V);
4451 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4454 end Set_Is_Character_Type;
4456 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4459 end Set_Is_Child_Unit;
4461 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4464 end Set_Is_Class_Wide_Equivalent_Type;
4466 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4468 Set_Flag149 (Id, V);
4469 end Set_Is_Compilation_Unit;
4471 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4473 pragma Assert (Ekind (Id) = E_Discriminant);
4474 Set_Flag103 (Id, V);
4475 end Set_Is_Completely_Hidden;
4477 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4480 end Set_Is_Concurrent_Record_Type;
4482 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4485 end Set_Is_Constr_Subt_For_U_Nominal;
4487 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4489 Set_Flag141 (Id, V);
4490 end Set_Is_Constr_Subt_For_UN_Aliased;
4492 procedure Set_Is_Constrained (Id : E; V : B := True) is
4494 pragma Assert (Nkind (Id) in N_Entity);
4496 end Set_Is_Constrained;
4498 procedure Set_Is_Constructor (Id : E; V : B := True) is
4501 end Set_Is_Constructor;
4503 procedure Set_Is_Controlled (Id : E; V : B := True) is
4505 pragma Assert (Id = Base_Type (Id));
4507 end Set_Is_Controlled;
4509 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4511 pragma Assert (Is_Formal (Id));
4513 end Set_Is_Controlling_Formal;
4515 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4518 end Set_Is_CPP_Class;
4520 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4522 pragma Assert (Is_Type (Id));
4523 Set_Flag223 (Id, V);
4524 end Set_Is_Descendent_Of_Address;
4526 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4528 Set_Flag176 (Id, V);
4529 end Set_Is_Discrim_SO_Function;
4531 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4533 Set_Flag234 (Id, V);
4534 end Set_Is_Dispatch_Table_Entity;
4536 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4541 Is_Overloadable (Id)
4543 Ekind (Id) = E_Subprogram_Type);
4546 end Set_Is_Dispatching_Operation;
4548 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4550 Set_Flag124 (Id, V);
4551 end Set_Is_Eliminated;
4553 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4556 end Set_Is_Entry_Formal;
4558 procedure Set_Is_Exported (Id : E; V : B := True) is
4561 end Set_Is_Exported;
4563 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4566 end Set_Is_First_Subtype;
4568 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4570 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4571 Set_Flag118 (Id, V);
4572 end Set_Is_For_Access_Subtype;
4574 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4576 Set_Flag111 (Id, V);
4577 end Set_Is_Formal_Subprogram;
4579 procedure Set_Is_Frozen (Id : E; V : B := True) is
4581 pragma Assert (Nkind (Id) in N_Entity);
4585 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4587 pragma Assert (Is_Type (Id));
4589 end Set_Is_Generic_Actual_Type;
4591 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4593 Set_Flag130 (Id, V);
4594 end Set_Is_Generic_Instance;
4596 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4598 pragma Assert (Nkind (Id) in N_Entity);
4600 end Set_Is_Generic_Type;
4602 procedure Set_Is_Hidden (Id : E; V : B := True) is
4607 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4609 Set_Flag171 (Id, V);
4610 end Set_Is_Hidden_Open_Scope;
4612 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4614 pragma Assert (Nkind (Id) in N_Entity);
4616 end Set_Is_Immediately_Visible;
4618 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4620 Set_Flag254 (Id, V);
4621 end Set_Is_Implementation_Defined;
4623 procedure Set_Is_Imported (Id : E; V : B := True) is
4626 end Set_Is_Imported;
4628 procedure Set_Is_Inlined (Id : E; V : B := True) is
4633 procedure Set_Is_Interface (Id : E; V : B := True) is
4635 pragma Assert (Is_Record_Type (Id));
4636 Set_Flag186 (Id, V);
4637 end Set_Is_Interface;
4639 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4641 Set_Flag126 (Id, V);
4642 end Set_Is_Instantiated;
4644 procedure Set_Is_Internal (Id : E; V : B := True) is
4646 pragma Assert (Nkind (Id) in N_Entity);
4648 end Set_Is_Internal;
4650 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4652 pragma Assert (Nkind (Id) in N_Entity);
4654 end Set_Is_Interrupt_Handler;
4656 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4659 end Set_Is_Intrinsic_Subprogram;
4661 procedure Set_Is_Itype (Id : E; V : B := True) is
4666 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4669 end Set_Is_Known_Non_Null;
4671 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4673 Set_Flag204 (Id, V);
4674 end Set_Is_Known_Null;
4676 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4678 Set_Flag170 (Id, V);
4679 end Set_Is_Known_Valid;
4681 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4683 pragma Assert (Is_Type (Id));
4684 Set_Flag106 (Id, V);
4685 end Set_Is_Limited_Composite;
4687 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4689 pragma Assert (Is_Interface (Id));
4690 Set_Flag197 (Id, V);
4691 end Set_Is_Limited_Interface;
4693 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4696 end Set_Is_Limited_Record;
4698 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4700 pragma Assert (Is_Subprogram (Id));
4701 Set_Flag137 (Id, V);
4702 end Set_Is_Machine_Code_Subprogram;
4704 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4706 pragma Assert (Is_Type (Id));
4707 Set_Flag109 (Id, V);
4708 end Set_Is_Non_Static_Subtype;
4710 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4712 pragma Assert (Ekind (Id) = E_Procedure);
4713 Set_Flag178 (Id, V);
4714 end Set_Is_Null_Init_Proc;
4716 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4718 Set_Flag153 (Id, V);
4719 end Set_Is_Obsolescent;
4721 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4723 pragma Assert (Ekind (Id) = E_Out_Parameter);
4724 Set_Flag226 (Id, V);
4725 end Set_Is_Only_Out_Parameter;
4727 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4729 pragma Assert (Is_Formal (Id));
4730 Set_Flag134 (Id, V);
4731 end Set_Is_Optional_Parameter;
4733 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4735 Set_Flag160 (Id, V);
4736 end Set_Is_Package_Body_Entity;
4738 procedure Set_Is_Packed (Id : E; V : B := True) is
4740 pragma Assert (Id = Base_Type (Id));
4744 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4746 Set_Flag138 (Id, V);
4747 end Set_Is_Packed_Array_Type;
4749 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4751 pragma Assert (Nkind (Id) in N_Entity);
4753 end Set_Is_Potentially_Use_Visible;
4755 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4758 end Set_Is_Preelaborated;
4760 procedure Set_Is_Primitive (Id : E; V : B := True) is
4763 (Is_Overloadable (Id)
4764 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4765 Set_Flag218 (Id, V);
4766 end Set_Is_Primitive;
4768 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4770 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4771 Set_Flag195 (Id, V);
4772 end Set_Is_Primitive_Wrapper;
4774 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4776 pragma Assert (Is_Type (Id));
4777 Set_Flag107 (Id, V);
4778 end Set_Is_Private_Composite;
4780 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4783 end Set_Is_Private_Descendant;
4785 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4787 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4788 Set_Flag245 (Id, V);
4789 end Set_Is_Private_Primitive;
4791 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4793 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4794 Set_Flag252 (Id, V);
4795 end Set_Is_Processed_Transient;
4797 procedure Set_Is_Public (Id : E; V : B := True) is
4799 pragma Assert (Nkind (Id) in N_Entity);
4803 procedure Set_Is_Pure (Id : E; V : B := True) is
4808 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4810 pragma Assert (Is_Access_Type (Id));
4811 Set_Flag189 (Id, V);
4812 end Set_Is_Pure_Unit_Access_Type;
4814 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4816 pragma Assert (Is_Type (Id));
4817 Set_Flag244 (Id, V);
4818 end Set_Is_RACW_Stub_Type;
4820 procedure Set_Is_Raised (Id : E; V : B := True) is
4822 pragma Assert (Ekind (Id) = E_Exception);
4823 Set_Flag224 (Id, V);
4826 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4829 end Set_Is_Remote_Call_Interface;
4831 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4834 end Set_Is_Remote_Types;
4836 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4838 Set_Flag112 (Id, V);
4839 end Set_Is_Renaming_Of_Object;
4841 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4843 Set_Flag209 (Id, V);
4844 end Set_Is_Return_Object;
4846 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4848 pragma Assert (Ekind (Id) = E_Variable);
4849 Set_Flag249 (Id, V);
4850 end Set_Is_Safe_To_Reevaluate;
4852 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4855 end Set_Is_Shared_Passive;
4857 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4861 or else Ekind_In (Id, E_Exception,
4866 end Set_Is_Statically_Allocated;
4868 procedure Set_Is_Tag (Id : E; V : B := True) is
4870 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4874 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4877 end Set_Is_Tagged_Type;
4879 procedure Set_Is_Thunk (Id : E; V : B := True) is
4881 Set_Flag225 (Id, V);
4884 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4886 Set_Flag235 (Id, V);
4887 end Set_Is_Trivial_Subprogram;
4889 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4891 Set_Flag163 (Id, V);
4892 end Set_Is_True_Constant;
4894 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4896 pragma Assert (Id = Base_Type (Id));
4897 Set_Flag117 (Id, V);
4898 end Set_Is_Unchecked_Union;
4900 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4902 pragma Assert (Ekind (Id) = E_Record_Type);
4903 Set_Flag246 (Id, V);
4904 end Set_Is_Underlying_Record_View;
4906 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4908 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4909 Set_Flag144 (Id, V);
4910 end Set_Is_Unsigned_Type;
4912 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4914 pragma Assert (Ekind (Id) = E_Procedure);
4915 Set_Flag127 (Id, V);
4916 end Set_Is_Valued_Procedure;
4918 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4920 Set_Flag206 (Id, V);
4921 end Set_Is_Visible_Formal;
4923 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4925 Set_Flag116 (Id, V);
4926 end Set_Is_Visible_Lib_Unit;
4928 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4930 pragma Assert (Ekind (Id) = E_Exception);
4931 Set_Flag133 (Id, V);
4932 end Set_Is_VMS_Exception;
4934 procedure Set_Is_Volatile (Id : E; V : B := True) is
4936 pragma Assert (Nkind (Id) in N_Entity);
4938 end Set_Is_Volatile;
4940 procedure Set_Itype_Printed (Id : E; V : B := True) is
4942 pragma Assert (Is_Itype (Id));
4943 Set_Flag202 (Id, V);
4944 end Set_Itype_Printed;
4946 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4949 end Set_Kill_Elaboration_Checks;
4951 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4954 end Set_Kill_Range_Checks;
4956 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4958 pragma Assert (Is_Type (Id));
4959 Set_Flag207 (Id, V);
4960 end Set_Known_To_Have_Preelab_Init;
4962 procedure Set_Last_Assignment (Id : E; V : N) is
4964 pragma Assert (Is_Assignable (Id));
4966 end Set_Last_Assignment;
4968 procedure Set_Last_Entity (Id : E; V : E) is
4971 end Set_Last_Entity;
4973 procedure Set_Limited_View (Id : E; V : E) is
4975 pragma Assert (Ekind (Id) = E_Package);
4977 end Set_Limited_View;
4979 procedure Set_Lit_Indexes (Id : E; V : E) is
4981 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4983 end Set_Lit_Indexes;
4985 procedure Set_Lit_Strings (Id : E; V : E) is
4987 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4989 end Set_Lit_Strings;
4991 procedure Set_Loop_Entry_Attributes (Id : E; V : L) is
4993 pragma Assert (Ekind (Id) = E_Loop);
4994 Set_Elist10 (Id, V);
4995 end Set_Loop_Entry_Attributes;
4997 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4999 pragma Assert (Is_Formal (Id));
5000 Set_Flag205 (Id, V);
5001 end Set_Low_Bound_Tested;
5003 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5005 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5007 end Set_Machine_Radix_10;
5009 procedure Set_Master_Id (Id : E; V : E) is
5011 pragma Assert (Is_Access_Type (Id));
5015 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5017 Set_Flag168 (Id, V);
5018 end Set_Materialize_Entity;
5020 procedure Set_Mechanism (Id : E; V : M) is
5022 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5023 Set_Uint8 (Id, UI_From_Int (V));
5026 procedure Set_Modulus (Id : E; V : U) is
5028 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5032 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5034 pragma Assert (Is_Type (Id));
5035 Set_Flag183 (Id, V);
5036 end Set_Must_Be_On_Byte_Boundary;
5038 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5040 pragma Assert (Is_Type (Id));
5041 Set_Flag208 (Id, V);
5042 end Set_Must_Have_Preelab_Init;
5044 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5046 Set_Flag147 (Id, V);
5047 end Set_Needs_Debug_Info;
5049 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5052 (Is_Overloadable (Id)
5053 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5055 end Set_Needs_No_Actuals;
5057 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5059 Set_Flag115 (Id, V);
5060 end Set_Never_Set_In_Source;
5062 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5065 end Set_Next_Inlined_Subprogram;
5067 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5069 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5070 Set_Flag131 (Id, V);
5071 end Set_No_Pool_Assigned;
5073 procedure Set_No_Return (Id : E; V : B := True) is
5076 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5077 Set_Flag113 (Id, V);
5080 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5082 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5083 Set_Flag136 (Id, V);
5084 end Set_No_Strict_Aliasing;
5086 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5088 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5090 end Set_Non_Binary_Modulus;
5092 procedure Set_Non_Limited_View (Id : E; V : E) is
5094 pragma Assert (Ekind (Id) in Incomplete_Kind);
5096 end Set_Non_Limited_View;
5098 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5101 (Root_Type (Id) = Standard_Boolean
5102 and then Ekind (Id) = E_Enumeration_Type);
5103 Set_Flag162 (Id, V);
5104 end Set_Nonzero_Is_True;
5106 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5108 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5110 end Set_Normalized_First_Bit;
5112 procedure Set_Normalized_Position (Id : E; V : U) is
5114 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5116 end Set_Normalized_Position;
5118 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5120 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5122 end Set_Normalized_Position_Max;
5124 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5126 pragma Assert (Ekind (Id) = E_Variable);
5127 Set_Flag247 (Id, V);
5128 end Set_OK_To_Rename;
5130 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5133 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5134 Set_Flag239 (Id, V);
5135 end Set_OK_To_Reorder_Components;
5137 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5140 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5141 Set_Flag241 (Id, V);
5142 end Set_Optimize_Alignment_Space;
5144 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5147 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5148 Set_Flag242 (Id, V);
5149 end Set_Optimize_Alignment_Time;
5151 procedure Set_Original_Access_Type (Id : E; V : E) is
5153 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5155 end Set_Original_Access_Type;
5157 procedure Set_Original_Array_Type (Id : E; V : E) is
5159 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5161 end Set_Original_Array_Type;
5163 procedure Set_Original_Record_Component (Id : E; V : E) is
5165 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5167 end Set_Original_Record_Component;
5169 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5171 Set_Flag243 (Id, V);
5172 end Set_Overlays_Constant;
5174 procedure Set_Overridden_Operation (Id : E; V : E) is
5177 end Set_Overridden_Operation;
5179 procedure Set_Package_Instantiation (Id : E; V : N) is
5181 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5183 end Set_Package_Instantiation;
5185 procedure Set_Packed_Array_Type (Id : E; V : E) is
5187 pragma Assert (Is_Array_Type (Id));
5189 end Set_Packed_Array_Type;
5191 procedure Set_Parent_Subtype (Id : E; V : E) is
5193 pragma Assert (Ekind (Id) = E_Record_Type);
5195 end Set_Parent_Subtype;
5197 procedure Set_Postcondition_Proc (Id : E; V : E) is
5199 pragma Assert (Ekind (Id) = E_Procedure);
5201 end Set_Postcondition_Proc;
5203 procedure Set_PPC_Wrapper (Id : E; V : E) is
5205 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5207 end Set_PPC_Wrapper;
5209 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5211 pragma Assert (Is_Tagged_Type (Id));
5212 Set_Elist10 (Id, V);
5213 end Set_Direct_Primitive_Operations;
5215 procedure Set_Prival (Id : E; V : E) is
5217 pragma Assert (Is_Protected_Component (Id));
5221 procedure Set_Prival_Link (Id : E; V : E) is
5223 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5225 end Set_Prival_Link;
5227 procedure Set_Private_Dependents (Id : E; V : L) is
5229 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5230 Set_Elist18 (Id, V);
5231 end Set_Private_Dependents;
5233 procedure Set_Private_View (Id : E; V : N) is
5235 pragma Assert (Is_Private_Type (Id));
5237 end Set_Private_View;
5239 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5241 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5243 end Set_Protected_Body_Subprogram;
5245 procedure Set_Protected_Formal (Id : E; V : E) is
5247 pragma Assert (Is_Formal (Id));
5249 end Set_Protected_Formal;
5251 procedure Set_Protection_Object (Id : E; V : E) is
5253 pragma Assert (Ekind_In (Id, E_Entry,
5258 end Set_Protection_Object;
5260 procedure Set_Reachable (Id : E; V : B := True) is
5265 procedure Set_Referenced (Id : E; V : B := True) is
5267 Set_Flag156 (Id, V);
5270 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5273 end Set_Referenced_As_LHS;
5275 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5277 Set_Flag227 (Id, V);
5278 end Set_Referenced_As_Out_Parameter;
5280 procedure Set_Refined_State (Id : E; V : E) is
5282 pragma Assert (Ekind (Id) = E_Abstract_State);
5284 end Set_Refined_State;
5286 procedure Set_Register_Exception_Call (Id : E; V : N) is
5288 pragma Assert (Ekind (Id) = E_Exception);
5290 end Set_Register_Exception_Call;
5292 procedure Set_Related_Array_Object (Id : E; V : E) is
5294 pragma Assert (Is_Array_Type (Id));
5296 end Set_Related_Array_Object;
5298 procedure Set_Related_Expression (Id : E; V : N) is
5300 pragma Assert (Ekind (Id) in Type_Kind
5301 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5303 end Set_Related_Expression;
5305 procedure Set_Related_Instance (Id : E; V : E) is
5307 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5309 end Set_Related_Instance;
5311 procedure Set_Related_Type (Id : E; V : E) is
5313 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5315 end Set_Related_Type;
5317 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5319 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5321 end Set_Relative_Deadline_Variable;
5323 procedure Set_Renamed_Entity (Id : E; V : N) is
5326 end Set_Renamed_Entity;
5328 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5330 pragma Assert (Ekind (Id) = E_Package);
5331 Set_Flag231 (Id, V);
5332 end Set_Renamed_In_Spec;
5334 procedure Set_Renamed_Object (Id : E; V : N) is
5337 end Set_Renamed_Object;
5339 procedure Set_Renaming_Map (Id : E; V : U) is
5342 end Set_Renaming_Map;
5344 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5346 pragma Assert (Is_Overloadable (Id));
5347 Set_Flag213 (Id, V);
5348 end Set_Requires_Overriding;
5350 procedure Set_Return_Present (Id : E; V : B := True) is
5353 end Set_Return_Present;
5355 procedure Set_Return_Applies_To (Id : E; V : N) is
5358 end Set_Return_Applies_To;
5360 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5363 end Set_Returns_By_Ref;
5365 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5368 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5369 Set_Flag164 (Id, V);
5370 end Set_Reverse_Bit_Order;
5372 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5376 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5378 end Set_Reverse_Storage_Order;
5380 procedure Set_RM_Size (Id : E; V : U) is
5382 pragma Assert (Is_Type (Id));
5386 procedure Set_Scalar_Range (Id : E; V : N) is
5389 end Set_Scalar_Range;
5391 procedure Set_Scale_Value (Id : E; V : U) is
5394 end Set_Scale_Value;
5396 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5398 pragma Assert (not Is_Record_Type (Id));
5400 end Set_Scope_Depth_Value;
5402 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5404 Set_Flag167 (Id, V);
5405 end Set_Sec_Stack_Needed_For_Return;
5407 procedure Set_Shadow_Entities (Id : E; V : S) is
5409 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5411 end Set_Shadow_Entities;
5413 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5415 pragma Assert (Ekind (Id) = E_Variable);
5417 end Set_Shared_Var_Procs_Instance;
5419 procedure Set_Size_Check_Code (Id : E; V : N) is
5421 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5423 end Set_Size_Check_Code;
5425 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5427 Set_Flag177 (Id, V);
5428 end Set_Size_Depends_On_Discriminant;
5430 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5433 end Set_Size_Known_At_Compile_Time;
5435 procedure Set_Small_Value (Id : E; V : R) is
5437 pragma Assert (Is_Fixed_Point_Type (Id));
5438 Set_Ureal21 (Id, V);
5439 end Set_Small_Value;
5441 procedure Set_Spec_Entity (Id : E; V : E) is
5443 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5445 end Set_Spec_Entity;
5447 procedure Set_Static_Predicate (Id : E; V : S) is
5450 (Ekind_In (Id, E_Enumeration_Subtype,
5451 E_Modular_Integer_Subtype,
5452 E_Signed_Integer_Subtype)
5453 and then Has_Predicates (Id));
5455 end Set_Static_Predicate;
5457 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5459 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5461 end Set_Status_Flag_Or_Transient_Decl;
5463 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5465 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5466 pragma Assert (Id = Base_Type (Id));
5468 end Set_Storage_Size_Variable;
5470 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5472 pragma Assert (Ekind (Id) = E_Package);
5474 end Set_Static_Elaboration_Desired;
5476 procedure Set_Static_Initialization (Id : E; V : N) is
5479 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5481 end Set_Static_Initialization;
5483 procedure Set_Stored_Constraint (Id : E; V : L) is
5485 pragma Assert (Nkind (Id) in N_Entity);
5486 Set_Elist23 (Id, V);
5487 end Set_Stored_Constraint;
5489 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5491 pragma Assert (Id = Base_Type (Id));
5492 Set_Flag145 (Id, V);
5493 end Set_Strict_Alignment;
5495 procedure Set_String_Literal_Length (Id : E; V : U) is
5497 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5499 end Set_String_Literal_Length;
5501 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5503 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5505 end Set_String_Literal_Low_Bound;
5507 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5509 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5511 end Set_Subprograms_For_Type;
5513 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5515 Set_Flag148 (Id, V);
5516 end Set_Suppress_Elaboration_Warnings;
5518 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5520 pragma Assert (Is_Type (Id));
5521 Set_Flag105 (Id, V);
5522 end Set_Suppress_Initialization;
5524 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5526 Set_Flag165 (Id, V);
5527 end Set_Suppress_Style_Checks;
5529 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5531 Set_Flag217 (Id, V);
5532 end Set_Suppress_Value_Tracking_On_Call;
5534 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5536 pragma Assert (Ekind (Id) in Task_Kind);
5538 end Set_Task_Body_Procedure;
5540 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5543 end Set_Treat_As_Volatile;
5545 procedure Set_Underlying_Full_View (Id : E; V : E) is
5547 pragma Assert (Ekind (Id) in Private_Kind);
5549 end Set_Underlying_Full_View;
5551 procedure Set_Underlying_Record_View (Id : E; V : E) is
5553 pragma Assert (Ekind (Id) = E_Record_Type);
5555 end Set_Underlying_Record_View;
5557 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5559 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5560 Set_Flag216 (Id, V);
5561 end Set_Universal_Aliasing;
5563 procedure Set_Unset_Reference (Id : E; V : N) is
5566 end Set_Unset_Reference;
5568 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5570 Set_Flag222 (Id, V);
5571 end Set_Used_As_Generic_Actual;
5573 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5575 pragma Assert (Ekind (Id) = E_Protected_Type);
5576 Set_Flag188 (Id, V);
5577 end Set_Uses_Lock_Free;
5579 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5582 end Set_Uses_Sec_Stack;
5584 procedure Set_Warnings_Off (Id : E; V : B := True) is
5587 end Set_Warnings_Off;
5589 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5591 Set_Flag236 (Id, V);
5592 end Set_Warnings_Off_Used;
5594 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5596 Set_Flag237 (Id, V);
5597 end Set_Warnings_Off_Used_Unmodified;
5599 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5601 Set_Flag238 (Id, V);
5602 end Set_Warnings_Off_Used_Unreferenced;
5604 procedure Set_Was_Hidden (Id : E; V : B := True) is
5606 Set_Flag196 (Id, V);
5609 procedure Set_Wrapped_Entity (Id : E; V : E) is
5611 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5612 and then Is_Primitive_Wrapper (Id));
5614 end Set_Wrapped_Entity;
5616 -----------------------------------
5617 -- Field Initialization Routines --
5618 -----------------------------------
5620 procedure Init_Alignment (Id : E) is
5622 Set_Uint14 (Id, Uint_0);
5625 procedure Init_Alignment (Id : E; V : Int) is
5627 Set_Uint14 (Id, UI_From_Int (V));
5630 procedure Init_Component_Bit_Offset (Id : E) is
5632 Set_Uint11 (Id, No_Uint);
5633 end Init_Component_Bit_Offset;
5635 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5637 Set_Uint11 (Id, UI_From_Int (V));
5638 end Init_Component_Bit_Offset;
5640 procedure Init_Component_Size (Id : E) is
5642 Set_Uint22 (Id, Uint_0);
5643 end Init_Component_Size;
5645 procedure Init_Component_Size (Id : E; V : Int) is
5647 Set_Uint22 (Id, UI_From_Int (V));
5648 end Init_Component_Size;
5650 procedure Init_Digits_Value (Id : E) is
5652 Set_Uint17 (Id, Uint_0);
5653 end Init_Digits_Value;
5655 procedure Init_Digits_Value (Id : E; V : Int) is
5657 Set_Uint17 (Id, UI_From_Int (V));
5658 end Init_Digits_Value;
5660 procedure Init_Esize (Id : E) is
5662 Set_Uint12 (Id, Uint_0);
5665 procedure Init_Esize (Id : E; V : Int) is
5667 Set_Uint12 (Id, UI_From_Int (V));
5670 procedure Init_Normalized_First_Bit (Id : E) is
5672 Set_Uint8 (Id, No_Uint);
5673 end Init_Normalized_First_Bit;
5675 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5677 Set_Uint8 (Id, UI_From_Int (V));
5678 end Init_Normalized_First_Bit;
5680 procedure Init_Normalized_Position (Id : E) is
5682 Set_Uint14 (Id, No_Uint);
5683 end Init_Normalized_Position;
5685 procedure Init_Normalized_Position (Id : E; V : Int) is
5687 Set_Uint14 (Id, UI_From_Int (V));
5688 end Init_Normalized_Position;
5690 procedure Init_Normalized_Position_Max (Id : E) is
5692 Set_Uint10 (Id, No_Uint);
5693 end Init_Normalized_Position_Max;
5695 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5697 Set_Uint10 (Id, UI_From_Int (V));
5698 end Init_Normalized_Position_Max;
5700 procedure Init_RM_Size (Id : E) is
5702 Set_Uint13 (Id, Uint_0);
5705 procedure Init_RM_Size (Id : E; V : Int) is
5707 Set_Uint13 (Id, UI_From_Int (V));
5710 -----------------------------
5711 -- Init_Component_Location --
5712 -----------------------------
5714 procedure Init_Component_Location (Id : E) is
5716 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5717 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5718 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5719 Set_Uint12 (Id, Uint_0); -- Esize
5720 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5721 end Init_Component_Location;
5723 ----------------------------
5724 -- Init_Object_Size_Align --
5725 ----------------------------
5727 procedure Init_Object_Size_Align (Id : E) is
5729 Set_Uint12 (Id, Uint_0); -- Esize
5730 Set_Uint14 (Id, Uint_0); -- Alignment
5731 end Init_Object_Size_Align;
5737 procedure Init_Size (Id : E; V : Int) is
5739 pragma Assert (not Is_Object (Id));
5740 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5741 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5744 ---------------------
5745 -- Init_Size_Align --
5746 ---------------------
5748 procedure Init_Size_Align (Id : E) is
5750 pragma Assert (not Is_Object (Id));
5751 Set_Uint12 (Id, Uint_0); -- Esize
5752 Set_Uint13 (Id, Uint_0); -- RM_Size
5753 Set_Uint14 (Id, Uint_0); -- Alignment
5754 end Init_Size_Align;
5756 ----------------------------------------------
5757 -- Type Representation Attribute Predicates --
5758 ----------------------------------------------
5760 function Known_Alignment (E : Entity_Id) return B is
5762 return Uint14 (E) /= Uint_0
5763 and then Uint14 (E) /= No_Uint;
5764 end Known_Alignment;
5766 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5768 return Uint11 (E) /= No_Uint;
5769 end Known_Component_Bit_Offset;
5771 function Known_Component_Size (E : Entity_Id) return B is
5773 return Uint22 (Base_Type (E)) /= Uint_0
5774 and then Uint22 (Base_Type (E)) /= No_Uint;
5775 end Known_Component_Size;
5777 function Known_Esize (E : Entity_Id) return B is
5779 return Uint12 (E) /= Uint_0
5780 and then Uint12 (E) /= No_Uint;
5783 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5785 return Uint8 (E) /= No_Uint;
5786 end Known_Normalized_First_Bit;
5788 function Known_Normalized_Position (E : Entity_Id) return B is
5790 return Uint14 (E) /= No_Uint;
5791 end Known_Normalized_Position;
5793 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5795 return Uint10 (E) /= No_Uint;
5796 end Known_Normalized_Position_Max;
5798 function Known_RM_Size (E : Entity_Id) return B is
5800 return Uint13 (E) /= No_Uint
5801 and then (Uint13 (E) /= Uint_0
5802 or else Is_Discrete_Type (E)
5803 or else Is_Fixed_Point_Type (E));
5806 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5808 return Uint11 (E) /= No_Uint
5809 and then Uint11 (E) >= Uint_0;
5810 end Known_Static_Component_Bit_Offset;
5812 function Known_Static_Component_Size (E : Entity_Id) return B is
5814 return Uint22 (Base_Type (E)) > Uint_0;
5815 end Known_Static_Component_Size;
5817 function Known_Static_Esize (E : Entity_Id) return B is
5819 return Uint12 (E) > Uint_0
5820 and then not Is_Generic_Type (E);
5821 end Known_Static_Esize;
5823 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5825 return Uint8 (E) /= No_Uint
5826 and then Uint8 (E) >= Uint_0;
5827 end Known_Static_Normalized_First_Bit;
5829 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5831 return Uint14 (E) /= No_Uint
5832 and then Uint14 (E) >= Uint_0;
5833 end Known_Static_Normalized_Position;
5835 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5837 return Uint10 (E) /= No_Uint
5838 and then Uint10 (E) >= Uint_0;
5839 end Known_Static_Normalized_Position_Max;
5841 function Known_Static_RM_Size (E : Entity_Id) return B is
5843 return (Uint13 (E) > Uint_0
5844 or else Is_Discrete_Type (E)
5845 or else Is_Fixed_Point_Type (E))
5846 and then not Is_Generic_Type (E);
5847 end Known_Static_RM_Size;
5849 function Unknown_Alignment (E : Entity_Id) return B is
5851 return Uint14 (E) = Uint_0
5852 or else Uint14 (E) = No_Uint;
5853 end Unknown_Alignment;
5855 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5857 return Uint11 (E) = No_Uint;
5858 end Unknown_Component_Bit_Offset;
5860 function Unknown_Component_Size (E : Entity_Id) return B is
5862 return Uint22 (Base_Type (E)) = Uint_0
5864 Uint22 (Base_Type (E)) = No_Uint;
5865 end Unknown_Component_Size;
5867 function Unknown_Esize (E : Entity_Id) return B is
5869 return Uint12 (E) = No_Uint
5871 Uint12 (E) = Uint_0;
5874 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5876 return Uint8 (E) = No_Uint;
5877 end Unknown_Normalized_First_Bit;
5879 function Unknown_Normalized_Position (E : Entity_Id) return B is
5881 return Uint14 (E) = No_Uint;
5882 end Unknown_Normalized_Position;
5884 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5886 return Uint10 (E) = No_Uint;
5887 end Unknown_Normalized_Position_Max;
5889 function Unknown_RM_Size (E : Entity_Id) return B is
5891 return (Uint13 (E) = Uint_0
5892 and then not Is_Discrete_Type (E)
5893 and then not Is_Fixed_Point_Type (E))
5894 or else Uint13 (E) = No_Uint;
5895 end Unknown_RM_Size;
5897 --------------------
5898 -- Address_Clause --
5899 --------------------
5901 function Address_Clause (Id : E) return N is
5903 return Rep_Clause (Id, Name_Address);
5910 function Aft_Value (Id : E) return U is
5912 Delta_Val : Ureal := Delta_Value (Id);
5914 while Delta_Val < Ureal_Tenth loop
5915 Delta_Val := Delta_Val * Ureal_10;
5916 Result := Result + 1;
5919 return UI_From_Int (Result);
5922 ----------------------
5923 -- Alignment_Clause --
5924 ----------------------
5926 function Alignment_Clause (Id : E) return N is
5928 return Rep_Clause (Id, Name_Alignment);
5929 end Alignment_Clause;
5935 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5937 if Last_Entity (V) = Empty then
5938 Set_First_Entity (Id => V, V => Id);
5940 Set_Next_Entity (Last_Entity (V), Id);
5943 Set_Next_Entity (Id, Empty);
5945 Set_Last_Entity (Id => V, V => Id);
5952 function Base_Type (Id : E) return E is
5954 if Is_Base_Type (Id) then
5957 pragma Assert (Is_Type (Id));
5962 -------------------------
5963 -- Component_Alignment --
5964 -------------------------
5966 -- Component Alignment is encoded using two flags, Flag128/129 as
5967 -- follows. Note that both flags False = Align_Default, so that the
5968 -- default initialization of flags to False initializes component
5969 -- alignment to the default value as required.
5971 -- Flag128 Flag129 Value
5972 -- ------- ------- -----
5973 -- False False Calign_Default
5974 -- False True Calign_Component_Size
5975 -- True False Calign_Component_Size_4
5976 -- True True Calign_Storage_Unit
5978 function Component_Alignment (Id : E) return C is
5979 BT : constant Node_Id := Base_Type (Id);
5982 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5984 if Flag128 (BT) then
5985 if Flag129 (BT) then
5986 return Calign_Storage_Unit;
5988 return Calign_Component_Size_4;
5992 if Flag129 (BT) then
5993 return Calign_Component_Size;
5995 return Calign_Default;
5998 end Component_Alignment;
6000 ----------------------
6001 -- Declaration_Node --
6002 ----------------------
6004 function Declaration_Node (Id : E) return N is
6008 if Ekind (Id) = E_Incomplete_Type
6009 and then Present (Full_View (Id))
6011 P := Parent (Full_View (Id));
6017 if Nkind (P) /= N_Selected_Component
6018 and then Nkind (P) /= N_Expanded_Name
6020 not (Nkind (P) = N_Defining_Program_Unit_Name
6021 and then Is_Child_Unit (Id))
6028 end Declaration_Node;
6030 ---------------------
6031 -- Designated_Type --
6032 ---------------------
6034 function Designated_Type (Id : E) return E is
6038 Desig_Type := Directly_Designated_Type (Id);
6040 if Ekind (Desig_Type) = E_Incomplete_Type
6041 and then Present (Full_View (Desig_Type))
6043 return Full_View (Desig_Type);
6045 elsif Is_Class_Wide_Type (Desig_Type)
6046 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6047 and then Present (Full_View (Etype (Desig_Type)))
6048 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6050 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6055 end Designated_Type;
6057 ----------------------
6058 -- Entry_Index_Type --
6059 ----------------------
6061 function Entry_Index_Type (Id : E) return N is
6063 pragma Assert (Ekind (Id) = E_Entry_Family);
6064 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6065 end Entry_Index_Type;
6067 ---------------------
6068 -- First_Component --
6069 ---------------------
6071 function First_Component (Id : E) return E is
6076 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6078 Comp_Id := First_Entity (Id);
6079 while Present (Comp_Id) loop
6080 exit when Ekind (Comp_Id) = E_Component;
6081 Comp_Id := Next_Entity (Comp_Id);
6085 end First_Component;
6087 -------------------------------------
6088 -- First_Component_Or_Discriminant --
6089 -------------------------------------
6091 function First_Component_Or_Discriminant (Id : E) return E is
6096 (Is_Record_Type (Id)
6097 or else Is_Incomplete_Or_Private_Type (Id)
6098 or else Has_Discriminants (Id));
6100 Comp_Id := First_Entity (Id);
6101 while Present (Comp_Id) loop
6102 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6103 Comp_Id := Next_Entity (Comp_Id);
6107 end First_Component_Or_Discriminant;
6113 function First_Formal (Id : E) return E is
6118 (Is_Overloadable (Id)
6119 or else Ekind_In (Id, E_Entry_Family,
6121 E_Subprogram_Type));
6123 if Ekind (Id) = E_Enumeration_Literal then
6127 Formal := First_Entity (Id);
6129 if Present (Formal) and then Is_Formal (Formal) then
6137 ------------------------------
6138 -- First_Formal_With_Extras --
6139 ------------------------------
6141 function First_Formal_With_Extras (Id : E) return E is
6146 (Is_Overloadable (Id)
6147 or else Ekind_In (Id, E_Entry_Family,
6149 E_Subprogram_Type));
6151 if Ekind (Id) = E_Enumeration_Literal then
6155 Formal := First_Entity (Id);
6157 if Present (Formal) and then Is_Formal (Formal) then
6160 return Extra_Formals (Id); -- Empty if no extra formals
6163 end First_Formal_With_Extras;
6165 -------------------------------------
6166 -- Get_Attribute_Definition_Clause --
6167 -------------------------------------
6169 function Get_Attribute_Definition_Clause
6171 Id : Attribute_Id) return Node_Id
6176 N := First_Rep_Item (E);
6177 while Present (N) loop
6178 if Nkind (N) = N_Attribute_Definition_Clause
6179 and then Get_Attribute_Id (Chars (N)) = Id
6188 end Get_Attribute_Definition_Clause;
6194 function Get_Full_View (T : Entity_Id) return Entity_Id is
6196 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6197 return Full_View (T);
6199 elsif Is_Class_Wide_Type (T)
6200 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6201 and then Present (Full_View (Root_Type (T)))
6203 return Class_Wide_Type (Full_View (Root_Type (T)));
6210 --------------------------------------
6211 -- Get_Record_Representation_Clause --
6212 --------------------------------------
6214 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6218 N := First_Rep_Item (E);
6219 while Present (N) loop
6220 if Nkind (N) = N_Record_Representation_Clause then
6228 end Get_Record_Representation_Clause;
6230 ------------------------
6231 -- Has_Attach_Handler --
6232 ------------------------
6234 function Has_Attach_Handler (Id : E) return B is
6238 pragma Assert (Is_Protected_Type (Id));
6240 Ritem := First_Rep_Item (Id);
6241 while Present (Ritem) loop
6242 if Nkind (Ritem) = N_Pragma
6243 and then Pragma_Name (Ritem) = Name_Attach_Handler
6247 Next_Rep_Item (Ritem);
6252 end Has_Attach_Handler;
6258 function Has_Entries (Id : E) return B is
6262 pragma Assert (Is_Concurrent_Type (Id));
6264 Ent := First_Entity (Id);
6265 while Present (Ent) loop
6266 if Is_Entry (Ent) then
6270 Ent := Next_Entity (Ent);
6276 ----------------------------
6277 -- Has_Foreign_Convention --
6278 ----------------------------
6280 function Has_Foreign_Convention (Id : E) return B is
6282 -- While regular Intrinsics such as the Standard operators fit in the
6283 -- "Ada" convention, those with an Interface_Name materialize GCC
6284 -- builtin imports for which Ada special treatments shouldn't apply.
6286 return Convention (Id) in Foreign_Convention
6287 or else (Convention (Id) = Convention_Intrinsic
6288 and then Present (Interface_Name (Id)));
6289 end Has_Foreign_Convention;
6291 ---------------------------
6292 -- Has_Interrupt_Handler --
6293 ---------------------------
6295 function Has_Interrupt_Handler (Id : E) return B is
6299 pragma Assert (Is_Protected_Type (Id));
6301 Ritem := First_Rep_Item (Id);
6302 while Present (Ritem) loop
6303 if Nkind (Ritem) = N_Pragma
6304 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6308 Next_Rep_Item (Ritem);
6313 end Has_Interrupt_Handler;
6315 --------------------
6316 -- Has_Unmodified --
6317 --------------------
6319 function Has_Unmodified (E : Entity_Id) return Boolean is
6321 if Has_Pragma_Unmodified (E) then
6323 elsif Warnings_Off (E) then
6324 Set_Warnings_Off_Used_Unmodified (E);
6331 ---------------------
6332 -- Has_Unreferenced --
6333 ---------------------
6335 function Has_Unreferenced (E : Entity_Id) return Boolean is
6337 if Has_Pragma_Unreferenced (E) then
6339 elsif Warnings_Off (E) then
6340 Set_Warnings_Off_Used_Unreferenced (E);
6345 end Has_Unreferenced;
6347 ----------------------
6348 -- Has_Warnings_Off --
6349 ----------------------
6351 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6353 if Warnings_Off (E) then
6354 Set_Warnings_Off_Used (E);
6359 end Has_Warnings_Off;
6361 ------------------------------
6362 -- Implementation_Base_Type --
6363 ------------------------------
6365 function Implementation_Base_Type (Id : E) return E is
6370 Bastyp := Base_Type (Id);
6372 if Is_Incomplete_Or_Private_Type (Bastyp) then
6373 Imptyp := Underlying_Type (Bastyp);
6375 -- If we have an implementation type, then just return it,
6376 -- otherwise we return the Base_Type anyway. This can only
6377 -- happen in error situations and should avoid some error bombs.
6379 if Present (Imptyp) then
6380 return Base_Type (Imptyp);
6388 end Implementation_Base_Type;
6390 -------------------------
6391 -- Invariant_Procedure --
6392 -------------------------
6394 function Invariant_Procedure (Id : E) return E is
6398 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6400 if No (Subprograms_For_Type (Id)) then
6404 S := Subprograms_For_Type (Id);
6405 while Present (S) loop
6406 if Has_Invariants (S) then
6409 S := Subprograms_For_Type (S);
6415 end Invariant_Procedure;
6421 -- Global flag table allowing rapid computation of this function
6423 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6424 (E_Enumeration_Subtype |
6426 E_Signed_Integer_Subtype |
6427 E_Modular_Integer_Subtype |
6428 E_Floating_Point_Subtype |
6429 E_Ordinary_Fixed_Point_Subtype |
6430 E_Decimal_Fixed_Point_Subtype |
6435 E_Record_Subtype_With_Private |
6436 E_Limited_Private_Subtype |
6438 E_Protected_Subtype |
6440 E_String_Literal_Subtype |
6441 E_Class_Wide_Subtype => False,
6444 function Is_Base_Type (Id : E) return Boolean is
6446 return Entity_Is_Base_Type (Ekind (Id));
6449 ---------------------
6450 -- Is_Boolean_Type --
6451 ---------------------
6453 function Is_Boolean_Type (Id : E) return B is
6455 return Root_Type (Id) = Standard_Boolean;
6456 end Is_Boolean_Type;
6458 ------------------------
6459 -- Is_Constant_Object --
6460 ------------------------
6462 function Is_Constant_Object (Id : E) return B is
6463 K : constant Entity_Kind := Ekind (Id);
6466 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6467 end Is_Constant_Object;
6469 --------------------
6470 -- Is_Discriminal --
6471 --------------------
6473 function Is_Discriminal (Id : E) return B is
6475 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6476 and then Present (Discriminal_Link (Id)));
6479 ----------------------
6480 -- Is_Dynamic_Scope --
6481 ----------------------
6483 function Is_Dynamic_Scope (Id : E) return B is
6486 Ekind (Id) = E_Block
6488 Ekind (Id) = E_Function
6490 Ekind (Id) = E_Procedure
6492 Ekind (Id) = E_Subprogram_Body
6494 Ekind (Id) = E_Task_Type
6496 (Ekind (Id) = E_Limited_Private_Type
6497 and then Present (Full_View (Id))
6498 and then Ekind (Full_View (Id)) = E_Task_Type)
6500 Ekind (Id) = E_Entry
6502 Ekind (Id) = E_Entry_Family
6504 Ekind (Id) = E_Return_Statement;
6505 end Is_Dynamic_Scope;
6507 --------------------
6508 -- Is_Entity_Name --
6509 --------------------
6511 function Is_Entity_Name (N : Node_Id) return Boolean is
6512 Kind : constant Node_Kind := Nkind (N);
6515 -- Identifiers, operator symbols, expanded names are entity names
6517 return Kind = N_Identifier
6518 or else Kind = N_Operator_Symbol
6519 or else Kind = N_Expanded_Name
6521 -- Attribute references are entity names if they refer to an entity.
6522 -- Note that we don't do this by testing for the presence of the
6523 -- Entity field in the N_Attribute_Reference node, since it may not
6524 -- have been set yet.
6526 or else (Kind = N_Attribute_Reference
6527 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6534 function Is_Finalizer (Id : E) return B is
6536 return Ekind (Id) = E_Procedure
6537 and then Chars (Id) = Name_uFinalizer;
6540 --------------------
6541 -- Is_Input_State --
6542 --------------------
6544 function Is_Input_State (Id : E) return B is
6547 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Input);
6554 function Is_Null_State (Id : E) return B is
6557 Ekind (Id) = E_Abstract_State
6558 and then Nkind (Parent (Id)) = N_Null;
6561 ---------------------
6562 -- Is_Output_State --
6563 ---------------------
6565 function Is_Output_State (Id : E) return B is
6568 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Output);
6569 end Is_Output_State;
6571 -----------------------------------
6572 -- Is_Package_Or_Generic_Package --
6573 -----------------------------------
6575 function Is_Package_Or_Generic_Package (Id : E) return B is
6578 Ekind (Id) = E_Package
6580 Ekind (Id) = E_Generic_Package;
6581 end Is_Package_Or_Generic_Package;
6587 function Is_Prival (Id : E) return B is
6589 return (Ekind_In (Id, E_Constant, E_Variable)
6590 and then Present (Prival_Link (Id)));
6593 ----------------------------
6594 -- Is_Protected_Component --
6595 ----------------------------
6597 function Is_Protected_Component (Id : E) return B is
6599 return Ekind (Id) = E_Component
6600 and then Is_Protected_Type (Scope (Id));
6601 end Is_Protected_Component;
6603 ----------------------------
6604 -- Is_Protected_Interface --
6605 ----------------------------
6607 function Is_Protected_Interface (Id : E) return B is
6608 Typ : constant Entity_Id := Base_Type (Id);
6610 if not Is_Interface (Typ) then
6612 elsif Is_Class_Wide_Type (Typ) then
6613 return Is_Protected_Interface (Etype (Typ));
6615 return Protected_Present (Type_Definition (Parent (Typ)));
6617 end Is_Protected_Interface;
6619 ------------------------------
6620 -- Is_Protected_Record_Type --
6621 ------------------------------
6623 function Is_Protected_Record_Type (Id : E) return B is
6626 Is_Concurrent_Record_Type (Id)
6627 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6628 end Is_Protected_Record_Type;
6630 --------------------------------
6631 -- Is_Standard_Character_Type --
6632 --------------------------------
6634 function Is_Standard_Character_Type (Id : E) return B is
6636 if Is_Type (Id) then
6638 R : constant Entity_Id := Root_Type (Id);
6641 R = Standard_Character
6643 R = Standard_Wide_Character
6645 R = Standard_Wide_Wide_Character;
6651 end Is_Standard_Character_Type;
6653 --------------------
6654 -- Is_String_Type --
6655 --------------------
6657 function Is_String_Type (Id : E) return B is
6659 return Ekind (Id) in String_Kind
6660 or else (Is_Array_Type (Id)
6661 and then Id /= Any_Composite
6662 and then Number_Dimensions (Id) = 1
6663 and then Is_Character_Type (Component_Type (Id)));
6666 -------------------------------
6667 -- Is_Synchronized_Interface --
6668 -------------------------------
6670 function Is_Synchronized_Interface (Id : E) return B is
6671 Typ : constant Entity_Id := Base_Type (Id);
6674 if not Is_Interface (Typ) then
6677 elsif Is_Class_Wide_Type (Typ) then
6678 return Is_Synchronized_Interface (Etype (Typ));
6681 return Protected_Present (Type_Definition (Parent (Typ)))
6682 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6683 or else Task_Present (Type_Definition (Parent (Typ)));
6685 end Is_Synchronized_Interface;
6687 -----------------------
6688 -- Is_Task_Interface --
6689 -----------------------
6691 function Is_Task_Interface (Id : E) return B is
6692 Typ : constant Entity_Id := Base_Type (Id);
6694 if not Is_Interface (Typ) then
6696 elsif Is_Class_Wide_Type (Typ) then
6697 return Is_Task_Interface (Etype (Typ));
6699 return Task_Present (Type_Definition (Parent (Typ)));
6701 end Is_Task_Interface;
6703 -------------------------
6704 -- Is_Task_Record_Type --
6705 -------------------------
6707 function Is_Task_Record_Type (Id : E) return B is
6710 Is_Concurrent_Record_Type (Id)
6711 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6712 end Is_Task_Record_Type;
6714 -----------------------
6715 -- Is_Volatile_State --
6716 -----------------------
6718 function Is_Volatile_State (Id : E) return B is
6721 Ekind (Id) = E_Abstract_State
6722 and then Has_Property (Id, Name_Volatile);
6723 end Is_Volatile_State;
6725 ------------------------
6726 -- Is_Wrapper_Package --
6727 ------------------------
6729 function Is_Wrapper_Package (Id : E) return B is
6731 return (Ekind (Id) = E_Package
6732 and then Present (Related_Instance (Id)));
6733 end Is_Wrapper_Package;
6739 function Last_Formal (Id : E) return E is
6744 (Is_Overloadable (Id)
6745 or else Ekind_In (Id, E_Entry_Family,
6747 E_Subprogram_Type));
6749 if Ekind (Id) = E_Enumeration_Literal then
6753 Formal := First_Formal (Id);
6755 if Present (Formal) then
6756 while Present (Next_Formal (Formal)) loop
6757 Formal := Next_Formal (Formal);
6765 function Model_Emin_Value (Id : E) return Uint is
6767 return Machine_Emin_Value (Id);
6768 end Model_Emin_Value;
6770 -------------------------
6771 -- Model_Epsilon_Value --
6772 -------------------------
6774 function Model_Epsilon_Value (Id : E) return Ureal is
6775 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6777 return Radix ** (1 - Model_Mantissa_Value (Id));
6778 end Model_Epsilon_Value;
6780 --------------------------
6781 -- Model_Mantissa_Value --
6782 --------------------------
6784 function Model_Mantissa_Value (Id : E) return Uint is
6786 return Machine_Mantissa_Value (Id);
6787 end Model_Mantissa_Value;
6789 -----------------------
6790 -- Model_Small_Value --
6791 -----------------------
6793 function Model_Small_Value (Id : E) return Ureal is
6794 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6796 return Radix ** (Model_Emin_Value (Id) - 1);
6797 end Model_Small_Value;
6799 ------------------------
6800 -- Machine_Emax_Value --
6801 ------------------------
6803 function Machine_Emax_Value (Id : E) return Uint is
6804 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6807 case Float_Rep (Id) is
6810 when 1 .. 6 => return Uint_128;
6811 when 7 .. 15 => return 2**10;
6812 when 16 .. 33 => return 2**14;
6813 when others => return No_Uint;
6818 when 1 .. 9 => return 2**7 - 1;
6819 when 10 .. 15 => return 2**10 - 1;
6820 when others => return No_Uint;
6824 return Uint_2 ** Uint_7 - Uint_1;
6826 end Machine_Emax_Value;
6828 ------------------------
6829 -- Machine_Emin_Value --
6830 ------------------------
6832 function Machine_Emin_Value (Id : E) return Uint is
6834 case Float_Rep (Id) is
6835 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6836 when VAX_Native => return -Machine_Emax_Value (Id);
6837 when AAMP => return -Machine_Emax_Value (Id);
6839 end Machine_Emin_Value;
6841 ----------------------------
6842 -- Machine_Mantissa_Value --
6843 ----------------------------
6845 function Machine_Mantissa_Value (Id : E) return Uint is
6846 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6849 case Float_Rep (Id) is
6852 when 1 .. 6 => return Uint_24;
6853 when 7 .. 15 => return UI_From_Int (53);
6854 when 16 .. 18 => return Uint_64;
6855 when 19 .. 33 => return UI_From_Int (113);
6856 when others => return No_Uint;
6861 when 1 .. 6 => return Uint_24;
6862 when 7 .. 9 => return UI_From_Int (56);
6863 when 10 .. 15 => return UI_From_Int (53);
6864 when others => return No_Uint;
6869 when 1 .. 6 => return Uint_24;
6870 when 7 .. 9 => return UI_From_Int (40);
6871 when others => return No_Uint;
6874 end Machine_Mantissa_Value;
6876 -------------------------
6877 -- Machine_Radix_Value --
6878 -------------------------
6880 function Machine_Radix_Value (Id : E) return U is
6882 case Float_Rep (Id) is
6883 when IEEE_Binary | VAX_Native | AAMP =>
6886 end Machine_Radix_Value;
6888 --------------------
6889 -- Next_Component --
6890 --------------------
6892 function Next_Component (Id : E) return E is
6896 Comp_Id := Next_Entity (Id);
6897 while Present (Comp_Id) loop
6898 exit when Ekind (Comp_Id) = E_Component;
6899 Comp_Id := Next_Entity (Comp_Id);
6905 ------------------------------------
6906 -- Next_Component_Or_Discriminant --
6907 ------------------------------------
6909 function Next_Component_Or_Discriminant (Id : E) return E is
6913 Comp_Id := Next_Entity (Id);
6914 while Present (Comp_Id) loop
6915 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6916 Comp_Id := Next_Entity (Comp_Id);
6920 end Next_Component_Or_Discriminant;
6922 -----------------------
6923 -- Next_Discriminant --
6924 -----------------------
6926 -- This function actually implements both Next_Discriminant and
6927 -- Next_Stored_Discriminant by making sure that the Discriminant
6928 -- returned is of the same variety as Id.
6930 function Next_Discriminant (Id : E) return E is
6932 -- Derived Tagged types with private extensions look like this...
6934 -- E_Discriminant d1
6935 -- E_Discriminant d2
6937 -- E_Discriminant d1
6938 -- E_Discriminant d2
6941 -- so it is critical not to go past the leading discriminants
6946 pragma Assert (Ekind (Id) = E_Discriminant);
6949 D := Next_Entity (D);
6951 or else (Ekind (D) /= E_Discriminant
6952 and then not Is_Itype (D))
6957 exit when Ekind (D) = E_Discriminant
6958 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6962 end Next_Discriminant;
6968 function Next_Formal (Id : E) return E is
6972 -- Follow the chain of declared entities as long as the kind of the
6973 -- entity corresponds to a formal parameter. Skip internal entities
6974 -- that may have been created for implicit subtypes, in the process
6975 -- of analyzing default expressions.
6979 P := Next_Entity (P);
6981 if No (P) or else Is_Formal (P) then
6983 elsif not Is_Internal (P) then
6989 -----------------------------
6990 -- Next_Formal_With_Extras --
6991 -----------------------------
6993 function Next_Formal_With_Extras (Id : E) return E is
6995 if Present (Extra_Formal (Id)) then
6996 return Extra_Formal (Id);
6998 return Next_Formal (Id);
7000 end Next_Formal_With_Extras;
7006 function Next_Index (Id : Node_Id) return Node_Id is
7015 function Next_Literal (Id : E) return E is
7017 pragma Assert (Nkind (Id) in N_Entity);
7021 ------------------------------
7022 -- Next_Stored_Discriminant --
7023 ------------------------------
7025 function Next_Stored_Discriminant (Id : E) return E is
7027 -- See comment in Next_Discriminant
7029 return Next_Discriminant (Id);
7030 end Next_Stored_Discriminant;
7032 -----------------------
7033 -- Number_Dimensions --
7034 -----------------------
7036 function Number_Dimensions (Id : E) return Pos is
7041 if Ekind (Id) in String_Kind then
7046 T := First_Index (Id);
7047 while Present (T) loop
7054 end Number_Dimensions;
7056 --------------------
7057 -- Number_Entries --
7058 --------------------
7060 function Number_Entries (Id : E) return Nat is
7065 pragma Assert (Is_Concurrent_Type (Id));
7068 Ent := First_Entity (Id);
7069 while Present (Ent) loop
7070 if Is_Entry (Ent) then
7074 Ent := Next_Entity (Ent);
7080 --------------------
7081 -- Number_Formals --
7082 --------------------
7084 function Number_Formals (Id : E) return Pos is
7090 Formal := First_Formal (Id);
7091 while Present (Formal) loop
7093 Formal := Next_Formal (Formal);
7099 --------------------
7100 -- Parameter_Mode --
7101 --------------------
7103 function Parameter_Mode (Id : E) return Formal_Kind is
7108 ------------------------
7109 -- Predicate_Function --
7110 ------------------------
7112 function Predicate_Function (Id : E) return E is
7116 pragma Assert (Is_Type (Id));
7118 if No (Subprograms_For_Type (Id)) then
7122 S := Subprograms_For_Type (Id);
7123 while Present (S) loop
7124 if Has_Predicates (S) then
7127 S := Subprograms_For_Type (S);
7133 end Predicate_Function;
7135 -------------------------
7136 -- Present_In_Rep_Item --
7137 -------------------------
7139 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7143 Ritem := First_Rep_Item (E);
7145 while Present (Ritem) loop
7150 Next_Rep_Item (Ritem);
7154 end Present_In_Rep_Item;
7156 --------------------------
7157 -- Primitive_Operations --
7158 --------------------------
7160 function Primitive_Operations (Id : E) return L is
7162 if Is_Concurrent_Type (Id) then
7163 if Present (Corresponding_Record_Type (Id)) then
7164 return Direct_Primitive_Operations
7165 (Corresponding_Record_Type (Id));
7167 -- If expansion is disabled the corresponding record type is absent,
7168 -- but if the type has ancestors it may have primitive operations.
7170 elsif Is_Tagged_Type (Id) then
7171 return Direct_Primitive_Operations (Id);
7177 return Direct_Primitive_Operations (Id);
7179 end Primitive_Operations;
7181 ---------------------
7182 -- Record_Rep_Item --
7183 ---------------------
7185 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7187 Set_Next_Rep_Item (N, First_Rep_Item (E));
7188 Set_First_Rep_Item (E, N);
7189 end Record_Rep_Item;
7195 function Root_Type (Id : E) return E is
7199 pragma Assert (Nkind (Id) in N_Entity);
7201 T := Base_Type (Id);
7203 if Ekind (T) = E_Class_Wide_Type then
7215 -- Following test catches some error cases resulting from
7218 elsif No (Etyp) then
7219 Check_Error_Detected;
7222 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7225 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7231 -- Return if there is a circularity in the inheritance chain. This
7232 -- happens in some error situations and we do not want to get
7233 -- stuck in this loop.
7235 if T = Base_Type (Id) then
7242 ---------------------
7243 -- Safe_Emax_Value --
7244 ---------------------
7246 function Safe_Emax_Value (Id : E) return Uint is
7248 return Machine_Emax_Value (Id);
7249 end Safe_Emax_Value;
7251 ----------------------
7252 -- Safe_First_Value --
7253 ----------------------
7255 function Safe_First_Value (Id : E) return Ureal is
7257 return -Safe_Last_Value (Id);
7258 end Safe_First_Value;
7260 ---------------------
7261 -- Safe_Last_Value --
7262 ---------------------
7264 function Safe_Last_Value (Id : E) return Ureal is
7265 Radix : constant Uint := Machine_Radix_Value (Id);
7266 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7267 Emax : constant Uint := Safe_Emax_Value (Id);
7268 Significand : constant Uint := Radix ** Mantissa - 1;
7269 Exponent : constant Uint := Emax - Mantissa;
7275 (Num => Significand * 2 ** (Exponent mod 4),
7276 Den => -Exponent / 4,
7282 (Num => Significand,
7286 end Safe_Last_Value;
7292 function Scope_Depth (Id : E) return Uint is
7297 while Is_Record_Type (Scop) loop
7298 Scop := Scope (Scop);
7301 return Scope_Depth_Value (Scop);
7304 ---------------------
7305 -- Scope_Depth_Set --
7306 ---------------------
7308 function Scope_Depth_Set (Id : E) return B is
7310 return not Is_Record_Type (Id)
7311 and then Field22 (Id) /= Union_Id (Empty);
7312 end Scope_Depth_Set;
7314 -----------------------------
7315 -- Set_Component_Alignment --
7316 -----------------------------
7318 -- Component Alignment is encoded using two flags, Flag128/129 as
7319 -- follows. Note that both flags False = Align_Default, so that the
7320 -- default initialization of flags to False initializes component
7321 -- alignment to the default value as required.
7323 -- Flag128 Flag129 Value
7324 -- ------- ------- -----
7325 -- False False Calign_Default
7326 -- False True Calign_Component_Size
7327 -- True False Calign_Component_Size_4
7328 -- True True Calign_Storage_Unit
7330 procedure Set_Component_Alignment (Id : E; V : C) is
7332 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7333 and then Is_Base_Type (Id));
7336 when Calign_Default =>
7337 Set_Flag128 (Id, False);
7338 Set_Flag129 (Id, False);
7340 when Calign_Component_Size =>
7341 Set_Flag128 (Id, False);
7342 Set_Flag129 (Id, True);
7344 when Calign_Component_Size_4 =>
7345 Set_Flag128 (Id, True);
7346 Set_Flag129 (Id, False);
7348 when Calign_Storage_Unit =>
7349 Set_Flag128 (Id, True);
7350 Set_Flag129 (Id, True);
7352 end Set_Component_Alignment;
7354 -----------------------------
7355 -- Set_Invariant_Procedure --
7356 -----------------------------
7358 procedure Set_Invariant_Procedure (Id : E; V : E) is
7362 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7364 S := Subprograms_For_Type (Id);
7365 Set_Subprograms_For_Type (Id, V);
7366 Set_Subprograms_For_Type (V, S);
7368 while Present (S) loop
7369 if Has_Invariants (S) then
7370 raise Program_Error;
7372 S := Subprograms_For_Type (S);
7375 end Set_Invariant_Procedure;
7377 ----------------------------
7378 -- Set_Predicate_Function --
7379 ----------------------------
7381 procedure Set_Predicate_Function (Id : E; V : E) is
7385 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7387 S := Subprograms_For_Type (Id);
7388 Set_Subprograms_For_Type (Id, V);
7389 Set_Subprograms_For_Type (V, S);
7391 while Present (S) loop
7392 if Has_Predicates (S) then
7393 raise Program_Error;
7395 S := Subprograms_For_Type (S);
7398 end Set_Predicate_Function;
7404 function Size_Clause (Id : E) return N is
7406 return Rep_Clause (Id, Name_Size);
7409 ------------------------
7410 -- Stream_Size_Clause --
7411 ------------------------
7413 function Stream_Size_Clause (Id : E) return N is
7415 return Rep_Clause (Id, Name_Stream_Size);
7416 end Stream_Size_Clause;
7422 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7428 Kind := E_Access_Subtype;
7432 Kind := E_Array_Subtype;
7434 when E_Class_Wide_Type |
7435 E_Class_Wide_Subtype =>
7436 Kind := E_Class_Wide_Subtype;
7438 when E_Decimal_Fixed_Point_Type |
7439 E_Decimal_Fixed_Point_Subtype =>
7440 Kind := E_Decimal_Fixed_Point_Subtype;
7442 when E_Ordinary_Fixed_Point_Type |
7443 E_Ordinary_Fixed_Point_Subtype =>
7444 Kind := E_Ordinary_Fixed_Point_Subtype;
7446 when E_Private_Type |
7447 E_Private_Subtype =>
7448 Kind := E_Private_Subtype;
7450 when E_Limited_Private_Type |
7451 E_Limited_Private_Subtype =>
7452 Kind := E_Limited_Private_Subtype;
7454 when E_Record_Type_With_Private |
7455 E_Record_Subtype_With_Private =>
7456 Kind := E_Record_Subtype_With_Private;
7458 when E_Record_Type |
7460 Kind := E_Record_Subtype;
7462 when E_String_Type |
7464 Kind := E_String_Subtype;
7466 when Enumeration_Kind =>
7467 Kind := E_Enumeration_Subtype;
7470 Kind := E_Floating_Point_Subtype;
7472 when Signed_Integer_Kind =>
7473 Kind := E_Signed_Integer_Subtype;
7475 when Modular_Integer_Kind =>
7476 Kind := E_Modular_Integer_Subtype;
7478 when Protected_Kind =>
7479 Kind := E_Protected_Subtype;
7482 Kind := E_Task_Subtype;
7486 raise Program_Error;
7492 ---------------------
7493 -- Type_High_Bound --
7494 ---------------------
7496 function Type_High_Bound (Id : E) return Node_Id is
7497 Rng : constant Node_Id := Scalar_Range (Id);
7499 if Nkind (Rng) = N_Subtype_Indication then
7500 return High_Bound (Range_Expression (Constraint (Rng)));
7502 return High_Bound (Rng);
7504 end Type_High_Bound;
7506 --------------------
7507 -- Type_Low_Bound --
7508 --------------------
7510 function Type_Low_Bound (Id : E) return Node_Id is
7511 Rng : constant Node_Id := Scalar_Range (Id);
7513 if Nkind (Rng) = N_Subtype_Indication then
7514 return Low_Bound (Range_Expression (Constraint (Rng)));
7516 return Low_Bound (Rng);
7520 ---------------------
7521 -- Underlying_Type --
7522 ---------------------
7524 function Underlying_Type (Id : E) return E is
7526 -- For record_with_private the underlying type is always the direct
7527 -- full view. Never try to take the full view of the parent it
7528 -- doesn't make sense.
7530 if Ekind (Id) = E_Record_Type_With_Private then
7531 return Full_View (Id);
7533 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7535 -- If we have an incomplete or private type with a full view,
7536 -- then we return the Underlying_Type of this full view
7538 if Present (Full_View (Id)) then
7539 if Id = Full_View (Id) then
7541 -- Previous error in declaration
7546 return Underlying_Type (Full_View (Id));
7549 -- If we have an incomplete entity that comes from the limited
7550 -- view then we return the Underlying_Type of its non-limited
7553 elsif From_With_Type (Id)
7554 and then Present (Non_Limited_View (Id))
7556 return Underlying_Type (Non_Limited_View (Id));
7558 -- Otherwise check for the case where we have a derived type or
7559 -- subtype, and if so get the Underlying_Type of the parent type.
7561 elsif Etype (Id) /= Id then
7562 return Underlying_Type (Etype (Id));
7564 -- Otherwise we have an incomplete or private type that has
7565 -- no full view, which means that we have not encountered the
7566 -- completion, so return Empty to indicate the underlying type
7567 -- is not yet known.
7573 -- For non-incomplete, non-private types, return the type itself
7574 -- Also for entities that are not types at all return the entity
7580 end Underlying_Type;
7586 function Vax_Float (Id : E) return B is
7588 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7591 ------------------------
7592 -- Write_Entity_Flags --
7593 ------------------------
7595 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7597 procedure W (Flag_Name : String; Flag : Boolean);
7598 -- Write out given flag if it is set
7604 procedure W (Flag_Name : String; Flag : Boolean) is
7608 Write_Str (Flag_Name);
7609 Write_Str (" = True");
7614 -- Start of processing for Write_Entity_Flags
7617 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7618 and then Is_Base_Type (Id)
7621 Write_Str ("Component_Alignment = ");
7623 case Component_Alignment (Id) is
7624 when Calign_Default =>
7625 Write_Str ("Calign_Default");
7627 when Calign_Component_Size =>
7628 Write_Str ("Calign_Component_Size");
7630 when Calign_Component_Size_4 =>
7631 Write_Str ("Calign_Component_Size_4");
7633 when Calign_Storage_Unit =>
7634 Write_Str ("Calign_Storage_Unit");
7640 W ("Address_Taken", Flag104 (Id));
7641 W ("Body_Needed_For_SAL", Flag40 (Id));
7642 W ("C_Pass_By_Copy", Flag125 (Id));
7643 W ("Can_Never_Be_Null", Flag38 (Id));
7644 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7645 W ("Debug_Info_Off", Flag166 (Id));
7646 W ("Default_Expressions_Processed", Flag108 (Id));
7647 W ("Delay_Cleanups", Flag114 (Id));
7648 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7649 W ("Depends_On_Private", Flag14 (Id));
7650 W ("Discard_Names", Flag88 (Id));
7651 W ("Elaboration_Entity_Required", Flag174 (Id));
7652 W ("Elaborate_Body_Desirable", Flag210 (Id));
7653 W ("Entry_Accepted", Flag152 (Id));
7654 W ("Can_Use_Internal_Rep", Flag229 (Id));
7655 W ("Finalize_Storage_Only", Flag158 (Id));
7656 W ("From_With_Type", Flag159 (Id));
7657 W ("Has_Aliased_Components", Flag135 (Id));
7658 W ("Has_Alignment_Clause", Flag46 (Id));
7659 W ("Has_All_Calls_Remote", Flag79 (Id));
7660 W ("Has_Anonymous_Master", Flag253 (Id));
7661 W ("Has_Atomic_Components", Flag86 (Id));
7662 W ("Has_Biased_Representation", Flag139 (Id));
7663 W ("Has_Completion", Flag26 (Id));
7664 W ("Has_Completion_In_Body", Flag71 (Id));
7665 W ("Has_Complex_Representation", Flag140 (Id));
7666 W ("Has_Component_Size_Clause", Flag68 (Id));
7667 W ("Has_Contiguous_Rep", Flag181 (Id));
7668 W ("Has_Controlled_Component", Flag43 (Id));
7669 W ("Has_Controlling_Result", Flag98 (Id));
7670 W ("Has_Convention_Pragma", Flag119 (Id));
7671 W ("Has_Default_Aspect", Flag39 (Id));
7672 W ("Has_Delayed_Aspects", Flag200 (Id));
7673 W ("Has_Delayed_Freeze", Flag18 (Id));
7674 W ("Has_Discriminants", Flag5 (Id));
7675 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7676 W ("Has_Exit", Flag47 (Id));
7677 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7678 W ("Has_Forward_Instantiation", Flag175 (Id));
7679 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7680 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7681 W ("Has_Homonym", Flag56 (Id));
7682 W ("Has_Implicit_Dereference", Flag251 (Id));
7683 W ("Has_Inheritable_Invariants", Flag248 (Id));
7684 W ("Has_Initial_Value", Flag219 (Id));
7685 W ("Has_Invariants", Flag232 (Id));
7686 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7687 W ("Has_Master_Entity", Flag21 (Id));
7688 W ("Has_Missing_Return", Flag142 (Id));
7689 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7690 W ("Has_Non_Standard_Rep", Flag75 (Id));
7691 W ("Has_Object_Size_Clause", Flag172 (Id));
7692 W ("Has_Per_Object_Constraint", Flag154 (Id));
7693 W ("Has_Postconditions", Flag240 (Id));
7694 W ("Has_Pragma_Controlled", Flag27 (Id));
7695 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7696 W ("Has_Pragma_Inline", Flag157 (Id));
7697 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7698 W ("Has_Pragma_No_Inline", Flag201 (Id));
7699 W ("Has_Pragma_Ordered", Flag198 (Id));
7700 W ("Has_Pragma_Pack", Flag121 (Id));
7701 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7702 W ("Has_Pragma_Pure", Flag203 (Id));
7703 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7704 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7705 W ("Has_Pragma_Unmodified", Flag233 (Id));
7706 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7707 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7708 W ("Has_Predicates", Flag250 (Id));
7709 W ("Has_Primitive_Operations", Flag120 (Id));
7710 W ("Has_Private_Ancestor", Flag151 (Id));
7711 W ("Has_Private_Declaration", Flag155 (Id));
7712 W ("Has_Qualified_Name", Flag161 (Id));
7713 W ("Has_RACW", Flag214 (Id));
7714 W ("Has_Record_Rep_Clause", Flag65 (Id));
7715 W ("Has_Recursive_Call", Flag143 (Id));
7716 W ("Has_Size_Clause", Flag29 (Id));
7717 W ("Has_Small_Clause", Flag67 (Id));
7718 W ("Has_Specified_Layout", Flag100 (Id));
7719 W ("Has_Specified_Stream_Input", Flag190 (Id));
7720 W ("Has_Specified_Stream_Output", Flag191 (Id));
7721 W ("Has_Specified_Stream_Read", Flag192 (Id));
7722 W ("Has_Specified_Stream_Write", Flag193 (Id));
7723 W ("Has_Static_Discriminants", Flag211 (Id));
7724 W ("Has_Storage_Size_Clause", Flag23 (Id));
7725 W ("Has_Stream_Size_Clause", Flag184 (Id));
7726 W ("Has_Task", Flag30 (Id));
7727 W ("Has_Thunks", Flag228 (Id));
7728 W ("Has_Unchecked_Union", Flag123 (Id));
7729 W ("Has_Unknown_Discriminants", Flag72 (Id));
7730 W ("Has_Up_Level_Access", Flag215 (Id));
7731 W ("Has_Volatile_Components", Flag87 (Id));
7732 W ("Has_Xref_Entry", Flag182 (Id));
7733 W ("In_Package_Body", Flag48 (Id));
7734 W ("In_Private_Part", Flag45 (Id));
7735 W ("In_Use", Flag8 (Id));
7736 W ("Is_AST_Entry", Flag132 (Id));
7737 W ("Is_Abstract_Subprogram", Flag19 (Id));
7738 W ("Is_Abstract_Type", Flag146 (Id));
7739 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7740 W ("Is_Access_Constant", Flag69 (Id));
7741 W ("Is_Ada_2005_Only", Flag185 (Id));
7742 W ("Is_Ada_2012_Only", Flag199 (Id));
7743 W ("Is_Aliased", Flag15 (Id));
7744 W ("Is_Asynchronous", Flag81 (Id));
7745 W ("Is_Atomic", Flag85 (Id));
7746 W ("Is_Bit_Packed_Array", Flag122 (Id));
7747 W ("Is_CPP_Class", Flag74 (Id));
7748 W ("Is_Called", Flag102 (Id));
7749 W ("Is_Character_Type", Flag63 (Id));
7750 W ("Is_Child_Unit", Flag73 (Id));
7751 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7752 W ("Is_Compilation_Unit", Flag149 (Id));
7753 W ("Is_Completely_Hidden", Flag103 (Id));
7754 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7755 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7756 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7757 W ("Is_Constrained", Flag12 (Id));
7758 W ("Is_Constructor", Flag76 (Id));
7759 W ("Is_Controlled", Flag42 (Id));
7760 W ("Is_Controlling_Formal", Flag97 (Id));
7761 W ("Is_Descendent_Of_Address", Flag223 (Id));
7762 W ("Is_Discrim_SO_Function", Flag176 (Id));
7763 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7764 W ("Is_Dispatching_Operation", Flag6 (Id));
7765 W ("Is_Eliminated", Flag124 (Id));
7766 W ("Is_Entry_Formal", Flag52 (Id));
7767 W ("Is_Exported", Flag99 (Id));
7768 W ("Is_First_Subtype", Flag70 (Id));
7769 W ("Is_For_Access_Subtype", Flag118 (Id));
7770 W ("Is_Formal_Subprogram", Flag111 (Id));
7771 W ("Is_Frozen", Flag4 (Id));
7772 W ("Is_Generic_Actual_Type", Flag94 (Id));
7773 W ("Is_Generic_Instance", Flag130 (Id));
7774 W ("Is_Generic_Type", Flag13 (Id));
7775 W ("Is_Hidden", Flag57 (Id));
7776 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7777 W ("Is_Immediately_Visible", Flag7 (Id));
7778 W ("Is_Implementation_Defined", Flag254 (Id));
7779 W ("Is_Imported", Flag24 (Id));
7780 W ("Is_Inlined", Flag11 (Id));
7781 W ("Is_Instantiated", Flag126 (Id));
7782 W ("Is_Interface", Flag186 (Id));
7783 W ("Is_Internal", Flag17 (Id));
7784 W ("Is_Interrupt_Handler", Flag89 (Id));
7785 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7786 W ("Is_Itype", Flag91 (Id));
7787 W ("Is_Known_Non_Null", Flag37 (Id));
7788 W ("Is_Known_Null", Flag204 (Id));
7789 W ("Is_Known_Valid", Flag170 (Id));
7790 W ("Is_Limited_Composite", Flag106 (Id));
7791 W ("Is_Limited_Interface", Flag197 (Id));
7792 W ("Is_Limited_Record", Flag25 (Id));
7793 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7794 W ("Is_Non_Static_Subtype", Flag109 (Id));
7795 W ("Is_Null_Init_Proc", Flag178 (Id));
7796 W ("Is_Obsolescent", Flag153 (Id));
7797 W ("Is_Only_Out_Parameter", Flag226 (Id));
7798 W ("Is_Optional_Parameter", Flag134 (Id));
7799 W ("Is_Package_Body_Entity", Flag160 (Id));
7800 W ("Is_Packed", Flag51 (Id));
7801 W ("Is_Packed_Array_Type", Flag138 (Id));
7802 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7803 W ("Is_Preelaborated", Flag59 (Id));
7804 W ("Is_Primitive", Flag218 (Id));
7805 W ("Is_Primitive_Wrapper", Flag195 (Id));
7806 W ("Is_Private_Composite", Flag107 (Id));
7807 W ("Is_Private_Descendant", Flag53 (Id));
7808 W ("Is_Private_Primitive", Flag245 (Id));
7809 W ("Is_Processed_Transient", Flag252 (Id));
7810 W ("Is_Public", Flag10 (Id));
7811 W ("Is_Pure", Flag44 (Id));
7812 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7813 W ("Is_RACW_Stub_Type", Flag244 (Id));
7814 W ("Is_Raised", Flag224 (Id));
7815 W ("Is_Remote_Call_Interface", Flag62 (Id));
7816 W ("Is_Remote_Types", Flag61 (Id));
7817 W ("Is_Renaming_Of_Object", Flag112 (Id));
7818 W ("Is_Return_Object", Flag209 (Id));
7819 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7820 W ("Is_Shared_Passive", Flag60 (Id));
7821 W ("Is_Statically_Allocated", Flag28 (Id));
7822 W ("Is_Tag", Flag78 (Id));
7823 W ("Is_Tagged_Type", Flag55 (Id));
7824 W ("Is_Thunk", Flag225 (Id));
7825 W ("Is_Trivial_Subprogram", Flag235 (Id));
7826 W ("Is_True_Constant", Flag163 (Id));
7827 W ("Is_Unchecked_Union", Flag117 (Id));
7828 W ("Is_Underlying_Record_View", Flag246 (Id));
7829 W ("Is_Unsigned_Type", Flag144 (Id));
7830 W ("Is_VMS_Exception", Flag133 (Id));
7831 W ("Is_Valued_Procedure", Flag127 (Id));
7832 W ("Is_Visible_Formal", Flag206 (Id));
7833 W ("Is_Visible_Lib_Unit", Flag116 (Id));
7834 W ("Is_Volatile", Flag16 (Id));
7835 W ("Itype_Printed", Flag202 (Id));
7836 W ("Kill_Elaboration_Checks", Flag32 (Id));
7837 W ("Kill_Range_Checks", Flag33 (Id));
7838 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7839 W ("Low_Bound_Tested", Flag205 (Id));
7840 W ("Machine_Radix_10", Flag84 (Id));
7841 W ("Materialize_Entity", Flag168 (Id));
7842 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7843 W ("Must_Have_Preelab_Init", Flag208 (Id));
7844 W ("Needs_Debug_Info", Flag147 (Id));
7845 W ("Needs_No_Actuals", Flag22 (Id));
7846 W ("Never_Set_In_Source", Flag115 (Id));
7847 W ("No_Pool_Assigned", Flag131 (Id));
7848 W ("No_Return", Flag113 (Id));
7849 W ("No_Strict_Aliasing", Flag136 (Id));
7850 W ("Non_Binary_Modulus", Flag58 (Id));
7851 W ("Nonzero_Is_True", Flag162 (Id));
7852 W ("OK_To_Rename", Flag247 (Id));
7853 W ("OK_To_Reorder_Components", Flag239 (Id));
7854 W ("Optimize_Alignment_Space", Flag241 (Id));
7855 W ("Optimize_Alignment_Time", Flag242 (Id));
7856 W ("Overlays_Constant", Flag243 (Id));
7857 W ("Reachable", Flag49 (Id));
7858 W ("Referenced", Flag156 (Id));
7859 W ("Referenced_As_LHS", Flag36 (Id));
7860 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7861 W ("Renamed_In_Spec", Flag231 (Id));
7862 W ("Requires_Overriding", Flag213 (Id));
7863 W ("Return_Present", Flag54 (Id));
7864 W ("Returns_By_Ref", Flag90 (Id));
7865 W ("Reverse_Bit_Order", Flag164 (Id));
7866 W ("Reverse_Storage_Order", Flag93 (Id));
7867 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7868 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7869 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7870 W ("Static_Elaboration_Desired", Flag77 (Id));
7871 W ("Strict_Alignment", Flag145 (Id));
7872 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7873 W ("Suppress_Initialization", Flag105 (Id));
7874 W ("Suppress_Style_Checks", Flag165 (Id));
7875 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7876 W ("Treat_As_Volatile", Flag41 (Id));
7877 W ("Universal_Aliasing", Flag216 (Id));
7878 W ("Used_As_Generic_Actual", Flag222 (Id));
7879 W ("Uses_Sec_Stack", Flag95 (Id));
7880 W ("Warnings_Off", Flag96 (Id));
7881 W ("Warnings_Off_Used", Flag236 (Id));
7882 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7883 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7884 W ("Was_Hidden", Flag196 (Id));
7885 end Write_Entity_Flags;
7887 -----------------------
7888 -- Write_Entity_Info --
7889 -----------------------
7891 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7893 procedure Write_Attribute (Which : String; Nam : E);
7894 -- Write attribute value with given string name
7896 procedure Write_Kind (Id : Entity_Id);
7897 -- Write Ekind field of entity
7899 ---------------------
7900 -- Write_Attribute --
7901 ---------------------
7903 procedure Write_Attribute (Which : String; Nam : E) is
7907 Write_Int (Int (Nam));
7909 Write_Name (Chars (Nam));
7911 end Write_Attribute;
7917 procedure Write_Kind (Id : Entity_Id) is
7918 K : constant String := Entity_Kind'Image (Ekind (Id));
7922 Write_Str (" Kind ");
7924 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7925 Write_Str ("TAGGED ");
7928 Write_Str (K (3 .. K'Length));
7931 if Is_Type (Id) and then Depends_On_Private (Id) then
7932 Write_Str ("Depends_On_Private ");
7936 -- Start of processing for Write_Entity_Info
7940 Write_Attribute ("Name ", Id);
7941 Write_Int (Int (Id));
7945 Write_Attribute (" Type ", Etype (Id));
7947 Write_Attribute (" Scope ", Scope (Id));
7952 when Discrete_Kind =>
7953 Write_Str ("Bounds: Id = ");
7955 if Present (Scalar_Range (Id)) then
7956 Write_Int (Int (Type_Low_Bound (Id)));
7957 Write_Str (" .. Id = ");
7958 Write_Int (Int (Type_High_Bound (Id)));
7960 Write_Str ("Empty");
7971 (" Component Type ", Component_Type (Id));
7974 Write_Str (" Indexes ");
7976 Index := First_Index (Id);
7977 while Present (Index) loop
7978 Write_Attribute (" ", Etype (Index));
7979 Index := Next_Index (Index);
7987 (" Directly Designated Type ",
7988 Directly_Designated_Type (Id));
7991 when Overloadable_Kind =>
7992 if Present (Homonym (Id)) then
7993 Write_Str (" Homonym ");
7994 Write_Name (Chars (Homonym (Id)));
7996 Write_Int (Int (Homonym (Id)));
8003 if Ekind (Scope (Id)) in Record_Kind then
8005 " Original_Record_Component ",
8006 Original_Record_Component (Id));
8007 Write_Int (Int (Original_Record_Component (Id)));
8011 when others => null;
8013 end Write_Entity_Info;
8015 -----------------------
8016 -- Write_Field6_Name --
8017 -----------------------
8019 procedure Write_Field6_Name (Id : Entity_Id) is
8020 pragma Warnings (Off, Id);
8022 Write_Str ("First_Rep_Item");
8023 end Write_Field6_Name;
8025 -----------------------
8026 -- Write_Field7_Name --
8027 -----------------------
8029 procedure Write_Field7_Name (Id : Entity_Id) is
8030 pragma Warnings (Off, Id);
8032 Write_Str ("Freeze_Node");
8033 end Write_Field7_Name;
8035 -----------------------
8036 -- Write_Field8_Name --
8037 -----------------------
8039 procedure Write_Field8_Name (Id : Entity_Id) is
8043 Write_Str ("Associated_Node_For_Itype");
8046 Write_Str ("Dependent_Instances");
8049 Write_Str ("First_Exit_Statement");
8052 Write_Str ("Hiding_Loop_Variable");
8054 when E_Abstract_State =>
8055 Write_Str ("Integrity_Level");
8059 E_Subprogram_Body =>
8060 Write_Str ("Mechanism");
8064 Write_Str ("Normalized_First_Bit");
8067 Write_Str ("Postcondition_Proc");
8069 when E_Return_Statement =>
8070 Write_Str ("Return_Applies_To");
8073 Write_Str ("Field8??");
8075 end Write_Field8_Name;
8077 -----------------------
8078 -- Write_Field9_Name --
8079 -----------------------
8081 procedure Write_Field9_Name (Id : Entity_Id) is
8085 Write_Str ("Class_Wide_Type");
8088 Write_Str ("Current_Value");
8090 when E_Abstract_State =>
8091 Write_Str ("Refined_State");
8094 E_Generic_Function |
8096 E_Generic_Procedure |
8099 Write_Str ("Renaming_Map");
8102 Write_Str ("Field9??");
8104 end Write_Field9_Name;
8106 ------------------------
8107 -- Write_Field10_Name --
8108 ------------------------
8110 procedure Write_Field10_Name (Id : Entity_Id) is
8113 when Class_Wide_Kind |
8119 Write_Str ("Direct_Primitive_Operations");
8122 Write_Str ("Float_Rep");
8124 when E_In_Parameter |
8126 Write_Str ("Discriminal_Link");
8132 Write_Str ("Handler_Records");
8135 Write_Str ("Loop_Entry_Attributes");
8139 Write_Str ("Normalized_Position_Max");
8142 Write_Str ("Field10??");
8144 end Write_Field10_Name;
8146 ------------------------
8147 -- Write_Field11_Name --
8148 ------------------------
8150 procedure Write_Field11_Name (Id : Entity_Id) is
8154 Write_Str ("Block_Node");
8158 Write_Str ("Component_Bit_Offset");
8161 Write_Str ("Entry_Component");
8163 when E_Enumeration_Literal =>
8164 Write_Str ("Enumeration_Pos");
8168 Write_Str ("Full_View");
8170 when E_Generic_Package =>
8171 Write_Str ("Generic_Homonym");
8177 Write_Str ("Protected_Body_Subprogram");
8180 Write_Str ("Field11??");
8182 end Write_Field11_Name;
8184 ------------------------
8185 -- Write_Field12_Name --
8186 ------------------------
8188 procedure Write_Field12_Name (Id : Entity_Id) is
8192 Write_Str ("Associated_Formal_Package");
8195 Write_Str ("Barrier_Function");
8197 when E_Enumeration_Literal =>
8198 Write_Str ("Enumeration_Rep");
8206 E_In_Out_Parameter |
8210 Write_Str ("Esize");
8214 Write_Str ("Next_Inlined_Subprogram");
8217 Write_Str ("Field12??");
8219 end Write_Field12_Name;
8221 ------------------------
8222 -- Write_Field13_Name --
8223 ------------------------
8225 procedure Write_Field13_Name (Id : Entity_Id) is
8230 Write_Str ("Component_Clause");
8233 Write_Str ("Elaboration_Entity");
8237 Generic_Unit_Kind =>
8238 Write_Str ("Elaboration_Entity");
8242 Write_Str ("Extra_Accessibility");
8245 Write_Str ("RM_Size");
8248 Write_Str ("Field13??");
8250 end Write_Field13_Name;
8252 -----------------------
8253 -- Write_Field14_Name --
8254 -----------------------
8256 procedure Write_Field14_Name (Id : Entity_Id) is
8265 Write_Str ("Alignment");
8269 Write_Str ("First_Optional_Parameter");
8273 Write_Str ("Normalized_Position");
8276 E_Generic_Package =>
8277 Write_Str ("Shadow_Entities");
8280 Write_Str ("Field14??");
8282 end Write_Field14_Name;
8284 ------------------------
8285 -- Write_Field15_Name --
8286 ------------------------
8288 procedure Write_Field15_Name (Id : Entity_Id) is
8291 when E_Discriminant =>
8292 Write_Str ("Discriminant_Number");
8295 Write_Str ("DT_Entry_Count");
8299 Write_Str ("DT_Position");
8301 when E_Protected_Type =>
8302 Write_Str ("Entry_Bodies_Array");
8305 Write_Str ("Entry_Parameters_Type");
8308 Write_Str ("Extra_Formal");
8310 when Enumeration_Kind =>
8311 Write_Str ("Lit_Indexes");
8315 Write_Str ("Related_Instance");
8317 when Decimal_Fixed_Point_Kind =>
8318 Write_Str ("Scale_Value");
8322 Write_Str ("Status_Flag_Or_Transient_Decl");
8326 Write_Str ("Storage_Size_Variable");
8328 when E_String_Literal_Subtype =>
8329 Write_Str ("String_Literal_Low_Bound");
8332 Write_Str ("Field15??");
8334 end Write_Field15_Name;
8336 ------------------------
8337 -- Write_Field16_Name --
8338 ------------------------
8340 procedure Write_Field16_Name (Id : Entity_Id) is
8343 when E_Record_Type |
8344 E_Record_Type_With_Private =>
8345 Write_Str ("Access_Disp_Table");
8347 when E_Record_Subtype |
8348 E_Class_Wide_Subtype =>
8349 Write_Str ("Cloned_Subtype");
8353 Write_Str ("DTC_Entity");
8356 Write_Str ("Entry_Formal");
8361 Write_Str ("First_Private_Entity");
8363 when Enumeration_Kind =>
8364 Write_Str ("Lit_Strings");
8366 when E_String_Literal_Subtype =>
8367 Write_Str ("String_Literal_Length");
8371 Write_Str ("Unset_Reference");
8374 Write_Str ("Field16??");
8376 end Write_Field16_Name;
8378 ------------------------
8379 -- Write_Field17_Name --
8380 ------------------------
8382 procedure Write_Field17_Name (Id : Entity_Id) is
8387 E_Generic_In_Out_Parameter |
8389 Write_Str ("Actual_Subtype");
8392 Write_Str ("Digits_Value");
8394 when E_Discriminant =>
8395 Write_Str ("Discriminal");
8404 E_Generic_Function |
8406 E_Generic_Procedure |
8414 E_Return_Statement |
8416 E_Subprogram_Type =>
8417 Write_Str ("First_Entity");
8420 Write_Str ("First_Index");
8422 when Enumeration_Kind =>
8423 Write_Str ("First_Literal");
8426 Write_Str ("Master_Id");
8428 when Modular_Integer_Kind =>
8429 Write_Str ("Modulus");
8431 when E_Incomplete_Type =>
8432 Write_Str ("Non_Limited_View");
8434 when E_Incomplete_Subtype =>
8435 if From_With_Type (Id) then
8436 Write_Str ("Non_Limited_View");
8440 Write_Str ("Prival");
8443 Write_Str ("Field17??");
8445 end Write_Field17_Name;
8447 ------------------------
8448 -- Write_Field18_Name --
8449 ------------------------
8451 procedure Write_Field18_Name (Id : Entity_Id) is
8454 when E_Enumeration_Literal |
8458 Write_Str ("Alias");
8460 when E_Record_Type =>
8461 Write_Str ("Corresponding_Concurrent_Type");
8463 when E_Subprogram_Body =>
8464 Write_Str ("Corresponding_Protected_Entry");
8466 when Concurrent_Kind =>
8467 Write_Str ("Corresponding_Record_Type");
8472 Write_Str ("Enclosing_Scope");
8474 when E_Entry_Index_Parameter =>
8475 Write_Str ("Entry_Index_Constant");
8477 when E_Class_Wide_Subtype |
8478 E_Access_Protected_Subprogram_Type |
8479 E_Anonymous_Access_Protected_Subprogram_Type |
8480 E_Access_Subprogram_Type |
8482 Write_Str ("Equivalent_Type");
8484 when Fixed_Point_Kind =>
8485 Write_Str ("Delta_Value");
8487 when Incomplete_Or_Private_Kind |
8489 Write_Str ("Private_Dependents");
8492 Write_Str ("Renamed_Object");
8496 E_Generic_Function |
8497 E_Generic_Procedure |
8498 E_Generic_Package =>
8499 Write_Str ("Renamed_Entity");
8502 Write_Str ("Field18??");
8504 end Write_Field18_Name;
8506 -----------------------
8507 -- Write_Field19_Name --
8508 -----------------------
8510 procedure Write_Field19_Name (Id : Entity_Id) is
8514 E_Generic_Package =>
8515 Write_Str ("Body_Entity");
8517 when E_Discriminant =>
8518 Write_Str ("Corresponding_Discriminant");
8521 Write_Str ("Default_Value");
8523 when E_Array_Type =>
8524 Write_Str ("Default_Component_Value");
8526 when E_Record_Type =>
8527 Write_Str ("Parent_Subtype");
8531 Write_Str ("Size_Check_Code");
8533 when E_Package_Body |
8535 Write_Str ("Spec_Entity");
8537 when Private_Kind =>
8538 Write_Str ("Underlying_Full_View");
8540 when E_Function | E_Operator | E_Subprogram_Type =>
8541 Write_Str ("Extra_Accessibility_Of_Result");
8544 Write_Str ("Field19??");
8546 end Write_Field19_Name;
8548 -----------------------
8549 -- Write_Field20_Name --
8550 -----------------------
8552 procedure Write_Field20_Name (Id : Entity_Id) is
8556 Write_Str ("Component_Type");
8558 when E_In_Parameter |
8559 E_Generic_In_Parameter =>
8560 Write_Str ("Default_Value");
8563 Write_Str ("Directly_Designated_Type");
8566 Write_Str ("Discriminant_Checking_Func");
8568 when E_Discriminant =>
8569 Write_Str ("Discriminant_Default_Value");
8578 E_Generic_Function |
8580 E_Generic_Procedure |
8588 E_Return_Statement |
8590 E_Subprogram_Type =>
8591 Write_Str ("Last_Entity");
8595 Write_Str ("Prival_Link");
8598 Write_Str ("Scalar_Range");
8601 Write_Str ("Register_Exception_Call");
8604 Write_Str ("Field20??");
8606 end Write_Field20_Name;
8608 -----------------------
8609 -- Write_Field21_Name --
8610 -----------------------
8612 procedure Write_Field21_Name (Id : Entity_Id) is
8616 Write_Str ("Accept_Address");
8618 when E_In_Parameter =>
8619 Write_Str ("Default_Expr_Function");
8621 when Concurrent_Kind |
8622 Incomplete_Or_Private_Kind |
8626 Write_Str ("Discriminant_Constraint");
8631 E_Generic_Function |
8633 E_Generic_Procedure |
8635 Write_Str ("Interface_Name");
8638 Modular_Integer_Kind =>
8639 Write_Str ("Original_Array_Type");
8641 when Fixed_Point_Kind =>
8642 Write_Str ("Small_Value");
8645 Write_Str ("Field21??");
8647 end Write_Field21_Name;
8649 -----------------------
8650 -- Write_Field22_Name --
8651 -----------------------
8653 procedure Write_Field22_Name (Id : Entity_Id) is
8657 Write_Str ("Associated_Storage_Pool");
8660 Write_Str ("Component_Size");
8662 when E_Record_Type =>
8663 Write_Str ("Corresponding_Remote_Type");
8667 Write_Str ("Original_Record_Component");
8669 when E_Enumeration_Literal =>
8670 Write_Str ("Enumeration_Rep_Expr");
8673 Write_Str ("Exception_Code");
8675 when E_Record_Type_With_Private |
8676 E_Record_Subtype_With_Private |
8679 E_Limited_Private_Type |
8680 E_Limited_Private_Subtype =>
8681 Write_Str ("Private_View");
8684 Write_Str ("Protected_Formal");
8694 E_Generic_Function |
8695 E_Generic_Procedure |
8698 E_Return_Statement |
8701 Write_Str ("Scope_Depth_Value");
8704 Write_Str ("Shared_Var_Procs_Instance");
8707 Write_Str ("Field22??");
8709 end Write_Field22_Name;
8711 ------------------------
8712 -- Write_Field23_Name --
8713 ------------------------
8715 procedure Write_Field23_Name (Id : Entity_Id) is
8718 when E_Discriminant =>
8719 Write_Str ("CR_Discriminant");
8722 Write_Str ("Entry_Cancel_Parameter");
8724 when E_Enumeration_Type =>
8725 Write_Str ("Enum_Pos_To_Rep");
8729 Write_Str ("Extra_Constrained");
8732 Write_Str ("Finalization_Master");
8734 when E_Generic_Function |
8736 E_Generic_Procedure =>
8737 Write_Str ("Inner_Instances");
8740 Write_Str ("Packed_Array_Type");
8743 Write_Str ("Protection_Object");
8745 when Concurrent_Kind |
8746 Incomplete_Or_Private_Kind |
8750 Write_Str ("Stored_Constraint");
8754 if Present (Scope (Id))
8755 and then Is_Protected_Type (Scope (Id))
8757 Write_Str ("Protection_Object");
8759 Write_Str ("Generic_Renamings");
8763 if Is_Generic_Instance (Id) then
8764 Write_Str ("Generic_Renamings");
8766 Write_Str ("Limited_View");
8770 Write_Str ("Field23??");
8772 end Write_Field23_Name;
8774 ------------------------
8775 -- Write_Field24_Name --
8776 ------------------------
8778 procedure Write_Field24_Name (Id : Entity_Id) is
8783 Write_Str ("Finalizer");
8788 Write_Str ("Related_Expression");
8793 Generic_Subprogram_Kind =>
8794 Write_Str ("Contract");
8797 Write_Str ("Field24???");
8799 end Write_Field24_Name;
8801 ------------------------
8802 -- Write_Field25_Name --
8803 ------------------------
8805 procedure Write_Field25_Name (Id : Entity_Id) is
8809 Write_Str ("Abstract_States");
8812 Write_Str ("Debug_Renaming_Link");
8815 Write_Str ("DT_Offset_To_Top_Func");
8819 Write_Str ("Interface_Alias");
8821 when E_Record_Type |
8823 E_Record_Type_With_Private |
8824 E_Record_Subtype_With_Private =>
8825 Write_Str ("Interfaces");
8829 Write_Str ("Related_Array_Object");
8832 Write_Str ("Task_Body_Procedure");
8836 Write_Str ("PPC_Wrapper");
8838 when E_Enumeration_Subtype |
8839 E_Modular_Integer_Subtype |
8840 E_Signed_Integer_Subtype =>
8841 Write_Str ("Static_Predicate");
8844 Write_Str ("Field25??");
8846 end Write_Field25_Name;
8848 ------------------------
8849 -- Write_Field26_Name --
8850 ------------------------
8852 procedure Write_Field26_Name (Id : Entity_Id) is
8855 when E_Record_Type |
8856 E_Record_Type_With_Private =>
8857 Write_Str ("Dispatch_Table_Wrappers");
8859 when E_In_Out_Parameter |
8862 Write_Str ("Last_Assignment");
8864 when E_Access_Subprogram_Type =>
8865 Write_Str ("Original_Access_Type");
8867 when E_Generic_Package |
8869 Write_Str ("Package_Instantiation");
8873 Write_Str ("Related_Type");
8876 Write_Str ("Relative_Deadline_Variable");
8880 Write_Str ("Overridden_Operation");
8883 Write_Str ("Field26??");
8885 end Write_Field26_Name;
8887 ------------------------
8888 -- Write_Field27_Name --
8889 ------------------------
8891 procedure Write_Field27_Name (Id : Entity_Id) is
8896 Write_Str ("Current_Use_Clause");
8901 Write_Str ("Related_Type");
8904 Write_Str ("Wrapped_Entity");
8907 Write_Str ("Field27??");
8909 end Write_Field27_Name;
8911 ------------------------
8912 -- Write_Field28_Name --
8913 ------------------------
8915 procedure Write_Field28_Name (Id : Entity_Id) is
8923 E_Subprogram_Type =>
8924 Write_Str ("Extra_Formals");
8926 when E_Constant | E_Variable =>
8927 Write_Str ("Initialization_Statements");
8929 when E_Record_Type =>
8930 Write_Str ("Underlying_Record_View");
8933 Write_Str ("Field28??");
8935 end Write_Field28_Name;
8937 ------------------------
8938 -- Write_Field29_Name --
8939 ------------------------
8941 procedure Write_Field29_Name (Id : Entity_Id) is
8945 Write_Str ("Subprograms_For_Type");
8948 Write_Str ("Field29??");
8950 end Write_Field29_Name;
8952 ------------------------
8953 -- Write_Field30_Name --
8954 ------------------------
8956 procedure Write_Field30_Name (Id : Entity_Id) is
8960 Write_Str ("Corresponding_Equality");
8963 Write_Str ("Static_Initialization");
8966 Write_Str ("Field30??");
8968 end Write_Field30_Name;
8970 ------------------------
8971 -- Write_Field31_Name --
8972 ------------------------
8974 procedure Write_Field31_Name (Id : Entity_Id) is
8978 Write_Str ("Field31??");
8980 end Write_Field31_Name;
8982 ------------------------
8983 -- Write_Field32_Name --
8984 ------------------------
8986 procedure Write_Field32_Name (Id : Entity_Id) is
8990 Write_Str ("Field32??");
8992 end Write_Field32_Name;
8994 ------------------------
8995 -- Write_Field33_Name --
8996 ------------------------
8998 procedure Write_Field33_Name (Id : Entity_Id) is
9002 Write_Str ("Field33??");
9004 end Write_Field33_Name;
9006 ------------------------
9007 -- Write_Field34_Name --
9008 ------------------------
9010 procedure Write_Field34_Name (Id : Entity_Id) is
9014 Write_Str ("Field34??");
9016 end Write_Field34_Name;
9018 ------------------------
9019 -- Write_Field35_Name --
9020 ------------------------
9022 procedure Write_Field35_Name (Id : Entity_Id) is
9026 Write_Str ("Field35??");
9028 end Write_Field35_Name;
9030 -------------------------
9031 -- Iterator Procedures --
9032 -------------------------
9034 procedure Proc_Next_Component (N : in out Node_Id) is
9036 N := Next_Component (N);
9037 end Proc_Next_Component;
9039 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9041 N := Next_Entity (N);
9042 while Present (N) loop
9043 exit when Ekind_In (N, E_Component, E_Discriminant);
9044 N := Next_Entity (N);
9046 end Proc_Next_Component_Or_Discriminant;
9048 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9050 N := Next_Discriminant (N);
9051 end Proc_Next_Discriminant;
9053 procedure Proc_Next_Formal (N : in out Node_Id) is
9055 N := Next_Formal (N);
9056 end Proc_Next_Formal;
9058 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9060 N := Next_Formal_With_Extras (N);
9061 end Proc_Next_Formal_With_Extras;
9063 procedure Proc_Next_Index (N : in out Node_Id) is
9065 N := Next_Index (N);
9066 end Proc_Next_Index;
9068 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9070 N := Next_Inlined_Subprogram (N);
9071 end Proc_Next_Inlined_Subprogram;
9073 procedure Proc_Next_Literal (N : in out Node_Id) is
9075 N := Next_Literal (N);
9076 end Proc_Next_Literal;
9078 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9080 N := Next_Stored_Discriminant (N);
9081 end Proc_Next_Stored_Discriminant;