1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2015, 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 Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
73 -- Associated_Entity Node37
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Part_Of_Constituents Elist9
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
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 -- Normalized_Position Uint14
118 -- Postconditions_Proc Node14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Pending_Access_Types Elist15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
130 -- Access_Disp_Table Elist16
131 -- Body_References Elist16
132 -- Cloned_Subtype Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- Scale_Value Uint16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Lit_Indexes Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
162 -- String_Literal_Low_Bound Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Default_Aspect_Component_Value Node19
167 -- Default_Aspect_Value Node19
168 -- Entry_Bodies_Array Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Non_Limited_View Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
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_Impl_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Incomplete_Actuals Elist24
216 -- Related_Expression Node24
217 -- Subps_Index Uint24
219 -- Debug_Renaming_Link Node25
220 -- DT_Offset_To_Top_Func Node25
221 -- Interface_Alias Node25
222 -- Interfaces Elist25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Discrete_Predicate List25
226 -- Static_Real_Or_String_Predicate Node25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Storage_Size_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Original_Access_Type Node28
243 -- Relative_Deadline_Variable Node28
244 -- Underlying_Record_View Node28
246 -- BIP_Initialization_Call Node29
247 -- Subprograms_For_Type Node29
249 -- Corresponding_Equality Node30
250 -- Last_Aggregate_Assignment Node30
251 -- Static_Initialization Node30
253 -- Derived_Type_Link Node31
254 -- Thunk_Entity Node31
255 -- Activation_Record_Component Node31
257 -- Encapsulating_State Node32
258 -- SPARK_Pragma Node32
259 -- No_Tagged_Streams_Pragma Node32
261 -- Linker_Section_Pragma Node33
262 -- SPARK_Aux_Pragma Node33
266 -- Import_Pragma Node35
268 -- Anonymous_Master Node36
275 ---------------------------------------------
276 -- Usage of Flags in Defining Entity Nodes --
277 ---------------------------------------------
279 -- All flags are unique, there is no overlaying, so each flag is physically
280 -- present in every entity. However, for many of the flags, it only makes
281 -- sense for them to be set true for certain subsets of entity kinds. See
282 -- the spec of Einfo for further details.
284 -- Is_Inlined_Always Flag1
285 -- Is_Hidden_Non_Overridden_Subpgm Flag2
286 -- Has_Default_Init_Cond Flag3
288 -- Has_Discriminants Flag5
289 -- Is_Dispatching_Operation Flag6
290 -- Is_Immediately_Visible Flag7
292 -- Is_Potentially_Use_Visible Flag9
296 -- Is_Constrained Flag12
297 -- Is_Generic_Type Flag13
298 -- Depends_On_Private Flag14
300 -- Is_Volatile Flag16
301 -- Is_Internal Flag17
302 -- Has_Delayed_Freeze Flag18
303 -- Is_Abstract_Subprogram Flag19
304 -- Is_Concurrent_Record_Type Flag20
306 -- Has_Master_Entity Flag21
307 -- Needs_No_Actuals Flag22
308 -- Has_Storage_Size_Clause Flag23
309 -- Is_Imported Flag24
310 -- Is_Limited_Record Flag25
311 -- Has_Completion Flag26
312 -- Has_Pragma_Controlled Flag27
313 -- Is_Statically_Allocated Flag28
314 -- Has_Size_Clause Flag29
317 -- Checks_May_Be_Suppressed Flag31
318 -- Kill_Elaboration_Checks Flag32
319 -- Kill_Range_Checks Flag33
320 -- Has_Independent_Components Flag34
321 -- Is_Class_Wide_Equivalent_Type Flag35
322 -- Referenced_As_LHS Flag36
323 -- Is_Known_Non_Null Flag37
324 -- Can_Never_Be_Null Flag38
325 -- Has_Default_Aspect Flag39
326 -- Body_Needed_For_SAL Flag40
328 -- Treat_As_Volatile Flag41
329 -- Is_Controlled Flag42
330 -- Has_Controlled_Component Flag43
332 -- In_Private_Part Flag45
333 -- Has_Alignment_Clause Flag46
335 -- In_Package_Body Flag48
337 -- Delay_Subprogram_Descriptors Flag50
340 -- Is_Entry_Formal Flag52
341 -- Is_Private_Descendant Flag53
342 -- Return_Present Flag54
343 -- Is_Tagged_Type Flag55
344 -- Has_Homonym Flag56
346 -- Non_Binary_Modulus Flag58
347 -- Is_Preelaborated Flag59
348 -- Is_Shared_Passive Flag60
350 -- Is_Remote_Types Flag61
351 -- Is_Remote_Call_Interface Flag62
352 -- Is_Character_Type Flag63
353 -- Is_Intrinsic_Subprogram Flag64
354 -- Has_Record_Rep_Clause Flag65
355 -- Has_Enumeration_Rep_Clause Flag66
356 -- Has_Small_Clause Flag67
357 -- Has_Component_Size_Clause Flag68
358 -- Is_Access_Constant Flag69
359 -- Is_First_Subtype Flag70
361 -- Has_Completion_In_Body Flag71
362 -- Has_Unknown_Discriminants Flag72
363 -- Is_Child_Unit Flag73
364 -- Is_CPP_Class Flag74
365 -- Has_Non_Standard_Rep Flag75
366 -- Is_Constructor Flag76
367 -- Static_Elaboration_Desired Flag77
369 -- Has_All_Calls_Remote Flag79
370 -- Is_Constr_Subt_For_U_Nominal Flag80
372 -- Is_Asynchronous Flag81
373 -- Has_Gigi_Rep_Item Flag82
374 -- Has_Machine_Radix_Clause Flag83
375 -- Machine_Radix_10 Flag84
377 -- Has_Atomic_Components Flag86
378 -- Has_Volatile_Components Flag87
379 -- Discard_Names Flag88
380 -- Is_Interrupt_Handler Flag89
381 -- Returns_By_Ref Flag90
384 -- Size_Known_At_Compile_Time Flag92
385 -- Reverse_Storage_Order Flag93
386 -- Is_Generic_Actual_Type Flag94
387 -- Uses_Sec_Stack Flag95
388 -- Warnings_Off Flag96
389 -- Is_Controlling_Formal Flag97
390 -- Has_Controlling_Result Flag98
391 -- Is_Exported Flag99
392 -- Has_Specified_Layout Flag100
394 -- Has_Nested_Block_With_Handler Flag101
396 -- Is_Completely_Hidden Flag103
397 -- Address_Taken Flag104
398 -- Suppress_Initialization Flag105
399 -- Is_Limited_Composite Flag106
400 -- Is_Private_Composite Flag107
401 -- Default_Expressions_Processed Flag108
402 -- Is_Non_Static_Subtype Flag109
403 -- Has_Out_Or_In_Out_Parameter Flag110
405 -- Is_Formal_Subprogram Flag111
406 -- Is_Renaming_Of_Object Flag112
408 -- Delay_Cleanups Flag114
409 -- Never_Set_In_Source Flag115
410 -- Is_Visible_Lib_Unit Flag116
411 -- Is_Unchecked_Union Flag117
412 -- Is_For_Access_Subtype Flag118
413 -- Has_Convention_Pragma Flag119
414 -- Has_Primitive_Operations Flag120
416 -- Has_Pragma_Pack Flag121
417 -- Is_Bit_Packed_Array Flag122
418 -- Has_Unchecked_Union Flag123
419 -- Is_Eliminated Flag124
420 -- C_Pass_By_Copy Flag125
421 -- Is_Instantiated Flag126
422 -- Is_Valued_Procedure Flag127
423 -- (used for Component_Alignment) Flag128
424 -- (used for Component_Alignment) Flag129
425 -- Is_Generic_Instance Flag130
427 -- No_Pool_Assigned Flag131
428 -- Is_Default_Init_Cond_Procedure Flag132
429 -- Has_Inherited_Default_Init_Cond Flag133
430 -- Returns_Limited_View Flag134
431 -- Has_Aliased_Components Flag135
432 -- No_Strict_Aliasing Flag136
433 -- Is_Machine_Code_Subprogram Flag137
434 -- Is_Packed_Array_Impl_Type Flag138
435 -- Has_Biased_Representation Flag139
436 -- Has_Complex_Representation Flag140
438 -- Is_Constr_Subt_For_UN_Aliased Flag141
439 -- Has_Missing_Return Flag142
440 -- Has_Recursive_Call Flag143
441 -- Is_Unsigned_Type Flag144
442 -- Strict_Alignment Flag145
443 -- Is_Abstract_Type Flag146
444 -- Needs_Debug_Info Flag147
445 -- Suppress_Elaboration_Warnings Flag148
446 -- Is_Compilation_Unit Flag149
447 -- Has_Pragma_Elaborate_Body Flag150
449 -- Has_Private_Ancestor Flag151
450 -- Entry_Accepted Flag152
451 -- Is_Obsolescent Flag153
452 -- Has_Per_Object_Constraint Flag154
453 -- Has_Private_Declaration Flag155
454 -- Referenced Flag156
455 -- Has_Pragma_Inline Flag157
456 -- Finalize_Storage_Only Flag158
457 -- From_Limited_With Flag159
458 -- Is_Package_Body_Entity Flag160
460 -- Has_Qualified_Name Flag161
461 -- Nonzero_Is_True Flag162
462 -- Is_True_Constant Flag163
463 -- Reverse_Bit_Order Flag164
464 -- Suppress_Style_Checks Flag165
465 -- Debug_Info_Off Flag166
466 -- Sec_Stack_Needed_For_Return Flag167
467 -- Materialize_Entity Flag168
468 -- Has_Pragma_Thread_Local_Storage Flag169
469 -- Is_Known_Valid Flag170
471 -- Is_Hidden_Open_Scope Flag171
472 -- Has_Object_Size_Clause Flag172
473 -- Has_Fully_Qualified_Name Flag173
474 -- Elaboration_Entity_Required Flag174
475 -- Has_Forward_Instantiation Flag175
476 -- Is_Discrim_SO_Function Flag176
477 -- Size_Depends_On_Discriminant Flag177
478 -- Is_Null_Init_Proc Flag178
479 -- Has_Pragma_Pure_Function Flag179
480 -- Has_Pragma_Unreferenced Flag180
482 -- Has_Contiguous_Rep Flag181
483 -- Has_Xref_Entry Flag182
484 -- Must_Be_On_Byte_Boundary Flag183
485 -- Has_Stream_Size_Clause Flag184
486 -- Is_Ada_2005_Only Flag185
487 -- Is_Interface Flag186
488 -- Has_Constrained_Partial_View Flag187
489 -- Uses_Lock_Free Flag188
490 -- Is_Pure_Unit_Access_Type Flag189
491 -- Has_Specified_Stream_Input Flag190
493 -- Has_Specified_Stream_Output Flag191
494 -- Has_Specified_Stream_Read Flag192
495 -- Has_Specified_Stream_Write Flag193
496 -- Is_Local_Anonymous_Access Flag194
497 -- Is_Primitive_Wrapper Flag195
498 -- Was_Hidden Flag196
499 -- Is_Limited_Interface Flag197
500 -- Has_Pragma_Ordered Flag198
501 -- Is_Ada_2012_Only Flag199
503 -- Has_Delayed_Aspects Flag200
504 -- Has_Pragma_No_Inline Flag201
505 -- Itype_Printed Flag202
506 -- Has_Pragma_Pure Flag203
507 -- Is_Known_Null Flag204
508 -- Low_Bound_Tested Flag205
509 -- Is_Visible_Formal Flag206
510 -- Known_To_Have_Preelab_Init Flag207
511 -- Must_Have_Preelab_Init Flag208
512 -- Is_Return_Object Flag209
513 -- Elaborate_Body_Desirable Flag210
515 -- Has_Static_Discriminants Flag211
516 -- Has_Pragma_Unreferenced_Objects Flag212
517 -- Requires_Overriding Flag213
519 -- Has_Uplevel_Reference Flag215
520 -- Universal_Aliasing Flag216
521 -- Suppress_Value_Tracking_On_Call Flag217
522 -- Is_Primitive Flag218
523 -- Has_Initial_Value Flag219
524 -- Has_Dispatch_Table Flag220
526 -- Has_Pragma_Preelab_Init Flag221
527 -- Used_As_Generic_Actual Flag222
528 -- Is_Descendent_Of_Address Flag223
531 -- Is_Only_Out_Parameter Flag226
532 -- Referenced_As_Out_Parameter Flag227
533 -- Has_Thunks Flag228
534 -- Can_Use_Internal_Rep Flag229
535 -- Has_Pragma_Inline_Always Flag230
537 -- Renamed_In_Spec Flag231
538 -- Has_Invariants Flag232
539 -- Has_Pragma_Unmodified Flag233
540 -- Is_Dispatch_Table_Entity Flag234
541 -- Is_Trivial_Subprogram Flag235
542 -- Warnings_Off_Used Flag236
543 -- Warnings_Off_Used_Unmodified Flag237
544 -- Warnings_Off_Used_Unreferenced Flag238
545 -- OK_To_Reorder_Components Flag239
546 -- Has_Expanded_Contract Flag240
548 -- Optimize_Alignment_Space Flag241
549 -- Optimize_Alignment_Time Flag242
550 -- Overlays_Constant Flag243
551 -- Is_RACW_Stub_Type Flag244
552 -- Is_Private_Primitive Flag245
553 -- Is_Underlying_Record_View Flag246
554 -- OK_To_Rename Flag247
555 -- Has_Inheritable_Invariants Flag248
556 -- Is_Safe_To_Reevaluate Flag249
557 -- Has_Predicates Flag250
559 -- Has_Implicit_Dereference Flag251
560 -- Is_Processed_Transient Flag252
561 -- Disable_Controlled Flag253
562 -- Is_Implementation_Defined Flag254
563 -- Is_Predicate_Function Flag255
564 -- Is_Predicate_Function_M Flag256
565 -- Is_Invariant_Procedure Flag257
566 -- Has_Dynamic_Predicate_Aspect Flag258
567 -- Has_Static_Predicate_Aspect Flag259
568 -- Has_Loop_Entry_Attributes Flag260
570 -- Has_Delayed_Rep_Aspects Flag261
571 -- May_Inherit_Delayed_Rep_Aspects Flag262
572 -- Has_Visible_Refinement Flag263
573 -- Is_Discriminant_Check_Function Flag264
574 -- SPARK_Pragma_Inherited Flag265
575 -- SPARK_Aux_Pragma_Inherited Flag266
576 -- Has_Shift_Operator Flag267
577 -- Is_Independent Flag268
578 -- Has_Static_Predicate Flag269
579 -- Stores_Attribute_Old_Prefix Flag270
581 -- Has_Protected Flag271
582 -- SSO_Set_Low_By_Default Flag272
583 -- SSO_Set_High_By_Default Flag273
584 -- Is_Generic_Actual_Subprogram Flag274
585 -- No_Predicate_On_Actual Flag275
586 -- No_Dynamic_Predicate_On_Actual Flag276
587 -- Is_Checked_Ghost_Entity Flag277
588 -- Is_Ignored_Ghost_Entity Flag278
589 -- Contains_Ignored_Ghost_Code Flag279
590 -- Partial_View_Has_Unknown_Discr Flag280
592 -- Is_Static_Type Flag281
593 -- Has_Nested_Subprogram Flag282
594 -- Is_Uplevel_Referenced_Entity Flag283
595 -- Is_Unimplemented Flag284
596 -- Is_Volatile_Full_Access Flag285
597 -- Needs_Typedef Flag286
614 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
616 -----------------------
617 -- Local subprograms --
618 -----------------------
621 (State_Id : Entity_Id;
622 Option_Nam : Name_Id) return Boolean;
623 -- Determine whether abstract state State_Id has particular option denoted
624 -- by the name Option_Nam.
630 function Float_Rep (Id : E) return F is
631 pragma Assert (Is_Floating_Point_Type (Id));
633 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
641 (State_Id : Entity_Id;
642 Option_Nam : Name_Id) return Boolean
644 Decl : constant Node_Id := Parent (State_Id);
649 pragma Assert (Ekind (State_Id) = E_Abstract_State);
651 -- The declaration of abstract states with options appear as an
652 -- extension aggregate. If this is not the case, the option is not
655 if Nkind (Decl) /= N_Extension_Aggregate then
661 Opt := First (Expressions (Decl));
662 while Present (Opt) loop
664 -- Currently the only simple option allowed is External
666 if Nkind (Opt) = N_Identifier
667 and then Chars (Opt) = Name_External
668 and then Chars (Opt) = Option_Nam
676 -- Complex options with various specifiers
678 Opt := First (Component_Associations (Decl));
679 while Present (Opt) loop
680 Opt_Nam := First (Choices (Opt));
682 if Nkind (Opt_Nam) = N_Identifier
683 and then Chars (Opt_Nam) = Option_Nam
694 --------------------------------
695 -- Attribute Access Functions --
696 --------------------------------
698 function Abstract_States (Id : E) return L is
700 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
704 function Accept_Address (Id : E) return L is
709 function Access_Disp_Table (Id : E) return L is
711 pragma Assert (Ekind_In (Id, E_Record_Type,
713 return Elist16 (Implementation_Base_Type (Id));
714 end Access_Disp_Table;
716 function Activation_Record_Component (Id : E) return E is
718 pragma Assert (Ekind_In (Id, E_Constant,
725 end Activation_Record_Component;
727 function Actual_Subtype (Id : E) return E is
730 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
731 or else Is_Formal (Id));
735 function Address_Taken (Id : E) return B is
740 function Alias (Id : E) return E is
743 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
747 function Alignment (Id : E) return U is
749 pragma Assert (Is_Type (Id)
750 or else Is_Formal (Id)
751 or else Ekind_In (Id, E_Loop_Parameter,
758 function Anonymous_Master (Id : E) return E is
760 pragma Assert (Ekind_In (Id, E_Function,
766 end Anonymous_Master;
768 function Associated_Entity (Id : E) return E is
771 end Associated_Entity;
773 function Associated_Formal_Package (Id : E) return E is
775 pragma Assert (Ekind (Id) = E_Package);
777 end Associated_Formal_Package;
779 function Associated_Node_For_Itype (Id : E) return N is
782 end Associated_Node_For_Itype;
784 function Associated_Storage_Pool (Id : E) return E is
786 pragma Assert (Is_Access_Type (Id));
787 return Node22 (Root_Type (Id));
788 end Associated_Storage_Pool;
790 function Barrier_Function (Id : E) return N is
792 pragma Assert (Is_Entry (Id));
794 end Barrier_Function;
796 function Block_Node (Id : E) return N is
798 pragma Assert (Ekind (Id) = E_Block);
802 function Body_Entity (Id : E) return E is
804 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
808 function Body_Needed_For_SAL (Id : E) return B is
811 (Ekind (Id) = E_Package
812 or else Is_Subprogram (Id)
813 or else Is_Generic_Unit (Id));
815 end Body_Needed_For_SAL;
817 function Body_References (Id : E) return L is
819 pragma Assert (Ekind (Id) = E_Abstract_State);
823 function BIP_Initialization_Call (Id : E) return N is
825 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
827 end BIP_Initialization_Call;
829 function C_Pass_By_Copy (Id : E) return B is
831 pragma Assert (Is_Record_Type (Id));
832 return Flag125 (Implementation_Base_Type (Id));
835 function Can_Never_Be_Null (Id : E) return B is
838 end Can_Never_Be_Null;
840 function Checks_May_Be_Suppressed (Id : E) return B is
843 end Checks_May_Be_Suppressed;
845 function Class_Wide_Type (Id : E) return E is
847 pragma Assert (Is_Type (Id));
851 function Cloned_Subtype (Id : E) return E is
853 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
857 function Component_Bit_Offset (Id : E) return U is
859 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
861 end Component_Bit_Offset;
863 function Component_Clause (Id : E) return N is
865 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
867 end Component_Clause;
869 function Component_Size (Id : E) return U is
871 pragma Assert (Is_Array_Type (Id));
872 return Uint22 (Implementation_Base_Type (Id));
875 function Component_Type (Id : E) return E is
877 pragma Assert (Is_Array_Type (Id));
878 return Node20 (Implementation_Base_Type (Id));
881 function Corresponding_Concurrent_Type (Id : E) return E is
883 pragma Assert (Ekind (Id) = E_Record_Type);
885 end Corresponding_Concurrent_Type;
887 function Corresponding_Discriminant (Id : E) return E is
889 pragma Assert (Ekind (Id) = E_Discriminant);
891 end Corresponding_Discriminant;
893 function Corresponding_Equality (Id : E) return E is
896 (Ekind (Id) = E_Function
897 and then not Comes_From_Source (Id)
898 and then Chars (Id) = Name_Op_Ne);
900 end Corresponding_Equality;
902 function Corresponding_Protected_Entry (Id : E) return E is
904 pragma Assert (Ekind (Id) = E_Subprogram_Body);
906 end Corresponding_Protected_Entry;
908 function Corresponding_Record_Type (Id : E) return E is
910 pragma Assert (Is_Concurrent_Type (Id));
912 end Corresponding_Record_Type;
914 function Corresponding_Remote_Type (Id : E) return E is
917 end Corresponding_Remote_Type;
919 function Current_Use_Clause (Id : E) return E is
921 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
923 end Current_Use_Clause;
925 function Current_Value (Id : E) return N is
927 pragma Assert (Ekind (Id) in Object_Kind);
931 function CR_Discriminant (Id : E) return E is
936 function Debug_Info_Off (Id : E) return B is
941 function Debug_Renaming_Link (Id : E) return E is
944 end Debug_Renaming_Link;
946 function Default_Aspect_Component_Value (Id : E) return N is
948 pragma Assert (Is_Array_Type (Id));
949 return Node19 (Base_Type (Id));
950 end Default_Aspect_Component_Value;
952 function Default_Aspect_Value (Id : E) return N is
954 pragma Assert (Is_Scalar_Type (Id));
955 return Node19 (Base_Type (Id));
956 end Default_Aspect_Value;
958 function Default_Expr_Function (Id : E) return E is
960 pragma Assert (Is_Formal (Id));
962 end Default_Expr_Function;
964 function Default_Expressions_Processed (Id : E) return B is
967 end Default_Expressions_Processed;
969 function Default_Value (Id : E) return N is
971 pragma Assert (Is_Formal (Id));
975 function Delay_Cleanups (Id : E) return B is
980 function Delay_Subprogram_Descriptors (Id : E) return B is
983 end Delay_Subprogram_Descriptors;
985 function Delta_Value (Id : E) return R is
987 pragma Assert (Is_Fixed_Point_Type (Id));
991 function Dependent_Instances (Id : E) return L is
993 pragma Assert (Is_Generic_Instance (Id));
995 end Dependent_Instances;
997 function Depends_On_Private (Id : E) return B is
999 pragma Assert (Nkind (Id) in N_Entity);
1001 end Depends_On_Private;
1003 function Derived_Type_Link (Id : E) return E is
1005 pragma Assert (Is_Type (Id));
1006 return Node31 (Base_Type (Id));
1007 end Derived_Type_Link;
1009 function Digits_Value (Id : E) return U is
1012 (Is_Floating_Point_Type (Id)
1013 or else Is_Decimal_Fixed_Point_Type (Id));
1017 function Direct_Primitive_Operations (Id : E) return L is
1019 pragma Assert (Is_Tagged_Type (Id));
1020 return Elist10 (Id);
1021 end Direct_Primitive_Operations;
1023 function Directly_Designated_Type (Id : E) return E is
1025 pragma Assert (Is_Access_Type (Id));
1027 end Directly_Designated_Type;
1029 function Disable_Controlled (Id : E) return B is
1031 return Flag253 (Base_Type (Id));
1032 end Disable_Controlled;
1034 function Discard_Names (Id : E) return B is
1039 function Discriminal (Id : E) return E is
1041 pragma Assert (Ekind (Id) = E_Discriminant);
1045 function Discriminal_Link (Id : E) return N is
1048 end Discriminal_Link;
1050 function Discriminant_Checking_Func (Id : E) return E is
1052 pragma Assert (Ekind (Id) = E_Component);
1054 end Discriminant_Checking_Func;
1056 function Discriminant_Constraint (Id : E) return L is
1058 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1059 return Elist21 (Id);
1060 end Discriminant_Constraint;
1062 function Discriminant_Default_Value (Id : E) return N is
1064 pragma Assert (Ekind (Id) = E_Discriminant);
1066 end Discriminant_Default_Value;
1068 function Discriminant_Number (Id : E) return U is
1070 pragma Assert (Ekind (Id) = E_Discriminant);
1072 end Discriminant_Number;
1074 function Dispatch_Table_Wrappers (Id : E) return L is
1076 pragma Assert (Ekind_In (Id, E_Record_Type,
1078 return Elist26 (Implementation_Base_Type (Id));
1079 end Dispatch_Table_Wrappers;
1081 function DT_Entry_Count (Id : E) return U is
1083 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1087 function DT_Offset_To_Top_Func (Id : E) return E is
1089 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1091 end DT_Offset_To_Top_Func;
1093 function DT_Position (Id : E) return U is
1095 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1096 and then Present (DTC_Entity (Id)));
1100 function DTC_Entity (Id : E) return E is
1102 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1106 function Elaborate_Body_Desirable (Id : E) return B is
1108 pragma Assert (Ekind (Id) = E_Package);
1109 return Flag210 (Id);
1110 end Elaborate_Body_Desirable;
1112 function Elaboration_Entity (Id : E) return E is
1117 Ekind (Id) = E_Package
1119 Is_Generic_Unit (Id));
1121 end Elaboration_Entity;
1123 function Elaboration_Entity_Required (Id : E) return B is
1128 Ekind (Id) = E_Package
1130 Is_Generic_Unit (Id));
1131 return Flag174 (Id);
1132 end Elaboration_Entity_Required;
1134 function Encapsulating_State (Id : E) return N is
1136 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1138 end Encapsulating_State;
1140 function Enclosing_Scope (Id : E) return E is
1143 end Enclosing_Scope;
1145 function Entry_Accepted (Id : E) return B is
1147 pragma Assert (Is_Entry (Id));
1148 return Flag152 (Id);
1151 function Entry_Bodies_Array (Id : E) return E is
1154 end Entry_Bodies_Array;
1156 function Entry_Cancel_Parameter (Id : E) return E is
1159 end Entry_Cancel_Parameter;
1161 function Entry_Component (Id : E) return E is
1164 end Entry_Component;
1166 function Entry_Formal (Id : E) return E is
1171 function Entry_Index_Constant (Id : E) return N is
1173 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1175 end Entry_Index_Constant;
1177 function Contains_Ignored_Ghost_Code (Id : E) return B is
1180 (Ekind_In (Id, E_Block,
1184 E_Generic_Procedure,
1188 E_Subprogram_Body));
1189 return Flag279 (Id);
1190 end Contains_Ignored_Ghost_Code;
1192 function Contract (Id : E) return N is
1195 (Ekind_In (Id, E_Constant,
1204 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1208 function Entry_Parameters_Type (Id : E) return E is
1211 end Entry_Parameters_Type;
1213 function Enum_Pos_To_Rep (Id : E) return E is
1215 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1217 end Enum_Pos_To_Rep;
1219 function Enumeration_Pos (Id : E) return Uint is
1221 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1223 end Enumeration_Pos;
1225 function Enumeration_Rep (Id : E) return U is
1227 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1229 end Enumeration_Rep;
1231 function Enumeration_Rep_Expr (Id : E) return N is
1233 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1235 end Enumeration_Rep_Expr;
1237 function Equivalent_Type (Id : E) return E is
1240 (Ekind_In (Id, E_Class_Wide_Type,
1241 E_Class_Wide_Subtype,
1242 E_Access_Subprogram_Type,
1243 E_Access_Protected_Subprogram_Type,
1244 E_Anonymous_Access_Protected_Subprogram_Type,
1245 E_Access_Subprogram_Type,
1248 end Equivalent_Type;
1250 function Esize (Id : E) return Uint is
1255 function Extra_Accessibility (Id : E) return E is
1258 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1260 end Extra_Accessibility;
1262 function Extra_Accessibility_Of_Result (Id : E) return E is
1264 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1266 end Extra_Accessibility_Of_Result;
1268 function Extra_Constrained (Id : E) return E is
1270 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1272 end Extra_Constrained;
1274 function Extra_Formal (Id : E) return E is
1279 function Extra_Formals (Id : E) return E is
1282 (Is_Overloadable (Id)
1283 or else Ekind_In (Id, E_Entry_Family,
1285 E_Subprogram_Type));
1289 function Can_Use_Internal_Rep (Id : E) return B is
1291 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1292 return Flag229 (Base_Type (Id));
1293 end Can_Use_Internal_Rep;
1295 function Finalization_Master (Id : E) return E is
1297 pragma Assert (Is_Access_Type (Id));
1298 return Node23 (Root_Type (Id));
1299 end Finalization_Master;
1301 function Finalize_Storage_Only (Id : E) return B is
1303 pragma Assert (Is_Type (Id));
1304 return Flag158 (Base_Type (Id));
1305 end Finalize_Storage_Only;
1307 function Finalizer (Id : E) return E is
1309 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1313 function First_Entity (Id : E) return E is
1318 function First_Exit_Statement (Id : E) return N is
1320 pragma Assert (Ekind (Id) = E_Loop);
1322 end First_Exit_Statement;
1324 function First_Index (Id : E) return N is
1326 pragma Assert (Is_Array_Type (Id));
1330 function First_Literal (Id : E) return E is
1332 pragma Assert (Is_Enumeration_Type (Id));
1336 function First_Private_Entity (Id : E) return E is
1338 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1339 or else Ekind (Id) in Concurrent_Kind);
1341 end First_Private_Entity;
1343 function First_Rep_Item (Id : E) return E is
1348 function Freeze_Node (Id : E) return N is
1353 function From_Limited_With (Id : E) return B is
1355 return Flag159 (Id);
1356 end From_Limited_With;
1358 function Full_View (Id : E) return E is
1360 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1364 function Generic_Homonym (Id : E) return E is
1366 pragma Assert (Ekind (Id) = E_Generic_Package);
1368 end Generic_Homonym;
1370 function Generic_Renamings (Id : E) return L is
1372 return Elist23 (Id);
1373 end Generic_Renamings;
1375 function Handler_Records (Id : E) return S is
1378 end Handler_Records;
1380 function Has_Aliased_Components (Id : E) return B is
1382 return Flag135 (Implementation_Base_Type (Id));
1383 end Has_Aliased_Components;
1385 function Has_Alignment_Clause (Id : E) return B is
1388 end Has_Alignment_Clause;
1390 function Has_All_Calls_Remote (Id : E) return B is
1393 end Has_All_Calls_Remote;
1395 function Has_Atomic_Components (Id : E) return B is
1397 return Flag86 (Implementation_Base_Type (Id));
1398 end Has_Atomic_Components;
1400 function Has_Biased_Representation (Id : E) return B is
1402 return Flag139 (Id);
1403 end Has_Biased_Representation;
1405 function Has_Completion (Id : E) return B is
1410 function Has_Completion_In_Body (Id : E) return B is
1412 pragma Assert (Is_Type (Id));
1414 end Has_Completion_In_Body;
1416 function Has_Complex_Representation (Id : E) return B is
1418 pragma Assert (Is_Type (Id));
1419 return Flag140 (Implementation_Base_Type (Id));
1420 end Has_Complex_Representation;
1422 function Has_Component_Size_Clause (Id : E) return B is
1424 pragma Assert (Is_Array_Type (Id));
1425 return Flag68 (Implementation_Base_Type (Id));
1426 end Has_Component_Size_Clause;
1428 function Has_Constrained_Partial_View (Id : E) return B is
1430 pragma Assert (Is_Type (Id));
1431 return Flag187 (Id);
1432 end Has_Constrained_Partial_View;
1434 function Has_Controlled_Component (Id : E) return B is
1436 return Flag43 (Base_Type (Id));
1437 end Has_Controlled_Component;
1439 function Has_Contiguous_Rep (Id : E) return B is
1441 return Flag181 (Id);
1442 end Has_Contiguous_Rep;
1444 function Has_Controlling_Result (Id : E) return B is
1447 end Has_Controlling_Result;
1449 function Has_Convention_Pragma (Id : E) return B is
1451 return Flag119 (Id);
1452 end Has_Convention_Pragma;
1454 function Has_Default_Aspect (Id : E) return B is
1456 return Flag39 (Base_Type (Id));
1457 end Has_Default_Aspect;
1459 function Has_Default_Init_Cond (Id : E) return B is
1461 pragma Assert (Is_Type (Id));
1462 return Flag3 (Base_Type (Id));
1463 end Has_Default_Init_Cond;
1465 function Has_Delayed_Aspects (Id : E) return B is
1467 pragma Assert (Nkind (Id) in N_Entity);
1468 return Flag200 (Id);
1469 end Has_Delayed_Aspects;
1471 function Has_Delayed_Freeze (Id : E) return B is
1473 pragma Assert (Nkind (Id) in N_Entity);
1475 end Has_Delayed_Freeze;
1477 function Has_Delayed_Rep_Aspects (Id : E) return B is
1479 pragma Assert (Nkind (Id) in N_Entity);
1480 return Flag261 (Id);
1481 end Has_Delayed_Rep_Aspects;
1483 function Has_Discriminants (Id : E) return B is
1485 pragma Assert (Nkind (Id) in N_Entity);
1487 end Has_Discriminants;
1489 function Has_Dispatch_Table (Id : E) return B is
1491 pragma Assert (Is_Tagged_Type (Id));
1492 return Flag220 (Id);
1493 end Has_Dispatch_Table;
1495 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1497 pragma Assert (Is_Type (Id));
1498 return Flag258 (Id);
1499 end Has_Dynamic_Predicate_Aspect;
1501 function Has_Enumeration_Rep_Clause (Id : E) return B is
1503 pragma Assert (Is_Enumeration_Type (Id));
1505 end Has_Enumeration_Rep_Clause;
1507 function Has_Exit (Id : E) return B is
1512 function Has_Expanded_Contract (Id : E) return B is
1514 pragma Assert (Is_Subprogram (Id));
1515 return Flag240 (Id);
1516 end Has_Expanded_Contract;
1518 function Has_Forward_Instantiation (Id : E) return B is
1520 return Flag175 (Id);
1521 end Has_Forward_Instantiation;
1523 function Has_Fully_Qualified_Name (Id : E) return B is
1525 return Flag173 (Id);
1526 end Has_Fully_Qualified_Name;
1528 function Has_Gigi_Rep_Item (Id : E) return B is
1531 end Has_Gigi_Rep_Item;
1533 function Has_Homonym (Id : E) return B is
1538 function Has_Implicit_Dereference (Id : E) return B is
1540 return Flag251 (Id);
1541 end Has_Implicit_Dereference;
1543 function Has_Independent_Components (Id : E) return B is
1545 return Flag34 (Implementation_Base_Type (Id));
1546 end Has_Independent_Components;
1548 function Has_Inheritable_Invariants (Id : E) return B is
1550 pragma Assert (Is_Type (Id));
1551 return Flag248 (Id);
1552 end Has_Inheritable_Invariants;
1554 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1556 pragma Assert (Is_Type (Id));
1557 return Flag133 (Base_Type (Id));
1558 end Has_Inherited_Default_Init_Cond;
1560 function Has_Initial_Value (Id : E) return B is
1562 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1563 return Flag219 (Id);
1564 end Has_Initial_Value;
1566 function Has_Invariants (Id : E) return B is
1568 pragma Assert (Is_Type (Id));
1569 return Flag232 (Id);
1572 function Has_Loop_Entry_Attributes (Id : E) return B is
1574 pragma Assert (Ekind (Id) = E_Loop);
1575 return Flag260 (Id);
1576 end Has_Loop_Entry_Attributes;
1578 function Has_Machine_Radix_Clause (Id : E) return B is
1580 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1582 end Has_Machine_Radix_Clause;
1584 function Has_Master_Entity (Id : E) return B is
1587 end Has_Master_Entity;
1589 function Has_Missing_Return (Id : E) return B is
1591 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1592 return Flag142 (Id);
1593 end Has_Missing_Return;
1595 function Has_Nested_Block_With_Handler (Id : E) return B is
1597 return Flag101 (Id);
1598 end Has_Nested_Block_With_Handler;
1600 function Has_Nested_Subprogram (Id : E) return B is
1602 pragma Assert (Is_Subprogram (Id));
1603 return Flag282 (Id);
1604 end Has_Nested_Subprogram;
1606 function Has_Non_Standard_Rep (Id : E) return B is
1608 return Flag75 (Implementation_Base_Type (Id));
1609 end Has_Non_Standard_Rep;
1611 function Has_Object_Size_Clause (Id : E) return B is
1613 pragma Assert (Is_Type (Id));
1614 return Flag172 (Id);
1615 end Has_Object_Size_Clause;
1617 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1620 (Ekind_In (Id, E_Entry, E_Entry_Family)
1621 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1622 return Flag110 (Id);
1623 end Has_Out_Or_In_Out_Parameter;
1625 function Has_Per_Object_Constraint (Id : E) return B is
1627 return Flag154 (Id);
1628 end Has_Per_Object_Constraint;
1630 function Has_Pragma_Controlled (Id : E) return B is
1632 pragma Assert (Is_Access_Type (Id));
1633 return Flag27 (Implementation_Base_Type (Id));
1634 end Has_Pragma_Controlled;
1636 function Has_Pragma_Elaborate_Body (Id : E) return B is
1638 return Flag150 (Id);
1639 end Has_Pragma_Elaborate_Body;
1641 function Has_Pragma_Inline (Id : E) return B is
1643 return Flag157 (Id);
1644 end Has_Pragma_Inline;
1646 function Has_Pragma_Inline_Always (Id : E) return B is
1648 return Flag230 (Id);
1649 end Has_Pragma_Inline_Always;
1651 function Has_Pragma_No_Inline (Id : E) return B is
1653 return Flag201 (Id);
1654 end Has_Pragma_No_Inline;
1656 function Has_Pragma_Ordered (Id : E) return B is
1658 pragma Assert (Is_Enumeration_Type (Id));
1659 return Flag198 (Implementation_Base_Type (Id));
1660 end Has_Pragma_Ordered;
1662 function Has_Pragma_Pack (Id : E) return B is
1664 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1665 return Flag121 (Implementation_Base_Type (Id));
1666 end Has_Pragma_Pack;
1668 function Has_Pragma_Preelab_Init (Id : E) return B is
1670 return Flag221 (Id);
1671 end Has_Pragma_Preelab_Init;
1673 function Has_Pragma_Pure (Id : E) return B is
1675 return Flag203 (Id);
1676 end Has_Pragma_Pure;
1678 function Has_Pragma_Pure_Function (Id : E) return B is
1680 return Flag179 (Id);
1681 end Has_Pragma_Pure_Function;
1683 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1685 return Flag169 (Id);
1686 end Has_Pragma_Thread_Local_Storage;
1688 function Has_Pragma_Unmodified (Id : E) return B is
1690 return Flag233 (Id);
1691 end Has_Pragma_Unmodified;
1693 function Has_Pragma_Unreferenced (Id : E) return B is
1695 return Flag180 (Id);
1696 end Has_Pragma_Unreferenced;
1698 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1700 pragma Assert (Is_Type (Id));
1701 return Flag212 (Id);
1702 end Has_Pragma_Unreferenced_Objects;
1704 function Has_Predicates (Id : E) return B is
1706 pragma Assert (Is_Type (Id));
1707 return Flag250 (Id);
1710 function Has_Primitive_Operations (Id : E) return B is
1712 pragma Assert (Is_Type (Id));
1713 return Flag120 (Base_Type (Id));
1714 end Has_Primitive_Operations;
1716 function Has_Private_Ancestor (Id : E) return B is
1718 return Flag151 (Id);
1719 end Has_Private_Ancestor;
1721 function Has_Private_Declaration (Id : E) return B is
1723 return Flag155 (Id);
1724 end Has_Private_Declaration;
1726 function Has_Protected (Id : E) return B is
1728 return Flag271 (Base_Type (Id));
1731 function Has_Qualified_Name (Id : E) return B is
1733 return Flag161 (Id);
1734 end Has_Qualified_Name;
1736 function Has_RACW (Id : E) return B is
1738 pragma Assert (Ekind (Id) = E_Package);
1739 return Flag214 (Id);
1742 function Has_Record_Rep_Clause (Id : E) return B is
1744 pragma Assert (Is_Record_Type (Id));
1745 return Flag65 (Implementation_Base_Type (Id));
1746 end Has_Record_Rep_Clause;
1748 function Has_Recursive_Call (Id : E) return B is
1750 pragma Assert (Is_Subprogram (Id));
1751 return Flag143 (Id);
1752 end Has_Recursive_Call;
1754 function Has_Shift_Operator (Id : E) return B is
1756 pragma Assert (Is_Integer_Type (Id));
1757 return Flag267 (Base_Type (Id));
1758 end Has_Shift_Operator;
1760 function Has_Size_Clause (Id : E) return B is
1763 end Has_Size_Clause;
1765 function Has_Small_Clause (Id : E) return B is
1768 end Has_Small_Clause;
1770 function Has_Specified_Layout (Id : E) return B is
1772 pragma Assert (Is_Type (Id));
1773 return Flag100 (Implementation_Base_Type (Id));
1774 end Has_Specified_Layout;
1776 function Has_Specified_Stream_Input (Id : E) return B is
1778 pragma Assert (Is_Type (Id));
1779 return Flag190 (Id);
1780 end Has_Specified_Stream_Input;
1782 function Has_Specified_Stream_Output (Id : E) return B is
1784 pragma Assert (Is_Type (Id));
1785 return Flag191 (Id);
1786 end Has_Specified_Stream_Output;
1788 function Has_Specified_Stream_Read (Id : E) return B is
1790 pragma Assert (Is_Type (Id));
1791 return Flag192 (Id);
1792 end Has_Specified_Stream_Read;
1794 function Has_Specified_Stream_Write (Id : E) return B is
1796 pragma Assert (Is_Type (Id));
1797 return Flag193 (Id);
1798 end Has_Specified_Stream_Write;
1800 function Has_Static_Discriminants (Id : E) return B is
1802 pragma Assert (Is_Type (Id));
1803 return Flag211 (Id);
1804 end Has_Static_Discriminants;
1806 function Has_Static_Predicate (Id : E) return B is
1808 pragma Assert (Is_Type (Id));
1809 return Flag269 (Id);
1810 end Has_Static_Predicate;
1812 function Has_Static_Predicate_Aspect (Id : E) return B is
1814 pragma Assert (Is_Type (Id));
1815 return Flag259 (Id);
1816 end Has_Static_Predicate_Aspect;
1818 function Has_Storage_Size_Clause (Id : E) return B is
1820 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1821 return Flag23 (Implementation_Base_Type (Id));
1822 end Has_Storage_Size_Clause;
1824 function Has_Stream_Size_Clause (Id : E) return B is
1826 return Flag184 (Id);
1827 end Has_Stream_Size_Clause;
1829 function Has_Task (Id : E) return B is
1831 return Flag30 (Base_Type (Id));
1834 function Has_Thunks (Id : E) return B is
1836 return Flag228 (Id);
1839 function Has_Unchecked_Union (Id : E) return B is
1841 return Flag123 (Base_Type (Id));
1842 end Has_Unchecked_Union;
1844 function Has_Unknown_Discriminants (Id : E) return B is
1846 pragma Assert (Is_Type (Id));
1848 end Has_Unknown_Discriminants;
1850 function Has_Uplevel_Reference (Id : E) return B is
1852 return Flag215 (Id);
1853 end Has_Uplevel_Reference;
1855 function Has_Visible_Refinement (Id : E) return B is
1857 pragma Assert (Ekind (Id) = E_Abstract_State);
1858 return Flag263 (Id);
1859 end Has_Visible_Refinement;
1861 function Has_Volatile_Components (Id : E) return B is
1863 return Flag87 (Implementation_Base_Type (Id));
1864 end Has_Volatile_Components;
1866 function Has_Xref_Entry (Id : E) return B is
1868 return Flag182 (Id);
1871 function Hiding_Loop_Variable (Id : E) return E is
1873 pragma Assert (Ekind (Id) = E_Variable);
1875 end Hiding_Loop_Variable;
1877 function Homonym (Id : E) return E is
1882 function Import_Pragma (Id : E) return E is
1884 pragma Assert (Is_Subprogram (Id));
1888 function Incomplete_Actuals (Id : E) return L is
1890 pragma Assert (Ekind (Id) = E_Package);
1891 return Elist24 (Id);
1892 end Incomplete_Actuals;
1894 function Interface_Alias (Id : E) return E is
1896 pragma Assert (Is_Subprogram (Id));
1898 end Interface_Alias;
1900 function Interfaces (Id : E) return L is
1902 pragma Assert (Is_Record_Type (Id));
1903 return Elist25 (Id);
1906 function In_Package_Body (Id : E) return B is
1909 end In_Package_Body;
1911 function In_Private_Part (Id : E) return B is
1914 end In_Private_Part;
1916 function In_Use (Id : E) return B is
1918 pragma Assert (Nkind (Id) in N_Entity);
1922 function Initialization_Statements (Id : E) return N is
1924 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1926 end Initialization_Statements;
1928 function Inner_Instances (Id : E) return L is
1930 return Elist23 (Id);
1931 end Inner_Instances;
1933 function Interface_Name (Id : E) return N is
1938 function Is_Abstract_Subprogram (Id : E) return B is
1940 pragma Assert (Is_Overloadable (Id));
1942 end Is_Abstract_Subprogram;
1944 function Is_Abstract_Type (Id : E) return B is
1946 pragma Assert (Is_Type (Id));
1947 return Flag146 (Id);
1948 end Is_Abstract_Type;
1950 function Is_Local_Anonymous_Access (Id : E) return B is
1952 pragma Assert (Is_Access_Type (Id));
1953 return Flag194 (Id);
1954 end Is_Local_Anonymous_Access;
1956 function Is_Access_Constant (Id : E) return B is
1958 pragma Assert (Is_Access_Type (Id));
1960 end Is_Access_Constant;
1962 function Is_Ada_2005_Only (Id : E) return B is
1964 return Flag185 (Id);
1965 end Is_Ada_2005_Only;
1967 function Is_Ada_2012_Only (Id : E) return B is
1969 return Flag199 (Id);
1970 end Is_Ada_2012_Only;
1972 function Is_Aliased (Id : E) return B is
1974 pragma Assert (Nkind (Id) in N_Entity);
1978 function Is_Asynchronous (Id : E) return B is
1980 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1982 end Is_Asynchronous;
1984 function Is_Atomic (Id : E) return B is
1989 function Is_Bit_Packed_Array (Id : E) return B is
1991 return Flag122 (Implementation_Base_Type (Id));
1992 end Is_Bit_Packed_Array;
1994 function Is_Called (Id : E) return B is
1996 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1997 return Flag102 (Id);
2000 function Is_Character_Type (Id : E) return B is
2003 end Is_Character_Type;
2005 function Is_Checked_Ghost_Entity (Id : E) return B is
2007 pragma Assert (Nkind (Id) in N_Entity);
2008 return Flag277 (Id);
2009 end Is_Checked_Ghost_Entity;
2011 function Is_Child_Unit (Id : E) return B is
2016 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2019 end Is_Class_Wide_Equivalent_Type;
2021 function Is_Compilation_Unit (Id : E) return B is
2023 return Flag149 (Id);
2024 end Is_Compilation_Unit;
2026 function Is_Completely_Hidden (Id : E) return B is
2028 pragma Assert (Ekind (Id) = E_Discriminant);
2029 return Flag103 (Id);
2030 end Is_Completely_Hidden;
2032 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2035 end Is_Constr_Subt_For_U_Nominal;
2037 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2039 return Flag141 (Id);
2040 end Is_Constr_Subt_For_UN_Aliased;
2042 function Is_Constrained (Id : E) return B is
2044 pragma Assert (Nkind (Id) in N_Entity);
2048 function Is_Constructor (Id : E) return B is
2053 function Is_Controlled (Id : E) return B is
2055 return Flag42 (Base_Type (Id));
2058 function Is_Controlling_Formal (Id : E) return B is
2060 pragma Assert (Is_Formal (Id));
2062 end Is_Controlling_Formal;
2064 function Is_CPP_Class (Id : E) return B is
2069 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2071 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2072 return Flag132 (Id);
2073 end Is_Default_Init_Cond_Procedure;
2075 function Is_Descendent_Of_Address (Id : E) return B is
2077 return Flag223 (Id);
2078 end Is_Descendent_Of_Address;
2080 function Is_Discrim_SO_Function (Id : E) return B is
2082 return Flag176 (Id);
2083 end Is_Discrim_SO_Function;
2085 function Is_Discriminant_Check_Function (Id : E) return B is
2087 return Flag264 (Id);
2088 end Is_Discriminant_Check_Function;
2090 function Is_Dispatch_Table_Entity (Id : E) return B is
2092 return Flag234 (Id);
2093 end Is_Dispatch_Table_Entity;
2095 function Is_Dispatching_Operation (Id : E) return B is
2097 pragma Assert (Nkind (Id) in N_Entity);
2099 end Is_Dispatching_Operation;
2101 function Is_Eliminated (Id : E) return B is
2103 return Flag124 (Id);
2106 function Is_Entry_Formal (Id : E) return B is
2109 end Is_Entry_Formal;
2111 function Is_Exported (Id : E) return B is
2116 function Is_First_Subtype (Id : E) return B is
2119 end Is_First_Subtype;
2121 function Is_For_Access_Subtype (Id : E) return B is
2123 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2124 return Flag118 (Id);
2125 end Is_For_Access_Subtype;
2127 function Is_Formal_Subprogram (Id : E) return B is
2129 return Flag111 (Id);
2130 end Is_Formal_Subprogram;
2132 function Is_Frozen (Id : E) return B is
2137 function Is_Generic_Actual_Subprogram (Id : E) return B is
2139 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2140 return Flag274 (Id);
2141 end Is_Generic_Actual_Subprogram;
2143 function Is_Generic_Actual_Type (Id : E) return B is
2145 pragma Assert (Is_Type (Id));
2147 end Is_Generic_Actual_Type;
2149 function Is_Generic_Instance (Id : E) return B is
2151 return Flag130 (Id);
2152 end Is_Generic_Instance;
2154 function Is_Generic_Type (Id : E) return B is
2156 pragma Assert (Nkind (Id) in N_Entity);
2158 end Is_Generic_Type;
2160 function Is_Hidden (Id : E) return B is
2165 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2168 end Is_Hidden_Non_Overridden_Subpgm;
2170 function Is_Hidden_Open_Scope (Id : E) return B is
2172 return Flag171 (Id);
2173 end Is_Hidden_Open_Scope;
2175 function Is_Ignored_Ghost_Entity (Id : E) return B is
2177 pragma Assert (Nkind (Id) in N_Entity);
2178 return Flag278 (Id);
2179 end Is_Ignored_Ghost_Entity;
2181 function Is_Immediately_Visible (Id : E) return B is
2183 pragma Assert (Nkind (Id) in N_Entity);
2185 end Is_Immediately_Visible;
2187 function Is_Implementation_Defined (Id : E) return B is
2189 return Flag254 (Id);
2190 end Is_Implementation_Defined;
2192 function Is_Imported (Id : E) return B is
2197 function Is_Independent (Id : E) return B is
2199 return Flag268 (Id);
2202 function Is_Inlined (Id : E) return B is
2207 function Is_Inlined_Always (Id : E) return B is
2209 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2211 end Is_Inlined_Always;
2213 function Is_Interface (Id : E) return B is
2215 return Flag186 (Id);
2218 function Is_Instantiated (Id : E) return B is
2220 return Flag126 (Id);
2221 end Is_Instantiated;
2223 function Is_Internal (Id : E) return B is
2225 pragma Assert (Nkind (Id) in N_Entity);
2229 function Is_Interrupt_Handler (Id : E) return B is
2231 pragma Assert (Nkind (Id) in N_Entity);
2233 end Is_Interrupt_Handler;
2235 function Is_Intrinsic_Subprogram (Id : E) return B is
2238 end Is_Intrinsic_Subprogram;
2240 function Is_Invariant_Procedure (Id : E) return B is
2242 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2243 return Flag257 (Id);
2244 end Is_Invariant_Procedure;
2246 function Is_Itype (Id : E) return B is
2251 function Is_Known_Non_Null (Id : E) return B is
2254 end Is_Known_Non_Null;
2256 function Is_Known_Null (Id : E) return B is
2258 return Flag204 (Id);
2261 function Is_Known_Valid (Id : E) return B is
2263 return Flag170 (Id);
2266 function Is_Limited_Composite (Id : E) return B is
2268 return Flag106 (Id);
2269 end Is_Limited_Composite;
2271 function Is_Limited_Interface (Id : E) return B is
2273 return Flag197 (Id);
2274 end Is_Limited_Interface;
2276 function Is_Limited_Record (Id : E) return B is
2279 end Is_Limited_Record;
2281 function Is_Machine_Code_Subprogram (Id : E) return B is
2283 pragma Assert (Is_Subprogram (Id));
2284 return Flag137 (Id);
2285 end Is_Machine_Code_Subprogram;
2287 function Is_Non_Static_Subtype (Id : E) return B is
2289 pragma Assert (Is_Type (Id));
2290 return Flag109 (Id);
2291 end Is_Non_Static_Subtype;
2293 function Is_Null_Init_Proc (Id : E) return B is
2295 pragma Assert (Ekind (Id) = E_Procedure);
2296 return Flag178 (Id);
2297 end Is_Null_Init_Proc;
2299 function Is_Obsolescent (Id : E) return B is
2301 return Flag153 (Id);
2304 function Is_Only_Out_Parameter (Id : E) return B is
2306 pragma Assert (Is_Formal (Id));
2307 return Flag226 (Id);
2308 end Is_Only_Out_Parameter;
2310 function Is_Package_Body_Entity (Id : E) return B is
2312 return Flag160 (Id);
2313 end Is_Package_Body_Entity;
2315 function Is_Packed (Id : E) return B is
2317 return Flag51 (Implementation_Base_Type (Id));
2320 function Is_Packed_Array_Impl_Type (Id : E) return B is
2322 return Flag138 (Id);
2323 end Is_Packed_Array_Impl_Type;
2325 function Is_Potentially_Use_Visible (Id : E) return B is
2327 pragma Assert (Nkind (Id) in N_Entity);
2329 end Is_Potentially_Use_Visible;
2331 function Is_Predicate_Function (Id : E) return B is
2333 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2334 return Flag255 (Id);
2335 end Is_Predicate_Function;
2337 function Is_Predicate_Function_M (Id : E) return B is
2339 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2340 return Flag256 (Id);
2341 end Is_Predicate_Function_M;
2343 function Is_Preelaborated (Id : E) return B is
2346 end Is_Preelaborated;
2348 function Is_Primitive (Id : E) return B is
2351 (Is_Overloadable (Id)
2352 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2353 return Flag218 (Id);
2356 function Is_Primitive_Wrapper (Id : E) return B is
2358 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2359 return Flag195 (Id);
2360 end Is_Primitive_Wrapper;
2362 function Is_Private_Composite (Id : E) return B is
2364 pragma Assert (Is_Type (Id));
2365 return Flag107 (Id);
2366 end Is_Private_Composite;
2368 function Is_Private_Descendant (Id : E) return B is
2371 end Is_Private_Descendant;
2373 function Is_Private_Primitive (Id : E) return B is
2375 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2376 return Flag245 (Id);
2377 end Is_Private_Primitive;
2379 function Is_Processed_Transient (Id : E) return B is
2381 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2382 return Flag252 (Id);
2383 end Is_Processed_Transient;
2385 function Is_Public (Id : E) return B is
2387 pragma Assert (Nkind (Id) in N_Entity);
2391 function Is_Pure (Id : E) return B is
2396 function Is_Pure_Unit_Access_Type (Id : E) return B is
2398 pragma Assert (Is_Access_Type (Id));
2399 return Flag189 (Id);
2400 end Is_Pure_Unit_Access_Type;
2402 function Is_RACW_Stub_Type (Id : E) return B is
2404 pragma Assert (Is_Type (Id));
2405 return Flag244 (Id);
2406 end Is_RACW_Stub_Type;
2408 function Is_Raised (Id : E) return B is
2410 pragma Assert (Ekind (Id) = E_Exception);
2411 return Flag224 (Id);
2414 function Is_Remote_Call_Interface (Id : E) return B is
2417 end Is_Remote_Call_Interface;
2419 function Is_Remote_Types (Id : E) return B is
2422 end Is_Remote_Types;
2424 function Is_Renaming_Of_Object (Id : E) return B is
2426 return Flag112 (Id);
2427 end Is_Renaming_Of_Object;
2429 function Is_Return_Object (Id : E) return B is
2431 return Flag209 (Id);
2432 end Is_Return_Object;
2434 function Is_Safe_To_Reevaluate (Id : E) return B is
2436 return Flag249 (Id);
2437 end Is_Safe_To_Reevaluate;
2439 function Is_Shared_Passive (Id : E) return B is
2442 end Is_Shared_Passive;
2444 function Is_Static_Type (Id : E) return B is
2446 return Flag281 (Id);
2449 function Is_Statically_Allocated (Id : E) return B is
2452 end Is_Statically_Allocated;
2454 function Is_Tag (Id : E) return B is
2456 pragma Assert (Nkind (Id) in N_Entity);
2460 function Is_Tagged_Type (Id : E) return B is
2465 function Is_Thunk (Id : E) return B is
2467 return Flag225 (Id);
2470 function Is_Trivial_Subprogram (Id : E) return B is
2472 return Flag235 (Id);
2473 end Is_Trivial_Subprogram;
2475 function Is_True_Constant (Id : E) return B is
2477 return Flag163 (Id);
2478 end Is_True_Constant;
2480 function Is_Unchecked_Union (Id : E) return B is
2482 return Flag117 (Implementation_Base_Type (Id));
2483 end Is_Unchecked_Union;
2485 function Is_Underlying_Record_View (Id : E) return B is
2487 return Flag246 (Id);
2488 end Is_Underlying_Record_View;
2490 function Is_Unimplemented (Id : E) return B is
2492 return Flag284 (Id);
2493 end Is_Unimplemented;
2495 function Is_Unsigned_Type (Id : E) return B is
2497 pragma Assert (Is_Type (Id));
2498 return Flag144 (Id);
2499 end Is_Unsigned_Type;
2501 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2503 return Flag283 (Id);
2504 end Is_Uplevel_Referenced_Entity;
2506 function Is_Valued_Procedure (Id : E) return B is
2508 pragma Assert (Ekind (Id) = E_Procedure);
2509 return Flag127 (Id);
2510 end Is_Valued_Procedure;
2512 function Is_Visible_Formal (Id : E) return B is
2514 return Flag206 (Id);
2515 end Is_Visible_Formal;
2517 function Is_Visible_Lib_Unit (Id : E) return B is
2519 return Flag116 (Id);
2520 end Is_Visible_Lib_Unit;
2522 function Is_Volatile (Id : E) return B is
2524 pragma Assert (Nkind (Id) in N_Entity);
2526 if Is_Type (Id) then
2527 return Flag16 (Base_Type (Id));
2533 function Is_Volatile_Full_Access (Id : E) return B is
2535 return Flag285 (Id);
2536 end Is_Volatile_Full_Access;
2538 function Itype_Printed (Id : E) return B is
2540 pragma Assert (Is_Itype (Id));
2541 return Flag202 (Id);
2544 function Kill_Elaboration_Checks (Id : E) return B is
2547 end Kill_Elaboration_Checks;
2549 function Kill_Range_Checks (Id : E) return B is
2552 end Kill_Range_Checks;
2554 function Known_To_Have_Preelab_Init (Id : E) return B is
2556 pragma Assert (Is_Type (Id));
2557 return Flag207 (Id);
2558 end Known_To_Have_Preelab_Init;
2560 function Last_Aggregate_Assignment (Id : E) return N is
2562 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2564 end Last_Aggregate_Assignment;
2566 function Last_Assignment (Id : E) return N is
2568 pragma Assert (Is_Assignable (Id));
2570 end Last_Assignment;
2572 function Last_Entity (Id : E) return E is
2577 function Limited_View (Id : E) return E is
2579 pragma Assert (Ekind (Id) = E_Package);
2583 function Linker_Section_Pragma (Id : E) return N is
2586 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2588 end Linker_Section_Pragma;
2590 function Lit_Indexes (Id : E) return E is
2592 pragma Assert (Is_Enumeration_Type (Id));
2596 function Lit_Strings (Id : E) return E is
2598 pragma Assert (Is_Enumeration_Type (Id));
2602 function Low_Bound_Tested (Id : E) return B is
2604 return Flag205 (Id);
2605 end Low_Bound_Tested;
2607 function Machine_Radix_10 (Id : E) return B is
2609 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2611 end Machine_Radix_10;
2613 function Master_Id (Id : E) return E is
2615 pragma Assert (Is_Access_Type (Id));
2619 function Materialize_Entity (Id : E) return B is
2621 return Flag168 (Id);
2622 end Materialize_Entity;
2624 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2626 return Flag262 (Id);
2627 end May_Inherit_Delayed_Rep_Aspects;
2629 function Mechanism (Id : E) return M is
2631 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2632 return UI_To_Int (Uint8 (Id));
2635 function Modulus (Id : E) return Uint is
2637 pragma Assert (Is_Modular_Integer_Type (Id));
2638 return Uint17 (Base_Type (Id));
2641 function Must_Be_On_Byte_Boundary (Id : E) return B is
2643 pragma Assert (Is_Type (Id));
2644 return Flag183 (Id);
2645 end Must_Be_On_Byte_Boundary;
2647 function Must_Have_Preelab_Init (Id : E) return B is
2649 pragma Assert (Is_Type (Id));
2650 return Flag208 (Id);
2651 end Must_Have_Preelab_Init;
2653 function Needs_Debug_Info (Id : E) return B is
2655 return Flag147 (Id);
2656 end Needs_Debug_Info;
2658 function Needs_No_Actuals (Id : E) return B is
2661 (Is_Overloadable (Id)
2662 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2664 end Needs_No_Actuals;
2666 function Needs_Typedef (Id : E) return B is
2668 pragma Assert (Is_Type (Id));
2669 return Flag286 (Id);
2672 function Never_Set_In_Source (Id : E) return B is
2674 return Flag115 (Id);
2675 end Never_Set_In_Source;
2677 function Next_Inlined_Subprogram (Id : E) return E is
2680 end Next_Inlined_Subprogram;
2682 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2684 pragma Assert (Is_Discrete_Type (Id));
2685 return Flag276 (Id);
2686 end No_Dynamic_Predicate_On_Actual;
2688 function No_Pool_Assigned (Id : E) return B is
2690 pragma Assert (Is_Access_Type (Id));
2691 return Flag131 (Root_Type (Id));
2692 end No_Pool_Assigned;
2694 function No_Predicate_On_Actual (Id : E) return Boolean is
2696 pragma Assert (Is_Discrete_Type (Id));
2697 return Flag275 (Id);
2698 end No_Predicate_On_Actual;
2700 function No_Return (Id : E) return B is
2702 return Flag113 (Id);
2705 function No_Strict_Aliasing (Id : E) return B is
2707 pragma Assert (Is_Access_Type (Id));
2708 return Flag136 (Base_Type (Id));
2709 end No_Strict_Aliasing;
2711 function No_Tagged_Streams_Pragma (Id : E) return N is
2713 pragma Assert (Is_Tagged_Type (Id));
2715 end No_Tagged_Streams_Pragma;
2717 function Non_Binary_Modulus (Id : E) return B is
2719 pragma Assert (Is_Type (Id));
2720 return Flag58 (Base_Type (Id));
2721 end Non_Binary_Modulus;
2723 function Non_Limited_View (Id : E) return E is
2726 (Ekind (Id) in Incomplete_Kind
2728 Ekind (Id) in Class_Wide_Kind
2730 Ekind (Id) = E_Abstract_State);
2732 end Non_Limited_View;
2734 function Nonzero_Is_True (Id : E) return B is
2736 pragma Assert (Root_Type (Id) = Standard_Boolean);
2737 return Flag162 (Base_Type (Id));
2738 end Nonzero_Is_True;
2740 function Normalized_First_Bit (Id : E) return U is
2742 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2744 end Normalized_First_Bit;
2746 function Normalized_Position (Id : E) return U is
2748 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2750 end Normalized_Position;
2752 function Normalized_Position_Max (Id : E) return U is
2754 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2756 end Normalized_Position_Max;
2758 function OK_To_Rename (Id : E) return B is
2760 pragma Assert (Ekind (Id) = E_Variable);
2761 return Flag247 (Id);
2764 function OK_To_Reorder_Components (Id : E) return B is
2766 pragma Assert (Is_Record_Type (Id));
2767 return Flag239 (Base_Type (Id));
2768 end OK_To_Reorder_Components;
2770 function Optimize_Alignment_Space (Id : E) return B is
2773 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2774 return Flag241 (Id);
2775 end Optimize_Alignment_Space;
2777 function Optimize_Alignment_Time (Id : E) return B is
2780 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2781 return Flag242 (Id);
2782 end Optimize_Alignment_Time;
2784 function Original_Access_Type (Id : E) return E is
2786 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2788 end Original_Access_Type;
2790 function Original_Array_Type (Id : E) return E is
2792 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2794 end Original_Array_Type;
2796 function Original_Record_Component (Id : E) return E is
2798 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2800 end Original_Record_Component;
2802 function Overlays_Constant (Id : E) return B is
2804 return Flag243 (Id);
2805 end Overlays_Constant;
2807 function Overridden_Operation (Id : E) return E is
2810 end Overridden_Operation;
2812 function Package_Instantiation (Id : E) return N is
2814 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2816 end Package_Instantiation;
2818 function Packed_Array_Impl_Type (Id : E) return E is
2820 pragma Assert (Is_Array_Type (Id));
2822 end Packed_Array_Impl_Type;
2824 function Parent_Subtype (Id : E) return E is
2826 pragma Assert (Is_Record_Type (Id));
2827 return Node19 (Base_Type (Id));
2830 function Part_Of_Constituents (Id : E) return L is
2832 pragma Assert (Ekind (Id) = E_Abstract_State);
2834 end Part_Of_Constituents;
2836 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2838 pragma Assert (Is_Type (Id));
2839 return Flag280 (Id);
2840 end Partial_View_Has_Unknown_Discr;
2842 function Pending_Access_Types (Id : E) return L is
2844 pragma Assert (Is_Type (Id));
2845 return Elist15 (Id);
2846 end Pending_Access_Types;
2848 function Postconditions_Proc (Id : E) return E is
2850 pragma Assert (Ekind_In (Id, E_Entry,
2855 end Postconditions_Proc;
2857 function PPC_Wrapper (Id : E) return E is
2859 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2863 function Prival (Id : E) return E is
2865 pragma Assert (Is_Protected_Component (Id));
2869 function Prival_Link (Id : E) return E is
2871 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2875 function Private_Dependents (Id : E) return L is
2877 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2878 return Elist18 (Id);
2879 end Private_Dependents;
2881 function Private_View (Id : E) return N is
2883 pragma Assert (Is_Private_Type (Id));
2887 function Protected_Body_Subprogram (Id : E) return E is
2889 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2891 end Protected_Body_Subprogram;
2893 function Protected_Formal (Id : E) return E is
2895 pragma Assert (Is_Formal (Id));
2897 end Protected_Formal;
2899 function Protection_Object (Id : E) return E is
2902 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2904 end Protection_Object;
2906 function Reachable (Id : E) return B is
2911 function Referenced (Id : E) return B is
2913 return Flag156 (Id);
2916 function Referenced_As_LHS (Id : E) return B is
2919 end Referenced_As_LHS;
2921 function Referenced_As_Out_Parameter (Id : E) return B is
2923 return Flag227 (Id);
2924 end Referenced_As_Out_Parameter;
2926 function Refinement_Constituents (Id : E) return L is
2928 pragma Assert (Ekind (Id) = E_Abstract_State);
2930 end Refinement_Constituents;
2932 function Register_Exception_Call (Id : E) return N is
2934 pragma Assert (Ekind (Id) = E_Exception);
2936 end Register_Exception_Call;
2938 function Related_Array_Object (Id : E) return E is
2940 pragma Assert (Is_Array_Type (Id));
2942 end Related_Array_Object;
2944 function Related_Expression (Id : E) return N is
2946 pragma Assert (Ekind (Id) in Type_Kind
2947 or else Ekind_In (Id, E_Constant, E_Variable));
2949 end Related_Expression;
2951 function Related_Instance (Id : E) return E is
2953 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2955 end Related_Instance;
2957 function Related_Type (Id : E) return E is
2959 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2963 function Relative_Deadline_Variable (Id : E) return E is
2965 pragma Assert (Is_Task_Type (Id));
2966 return Node28 (Implementation_Base_Type (Id));
2967 end Relative_Deadline_Variable;
2969 function Renamed_Entity (Id : E) return N is
2974 function Renamed_In_Spec (Id : E) return B is
2976 pragma Assert (Ekind (Id) = E_Package);
2977 return Flag231 (Id);
2978 end Renamed_In_Spec;
2980 function Renamed_Object (Id : E) return N is
2985 function Renaming_Map (Id : E) return U is
2990 function Requires_Overriding (Id : E) return B is
2992 pragma Assert (Is_Overloadable (Id));
2993 return Flag213 (Id);
2994 end Requires_Overriding;
2996 function Return_Present (Id : E) return B is
3001 function Return_Applies_To (Id : E) return N is
3004 end Return_Applies_To;
3006 function Returns_By_Ref (Id : E) return B is
3011 function Returns_Limited_View (Id : E) return B is
3013 pragma Assert (Ekind (Id) = E_Function);
3014 return Flag134 (Id);
3015 end Returns_Limited_View;
3017 function Reverse_Bit_Order (Id : E) return B is
3019 pragma Assert (Is_Record_Type (Id));
3020 return Flag164 (Base_Type (Id));
3021 end Reverse_Bit_Order;
3023 function Reverse_Storage_Order (Id : E) return B is
3025 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3026 return Flag93 (Base_Type (Id));
3027 end Reverse_Storage_Order;
3029 function RM_Size (Id : E) return U is
3031 pragma Assert (Is_Type (Id));
3035 function Scalar_Range (Id : E) return N is
3040 function Scale_Value (Id : E) return U is
3045 function Scope_Depth_Value (Id : E) return U is
3048 end Scope_Depth_Value;
3050 function Sec_Stack_Needed_For_Return (Id : E) return B is
3052 return Flag167 (Id);
3053 end Sec_Stack_Needed_For_Return;
3055 function Shadow_Entities (Id : E) return S is
3057 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3059 end Shadow_Entities;
3061 function Shared_Var_Procs_Instance (Id : E) return E is
3063 pragma Assert (Ekind (Id) = E_Variable);
3065 end Shared_Var_Procs_Instance;
3067 function Size_Check_Code (Id : E) return N is
3069 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3071 end Size_Check_Code;
3073 function Size_Depends_On_Discriminant (Id : E) return B is
3075 return Flag177 (Id);
3076 end Size_Depends_On_Discriminant;
3078 function Size_Known_At_Compile_Time (Id : E) return B is
3081 end Size_Known_At_Compile_Time;
3083 function Small_Value (Id : E) return R is
3085 pragma Assert (Is_Fixed_Point_Type (Id));
3086 return Ureal21 (Id);
3089 function SPARK_Aux_Pragma (Id : E) return N is
3092 (Ekind_In (Id, E_Generic_Package, -- package variants
3096 end SPARK_Aux_Pragma;
3098 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3101 (Ekind_In (Id, E_Generic_Package, -- package variants
3104 return Flag266 (Id);
3105 end SPARK_Aux_Pragma_Inherited;
3107 function SPARK_Pragma (Id : E) return N is
3110 (Ekind_In (Id, E_Function, -- subprogram variants
3112 E_Generic_Procedure,
3116 Ekind_In (Id, E_Generic_Package, -- package variants
3122 function SPARK_Pragma_Inherited (Id : E) return B is
3125 (Ekind_In (Id, E_Function, -- subprogram variants
3127 E_Generic_Procedure,
3131 Ekind_In (Id, E_Generic_Package, -- package variants
3134 return Flag265 (Id);
3135 end SPARK_Pragma_Inherited;
3137 function Spec_Entity (Id : E) return E is
3139 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3143 function SSO_Set_High_By_Default (Id : E) return B is
3145 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3146 return Flag273 (Base_Type (Id));
3147 end SSO_Set_High_By_Default;
3149 function SSO_Set_Low_By_Default (Id : E) return B is
3151 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3152 return Flag272 (Base_Type (Id));
3153 end SSO_Set_Low_By_Default;
3155 function Static_Discrete_Predicate (Id : E) return S is
3157 pragma Assert (Is_Discrete_Type (Id));
3159 end Static_Discrete_Predicate;
3161 function Static_Real_Or_String_Predicate (Id : E) return N is
3163 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3165 end Static_Real_Or_String_Predicate;
3167 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3169 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3171 end Status_Flag_Or_Transient_Decl;
3173 function Storage_Size_Variable (Id : E) return E is
3175 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3176 return Node26 (Implementation_Base_Type (Id));
3177 end Storage_Size_Variable;
3179 function Static_Elaboration_Desired (Id : E) return B is
3181 pragma Assert (Ekind (Id) = E_Package);
3183 end Static_Elaboration_Desired;
3185 function Static_Initialization (Id : E) return N is
3188 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3190 end Static_Initialization;
3192 function Stored_Constraint (Id : E) return L is
3195 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3196 return Elist23 (Id);
3197 end Stored_Constraint;
3199 function Stores_Attribute_Old_Prefix (Id : E) return B is
3201 return Flag270 (Id);
3202 end Stores_Attribute_Old_Prefix;
3204 function Strict_Alignment (Id : E) return B is
3206 return Flag145 (Implementation_Base_Type (Id));
3207 end Strict_Alignment;
3209 function String_Literal_Length (Id : E) return U is
3212 end String_Literal_Length;
3214 function String_Literal_Low_Bound (Id : E) return N is
3217 end String_Literal_Low_Bound;
3219 function Subprograms_For_Type (Id : E) return E is
3221 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3223 end Subprograms_For_Type;
3225 function Subps_Index (Id : E) return U is
3227 pragma Assert (Is_Subprogram (Id));
3231 function Suppress_Elaboration_Warnings (Id : E) return B is
3233 return Flag148 (Id);
3234 end Suppress_Elaboration_Warnings;
3236 function Suppress_Initialization (Id : E) return B is
3238 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3239 return Flag105 (Id);
3240 end Suppress_Initialization;
3242 function Suppress_Style_Checks (Id : E) return B is
3244 return Flag165 (Id);
3245 end Suppress_Style_Checks;
3247 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3249 return Flag217 (Id);
3250 end Suppress_Value_Tracking_On_Call;
3252 function Task_Body_Procedure (Id : E) return N is
3254 pragma Assert (Ekind (Id) in Task_Kind);
3256 end Task_Body_Procedure;
3258 function Thunk_Entity (Id : E) return E is
3260 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3261 and then Is_Thunk (Id));
3265 function Treat_As_Volatile (Id : E) return B is
3268 end Treat_As_Volatile;
3270 function Underlying_Full_View (Id : E) return E is
3272 pragma Assert (Ekind (Id) in Private_Kind);
3274 end Underlying_Full_View;
3276 function Underlying_Record_View (Id : E) return E is
3279 end Underlying_Record_View;
3281 function Universal_Aliasing (Id : E) return B is
3283 pragma Assert (Is_Type (Id));
3284 return Flag216 (Implementation_Base_Type (Id));
3285 end Universal_Aliasing;
3287 function Unset_Reference (Id : E) return N is
3290 end Unset_Reference;
3292 function Used_As_Generic_Actual (Id : E) return B is
3294 return Flag222 (Id);
3295 end Used_As_Generic_Actual;
3297 function Uses_Lock_Free (Id : E) return B is
3299 pragma Assert (Is_Protected_Type (Id));
3300 return Flag188 (Id);
3303 function Uses_Sec_Stack (Id : E) return B is
3308 function Warnings_Off (Id : E) return B is
3313 function Warnings_Off_Used (Id : E) return B is
3315 return Flag236 (Id);
3316 end Warnings_Off_Used;
3318 function Warnings_Off_Used_Unmodified (Id : E) return B is
3320 return Flag237 (Id);
3321 end Warnings_Off_Used_Unmodified;
3323 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3325 return Flag238 (Id);
3326 end Warnings_Off_Used_Unreferenced;
3328 function Wrapped_Entity (Id : E) return E is
3330 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3331 and then Is_Primitive_Wrapper (Id));
3335 function Was_Hidden (Id : E) return B is
3337 return Flag196 (Id);
3340 ------------------------------
3341 -- Classification Functions --
3342 ------------------------------
3344 function Is_Access_Type (Id : E) return B is
3346 return Ekind (Id) in Access_Kind;
3349 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3351 return Ekind (Id) in Access_Protected_Kind;
3352 end Is_Access_Protected_Subprogram_Type;
3354 function Is_Access_Subprogram_Type (Id : E) return B is
3356 return Ekind (Id) in Access_Subprogram_Kind;
3357 end Is_Access_Subprogram_Type;
3359 function Is_Aggregate_Type (Id : E) return B is
3361 return Ekind (Id) in Aggregate_Kind;
3362 end Is_Aggregate_Type;
3364 function Is_Array_Type (Id : E) return B is
3366 return Ekind (Id) in Array_Kind;
3369 function Is_Assignable (Id : E) return B is
3371 return Ekind (Id) in Assignable_Kind;
3374 function Is_Class_Wide_Type (Id : E) return B is
3376 return Ekind (Id) in Class_Wide_Kind;
3377 end Is_Class_Wide_Type;
3379 function Is_Composite_Type (Id : E) return B is
3381 return Ekind (Id) in Composite_Kind;
3382 end Is_Composite_Type;
3384 function Is_Concurrent_Body (Id : E) return B is
3386 return Ekind (Id) in
3387 Concurrent_Body_Kind;
3388 end Is_Concurrent_Body;
3390 function Is_Concurrent_Record_Type (Id : E) return B is
3393 end Is_Concurrent_Record_Type;
3395 function Is_Concurrent_Type (Id : E) return B is
3397 return Ekind (Id) in Concurrent_Kind;
3398 end Is_Concurrent_Type;
3400 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3402 return Ekind (Id) in
3403 Decimal_Fixed_Point_Kind;
3404 end Is_Decimal_Fixed_Point_Type;
3406 function Is_Digits_Type (Id : E) return B is
3408 return Ekind (Id) in Digits_Kind;
3411 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3413 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3414 end Is_Discrete_Or_Fixed_Point_Type;
3416 function Is_Discrete_Type (Id : E) return B is
3418 return Ekind (Id) in Discrete_Kind;
3419 end Is_Discrete_Type;
3421 function Is_Elementary_Type (Id : E) return B is
3423 return Ekind (Id) in Elementary_Kind;
3424 end Is_Elementary_Type;
3426 function Is_Entry (Id : E) return B is
3428 return Ekind (Id) in Entry_Kind;
3431 function Is_Enumeration_Type (Id : E) return B is
3433 return Ekind (Id) in
3435 end Is_Enumeration_Type;
3437 function Is_Fixed_Point_Type (Id : E) return B is
3439 return Ekind (Id) in
3441 end Is_Fixed_Point_Type;
3443 function Is_Floating_Point_Type (Id : E) return B is
3445 return Ekind (Id) in Float_Kind;
3446 end Is_Floating_Point_Type;
3448 function Is_Formal (Id : E) return B is
3450 return Ekind (Id) in Formal_Kind;
3453 function Is_Formal_Object (Id : E) return B is
3455 return Ekind (Id) in Formal_Object_Kind;
3456 end Is_Formal_Object;
3458 function Is_Generic_Subprogram (Id : E) return B is
3460 return Ekind (Id) in Generic_Subprogram_Kind;
3461 end Is_Generic_Subprogram;
3463 function Is_Generic_Unit (Id : E) return B is
3465 return Ekind (Id) in Generic_Unit_Kind;
3466 end Is_Generic_Unit;
3468 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3470 return Ekind (Id) in
3471 Incomplete_Or_Private_Kind;
3472 end Is_Incomplete_Or_Private_Type;
3474 function Is_Incomplete_Type (Id : E) return B is
3476 return Ekind (Id) in
3478 end Is_Incomplete_Type;
3480 function Is_Integer_Type (Id : E) return B is
3482 return Ekind (Id) in Integer_Kind;
3483 end Is_Integer_Type;
3485 function Is_Modular_Integer_Type (Id : E) return B is
3487 return Ekind (Id) in
3488 Modular_Integer_Kind;
3489 end Is_Modular_Integer_Type;
3491 function Is_Named_Number (Id : E) return B is
3493 return Ekind (Id) in Named_Kind;
3494 end Is_Named_Number;
3496 function Is_Numeric_Type (Id : E) return B is
3498 return Ekind (Id) in Numeric_Kind;
3499 end Is_Numeric_Type;
3501 function Is_Object (Id : E) return B is
3503 return Ekind (Id) in Object_Kind;
3506 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3508 return Ekind (Id) in
3509 Ordinary_Fixed_Point_Kind;
3510 end Is_Ordinary_Fixed_Point_Type;
3512 function Is_Overloadable (Id : E) return B is
3514 return Ekind (Id) in Overloadable_Kind;
3515 end Is_Overloadable;
3517 function Is_Private_Type (Id : E) return B is
3519 return Ekind (Id) in Private_Kind;
3520 end Is_Private_Type;
3522 function Is_Protected_Type (Id : E) return B is
3524 return Ekind (Id) in Protected_Kind;
3525 end Is_Protected_Type;
3527 function Is_Real_Type (Id : E) return B is
3529 return Ekind (Id) in Real_Kind;
3532 function Is_Record_Type (Id : E) return B is
3534 return Ekind (Id) in Record_Kind;
3537 function Is_Scalar_Type (Id : E) return B is
3539 return Ekind (Id) in Scalar_Kind;
3542 function Is_Signed_Integer_Type (Id : E) return B is
3544 return Ekind (Id) in Signed_Integer_Kind;
3545 end Is_Signed_Integer_Type;
3547 function Is_Subprogram (Id : E) return B is
3549 return Ekind (Id) in Subprogram_Kind;
3552 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3554 return Ekind (Id) in Subprogram_Kind
3556 Ekind (Id) in Generic_Subprogram_Kind;
3557 end Is_Subprogram_Or_Generic_Subprogram;
3559 function Is_Task_Type (Id : E) return B is
3561 return Ekind (Id) in Task_Kind;
3564 function Is_Type (Id : E) return B is
3566 return Ekind (Id) in Type_Kind;
3569 ------------------------------
3570 -- Attribute Set Procedures --
3571 ------------------------------
3573 -- Note: in many of these set procedures an "obvious" assertion is missing.
3574 -- The reason for this is that in many cases, a field is set before the
3575 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3576 -- it is possible to add assertions that specifically include the E_Void
3577 -- possibility, but in some cases, we just omit the assertions.
3579 procedure Set_Abstract_States (Id : E; V : L) is
3581 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3582 Set_Elist25 (Id, V);
3583 end Set_Abstract_States;
3585 procedure Set_Accept_Address (Id : E; V : L) is
3587 Set_Elist21 (Id, V);
3588 end Set_Accept_Address;
3590 procedure Set_Access_Disp_Table (Id : E; V : L) is
3592 pragma Assert (Ekind (Id) = E_Record_Type
3593 and then Id = Implementation_Base_Type (Id));
3594 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3595 Set_Elist16 (Id, V);
3596 end Set_Access_Disp_Table;
3598 procedure Set_Anonymous_Master (Id : E; V : E) is
3600 pragma Assert (Ekind_In (Id, E_Function,
3604 E_Subprogram_Body));
3606 end Set_Anonymous_Master;
3608 procedure Set_Associated_Entity (Id : E; V : E) is
3611 end Set_Associated_Entity;
3613 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3616 end Set_Associated_Formal_Package;
3618 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3621 end Set_Associated_Node_For_Itype;
3623 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3625 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3627 end Set_Associated_Storage_Pool;
3629 procedure Set_Activation_Record_Component (Id : E; V : E) is
3631 pragma Assert (Ekind_In (Id, E_Constant,
3638 end Set_Activation_Record_Component;
3640 procedure Set_Actual_Subtype (Id : E; V : E) is
3643 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3644 or else Is_Formal (Id));
3646 end Set_Actual_Subtype;
3648 procedure Set_Address_Taken (Id : E; V : B := True) is
3650 Set_Flag104 (Id, V);
3651 end Set_Address_Taken;
3653 procedure Set_Alias (Id : E; V : E) is
3656 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3660 procedure Set_Alignment (Id : E; V : U) is
3662 pragma Assert (Is_Type (Id)
3663 or else Is_Formal (Id)
3664 or else Ekind_In (Id, E_Loop_Parameter,
3671 procedure Set_Barrier_Function (Id : E; V : N) is
3673 pragma Assert (Is_Entry (Id));
3675 end Set_Barrier_Function;
3677 procedure Set_Block_Node (Id : E; V : N) is
3679 pragma Assert (Ekind (Id) = E_Block);
3683 procedure Set_Body_Entity (Id : E; V : E) is
3685 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3687 end Set_Body_Entity;
3689 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3692 (Ekind (Id) = E_Package
3693 or else Is_Subprogram (Id)
3694 or else Is_Generic_Unit (Id));
3696 end Set_Body_Needed_For_SAL;
3698 procedure Set_Body_References (Id : E; V : L) is
3700 pragma Assert (Ekind (Id) = E_Abstract_State);
3701 Set_Elist16 (Id, V);
3702 end Set_Body_References;
3704 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3706 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3708 end Set_BIP_Initialization_Call;
3710 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3712 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3713 Set_Flag125 (Id, V);
3714 end Set_C_Pass_By_Copy;
3716 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3719 end Set_Can_Never_Be_Null;
3721 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3724 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3725 Set_Flag229 (Id, V);
3726 end Set_Can_Use_Internal_Rep;
3728 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3731 end Set_Checks_May_Be_Suppressed;
3733 procedure Set_Class_Wide_Type (Id : E; V : E) is
3735 pragma Assert (Is_Type (Id));
3737 end Set_Class_Wide_Type;
3739 procedure Set_Cloned_Subtype (Id : E; V : E) is
3741 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3743 end Set_Cloned_Subtype;
3745 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3747 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3749 end Set_Component_Bit_Offset;
3751 procedure Set_Component_Clause (Id : E; V : N) is
3753 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3755 end Set_Component_Clause;
3757 procedure Set_Component_Size (Id : E; V : U) is
3759 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3761 end Set_Component_Size;
3763 procedure Set_Component_Type (Id : E; V : E) is
3765 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3767 end Set_Component_Type;
3769 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3772 (Ekind_In (Id, E_Block,
3776 E_Generic_Procedure,
3780 E_Subprogram_Body));
3781 Set_Flag279 (Id, V);
3782 end Set_Contains_Ignored_Ghost_Code;
3784 procedure Set_Contract (Id : E; V : N) is
3787 (Ekind_In (Id, E_Constant,
3796 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3800 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3803 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3805 end Set_Corresponding_Concurrent_Type;
3807 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3809 pragma Assert (Ekind (Id) = E_Discriminant);
3811 end Set_Corresponding_Discriminant;
3813 procedure Set_Corresponding_Equality (Id : E; V : E) is
3816 (Ekind (Id) = E_Function
3817 and then not Comes_From_Source (Id)
3818 and then Chars (Id) = Name_Op_Ne);
3820 end Set_Corresponding_Equality;
3822 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3824 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3826 end Set_Corresponding_Protected_Entry;
3828 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3830 pragma Assert (Is_Concurrent_Type (Id));
3832 end Set_Corresponding_Record_Type;
3834 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3837 end Set_Corresponding_Remote_Type;
3839 procedure Set_Current_Use_Clause (Id : E; V : E) is
3841 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3843 end Set_Current_Use_Clause;
3845 procedure Set_Current_Value (Id : E; V : N) is
3847 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3849 end Set_Current_Value;
3851 procedure Set_CR_Discriminant (Id : E; V : E) is
3854 end Set_CR_Discriminant;
3856 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3858 Set_Flag166 (Id, V);
3859 end Set_Debug_Info_Off;
3861 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3864 end Set_Debug_Renaming_Link;
3866 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3868 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3870 end Set_Default_Aspect_Component_Value;
3872 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3874 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3876 end Set_Default_Aspect_Value;
3878 procedure Set_Default_Expr_Function (Id : E; V : E) is
3880 pragma Assert (Is_Formal (Id));
3882 end Set_Default_Expr_Function;
3884 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3886 Set_Flag108 (Id, V);
3887 end Set_Default_Expressions_Processed;
3889 procedure Set_Default_Value (Id : E; V : N) is
3891 pragma Assert (Is_Formal (Id));
3893 end Set_Default_Value;
3895 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3899 or else Is_Task_Type (Id)
3900 or else Ekind (Id) = E_Block);
3901 Set_Flag114 (Id, V);
3902 end Set_Delay_Cleanups;
3904 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3907 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3910 end Set_Delay_Subprogram_Descriptors;
3912 procedure Set_Delta_Value (Id : E; V : R) is
3914 pragma Assert (Is_Fixed_Point_Type (Id));
3915 Set_Ureal18 (Id, V);
3916 end Set_Delta_Value;
3918 procedure Set_Dependent_Instances (Id : E; V : L) is
3920 pragma Assert (Is_Generic_Instance (Id));
3922 end Set_Dependent_Instances;
3924 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3926 pragma Assert (Nkind (Id) in N_Entity);
3928 end Set_Depends_On_Private;
3930 procedure Set_Derived_Type_Link (Id : E; V : E) is
3932 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3934 end Set_Derived_Type_Link;
3936 procedure Set_Digits_Value (Id : E; V : U) is
3939 (Is_Floating_Point_Type (Id)
3940 or else Is_Decimal_Fixed_Point_Type (Id));
3942 end Set_Digits_Value;
3944 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3947 end Set_Directly_Designated_Type;
3949 procedure Set_Disable_Controlled (Id : E; V : B := True) is
3951 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3952 Set_Flag253 (Id, V);
3953 end Set_Disable_Controlled;
3955 procedure Set_Discard_Names (Id : E; V : B := True) is
3958 end Set_Discard_Names;
3960 procedure Set_Discriminal (Id : E; V : E) is
3962 pragma Assert (Ekind (Id) = E_Discriminant);
3964 end Set_Discriminal;
3966 procedure Set_Discriminal_Link (Id : E; V : E) is
3969 end Set_Discriminal_Link;
3971 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3973 pragma Assert (Ekind (Id) = E_Component);
3975 end Set_Discriminant_Checking_Func;
3977 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3979 pragma Assert (Nkind (Id) in N_Entity);
3980 Set_Elist21 (Id, V);
3981 end Set_Discriminant_Constraint;
3983 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3986 end Set_Discriminant_Default_Value;
3988 procedure Set_Discriminant_Number (Id : E; V : U) is
3991 end Set_Discriminant_Number;
3993 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3995 pragma Assert (Ekind (Id) = E_Record_Type
3996 and then Id = Implementation_Base_Type (Id));
3997 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3998 Set_Elist26 (Id, V);
3999 end Set_Dispatch_Table_Wrappers;
4001 procedure Set_DT_Entry_Count (Id : E; V : U) is
4003 pragma Assert (Ekind (Id) = E_Component);
4005 end Set_DT_Entry_Count;
4007 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4009 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4011 end Set_DT_Offset_To_Top_Func;
4013 procedure Set_DT_Position (Id : E; V : U) is
4015 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4017 end Set_DT_Position;
4019 procedure Set_DTC_Entity (Id : E; V : E) is
4021 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4025 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4027 pragma Assert (Ekind (Id) = E_Package);
4028 Set_Flag210 (Id, V);
4029 end Set_Elaborate_Body_Desirable;
4031 procedure Set_Elaboration_Entity (Id : E; V : E) is
4036 Ekind (Id) = E_Package
4038 Is_Generic_Unit (Id));
4040 end Set_Elaboration_Entity;
4042 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4047 Ekind (Id) = E_Package
4049 Is_Generic_Unit (Id));
4050 Set_Flag174 (Id, V);
4051 end Set_Elaboration_Entity_Required;
4053 procedure Set_Encapsulating_State (Id : E; V : E) is
4055 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4057 end Set_Encapsulating_State;
4059 procedure Set_Enclosing_Scope (Id : E; V : E) is
4062 end Set_Enclosing_Scope;
4064 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4066 pragma Assert (Is_Entry (Id));
4067 Set_Flag152 (Id, V);
4068 end Set_Entry_Accepted;
4070 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4073 end Set_Entry_Bodies_Array;
4075 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4078 end Set_Entry_Cancel_Parameter;
4080 procedure Set_Entry_Component (Id : E; V : E) is
4083 end Set_Entry_Component;
4085 procedure Set_Entry_Formal (Id : E; V : E) is
4088 end Set_Entry_Formal;
4090 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4092 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4094 end Set_Entry_Index_Constant;
4096 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4099 end Set_Entry_Parameters_Type;
4101 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4103 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4105 end Set_Enum_Pos_To_Rep;
4107 procedure Set_Enumeration_Pos (Id : E; V : U) is
4109 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4111 end Set_Enumeration_Pos;
4113 procedure Set_Enumeration_Rep (Id : E; V : U) is
4115 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4117 end Set_Enumeration_Rep;
4119 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4121 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4123 end Set_Enumeration_Rep_Expr;
4125 procedure Set_Equivalent_Type (Id : E; V : E) is
4128 (Ekind_In (Id, E_Class_Wide_Type,
4129 E_Class_Wide_Subtype,
4130 E_Access_Protected_Subprogram_Type,
4131 E_Anonymous_Access_Protected_Subprogram_Type,
4132 E_Access_Subprogram_Type,
4135 end Set_Equivalent_Type;
4137 procedure Set_Esize (Id : E; V : U) is
4142 procedure Set_Extra_Accessibility (Id : E; V : E) is
4145 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4147 end Set_Extra_Accessibility;
4149 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4151 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4153 end Set_Extra_Accessibility_Of_Result;
4155 procedure Set_Extra_Constrained (Id : E; V : E) is
4157 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4159 end Set_Extra_Constrained;
4161 procedure Set_Extra_Formal (Id : E; V : E) is
4164 end Set_Extra_Formal;
4166 procedure Set_Extra_Formals (Id : E; V : E) is
4169 (Is_Overloadable (Id)
4170 or else Ekind_In (Id, E_Entry_Family,
4172 E_Subprogram_Type));
4174 end Set_Extra_Formals;
4176 procedure Set_Finalization_Master (Id : E; V : E) is
4178 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4180 end Set_Finalization_Master;
4182 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4184 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4185 Set_Flag158 (Id, V);
4186 end Set_Finalize_Storage_Only;
4188 procedure Set_Finalizer (Id : E; V : E) is
4190 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4194 procedure Set_First_Entity (Id : E; V : E) is
4197 end Set_First_Entity;
4199 procedure Set_First_Exit_Statement (Id : E; V : N) is
4201 pragma Assert (Ekind (Id) = E_Loop);
4203 end Set_First_Exit_Statement;
4205 procedure Set_First_Index (Id : E; V : N) is
4207 pragma Assert (Is_Array_Type (Id));
4209 end Set_First_Index;
4211 procedure Set_First_Literal (Id : E; V : E) is
4213 pragma Assert (Is_Enumeration_Type (Id));
4215 end Set_First_Literal;
4217 procedure Set_First_Private_Entity (Id : E; V : E) is
4219 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4220 or else Ekind (Id) in Concurrent_Kind);
4222 end Set_First_Private_Entity;
4224 procedure Set_First_Rep_Item (Id : E; V : N) is
4227 end Set_First_Rep_Item;
4229 procedure Set_Float_Rep (Id : E; V : F) is
4230 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4232 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4235 procedure Set_Freeze_Node (Id : E; V : N) is
4238 end Set_Freeze_Node;
4240 procedure Set_From_Limited_With (Id : E; V : B := True) is
4243 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4244 Set_Flag159 (Id, V);
4245 end Set_From_Limited_With;
4247 procedure Set_Full_View (Id : E; V : E) is
4249 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4253 procedure Set_Generic_Homonym (Id : E; V : E) is
4256 end Set_Generic_Homonym;
4258 procedure Set_Generic_Renamings (Id : E; V : L) is
4260 Set_Elist23 (Id, V);
4261 end Set_Generic_Renamings;
4263 procedure Set_Handler_Records (Id : E; V : S) is
4266 end Set_Handler_Records;
4268 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4270 pragma Assert (Id = Base_Type (Id));
4271 Set_Flag135 (Id, V);
4272 end Set_Has_Aliased_Components;
4274 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4277 end Set_Has_Alignment_Clause;
4279 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4282 end Set_Has_All_Calls_Remote;
4284 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4286 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4288 end Set_Has_Atomic_Components;
4290 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4293 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4294 Set_Flag139 (Id, V);
4295 end Set_Has_Biased_Representation;
4297 procedure Set_Has_Completion (Id : E; V : B := True) is
4300 end Set_Has_Completion;
4302 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4304 pragma Assert (Is_Type (Id));
4306 end Set_Has_Completion_In_Body;
4308 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4310 pragma Assert (Ekind (Id) = E_Record_Type);
4311 Set_Flag140 (Id, V);
4312 end Set_Has_Complex_Representation;
4314 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4316 pragma Assert (Ekind (Id) = E_Array_Type);
4318 end Set_Has_Component_Size_Clause;
4320 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4322 pragma Assert (Is_Type (Id));
4323 Set_Flag187 (Id, V);
4324 end Set_Has_Constrained_Partial_View;
4326 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4328 Set_Flag181 (Id, V);
4329 end Set_Has_Contiguous_Rep;
4331 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4333 pragma Assert (Id = Base_Type (Id));
4335 end Set_Has_Controlled_Component;
4337 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4340 end Set_Has_Controlling_Result;
4342 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4344 Set_Flag119 (Id, V);
4345 end Set_Has_Convention_Pragma;
4347 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4350 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4351 and then Is_Base_Type (Id));
4353 end Set_Has_Default_Aspect;
4355 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4357 pragma Assert (Is_Type (Id));
4358 Set_Flag3 (Base_Type (Id), V);
4359 end Set_Has_Default_Init_Cond;
4361 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4363 pragma Assert (Nkind (Id) in N_Entity);
4364 Set_Flag200 (Id, V);
4365 end Set_Has_Delayed_Aspects;
4367 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4369 pragma Assert (Nkind (Id) in N_Entity);
4371 end Set_Has_Delayed_Freeze;
4373 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4375 pragma Assert (Nkind (Id) in N_Entity);
4376 Set_Flag261 (Id, V);
4377 end Set_Has_Delayed_Rep_Aspects;
4379 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4381 pragma Assert (Nkind (Id) in N_Entity);
4383 end Set_Has_Discriminants;
4385 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4387 pragma Assert (Ekind (Id) = E_Record_Type
4388 and then Is_Tagged_Type (Id));
4389 Set_Flag220 (Id, V);
4390 end Set_Has_Dispatch_Table;
4392 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4394 pragma Assert (Is_Type (Id));
4395 Set_Flag258 (Id, V);
4396 end Set_Has_Dynamic_Predicate_Aspect;
4398 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4400 pragma Assert (Is_Enumeration_Type (Id));
4402 end Set_Has_Enumeration_Rep_Clause;
4404 procedure Set_Has_Exit (Id : E; V : B := True) is
4409 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4411 pragma Assert (Ekind_In (Id, E_Entry,
4415 Set_Flag240 (Id, V);
4416 end Set_Has_Expanded_Contract;
4418 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4420 Set_Flag175 (Id, V);
4421 end Set_Has_Forward_Instantiation;
4423 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4425 Set_Flag173 (Id, V);
4426 end Set_Has_Fully_Qualified_Name;
4428 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4431 end Set_Has_Gigi_Rep_Item;
4433 procedure Set_Has_Homonym (Id : E; V : B := True) is
4436 end Set_Has_Homonym;
4438 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4440 Set_Flag251 (Id, V);
4441 end Set_Has_Implicit_Dereference;
4443 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4445 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4447 end Set_Has_Independent_Components;
4449 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4451 pragma Assert (Is_Type (Id));
4452 Set_Flag248 (Id, V);
4453 end Set_Has_Inheritable_Invariants;
4455 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4457 pragma Assert (Is_Type (Id));
4458 Set_Flag133 (Base_Type (Id), V);
4459 end Set_Has_Inherited_Default_Init_Cond;
4461 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4463 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4464 Set_Flag219 (Id, V);
4465 end Set_Has_Initial_Value;
4467 procedure Set_Has_Invariants (Id : E; V : B := True) is
4469 pragma Assert (Is_Type (Id));
4470 Set_Flag232 (Id, V);
4471 end Set_Has_Invariants;
4473 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4475 pragma Assert (Ekind (Id) = E_Loop);
4476 Set_Flag260 (Id, V);
4477 end Set_Has_Loop_Entry_Attributes;
4479 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4481 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4483 end Set_Has_Machine_Radix_Clause;
4485 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4488 end Set_Has_Master_Entity;
4490 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4492 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4493 Set_Flag142 (Id, V);
4494 end Set_Has_Missing_Return;
4496 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4498 Set_Flag101 (Id, V);
4499 end Set_Has_Nested_Block_With_Handler;
4501 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4503 pragma Assert (Is_Subprogram (Id));
4504 Set_Flag282 (Id, V);
4505 end Set_Has_Nested_Subprogram;
4507 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4509 pragma Assert (Id = Base_Type (Id));
4511 end Set_Has_Non_Standard_Rep;
4513 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4515 pragma Assert (Is_Type (Id));
4516 Set_Flag172 (Id, V);
4517 end Set_Has_Object_Size_Clause;
4519 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4522 (Ekind_In (Id, E_Entry, E_Entry_Family)
4523 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4524 Set_Flag110 (Id, V);
4525 end Set_Has_Out_Or_In_Out_Parameter;
4527 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4529 Set_Flag154 (Id, V);
4530 end Set_Has_Per_Object_Constraint;
4532 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4534 pragma Assert (Is_Access_Type (Id));
4535 Set_Flag27 (Base_Type (Id), V);
4536 end Set_Has_Pragma_Controlled;
4538 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4540 Set_Flag150 (Id, V);
4541 end Set_Has_Pragma_Elaborate_Body;
4543 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4545 Set_Flag157 (Id, V);
4546 end Set_Has_Pragma_Inline;
4548 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4550 Set_Flag230 (Id, V);
4551 end Set_Has_Pragma_Inline_Always;
4553 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4555 Set_Flag201 (Id, V);
4556 end Set_Has_Pragma_No_Inline;
4558 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4560 pragma Assert (Is_Enumeration_Type (Id));
4561 pragma Assert (Id = Base_Type (Id));
4562 Set_Flag198 (Id, V);
4563 end Set_Has_Pragma_Ordered;
4565 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4567 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4568 pragma Assert (Id = Base_Type (Id));
4569 Set_Flag121 (Id, V);
4570 end Set_Has_Pragma_Pack;
4572 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4574 Set_Flag221 (Id, V);
4575 end Set_Has_Pragma_Preelab_Init;
4577 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4579 Set_Flag203 (Id, V);
4580 end Set_Has_Pragma_Pure;
4582 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4584 Set_Flag179 (Id, V);
4585 end Set_Has_Pragma_Pure_Function;
4587 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4589 Set_Flag169 (Id, V);
4590 end Set_Has_Pragma_Thread_Local_Storage;
4592 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4594 Set_Flag233 (Id, V);
4595 end Set_Has_Pragma_Unmodified;
4597 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4599 Set_Flag180 (Id, V);
4600 end Set_Has_Pragma_Unreferenced;
4602 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4604 pragma Assert (Is_Type (Id));
4605 Set_Flag212 (Id, V);
4606 end Set_Has_Pragma_Unreferenced_Objects;
4608 procedure Set_Has_Predicates (Id : E; V : B := True) is
4610 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4611 Set_Flag250 (Id, V);
4612 end Set_Has_Predicates;
4614 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4616 pragma Assert (Id = Base_Type (Id));
4617 Set_Flag120 (Id, V);
4618 end Set_Has_Primitive_Operations;
4620 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4622 pragma Assert (Is_Type (Id));
4623 Set_Flag151 (Id, V);
4624 end Set_Has_Private_Ancestor;
4626 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4628 Set_Flag155 (Id, V);
4629 end Set_Has_Private_Declaration;
4631 procedure Set_Has_Protected (Id : E; V : B := True) is
4633 Set_Flag271 (Id, V);
4634 end Set_Has_Protected;
4636 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4638 Set_Flag161 (Id, V);
4639 end Set_Has_Qualified_Name;
4641 procedure Set_Has_RACW (Id : E; V : B := True) is
4643 pragma Assert (Ekind (Id) = E_Package);
4644 Set_Flag214 (Id, V);
4647 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4649 pragma Assert (Id = Base_Type (Id));
4651 end Set_Has_Record_Rep_Clause;
4653 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4655 pragma Assert (Is_Subprogram (Id));
4656 Set_Flag143 (Id, V);
4657 end Set_Has_Recursive_Call;
4659 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4661 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4662 Set_Flag267 (Id, V);
4663 end Set_Has_Shift_Operator;
4665 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4668 end Set_Has_Size_Clause;
4670 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4673 end Set_Has_Small_Clause;
4675 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4677 pragma Assert (Id = Base_Type (Id));
4678 Set_Flag100 (Id, V);
4679 end Set_Has_Specified_Layout;
4681 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4683 pragma Assert (Is_Type (Id));
4684 Set_Flag190 (Id, V);
4685 end Set_Has_Specified_Stream_Input;
4687 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4689 pragma Assert (Is_Type (Id));
4690 Set_Flag191 (Id, V);
4691 end Set_Has_Specified_Stream_Output;
4693 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4695 pragma Assert (Is_Type (Id));
4696 Set_Flag192 (Id, V);
4697 end Set_Has_Specified_Stream_Read;
4699 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4701 pragma Assert (Is_Type (Id));
4702 Set_Flag193 (Id, V);
4703 end Set_Has_Specified_Stream_Write;
4705 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4707 Set_Flag211 (Id, V);
4708 end Set_Has_Static_Discriminants;
4710 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4712 pragma Assert (Is_Type (Id));
4713 Set_Flag269 (Id, V);
4714 end Set_Has_Static_Predicate;
4716 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4718 pragma Assert (Is_Type (Id));
4719 Set_Flag259 (Id, V);
4720 end Set_Has_Static_Predicate_Aspect;
4722 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4724 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4725 pragma Assert (Id = Base_Type (Id));
4727 end Set_Has_Storage_Size_Clause;
4729 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4731 pragma Assert (Is_Elementary_Type (Id));
4732 Set_Flag184 (Id, V);
4733 end Set_Has_Stream_Size_Clause;
4735 procedure Set_Has_Task (Id : E; V : B := True) is
4737 pragma Assert (Id = Base_Type (Id));
4741 procedure Set_Has_Thunks (Id : E; V : B := True) is
4743 pragma Assert (Is_Tag (Id));
4744 Set_Flag228 (Id, V);
4747 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4749 pragma Assert (Id = Base_Type (Id));
4750 Set_Flag123 (Id, V);
4751 end Set_Has_Unchecked_Union;
4753 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4755 pragma Assert (Is_Type (Id));
4757 end Set_Has_Unknown_Discriminants;
4759 procedure Set_Has_Uplevel_Reference (Id : E; V : B := True) is
4761 Set_Flag215 (Id, V);
4762 end Set_Has_Uplevel_Reference;
4764 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4766 pragma Assert (Ekind (Id) = E_Abstract_State);
4767 Set_Flag263 (Id, V);
4768 end Set_Has_Visible_Refinement;
4770 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4772 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4774 end Set_Has_Volatile_Components;
4776 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4778 Set_Flag182 (Id, V);
4779 end Set_Has_Xref_Entry;
4781 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4783 pragma Assert (Ekind (Id) = E_Variable);
4785 end Set_Hiding_Loop_Variable;
4787 procedure Set_Homonym (Id : E; V : E) is
4789 pragma Assert (Id /= V);
4793 procedure Set_Incomplete_Actuals (Id : E; V : L) is
4795 pragma Assert (Ekind (Id) = E_Package);
4796 Set_Elist24 (Id, V);
4797 end Set_Incomplete_Actuals;
4799 procedure Set_Import_Pragma (Id : E; V : E) is
4801 pragma Assert (Is_Subprogram (Id));
4803 end Set_Import_Pragma;
4805 procedure Set_Interface_Alias (Id : E; V : E) is
4809 and then Is_Hidden (Id)
4810 and then (Ekind_In (Id, E_Procedure, E_Function)));
4812 end Set_Interface_Alias;
4814 procedure Set_Interfaces (Id : E; V : L) is
4816 pragma Assert (Is_Record_Type (Id));
4817 Set_Elist25 (Id, V);
4820 procedure Set_In_Package_Body (Id : E; V : B := True) is
4823 end Set_In_Package_Body;
4825 procedure Set_In_Private_Part (Id : E; V : B := True) is
4828 end Set_In_Private_Part;
4830 procedure Set_In_Use (Id : E; V : B := True) is
4832 pragma Assert (Nkind (Id) in N_Entity);
4836 procedure Set_Initialization_Statements (Id : E; V : N) is
4838 -- Tolerate an E_Void entity since this can be called while resolving
4839 -- an aggregate used as the initialization expression for an object
4840 -- declaration, and this occurs before the Ekind for the object is set.
4842 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4844 end Set_Initialization_Statements;
4846 procedure Set_Inner_Instances (Id : E; V : L) is
4848 Set_Elist23 (Id, V);
4849 end Set_Inner_Instances;
4851 procedure Set_Interface_Name (Id : E; V : N) is
4854 end Set_Interface_Name;
4856 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4858 pragma Assert (Is_Overloadable (Id));
4860 end Set_Is_Abstract_Subprogram;
4862 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4864 pragma Assert (Is_Type (Id));
4865 Set_Flag146 (Id, V);
4866 end Set_Is_Abstract_Type;
4868 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4870 pragma Assert (Is_Access_Type (Id));
4871 Set_Flag194 (Id, V);
4872 end Set_Is_Local_Anonymous_Access;
4874 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4876 pragma Assert (Is_Access_Type (Id));
4878 end Set_Is_Access_Constant;
4880 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4882 Set_Flag185 (Id, V);
4883 end Set_Is_Ada_2005_Only;
4885 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4887 Set_Flag199 (Id, V);
4888 end Set_Is_Ada_2012_Only;
4890 procedure Set_Is_Aliased (Id : E; V : B := True) is
4892 pragma Assert (Nkind (Id) in N_Entity);
4896 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4899 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4901 end Set_Is_Asynchronous;
4903 procedure Set_Is_Atomic (Id : E; V : B := True) is
4908 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4910 pragma Assert ((not V)
4911 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4912 Set_Flag122 (Id, V);
4913 end Set_Is_Bit_Packed_Array;
4915 procedure Set_Is_Called (Id : E; V : B := True) is
4917 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4918 Set_Flag102 (Id, V);
4921 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4924 end Set_Is_Character_Type;
4926 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4928 pragma Assert (Is_Formal (Id)
4929 or else Is_Object (Id)
4930 or else Is_Package_Or_Generic_Package (Id)
4931 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4932 or else Is_Type (Id)
4933 or else Ekind (Id) = E_Abstract_State
4934 or else Ekind (Id) = E_Component
4935 or else Ekind (Id) = E_Discriminant
4936 or else Ekind (Id) = E_Exception
4937 or else Ekind (Id) = E_Package_Body
4938 or else Ekind (Id) = E_Subprogram_Body
4940 -- Allow this attribute to appear on non-analyzed entities
4942 or else Ekind (Id) = E_Void);
4943 Set_Flag277 (Id, V);
4944 end Set_Is_Checked_Ghost_Entity;
4946 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4949 end Set_Is_Child_Unit;
4951 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4954 end Set_Is_Class_Wide_Equivalent_Type;
4956 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4958 Set_Flag149 (Id, V);
4959 end Set_Is_Compilation_Unit;
4961 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4963 pragma Assert (Ekind (Id) = E_Discriminant);
4964 Set_Flag103 (Id, V);
4965 end Set_Is_Completely_Hidden;
4967 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4970 end Set_Is_Concurrent_Record_Type;
4972 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4975 end Set_Is_Constr_Subt_For_U_Nominal;
4977 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4979 Set_Flag141 (Id, V);
4980 end Set_Is_Constr_Subt_For_UN_Aliased;
4982 procedure Set_Is_Constrained (Id : E; V : B := True) is
4984 pragma Assert (Nkind (Id) in N_Entity);
4986 end Set_Is_Constrained;
4988 procedure Set_Is_Constructor (Id : E; V : B := True) is
4991 end Set_Is_Constructor;
4993 procedure Set_Is_Controlled (Id : E; V : B := True) is
4995 pragma Assert (Id = Base_Type (Id));
4997 end Set_Is_Controlled;
4999 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5001 pragma Assert (Is_Formal (Id));
5003 end Set_Is_Controlling_Formal;
5005 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5008 end Set_Is_CPP_Class;
5010 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
5012 pragma Assert (Ekind (Id) = E_Procedure);
5013 Set_Flag132 (Id, V);
5014 end Set_Is_Default_Init_Cond_Procedure;
5016 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
5018 pragma Assert (Is_Type (Id));
5019 Set_Flag223 (Id, V);
5020 end Set_Is_Descendent_Of_Address;
5022 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5024 Set_Flag176 (Id, V);
5025 end Set_Is_Discrim_SO_Function;
5027 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5029 Set_Flag264 (Id, V);
5030 end Set_Is_Discriminant_Check_Function;
5032 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5034 Set_Flag234 (Id, V);
5035 end Set_Is_Dispatch_Table_Entity;
5037 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5042 Is_Overloadable (Id)
5044 Ekind (Id) = E_Subprogram_Type);
5047 end Set_Is_Dispatching_Operation;
5049 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5051 Set_Flag124 (Id, V);
5052 end Set_Is_Eliminated;
5054 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5057 end Set_Is_Entry_Formal;
5059 procedure Set_Is_Exported (Id : E; V : B := True) is
5062 end Set_Is_Exported;
5064 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5067 end Set_Is_First_Subtype;
5069 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5071 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5072 Set_Flag118 (Id, V);
5073 end Set_Is_For_Access_Subtype;
5075 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5077 Set_Flag111 (Id, V);
5078 end Set_Is_Formal_Subprogram;
5080 procedure Set_Is_Frozen (Id : E; V : B := True) is
5082 pragma Assert (Nkind (Id) in N_Entity);
5086 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5088 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5089 Set_Flag274 (Id, V);
5090 end Set_Is_Generic_Actual_Subprogram;
5092 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5094 pragma Assert (Is_Type (Id));
5096 end Set_Is_Generic_Actual_Type;
5098 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5100 Set_Flag130 (Id, V);
5101 end Set_Is_Generic_Instance;
5103 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5105 pragma Assert (Nkind (Id) in N_Entity);
5107 end Set_Is_Generic_Type;
5109 procedure Set_Is_Hidden (Id : E; V : B := True) is
5114 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5116 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5118 end Set_Is_Hidden_Non_Overridden_Subpgm;
5120 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5122 Set_Flag171 (Id, V);
5123 end Set_Is_Hidden_Open_Scope;
5125 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5127 pragma Assert (Is_Formal (Id)
5128 or else Is_Object (Id)
5129 or else Is_Package_Or_Generic_Package (Id)
5130 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5131 or else Is_Type (Id)
5132 or else Ekind (Id) = E_Abstract_State
5133 or else Ekind (Id) = E_Component
5134 or else Ekind (Id) = E_Discriminant
5135 or else Ekind (Id) = E_Exception
5136 or else Ekind (Id) = E_Package_Body
5137 or else Ekind (Id) = E_Subprogram_Body
5139 -- Allow this attribute to appear on non-analyzed entities
5141 or else Ekind (Id) = E_Void);
5142 Set_Flag278 (Id, V);
5143 end Set_Is_Ignored_Ghost_Entity;
5145 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5147 pragma Assert (Nkind (Id) in N_Entity);
5149 end Set_Is_Immediately_Visible;
5151 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5153 Set_Flag254 (Id, V);
5154 end Set_Is_Implementation_Defined;
5156 procedure Set_Is_Imported (Id : E; V : B := True) is
5159 end Set_Is_Imported;
5161 procedure Set_Is_Independent (Id : E; V : B := True) is
5163 Set_Flag268 (Id, V);
5164 end Set_Is_Independent;
5166 procedure Set_Is_Inlined (Id : E; V : B := True) is
5171 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5173 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5175 end Set_Is_Inlined_Always;
5177 procedure Set_Is_Interface (Id : E; V : B := True) is
5179 pragma Assert (Is_Record_Type (Id));
5180 Set_Flag186 (Id, V);
5181 end Set_Is_Interface;
5183 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5185 Set_Flag126 (Id, V);
5186 end Set_Is_Instantiated;
5188 procedure Set_Is_Internal (Id : E; V : B := True) is
5190 pragma Assert (Nkind (Id) in N_Entity);
5192 end Set_Is_Internal;
5194 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5196 pragma Assert (Nkind (Id) in N_Entity);
5198 end Set_Is_Interrupt_Handler;
5200 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5203 end Set_Is_Intrinsic_Subprogram;
5205 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5207 pragma Assert (Ekind (Id) = E_Procedure);
5208 Set_Flag257 (Id, V);
5209 end Set_Is_Invariant_Procedure;
5211 procedure Set_Is_Itype (Id : E; V : B := True) is
5216 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5219 end Set_Is_Known_Non_Null;
5221 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5223 Set_Flag204 (Id, V);
5224 end Set_Is_Known_Null;
5226 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5228 Set_Flag170 (Id, V);
5229 end Set_Is_Known_Valid;
5231 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5233 pragma Assert (Is_Type (Id));
5234 Set_Flag106 (Id, V);
5235 end Set_Is_Limited_Composite;
5237 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5239 pragma Assert (Is_Interface (Id));
5240 Set_Flag197 (Id, V);
5241 end Set_Is_Limited_Interface;
5243 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5246 end Set_Is_Limited_Record;
5248 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5250 pragma Assert (Is_Subprogram (Id));
5251 Set_Flag137 (Id, V);
5252 end Set_Is_Machine_Code_Subprogram;
5254 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5256 pragma Assert (Is_Type (Id));
5257 Set_Flag109 (Id, V);
5258 end Set_Is_Non_Static_Subtype;
5260 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5262 pragma Assert (Ekind (Id) = E_Procedure);
5263 Set_Flag178 (Id, V);
5264 end Set_Is_Null_Init_Proc;
5266 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5268 Set_Flag153 (Id, V);
5269 end Set_Is_Obsolescent;
5271 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5273 pragma Assert (Ekind (Id) = E_Out_Parameter);
5274 Set_Flag226 (Id, V);
5275 end Set_Is_Only_Out_Parameter;
5277 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5279 Set_Flag160 (Id, V);
5280 end Set_Is_Package_Body_Entity;
5282 procedure Set_Is_Packed (Id : E; V : B := True) is
5284 pragma Assert (Id = Base_Type (Id));
5288 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5290 Set_Flag138 (Id, V);
5291 end Set_Is_Packed_Array_Impl_Type;
5293 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5295 pragma Assert (Nkind (Id) in N_Entity);
5297 end Set_Is_Potentially_Use_Visible;
5299 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5301 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5302 Set_Flag255 (Id, V);
5303 end Set_Is_Predicate_Function;
5305 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5307 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5308 Set_Flag256 (Id, V);
5309 end Set_Is_Predicate_Function_M;
5311 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5314 end Set_Is_Preelaborated;
5316 procedure Set_Is_Primitive (Id : E; V : B := True) is
5319 (Is_Overloadable (Id)
5320 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5321 Set_Flag218 (Id, V);
5322 end Set_Is_Primitive;
5324 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5326 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5327 Set_Flag195 (Id, V);
5328 end Set_Is_Primitive_Wrapper;
5330 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5332 pragma Assert (Is_Type (Id));
5333 Set_Flag107 (Id, V);
5334 end Set_Is_Private_Composite;
5336 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5339 end Set_Is_Private_Descendant;
5341 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5343 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5344 Set_Flag245 (Id, V);
5345 end Set_Is_Private_Primitive;
5347 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5349 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5350 Set_Flag252 (Id, V);
5351 end Set_Is_Processed_Transient;
5353 procedure Set_Is_Public (Id : E; V : B := True) is
5355 pragma Assert (Nkind (Id) in N_Entity);
5359 procedure Set_Is_Pure (Id : E; V : B := True) is
5364 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5366 pragma Assert (Is_Access_Type (Id));
5367 Set_Flag189 (Id, V);
5368 end Set_Is_Pure_Unit_Access_Type;
5370 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5372 pragma Assert (Is_Type (Id));
5373 Set_Flag244 (Id, V);
5374 end Set_Is_RACW_Stub_Type;
5376 procedure Set_Is_Raised (Id : E; V : B := True) is
5378 pragma Assert (Ekind (Id) = E_Exception);
5379 Set_Flag224 (Id, V);
5382 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5385 end Set_Is_Remote_Call_Interface;
5387 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5390 end Set_Is_Remote_Types;
5392 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5394 Set_Flag112 (Id, V);
5395 end Set_Is_Renaming_Of_Object;
5397 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5399 Set_Flag209 (Id, V);
5400 end Set_Is_Return_Object;
5402 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5404 pragma Assert (Ekind (Id) = E_Variable);
5405 Set_Flag249 (Id, V);
5406 end Set_Is_Safe_To_Reevaluate;
5408 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5411 end Set_Is_Shared_Passive;
5413 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5415 pragma Assert (Is_Type (Id));
5416 Set_Flag281 (Id, V);
5417 end Set_Is_Static_Type;
5419 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5423 or else Ekind_In (Id, E_Exception,
5428 end Set_Is_Statically_Allocated;
5430 procedure Set_Is_Tag (Id : E; V : B := True) is
5432 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5436 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5439 end Set_Is_Tagged_Type;
5441 procedure Set_Is_Thunk (Id : E; V : B := True) is
5443 pragma Assert (Is_Subprogram (Id));
5444 Set_Flag225 (Id, V);
5447 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5449 Set_Flag235 (Id, V);
5450 end Set_Is_Trivial_Subprogram;
5452 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5454 Set_Flag163 (Id, V);
5455 end Set_Is_True_Constant;
5457 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5459 pragma Assert (Id = Base_Type (Id));
5460 Set_Flag117 (Id, V);
5461 end Set_Is_Unchecked_Union;
5463 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5465 pragma Assert (Ekind (Id) = E_Record_Type);
5466 Set_Flag246 (Id, V);
5467 end Set_Is_Underlying_Record_View;
5469 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5471 Set_Flag284 (Id, V);
5472 end Set_Is_Unimplemented;
5474 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5476 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5477 Set_Flag144 (Id, V);
5478 end Set_Is_Unsigned_Type;
5480 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5483 (Ekind_In (Id, E_Constant, E_Variable)
5484 or else Is_Formal (Id)
5485 or else Is_Type (Id));
5486 Set_Flag283 (Id, V);
5487 end Set_Is_Uplevel_Referenced_Entity;
5489 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5491 pragma Assert (Ekind (Id) = E_Procedure);
5492 Set_Flag127 (Id, V);
5493 end Set_Is_Valued_Procedure;
5495 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5497 Set_Flag206 (Id, V);
5498 end Set_Is_Visible_Formal;
5500 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5502 Set_Flag116 (Id, V);
5503 end Set_Is_Visible_Lib_Unit;
5505 procedure Set_Is_Volatile (Id : E; V : B := True) is
5507 pragma Assert (Nkind (Id) in N_Entity);
5509 end Set_Is_Volatile;
5511 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
5513 Set_Flag285 (Id, V);
5514 end Set_Is_Volatile_Full_Access;
5516 procedure Set_Itype_Printed (Id : E; V : B := True) is
5518 pragma Assert (Is_Itype (Id));
5519 Set_Flag202 (Id, V);
5520 end Set_Itype_Printed;
5522 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5525 end Set_Kill_Elaboration_Checks;
5527 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5530 end Set_Kill_Range_Checks;
5532 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5534 pragma Assert (Is_Type (Id));
5535 Set_Flag207 (Id, V);
5536 end Set_Known_To_Have_Preelab_Init;
5538 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5540 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5542 end Set_Last_Aggregate_Assignment;
5544 procedure Set_Last_Assignment (Id : E; V : N) is
5546 pragma Assert (Is_Assignable (Id));
5548 end Set_Last_Assignment;
5550 procedure Set_Last_Entity (Id : E; V : E) is
5553 end Set_Last_Entity;
5555 procedure Set_Limited_View (Id : E; V : E) is
5557 pragma Assert (Ekind (Id) = E_Package);
5559 end Set_Limited_View;
5561 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5563 pragma Assert (Is_Type (Id)
5564 or else Ekind_In (Id, E_Constant, E_Variable)
5565 or else Is_Subprogram (Id));
5567 end Set_Linker_Section_Pragma;
5569 procedure Set_Lit_Indexes (Id : E; V : E) is
5571 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5573 end Set_Lit_Indexes;
5575 procedure Set_Lit_Strings (Id : E; V : E) is
5577 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5579 end Set_Lit_Strings;
5581 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5583 pragma Assert (Is_Formal (Id));
5584 Set_Flag205 (Id, V);
5585 end Set_Low_Bound_Tested;
5587 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5589 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5591 end Set_Machine_Radix_10;
5593 procedure Set_Master_Id (Id : E; V : E) is
5595 pragma Assert (Is_Access_Type (Id));
5599 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5601 Set_Flag168 (Id, V);
5602 end Set_Materialize_Entity;
5604 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5606 Set_Flag262 (Id, V);
5607 end Set_May_Inherit_Delayed_Rep_Aspects;
5609 procedure Set_Mechanism (Id : E; V : M) is
5611 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5612 Set_Uint8 (Id, UI_From_Int (V));
5615 procedure Set_Modulus (Id : E; V : U) is
5617 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5621 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5623 pragma Assert (Is_Type (Id));
5624 Set_Flag183 (Id, V);
5625 end Set_Must_Be_On_Byte_Boundary;
5627 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5629 pragma Assert (Is_Type (Id));
5630 Set_Flag208 (Id, V);
5631 end Set_Must_Have_Preelab_Init;
5633 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5635 Set_Flag147 (Id, V);
5636 end Set_Needs_Debug_Info;
5638 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5641 (Is_Overloadable (Id)
5642 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5644 end Set_Needs_No_Actuals;
5646 procedure Set_Needs_Typedef (Id : E; V : B := True) is
5648 pragma Assert (Is_Type (Id));
5649 Set_Flag286 (Id, V);
5650 end Set_Needs_Typedef;
5652 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5654 Set_Flag115 (Id, V);
5655 end Set_Never_Set_In_Source;
5657 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5660 end Set_Next_Inlined_Subprogram;
5662 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5664 pragma Assert (Is_Discrete_Type (Id));
5665 Set_Flag276 (Id, V);
5666 end Set_No_Dynamic_Predicate_On_Actual;
5668 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5670 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5671 Set_Flag131 (Id, V);
5672 end Set_No_Pool_Assigned;
5674 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5676 pragma Assert (Is_Discrete_Type (Id));
5677 Set_Flag275 (Id, V);
5678 end Set_No_Predicate_On_Actual;
5680 procedure Set_No_Return (Id : E; V : B := True) is
5683 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5684 Set_Flag113 (Id, V);
5687 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5689 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5690 Set_Flag136 (Id, V);
5691 end Set_No_Strict_Aliasing;
5693 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5695 pragma Assert (Is_Tagged_Type (Id));
5697 end Set_No_Tagged_Streams_Pragma;
5699 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5701 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5703 end Set_Non_Binary_Modulus;
5705 procedure Set_Non_Limited_View (Id : E; V : E) is
5708 (Ekind (Id) in Incomplete_Kind
5709 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
5711 end Set_Non_Limited_View;
5713 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5716 (Root_Type (Id) = Standard_Boolean
5717 and then Ekind (Id) = E_Enumeration_Type);
5718 Set_Flag162 (Id, V);
5719 end Set_Nonzero_Is_True;
5721 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5723 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5725 end Set_Normalized_First_Bit;
5727 procedure Set_Normalized_Position (Id : E; V : U) is
5729 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5731 end Set_Normalized_Position;
5733 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5735 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5737 end Set_Normalized_Position_Max;
5739 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5741 pragma Assert (Ekind (Id) = E_Variable);
5742 Set_Flag247 (Id, V);
5743 end Set_OK_To_Rename;
5745 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5748 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5749 Set_Flag239 (Id, V);
5750 end Set_OK_To_Reorder_Components;
5752 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5755 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5756 Set_Flag241 (Id, V);
5757 end Set_Optimize_Alignment_Space;
5759 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5762 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5763 Set_Flag242 (Id, V);
5764 end Set_Optimize_Alignment_Time;
5766 procedure Set_Original_Access_Type (Id : E; V : E) is
5768 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5770 end Set_Original_Access_Type;
5772 procedure Set_Original_Array_Type (Id : E; V : E) is
5774 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5776 end Set_Original_Array_Type;
5778 procedure Set_Original_Record_Component (Id : E; V : E) is
5780 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5782 end Set_Original_Record_Component;
5784 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5786 Set_Flag243 (Id, V);
5787 end Set_Overlays_Constant;
5789 procedure Set_Overridden_Operation (Id : E; V : E) is
5792 end Set_Overridden_Operation;
5794 procedure Set_Package_Instantiation (Id : E; V : N) is
5796 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5798 end Set_Package_Instantiation;
5800 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5802 pragma Assert (Is_Array_Type (Id));
5804 end Set_Packed_Array_Impl_Type;
5806 procedure Set_Parent_Subtype (Id : E; V : E) is
5808 pragma Assert (Ekind (Id) = E_Record_Type);
5810 end Set_Parent_Subtype;
5812 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5814 pragma Assert (Ekind (Id) = E_Abstract_State);
5816 end Set_Part_Of_Constituents;
5818 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5820 pragma Assert (Is_Type (Id));
5821 Set_Flag280 (Id, V);
5822 end Set_Partial_View_Has_Unknown_Discr;
5824 procedure Set_Pending_Access_Types (Id : E; V : L) is
5826 pragma Assert (Is_Type (Id));
5827 Set_Elist15 (Id, V);
5828 end Set_Pending_Access_Types;
5830 procedure Set_Postconditions_Proc (Id : E; V : E) is
5832 pragma Assert (Ekind_In (Id, E_Entry,
5837 end Set_Postconditions_Proc;
5839 procedure Set_PPC_Wrapper (Id : E; V : E) is
5841 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5843 end Set_PPC_Wrapper;
5845 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5847 pragma Assert (Is_Tagged_Type (Id));
5848 Set_Elist10 (Id, V);
5849 end Set_Direct_Primitive_Operations;
5851 procedure Set_Prival (Id : E; V : E) is
5853 pragma Assert (Is_Protected_Component (Id));
5857 procedure Set_Prival_Link (Id : E; V : E) is
5859 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5861 end Set_Prival_Link;
5863 procedure Set_Private_Dependents (Id : E; V : L) is
5865 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5866 Set_Elist18 (Id, V);
5867 end Set_Private_Dependents;
5869 procedure Set_Private_View (Id : E; V : N) is
5871 pragma Assert (Is_Private_Type (Id));
5873 end Set_Private_View;
5875 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5877 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5879 end Set_Protected_Body_Subprogram;
5881 procedure Set_Protected_Formal (Id : E; V : E) is
5883 pragma Assert (Is_Formal (Id));
5885 end Set_Protected_Formal;
5887 procedure Set_Protection_Object (Id : E; V : E) is
5889 pragma Assert (Ekind_In (Id, E_Entry,
5894 end Set_Protection_Object;
5896 procedure Set_Reachable (Id : E; V : B := True) is
5901 procedure Set_Referenced (Id : E; V : B := True) is
5903 Set_Flag156 (Id, V);
5906 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5909 end Set_Referenced_As_LHS;
5911 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5913 Set_Flag227 (Id, V);
5914 end Set_Referenced_As_Out_Parameter;
5916 procedure Set_Refinement_Constituents (Id : E; V : L) is
5918 pragma Assert (Ekind (Id) = E_Abstract_State);
5920 end Set_Refinement_Constituents;
5922 procedure Set_Register_Exception_Call (Id : E; V : N) is
5924 pragma Assert (Ekind (Id) = E_Exception);
5926 end Set_Register_Exception_Call;
5928 procedure Set_Related_Array_Object (Id : E; V : E) is
5930 pragma Assert (Is_Array_Type (Id));
5932 end Set_Related_Array_Object;
5934 procedure Set_Related_Expression (Id : E; V : N) is
5936 pragma Assert (Ekind (Id) in Type_Kind
5937 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5939 end Set_Related_Expression;
5941 procedure Set_Related_Instance (Id : E; V : E) is
5943 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5945 end Set_Related_Instance;
5947 procedure Set_Related_Type (Id : E; V : E) is
5949 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5951 end Set_Related_Type;
5953 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5955 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5957 end Set_Relative_Deadline_Variable;
5959 procedure Set_Renamed_Entity (Id : E; V : N) is
5962 end Set_Renamed_Entity;
5964 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5966 pragma Assert (Ekind (Id) = E_Package);
5967 Set_Flag231 (Id, V);
5968 end Set_Renamed_In_Spec;
5970 procedure Set_Renamed_Object (Id : E; V : N) is
5973 end Set_Renamed_Object;
5975 procedure Set_Renaming_Map (Id : E; V : U) is
5978 end Set_Renaming_Map;
5980 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5982 pragma Assert (Is_Overloadable (Id));
5983 Set_Flag213 (Id, V);
5984 end Set_Requires_Overriding;
5986 procedure Set_Return_Present (Id : E; V : B := True) is
5989 end Set_Return_Present;
5991 procedure Set_Return_Applies_To (Id : E; V : N) is
5994 end Set_Return_Applies_To;
5996 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5999 end Set_Returns_By_Ref;
6001 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
6003 pragma Assert (Ekind (Id) = E_Function);
6004 Set_Flag134 (Id, V);
6005 end Set_Returns_Limited_View;
6007 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6010 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6011 Set_Flag164 (Id, V);
6012 end Set_Reverse_Bit_Order;
6014 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6018 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6020 end Set_Reverse_Storage_Order;
6022 procedure Set_RM_Size (Id : E; V : U) is
6024 pragma Assert (Is_Type (Id));
6028 procedure Set_Scalar_Range (Id : E; V : N) is
6031 end Set_Scalar_Range;
6033 procedure Set_Scale_Value (Id : E; V : U) is
6036 end Set_Scale_Value;
6038 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6040 pragma Assert (not Is_Record_Type (Id));
6042 end Set_Scope_Depth_Value;
6044 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6046 Set_Flag167 (Id, V);
6047 end Set_Sec_Stack_Needed_For_Return;
6049 procedure Set_Shadow_Entities (Id : E; V : S) is
6051 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
6053 end Set_Shadow_Entities;
6055 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6057 pragma Assert (Ekind (Id) = E_Variable);
6059 end Set_Shared_Var_Procs_Instance;
6061 procedure Set_Size_Check_Code (Id : E; V : N) is
6063 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6065 end Set_Size_Check_Code;
6067 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6069 Set_Flag177 (Id, V);
6070 end Set_Size_Depends_On_Discriminant;
6072 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6075 end Set_Size_Known_At_Compile_Time;
6077 procedure Set_Small_Value (Id : E; V : R) is
6079 pragma Assert (Is_Fixed_Point_Type (Id));
6080 Set_Ureal21 (Id, V);
6081 end Set_Small_Value;
6083 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6086 (Ekind_In (Id, E_Generic_Package, -- package variants
6091 end Set_SPARK_Aux_Pragma;
6093 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6096 (Ekind_In (Id, E_Generic_Package, -- package variants
6100 Set_Flag266 (Id, V);
6101 end Set_SPARK_Aux_Pragma_Inherited;
6103 procedure Set_SPARK_Pragma (Id : E; V : N) is
6106 (Ekind_In (Id, E_Function, -- subprogram variants
6108 E_Generic_Procedure,
6112 Ekind_In (Id, E_Generic_Package, -- package variants
6117 end Set_SPARK_Pragma;
6119 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6122 (Ekind_In (Id, E_Function, -- subprogram variants
6124 E_Generic_Procedure,
6128 Ekind_In (Id, E_Generic_Package, -- package variants
6132 Set_Flag265 (Id, V);
6133 end Set_SPARK_Pragma_Inherited;
6135 procedure Set_Spec_Entity (Id : E; V : E) is
6137 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6139 end Set_Spec_Entity;
6141 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6145 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6146 Set_Flag273 (Id, V);
6147 end Set_SSO_Set_High_By_Default;
6149 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6153 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6154 Set_Flag272 (Id, V);
6155 end Set_SSO_Set_Low_By_Default;
6157 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6159 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6161 end Set_Static_Discrete_Predicate;
6163 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6165 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6166 and then Has_Predicates (Id));
6168 end Set_Static_Real_Or_String_Predicate;
6170 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6172 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6174 end Set_Status_Flag_Or_Transient_Decl;
6176 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6178 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6179 pragma Assert (Id = Base_Type (Id));
6181 end Set_Storage_Size_Variable;
6183 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6185 pragma Assert (Ekind (Id) = E_Package);
6187 end Set_Static_Elaboration_Desired;
6189 procedure Set_Static_Initialization (Id : E; V : N) is
6192 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6194 end Set_Static_Initialization;
6196 procedure Set_Stored_Constraint (Id : E; V : L) is
6198 pragma Assert (Nkind (Id) in N_Entity);
6199 Set_Elist23 (Id, V);
6200 end Set_Stored_Constraint;
6202 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6204 pragma Assert (Ekind (Id) = E_Constant);
6205 Set_Flag270 (Id, V);
6206 end Set_Stores_Attribute_Old_Prefix;
6208 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6210 pragma Assert (Id = Base_Type (Id));
6211 Set_Flag145 (Id, V);
6212 end Set_Strict_Alignment;
6214 procedure Set_String_Literal_Length (Id : E; V : U) is
6216 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6218 end Set_String_Literal_Length;
6220 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6222 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6224 end Set_String_Literal_Low_Bound;
6226 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6228 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6230 end Set_Subprograms_For_Type;
6232 procedure Set_Subps_Index (Id : E; V : U) is
6234 pragma Assert (Is_Subprogram (Id));
6236 end Set_Subps_Index;
6238 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6240 Set_Flag148 (Id, V);
6241 end Set_Suppress_Elaboration_Warnings;
6243 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6245 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6246 Set_Flag105 (Id, V);
6247 end Set_Suppress_Initialization;
6249 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6251 Set_Flag165 (Id, V);
6252 end Set_Suppress_Style_Checks;
6254 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6256 Set_Flag217 (Id, V);
6257 end Set_Suppress_Value_Tracking_On_Call;
6259 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6261 pragma Assert (Ekind (Id) in Task_Kind);
6263 end Set_Task_Body_Procedure;
6265 procedure Set_Thunk_Entity (Id : E; V : E) is
6267 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6268 and then Is_Thunk (Id));
6270 end Set_Thunk_Entity;
6272 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6275 end Set_Treat_As_Volatile;
6277 procedure Set_Underlying_Full_View (Id : E; V : E) is
6279 pragma Assert (Ekind (Id) in Private_Kind);
6281 end Set_Underlying_Full_View;
6283 procedure Set_Underlying_Record_View (Id : E; V : E) is
6285 pragma Assert (Ekind (Id) = E_Record_Type);
6287 end Set_Underlying_Record_View;
6289 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6291 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6292 Set_Flag216 (Id, V);
6293 end Set_Universal_Aliasing;
6295 procedure Set_Unset_Reference (Id : E; V : N) is
6298 end Set_Unset_Reference;
6300 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6302 Set_Flag222 (Id, V);
6303 end Set_Used_As_Generic_Actual;
6305 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6307 pragma Assert (Ekind (Id) = E_Protected_Type);
6308 Set_Flag188 (Id, V);
6309 end Set_Uses_Lock_Free;
6311 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6314 end Set_Uses_Sec_Stack;
6316 procedure Set_Warnings_Off (Id : E; V : B := True) is
6319 end Set_Warnings_Off;
6321 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6323 Set_Flag236 (Id, V);
6324 end Set_Warnings_Off_Used;
6326 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6328 Set_Flag237 (Id, V);
6329 end Set_Warnings_Off_Used_Unmodified;
6331 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6333 Set_Flag238 (Id, V);
6334 end Set_Warnings_Off_Used_Unreferenced;
6336 procedure Set_Was_Hidden (Id : E; V : B := True) is
6338 Set_Flag196 (Id, V);
6341 procedure Set_Wrapped_Entity (Id : E; V : E) is
6343 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6344 and then Is_Primitive_Wrapper (Id));
6346 end Set_Wrapped_Entity;
6348 -----------------------------------
6349 -- Field Initialization Routines --
6350 -----------------------------------
6352 procedure Init_Alignment (Id : E) is
6354 Set_Uint14 (Id, Uint_0);
6357 procedure Init_Alignment (Id : E; V : Int) is
6359 Set_Uint14 (Id, UI_From_Int (V));
6362 procedure Init_Component_Bit_Offset (Id : E) is
6364 Set_Uint11 (Id, No_Uint);
6365 end Init_Component_Bit_Offset;
6367 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6369 Set_Uint11 (Id, UI_From_Int (V));
6370 end Init_Component_Bit_Offset;
6372 procedure Init_Component_Size (Id : E) is
6374 Set_Uint22 (Id, Uint_0);
6375 end Init_Component_Size;
6377 procedure Init_Component_Size (Id : E; V : Int) is
6379 Set_Uint22 (Id, UI_From_Int (V));
6380 end Init_Component_Size;
6382 procedure Init_Digits_Value (Id : E) is
6384 Set_Uint17 (Id, Uint_0);
6385 end Init_Digits_Value;
6387 procedure Init_Digits_Value (Id : E; V : Int) is
6389 Set_Uint17 (Id, UI_From_Int (V));
6390 end Init_Digits_Value;
6392 procedure Init_Esize (Id : E) is
6394 Set_Uint12 (Id, Uint_0);
6397 procedure Init_Esize (Id : E; V : Int) is
6399 Set_Uint12 (Id, UI_From_Int (V));
6402 procedure Init_Normalized_First_Bit (Id : E) is
6404 Set_Uint8 (Id, No_Uint);
6405 end Init_Normalized_First_Bit;
6407 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6409 Set_Uint8 (Id, UI_From_Int (V));
6410 end Init_Normalized_First_Bit;
6412 procedure Init_Normalized_Position (Id : E) is
6414 Set_Uint14 (Id, No_Uint);
6415 end Init_Normalized_Position;
6417 procedure Init_Normalized_Position (Id : E; V : Int) is
6419 Set_Uint14 (Id, UI_From_Int (V));
6420 end Init_Normalized_Position;
6422 procedure Init_Normalized_Position_Max (Id : E) is
6424 Set_Uint10 (Id, No_Uint);
6425 end Init_Normalized_Position_Max;
6427 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6429 Set_Uint10 (Id, UI_From_Int (V));
6430 end Init_Normalized_Position_Max;
6432 procedure Init_RM_Size (Id : E) is
6434 Set_Uint13 (Id, Uint_0);
6437 procedure Init_RM_Size (Id : E; V : Int) is
6439 Set_Uint13 (Id, UI_From_Int (V));
6442 -----------------------------
6443 -- Init_Component_Location --
6444 -----------------------------
6446 procedure Init_Component_Location (Id : E) is
6448 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6449 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6450 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6451 Set_Uint12 (Id, Uint_0); -- Esize
6452 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6453 end Init_Component_Location;
6455 ----------------------------
6456 -- Init_Object_Size_Align --
6457 ----------------------------
6459 procedure Init_Object_Size_Align (Id : E) is
6461 Set_Uint12 (Id, Uint_0); -- Esize
6462 Set_Uint14 (Id, Uint_0); -- Alignment
6463 end Init_Object_Size_Align;
6469 procedure Init_Size (Id : E; V : Int) is
6471 pragma Assert (not Is_Object (Id));
6472 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6473 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6476 ---------------------
6477 -- Init_Size_Align --
6478 ---------------------
6480 procedure Init_Size_Align (Id : E) is
6482 pragma Assert (not Is_Object (Id));
6483 Set_Uint12 (Id, Uint_0); -- Esize
6484 Set_Uint13 (Id, Uint_0); -- RM_Size
6485 Set_Uint14 (Id, Uint_0); -- Alignment
6486 end Init_Size_Align;
6488 ----------------------------------------------
6489 -- Type Representation Attribute Predicates --
6490 ----------------------------------------------
6492 function Known_Alignment (E : Entity_Id) return B is
6494 return Uint14 (E) /= Uint_0
6495 and then Uint14 (E) /= No_Uint;
6496 end Known_Alignment;
6498 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6500 return Uint11 (E) /= No_Uint;
6501 end Known_Component_Bit_Offset;
6503 function Known_Component_Size (E : Entity_Id) return B is
6505 return Uint22 (Base_Type (E)) /= Uint_0
6506 and then Uint22 (Base_Type (E)) /= No_Uint;
6507 end Known_Component_Size;
6509 function Known_Esize (E : Entity_Id) return B is
6511 return Uint12 (E) /= Uint_0
6512 and then Uint12 (E) /= No_Uint;
6515 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6517 return Uint8 (E) /= No_Uint;
6518 end Known_Normalized_First_Bit;
6520 function Known_Normalized_Position (E : Entity_Id) return B is
6522 return Uint14 (E) /= No_Uint;
6523 end Known_Normalized_Position;
6525 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6527 return Uint10 (E) /= No_Uint;
6528 end Known_Normalized_Position_Max;
6530 function Known_RM_Size (E : Entity_Id) return B is
6532 return Uint13 (E) /= No_Uint
6533 and then (Uint13 (E) /= Uint_0
6534 or else Is_Discrete_Type (E)
6535 or else Is_Fixed_Point_Type (E));
6538 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6540 return Uint11 (E) /= No_Uint
6541 and then Uint11 (E) >= Uint_0;
6542 end Known_Static_Component_Bit_Offset;
6544 function Known_Static_Component_Size (E : Entity_Id) return B is
6546 return Uint22 (Base_Type (E)) > Uint_0;
6547 end Known_Static_Component_Size;
6549 function Known_Static_Esize (E : Entity_Id) return B is
6551 return Uint12 (E) > Uint_0
6552 and then not Is_Generic_Type (E);
6553 end Known_Static_Esize;
6555 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6557 return Uint8 (E) /= No_Uint
6558 and then Uint8 (E) >= Uint_0;
6559 end Known_Static_Normalized_First_Bit;
6561 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6563 return Uint14 (E) /= No_Uint
6564 and then Uint14 (E) >= Uint_0;
6565 end Known_Static_Normalized_Position;
6567 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6569 return Uint10 (E) /= No_Uint
6570 and then Uint10 (E) >= Uint_0;
6571 end Known_Static_Normalized_Position_Max;
6573 function Known_Static_RM_Size (E : Entity_Id) return B is
6575 return (Uint13 (E) > Uint_0
6576 or else Is_Discrete_Type (E)
6577 or else Is_Fixed_Point_Type (E))
6578 and then not Is_Generic_Type (E);
6579 end Known_Static_RM_Size;
6581 function Unknown_Alignment (E : Entity_Id) return B is
6583 return Uint14 (E) = Uint_0
6584 or else Uint14 (E) = No_Uint;
6585 end Unknown_Alignment;
6587 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6589 return Uint11 (E) = No_Uint;
6590 end Unknown_Component_Bit_Offset;
6592 function Unknown_Component_Size (E : Entity_Id) return B is
6594 return Uint22 (Base_Type (E)) = Uint_0
6596 Uint22 (Base_Type (E)) = No_Uint;
6597 end Unknown_Component_Size;
6599 function Unknown_Esize (E : Entity_Id) return B is
6601 return Uint12 (E) = No_Uint
6603 Uint12 (E) = Uint_0;
6606 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6608 return Uint8 (E) = No_Uint;
6609 end Unknown_Normalized_First_Bit;
6611 function Unknown_Normalized_Position (E : Entity_Id) return B is
6613 return Uint14 (E) = No_Uint;
6614 end Unknown_Normalized_Position;
6616 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6618 return Uint10 (E) = No_Uint;
6619 end Unknown_Normalized_Position_Max;
6621 function Unknown_RM_Size (E : Entity_Id) return B is
6623 return (Uint13 (E) = Uint_0
6624 and then not Is_Discrete_Type (E)
6625 and then not Is_Fixed_Point_Type (E))
6626 or else Uint13 (E) = No_Uint;
6627 end Unknown_RM_Size;
6629 --------------------
6630 -- Address_Clause --
6631 --------------------
6633 function Address_Clause (Id : E) return N is
6635 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6642 function Aft_Value (Id : E) return U is
6644 Delta_Val : Ureal := Delta_Value (Id);
6646 while Delta_Val < Ureal_Tenth loop
6647 Delta_Val := Delta_Val * Ureal_10;
6648 Result := Result + 1;
6651 return UI_From_Int (Result);
6654 ----------------------
6655 -- Alignment_Clause --
6656 ----------------------
6658 function Alignment_Clause (Id : E) return N is
6660 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6661 end Alignment_Clause;
6667 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6669 if Last_Entity (V) = Empty then
6670 Set_First_Entity (Id => V, V => Id);
6672 Set_Next_Entity (Last_Entity (V), Id);
6675 Set_Next_Entity (Id, Empty);
6677 Set_Last_Entity (Id => V, V => Id);
6684 function Base_Type (Id : E) return E is
6686 if Is_Base_Type (Id) then
6689 pragma Assert (Is_Type (Id));
6694 -------------------------
6695 -- Component_Alignment --
6696 -------------------------
6698 -- Component Alignment is encoded using two flags, Flag128/129 as
6699 -- follows. Note that both flags False = Align_Default, so that the
6700 -- default initialization of flags to False initializes component
6701 -- alignment to the default value as required.
6703 -- Flag128 Flag129 Value
6704 -- ------- ------- -----
6705 -- False False Calign_Default
6706 -- False True Calign_Component_Size
6707 -- True False Calign_Component_Size_4
6708 -- True True Calign_Storage_Unit
6710 function Component_Alignment (Id : E) return C is
6711 BT : constant Node_Id := Base_Type (Id);
6714 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6716 if Flag128 (BT) then
6717 if Flag129 (BT) then
6718 return Calign_Storage_Unit;
6720 return Calign_Component_Size_4;
6724 if Flag129 (BT) then
6725 return Calign_Component_Size;
6727 return Calign_Default;
6730 end Component_Alignment;
6732 ----------------------
6733 -- Declaration_Node --
6734 ----------------------
6736 function Declaration_Node (Id : E) return N is
6740 if Ekind (Id) = E_Incomplete_Type
6741 and then Present (Full_View (Id))
6743 P := Parent (Full_View (Id));
6749 if Nkind (P) /= N_Selected_Component
6750 and then Nkind (P) /= N_Expanded_Name
6752 not (Nkind (P) = N_Defining_Program_Unit_Name
6753 and then Is_Child_Unit (Id))
6760 end Declaration_Node;
6762 ---------------------------------
6763 -- Default_Init_Cond_Procedure --
6764 ---------------------------------
6766 function Default_Init_Cond_Procedure (Id : E) return E is
6767 Subp_Id : Entity_Id;
6772 and then (Has_Default_Init_Cond (Id)
6773 or Has_Inherited_Default_Init_Cond (Id)));
6775 Subp_Id := Subprograms_For_Type (Base_Type (Id));
6776 while Present (Subp_Id) loop
6777 if Is_Default_Init_Cond_Procedure (Subp_Id) then
6781 Subp_Id := Subprograms_For_Type (Subp_Id);
6785 end Default_Init_Cond_Procedure;
6787 ---------------------
6788 -- Designated_Type --
6789 ---------------------
6791 function Designated_Type (Id : E) return E is
6795 Desig_Type := Directly_Designated_Type (Id);
6797 if Ekind (Desig_Type) = E_Incomplete_Type
6798 and then Present (Full_View (Desig_Type))
6800 return Full_View (Desig_Type);
6802 elsif Is_Class_Wide_Type (Desig_Type)
6803 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6804 and then Present (Full_View (Etype (Desig_Type)))
6805 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6807 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6812 end Designated_Type;
6814 ----------------------
6815 -- Entry_Index_Type --
6816 ----------------------
6818 function Entry_Index_Type (Id : E) return N is
6820 pragma Assert (Ekind (Id) = E_Entry_Family);
6821 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6822 end Entry_Index_Type;
6824 ---------------------
6825 -- First_Component --
6826 ---------------------
6828 function First_Component (Id : E) return E is
6833 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6835 Comp_Id := First_Entity (Id);
6836 while Present (Comp_Id) loop
6837 exit when Ekind (Comp_Id) = E_Component;
6838 Comp_Id := Next_Entity (Comp_Id);
6842 end First_Component;
6844 -------------------------------------
6845 -- First_Component_Or_Discriminant --
6846 -------------------------------------
6848 function First_Component_Or_Discriminant (Id : E) return E is
6853 (Is_Record_Type (Id)
6854 or else Is_Incomplete_Or_Private_Type (Id)
6855 or else Has_Discriminants (Id));
6857 Comp_Id := First_Entity (Id);
6858 while Present (Comp_Id) loop
6859 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6860 Comp_Id := Next_Entity (Comp_Id);
6864 end First_Component_Or_Discriminant;
6870 function First_Formal (Id : E) return E is
6875 (Is_Generic_Subprogram (Id)
6876 or else Is_Overloadable (Id)
6877 or else Ekind_In (Id, E_Entry_Family,
6879 E_Subprogram_Type));
6881 if Ekind (Id) = E_Enumeration_Literal then
6885 Formal := First_Entity (Id);
6887 -- The first/next entity chain of a generic subprogram contains all
6888 -- generic formal parameters, followed by the formal parameters. Go
6889 -- directly to the parameters by skipping the formal part.
6891 if Is_Generic_Subprogram (Id) then
6892 while Present (Formal) and then not Is_Formal (Formal) loop
6893 Next_Entity (Formal);
6897 if Present (Formal) and then Is_Formal (Formal) then
6905 ------------------------------
6906 -- First_Formal_With_Extras --
6907 ------------------------------
6909 function First_Formal_With_Extras (Id : E) return E is
6914 (Is_Generic_Subprogram (Id)
6915 or else Is_Overloadable (Id)
6916 or else Ekind_In (Id, E_Entry_Family,
6918 E_Subprogram_Type));
6920 if Ekind (Id) = E_Enumeration_Literal then
6924 Formal := First_Entity (Id);
6926 -- The first/next entity chain of a generic subprogram contains all
6927 -- generic formal parameters, followed by the formal parameters. Go
6928 -- directly to the parameters by skipping the formal part.
6930 if Is_Generic_Subprogram (Id) then
6931 while Present (Formal) and then not Is_Formal (Formal) loop
6932 Next_Entity (Formal);
6936 if Present (Formal) and then Is_Formal (Formal) then
6939 return Extra_Formals (Id); -- Empty if no extra formals
6942 end First_Formal_With_Extras;
6944 -------------------------------------
6945 -- Get_Attribute_Definition_Clause --
6946 -------------------------------------
6948 function Get_Attribute_Definition_Clause
6950 Id : Attribute_Id) return Node_Id
6955 N := First_Rep_Item (E);
6956 while Present (N) loop
6957 if Nkind (N) = N_Attribute_Definition_Clause
6958 and then Get_Attribute_Id (Chars (N)) = Id
6967 end Get_Attribute_Definition_Clause;
6973 function Get_Full_View (T : Entity_Id) return Entity_Id is
6975 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6976 return Full_View (T);
6978 elsif Is_Class_Wide_Type (T)
6979 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6980 and then Present (Full_View (Root_Type (T)))
6982 return Class_Wide_Type (Full_View (Root_Type (T)));
6993 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6994 Is_CDG : constant Boolean :=
6995 Id = Pragma_Abstract_State or else
6996 Id = Pragma_Async_Readers or else
6997 Id = Pragma_Async_Writers or else
6998 Id = Pragma_Depends or else
6999 Id = Pragma_Effective_Reads or else
7000 Id = Pragma_Effective_Writes or else
7001 Id = Pragma_Extensions_Visible or else
7002 Id = Pragma_Global or else
7003 Id = Pragma_Initial_Condition or else
7004 Id = Pragma_Initializes or else
7005 Id = Pragma_Part_Of or else
7006 Id = Pragma_Refined_Depends or else
7007 Id = Pragma_Refined_Global or else
7008 Id = Pragma_Refined_State;
7009 Is_CTC : constant Boolean :=
7010 Id = Pragma_Contract_Cases or else
7011 Id = Pragma_Test_Case;
7012 Is_PPC : constant Boolean :=
7013 Id = Pragma_Precondition or else
7014 Id = Pragma_Postcondition or else
7015 Id = Pragma_Refined_Post;
7017 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
7023 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7024 -- extracted from their specialized list.
7027 Items := Contract (E);
7033 Item := Classifications (Items);
7036 Item := Contract_Test_Cases (Items);
7039 Item := Pre_Post_Conditions (Items);
7045 Item := First_Rep_Item (E);
7048 while Present (Item) loop
7049 if Nkind (Item) = N_Pragma
7050 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
7054 -- All nodes in N_Contract are chained using Next_Pragma
7056 elsif In_Contract then
7057 Item := Next_Pragma (Item);
7062 Next_Rep_Item (Item);
7069 --------------------------------------
7070 -- Get_Record_Representation_Clause --
7071 --------------------------------------
7073 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7077 N := First_Rep_Item (E);
7078 while Present (N) loop
7079 if Nkind (N) = N_Record_Representation_Clause then
7087 end Get_Record_Representation_Clause;
7089 ------------------------
7090 -- Has_Attach_Handler --
7091 ------------------------
7093 function Has_Attach_Handler (Id : E) return B is
7097 pragma Assert (Is_Protected_Type (Id));
7099 Ritem := First_Rep_Item (Id);
7100 while Present (Ritem) loop
7101 if Nkind (Ritem) = N_Pragma
7102 and then Pragma_Name (Ritem) = Name_Attach_Handler
7106 Next_Rep_Item (Ritem);
7111 end Has_Attach_Handler;
7117 function Has_Entries (Id : E) return B is
7121 pragma Assert (Is_Concurrent_Type (Id));
7123 Ent := First_Entity (Id);
7124 while Present (Ent) loop
7125 if Is_Entry (Ent) then
7129 Ent := Next_Entity (Ent);
7135 ----------------------------
7136 -- Has_Foreign_Convention --
7137 ----------------------------
7139 function Has_Foreign_Convention (Id : E) return B is
7141 -- While regular Intrinsics such as the Standard operators fit in the
7142 -- "Ada" convention, those with an Interface_Name materialize GCC
7143 -- builtin imports for which Ada special treatments shouldn't apply.
7145 return Convention (Id) in Foreign_Convention
7146 or else (Convention (Id) = Convention_Intrinsic
7147 and then Present (Interface_Name (Id)));
7148 end Has_Foreign_Convention;
7150 ---------------------------
7151 -- Has_Interrupt_Handler --
7152 ---------------------------
7154 function Has_Interrupt_Handler (Id : E) return B is
7158 pragma Assert (Is_Protected_Type (Id));
7160 Ritem := First_Rep_Item (Id);
7161 while Present (Ritem) loop
7162 if Nkind (Ritem) = N_Pragma
7163 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7167 Next_Rep_Item (Ritem);
7172 end Has_Interrupt_Handler;
7174 --------------------------
7175 -- Has_Non_Limited_View --
7176 --------------------------
7178 function Has_Non_Limited_View (Id : E) return B is
7180 return (Ekind (Id) in Incomplete_Kind
7181 or else Ekind (Id) in Class_Wide_Kind
7182 or else Ekind (Id) = E_Abstract_State)
7183 and then Present (Non_Limited_View (Id));
7184 end Has_Non_Limited_View;
7186 -----------------------------
7187 -- Has_Non_Null_Refinement --
7188 -----------------------------
7190 function Has_Non_Null_Refinement (Id : E) return B is
7192 -- "Refinement" is a concept applicable only to abstract states
7194 pragma Assert (Ekind (Id) = E_Abstract_State);
7196 if Has_Visible_Refinement (Id) then
7197 pragma Assert (Present (Refinement_Constituents (Id)));
7199 -- For a refinement to be non-null, the first constituent must be
7200 -- anything other than null.
7203 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
7207 end Has_Non_Null_Refinement;
7209 -----------------------------
7210 -- Has_Null_Abstract_State --
7211 -----------------------------
7213 function Has_Null_Abstract_State (Id : E) return B is
7215 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7218 Present (Abstract_States (Id))
7219 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7220 end Has_Null_Abstract_State;
7222 -------------------------
7223 -- Has_Null_Refinement --
7224 -------------------------
7226 function Has_Null_Refinement (Id : E) return B is
7228 -- "Refinement" is a concept applicable only to abstract states
7230 pragma Assert (Ekind (Id) = E_Abstract_State);
7232 if Has_Visible_Refinement (Id) then
7233 pragma Assert (Present (Refinement_Constituents (Id)));
7235 -- For a refinement to be null, the state's sole constituent must be
7239 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
7243 end Has_Null_Refinement;
7245 --------------------
7246 -- Has_Unmodified --
7247 --------------------
7249 function Has_Unmodified (E : Entity_Id) return Boolean is
7251 if Has_Pragma_Unmodified (E) then
7253 elsif Warnings_Off (E) then
7254 Set_Warnings_Off_Used_Unmodified (E);
7261 ---------------------
7262 -- Has_Unreferenced --
7263 ---------------------
7265 function Has_Unreferenced (E : Entity_Id) return Boolean is
7267 if Has_Pragma_Unreferenced (E) then
7269 elsif Warnings_Off (E) then
7270 Set_Warnings_Off_Used_Unreferenced (E);
7275 end Has_Unreferenced;
7277 ----------------------
7278 -- Has_Warnings_Off --
7279 ----------------------
7281 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7283 if Warnings_Off (E) then
7284 Set_Warnings_Off_Used (E);
7289 end Has_Warnings_Off;
7291 ------------------------------
7292 -- Implementation_Base_Type --
7293 ------------------------------
7295 function Implementation_Base_Type (Id : E) return E is
7300 Bastyp := Base_Type (Id);
7302 if Is_Incomplete_Or_Private_Type (Bastyp) then
7303 Imptyp := Underlying_Type (Bastyp);
7305 -- If we have an implementation type, then just return it,
7306 -- otherwise we return the Base_Type anyway. This can only
7307 -- happen in error situations and should avoid some error bombs.
7309 if Present (Imptyp) then
7310 return Base_Type (Imptyp);
7318 end Implementation_Base_Type;
7320 -------------------------
7321 -- Invariant_Procedure --
7322 -------------------------
7324 function Invariant_Procedure (Id : E) return E is
7328 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7330 if No (Subprograms_For_Type (Id)) then
7334 S := Subprograms_For_Type (Id);
7335 while Present (S) loop
7336 if Is_Invariant_Procedure (S) then
7339 S := Subprograms_For_Type (S);
7345 end Invariant_Procedure;
7347 ----------------------
7348 -- Is_Atomic_Or_VFA --
7349 ----------------------
7351 function Is_Atomic_Or_VFA (Id : E) return B is
7353 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
7354 end Is_Atomic_Or_VFA;
7360 -- Global flag table allowing rapid computation of this function
7362 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7363 (E_Enumeration_Subtype |
7365 E_Signed_Integer_Subtype |
7366 E_Modular_Integer_Subtype |
7367 E_Floating_Point_Subtype |
7368 E_Ordinary_Fixed_Point_Subtype |
7369 E_Decimal_Fixed_Point_Subtype |
7373 E_Record_Subtype_With_Private |
7374 E_Limited_Private_Subtype |
7376 E_Protected_Subtype |
7378 E_String_Literal_Subtype |
7379 E_Class_Wide_Subtype => False,
7382 function Is_Base_Type (Id : E) return Boolean is
7384 return Entity_Is_Base_Type (Ekind (Id));
7387 ---------------------
7388 -- Is_Boolean_Type --
7389 ---------------------
7391 function Is_Boolean_Type (Id : E) return B is
7393 return Root_Type (Id) = Standard_Boolean;
7394 end Is_Boolean_Type;
7396 ------------------------
7397 -- Is_Constant_Object --
7398 ------------------------
7400 function Is_Constant_Object (Id : E) return B is
7401 K : constant Entity_Kind := Ekind (Id);
7404 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7405 end Is_Constant_Object;
7407 --------------------------
7408 -- Is_Controlled_Active --
7409 --------------------------
7411 function Is_Controlled_Active (Id : E) return B is
7413 return Is_Controlled (Id) and then not Disable_Controlled (Id);
7414 end Is_Controlled_Active;
7416 --------------------
7417 -- Is_Discriminal --
7418 --------------------
7420 function Is_Discriminal (Id : E) return B is
7422 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7423 and then Present (Discriminal_Link (Id)));
7426 ----------------------
7427 -- Is_Dynamic_Scope --
7428 ----------------------
7430 function Is_Dynamic_Scope (Id : E) return B is
7433 Ekind (Id) = E_Block
7435 Ekind (Id) = E_Function
7437 Ekind (Id) = E_Procedure
7439 Ekind (Id) = E_Subprogram_Body
7441 Ekind (Id) = E_Task_Type
7443 (Ekind (Id) = E_Limited_Private_Type
7444 and then Present (Full_View (Id))
7445 and then Ekind (Full_View (Id)) = E_Task_Type)
7447 Ekind (Id) = E_Entry
7449 Ekind (Id) = E_Entry_Family
7451 Ekind (Id) = E_Return_Statement;
7452 end Is_Dynamic_Scope;
7454 --------------------
7455 -- Is_Entity_Name --
7456 --------------------
7458 function Is_Entity_Name (N : Node_Id) return Boolean is
7459 Kind : constant Node_Kind := Nkind (N);
7462 -- Identifiers, operator symbols, expanded names are entity names
7464 return Kind = N_Identifier
7465 or else Kind = N_Operator_Symbol
7466 or else Kind = N_Expanded_Name
7468 -- Attribute references are entity names if they refer to an entity.
7469 -- Note that we don't do this by testing for the presence of the
7470 -- Entity field in the N_Attribute_Reference node, since it may not
7471 -- have been set yet.
7473 or else (Kind = N_Attribute_Reference
7474 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7477 -----------------------
7478 -- Is_External_State --
7479 -----------------------
7481 function Is_External_State (Id : E) return B is
7484 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7485 end Is_External_State;
7491 function Is_Finalizer (Id : E) return B is
7493 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7500 function Is_Null_State (Id : E) return B is
7503 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7506 ---------------------
7507 -- Is_Packed_Array --
7508 ---------------------
7510 function Is_Packed_Array (Id : E) return B is
7512 return Is_Array_Type (Id) and then Is_Packed (Id);
7513 end Is_Packed_Array;
7515 -----------------------------------
7516 -- Is_Package_Or_Generic_Package --
7517 -----------------------------------
7519 function Is_Package_Or_Generic_Package (Id : E) return B is
7521 return Ekind_In (Id, E_Generic_Package, E_Package);
7522 end Is_Package_Or_Generic_Package;
7528 function Is_Prival (Id : E) return B is
7530 return (Ekind_In (Id, E_Constant, E_Variable)
7531 and then Present (Prival_Link (Id)));
7534 ----------------------------
7535 -- Is_Protected_Component --
7536 ----------------------------
7538 function Is_Protected_Component (Id : E) return B is
7540 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7541 end Is_Protected_Component;
7543 ----------------------------
7544 -- Is_Protected_Interface --
7545 ----------------------------
7547 function Is_Protected_Interface (Id : E) return B is
7548 Typ : constant Entity_Id := Base_Type (Id);
7550 if not Is_Interface (Typ) then
7552 elsif Is_Class_Wide_Type (Typ) then
7553 return Is_Protected_Interface (Etype (Typ));
7555 return Protected_Present (Type_Definition (Parent (Typ)));
7557 end Is_Protected_Interface;
7559 ------------------------------
7560 -- Is_Protected_Record_Type --
7561 ------------------------------
7563 function Is_Protected_Record_Type (Id : E) return B is
7566 Is_Concurrent_Record_Type (Id)
7567 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7568 end Is_Protected_Record_Type;
7570 --------------------------------
7571 -- Is_Standard_Character_Type --
7572 --------------------------------
7574 function Is_Standard_Character_Type (Id : E) return B is
7576 if Is_Type (Id) then
7578 R : constant Entity_Id := Root_Type (Id);
7581 R = Standard_Character
7583 R = Standard_Wide_Character
7585 R = Standard_Wide_Wide_Character;
7591 end Is_Standard_Character_Type;
7593 -----------------------------
7594 -- Is_Standard_String_Type --
7595 -----------------------------
7597 function Is_Standard_String_Type (Id : E) return B is
7599 if Is_Type (Id) then
7601 R : constant Entity_Id := Root_Type (Id);
7606 R = Standard_Wide_String
7608 R = Standard_Wide_Wide_String;
7614 end Is_Standard_String_Type;
7616 --------------------
7617 -- Is_String_Type --
7618 --------------------
7620 function Is_String_Type (Id : E) return B is
7622 return Is_Array_Type (Id)
7623 and then Id /= Any_Composite
7624 and then Number_Dimensions (Id) = 1
7625 and then Is_Character_Type (Component_Type (Id));
7628 -------------------------------
7629 -- Is_Synchronized_Interface --
7630 -------------------------------
7632 function Is_Synchronized_Interface (Id : E) return B is
7633 Typ : constant Entity_Id := Base_Type (Id);
7636 if not Is_Interface (Typ) then
7639 elsif Is_Class_Wide_Type (Typ) then
7640 return Is_Synchronized_Interface (Etype (Typ));
7643 return Protected_Present (Type_Definition (Parent (Typ)))
7644 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7645 or else Task_Present (Type_Definition (Parent (Typ)));
7647 end Is_Synchronized_Interface;
7649 -----------------------
7650 -- Is_Task_Interface --
7651 -----------------------
7653 function Is_Task_Interface (Id : E) return B is
7654 Typ : constant Entity_Id := Base_Type (Id);
7656 if not Is_Interface (Typ) then
7658 elsif Is_Class_Wide_Type (Typ) then
7659 return Is_Task_Interface (Etype (Typ));
7661 return Task_Present (Type_Definition (Parent (Typ)));
7663 end Is_Task_Interface;
7665 -------------------------
7666 -- Is_Task_Record_Type --
7667 -------------------------
7669 function Is_Task_Record_Type (Id : E) return B is
7672 Is_Concurrent_Record_Type (Id)
7673 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7674 end Is_Task_Record_Type;
7676 ------------------------
7677 -- Is_Wrapper_Package --
7678 ------------------------
7680 function Is_Wrapper_Package (Id : E) return B is
7682 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7683 end Is_Wrapper_Package;
7689 function Last_Formal (Id : E) return E is
7694 (Is_Overloadable (Id)
7695 or else Ekind_In (Id, E_Entry_Family,
7697 E_Subprogram_Type));
7699 if Ekind (Id) = E_Enumeration_Literal then
7703 Formal := First_Formal (Id);
7705 if Present (Formal) then
7706 while Present (Next_Formal (Formal)) loop
7707 Formal := Next_Formal (Formal);
7715 function Model_Emin_Value (Id : E) return Uint is
7717 return Machine_Emin_Value (Id);
7718 end Model_Emin_Value;
7720 -------------------------
7721 -- Model_Epsilon_Value --
7722 -------------------------
7724 function Model_Epsilon_Value (Id : E) return Ureal is
7725 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7727 return Radix ** (1 - Model_Mantissa_Value (Id));
7728 end Model_Epsilon_Value;
7730 --------------------------
7731 -- Model_Mantissa_Value --
7732 --------------------------
7734 function Model_Mantissa_Value (Id : E) return Uint is
7736 return Machine_Mantissa_Value (Id);
7737 end Model_Mantissa_Value;
7739 -----------------------
7740 -- Model_Small_Value --
7741 -----------------------
7743 function Model_Small_Value (Id : E) return Ureal is
7744 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7746 return Radix ** (Model_Emin_Value (Id) - 1);
7747 end Model_Small_Value;
7749 ------------------------
7750 -- Machine_Emax_Value --
7751 ------------------------
7753 function Machine_Emax_Value (Id : E) return Uint is
7754 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7757 case Float_Rep (Id) is
7760 when 1 .. 6 => return Uint_128;
7761 when 7 .. 15 => return 2**10;
7762 when 16 .. 33 => return 2**14;
7763 when others => return No_Uint;
7767 return Uint_2 ** Uint_7 - Uint_1;
7769 end Machine_Emax_Value;
7771 ------------------------
7772 -- Machine_Emin_Value --
7773 ------------------------
7775 function Machine_Emin_Value (Id : E) return Uint is
7777 case Float_Rep (Id) is
7778 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7779 when AAMP => return -Machine_Emax_Value (Id);
7781 end Machine_Emin_Value;
7783 ----------------------------
7784 -- Machine_Mantissa_Value --
7785 ----------------------------
7787 function Machine_Mantissa_Value (Id : E) return Uint is
7788 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7791 case Float_Rep (Id) is
7794 when 1 .. 6 => return Uint_24;
7795 when 7 .. 15 => return UI_From_Int (53);
7796 when 16 .. 18 => return Uint_64;
7797 when 19 .. 33 => return UI_From_Int (113);
7798 when others => return No_Uint;
7803 when 1 .. 6 => return Uint_24;
7804 when 7 .. 9 => return UI_From_Int (40);
7805 when others => return No_Uint;
7808 end Machine_Mantissa_Value;
7810 -------------------------
7811 -- Machine_Radix_Value --
7812 -------------------------
7814 function Machine_Radix_Value (Id : E) return U is
7816 case Float_Rep (Id) is
7817 when IEEE_Binary | AAMP =>
7820 end Machine_Radix_Value;
7822 --------------------
7823 -- Next_Component --
7824 --------------------
7826 function Next_Component (Id : E) return E is
7830 Comp_Id := Next_Entity (Id);
7831 while Present (Comp_Id) loop
7832 exit when Ekind (Comp_Id) = E_Component;
7833 Comp_Id := Next_Entity (Comp_Id);
7839 ------------------------------------
7840 -- Next_Component_Or_Discriminant --
7841 ------------------------------------
7843 function Next_Component_Or_Discriminant (Id : E) return E is
7847 Comp_Id := Next_Entity (Id);
7848 while Present (Comp_Id) loop
7849 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7850 Comp_Id := Next_Entity (Comp_Id);
7854 end Next_Component_Or_Discriminant;
7856 -----------------------
7857 -- Next_Discriminant --
7858 -----------------------
7860 -- This function actually implements both Next_Discriminant and
7861 -- Next_Stored_Discriminant by making sure that the Discriminant
7862 -- returned is of the same variety as Id.
7864 function Next_Discriminant (Id : E) return E is
7866 -- Derived Tagged types with private extensions look like this...
7868 -- E_Discriminant d1
7869 -- E_Discriminant d2
7871 -- E_Discriminant d1
7872 -- E_Discriminant d2
7875 -- so it is critical not to go past the leading discriminants
7880 pragma Assert (Ekind (Id) = E_Discriminant);
7883 D := Next_Entity (D);
7885 or else (Ekind (D) /= E_Discriminant
7886 and then not Is_Itype (D))
7891 exit when Ekind (D) = E_Discriminant
7892 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7896 end Next_Discriminant;
7902 function Next_Formal (Id : E) return E is
7906 -- Follow the chain of declared entities as long as the kind of the
7907 -- entity corresponds to a formal parameter. Skip internal entities
7908 -- that may have been created for implicit subtypes, in the process
7909 -- of analyzing default expressions.
7915 if No (P) or else Is_Formal (P) then
7917 elsif not Is_Internal (P) then
7923 -----------------------------
7924 -- Next_Formal_With_Extras --
7925 -----------------------------
7927 function Next_Formal_With_Extras (Id : E) return E is
7929 if Present (Extra_Formal (Id)) then
7930 return Extra_Formal (Id);
7932 return Next_Formal (Id);
7934 end Next_Formal_With_Extras;
7940 function Next_Index (Id : Node_Id) return Node_Id is
7949 function Next_Literal (Id : E) return E is
7951 pragma Assert (Nkind (Id) in N_Entity);
7955 ------------------------------
7956 -- Next_Stored_Discriminant --
7957 ------------------------------
7959 function Next_Stored_Discriminant (Id : E) return E is
7961 -- See comment in Next_Discriminant
7963 return Next_Discriminant (Id);
7964 end Next_Stored_Discriminant;
7966 -----------------------
7967 -- Number_Dimensions --
7968 -----------------------
7970 function Number_Dimensions (Id : E) return Pos is
7975 if Ekind (Id) = E_String_Literal_Subtype then
7980 T := First_Index (Id);
7981 while Present (T) loop
7988 end Number_Dimensions;
7990 --------------------
7991 -- Number_Entries --
7992 --------------------
7994 function Number_Entries (Id : E) return Nat is
7999 pragma Assert (Is_Concurrent_Type (Id));
8002 Ent := First_Entity (Id);
8003 while Present (Ent) loop
8004 if Is_Entry (Ent) then
8008 Ent := Next_Entity (Ent);
8014 --------------------
8015 -- Number_Formals --
8016 --------------------
8018 function Number_Formals (Id : E) return Pos is
8024 Formal := First_Formal (Id);
8025 while Present (Formal) loop
8027 Formal := Next_Formal (Formal);
8033 --------------------
8034 -- Parameter_Mode --
8035 --------------------
8037 function Parameter_Mode (Id : E) return Formal_Kind is
8042 ------------------------
8043 -- Predicate_Function --
8044 ------------------------
8046 function Predicate_Function (Id : E) return E is
8051 pragma Assert (Is_Type (Id));
8053 -- If type is private and has a completion, predicate may be defined
8054 -- on the full view.
8056 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8057 T := Full_View (Id);
8062 if No (Subprograms_For_Type (T)) then
8066 S := Subprograms_For_Type (T);
8067 while Present (S) loop
8068 if Is_Predicate_Function (S) then
8071 S := Subprograms_For_Type (S);
8077 end Predicate_Function;
8079 --------------------------
8080 -- Predicate_Function_M --
8081 --------------------------
8083 function Predicate_Function_M (Id : E) return E is
8088 pragma Assert (Is_Type (Id));
8090 -- If type is private and has a completion, predicate may be defined
8091 -- on the full view.
8093 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8094 T := Full_View (Id);
8099 if No (Subprograms_For_Type (T)) then
8103 S := Subprograms_For_Type (T);
8104 while Present (S) loop
8105 if Is_Predicate_Function_M (S) then
8108 S := Subprograms_For_Type (S);
8114 end Predicate_Function_M;
8116 -------------------------
8117 -- Present_In_Rep_Item --
8118 -------------------------
8120 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8124 Ritem := First_Rep_Item (E);
8126 while Present (Ritem) loop
8131 Next_Rep_Item (Ritem);
8135 end Present_In_Rep_Item;
8137 --------------------------
8138 -- Primitive_Operations --
8139 --------------------------
8141 function Primitive_Operations (Id : E) return L is
8143 if Is_Concurrent_Type (Id) then
8144 if Present (Corresponding_Record_Type (Id)) then
8145 return Direct_Primitive_Operations
8146 (Corresponding_Record_Type (Id));
8148 -- If expansion is disabled the corresponding record type is absent,
8149 -- but if the type has ancestors it may have primitive operations.
8151 elsif Is_Tagged_Type (Id) then
8152 return Direct_Primitive_Operations (Id);
8158 return Direct_Primitive_Operations (Id);
8160 end Primitive_Operations;
8162 ---------------------
8163 -- Record_Rep_Item --
8164 ---------------------
8166 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8168 Set_Next_Rep_Item (N, First_Rep_Item (E));
8169 Set_First_Rep_Item (E, N);
8170 end Record_Rep_Item;
8176 function Root_Type (Id : E) return E is
8180 pragma Assert (Nkind (Id) in N_Entity);
8182 T := Base_Type (Id);
8184 if Ekind (T) = E_Class_Wide_Type then
8196 -- Following test catches some error cases resulting from
8199 elsif No (Etyp) then
8200 Check_Error_Detected;
8203 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8206 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8212 -- Return if there is a circularity in the inheritance chain. This
8213 -- happens in some error situations and we do not want to get
8214 -- stuck in this loop.
8216 if T = Base_Type (Id) then
8223 ---------------------
8224 -- Safe_Emax_Value --
8225 ---------------------
8227 function Safe_Emax_Value (Id : E) return Uint is
8229 return Machine_Emax_Value (Id);
8230 end Safe_Emax_Value;
8232 ----------------------
8233 -- Safe_First_Value --
8234 ----------------------
8236 function Safe_First_Value (Id : E) return Ureal is
8238 return -Safe_Last_Value (Id);
8239 end Safe_First_Value;
8241 ---------------------
8242 -- Safe_Last_Value --
8243 ---------------------
8245 function Safe_Last_Value (Id : E) return Ureal is
8246 Radix : constant Uint := Machine_Radix_Value (Id);
8247 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8248 Emax : constant Uint := Safe_Emax_Value (Id);
8249 Significand : constant Uint := Radix ** Mantissa - 1;
8250 Exponent : constant Uint := Emax - Mantissa;
8256 (Num => Significand * 2 ** (Exponent mod 4),
8257 Den => -Exponent / 4,
8262 (Num => Significand,
8266 end Safe_Last_Value;
8272 function Scope_Depth (Id : E) return Uint is
8277 while Is_Record_Type (Scop) loop
8278 Scop := Scope (Scop);
8281 return Scope_Depth_Value (Scop);
8284 ---------------------
8285 -- Scope_Depth_Set --
8286 ---------------------
8288 function Scope_Depth_Set (Id : E) return B is
8290 return not Is_Record_Type (Id)
8291 and then Field22 (Id) /= Union_Id (Empty);
8292 end Scope_Depth_Set;
8294 -----------------------------
8295 -- Set_Component_Alignment --
8296 -----------------------------
8298 -- Component Alignment is encoded using two flags, Flag128/129 as
8299 -- follows. Note that both flags False = Align_Default, so that the
8300 -- default initialization of flags to False initializes component
8301 -- alignment to the default value as required.
8303 -- Flag128 Flag129 Value
8304 -- ------- ------- -----
8305 -- False False Calign_Default
8306 -- False True Calign_Component_Size
8307 -- True False Calign_Component_Size_4
8308 -- True True Calign_Storage_Unit
8310 procedure Set_Component_Alignment (Id : E; V : C) is
8312 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8313 and then Is_Base_Type (Id));
8316 when Calign_Default =>
8317 Set_Flag128 (Id, False);
8318 Set_Flag129 (Id, False);
8320 when Calign_Component_Size =>
8321 Set_Flag128 (Id, False);
8322 Set_Flag129 (Id, True);
8324 when Calign_Component_Size_4 =>
8325 Set_Flag128 (Id, True);
8326 Set_Flag129 (Id, False);
8328 when Calign_Storage_Unit =>
8329 Set_Flag128 (Id, True);
8330 Set_Flag129 (Id, True);
8332 end Set_Component_Alignment;
8334 -------------------------------------
8335 -- Set_Default_Init_Cond_Procedure --
8336 -------------------------------------
8338 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8339 Base_Typ : Entity_Id;
8340 Subp_Id : Entity_Id;
8345 and then (Has_Default_Init_Cond (Id)
8346 or Has_Inherited_Default_Init_Cond (Id)));
8347 Base_Typ := Base_Type (Id);
8349 Subp_Id := Subprograms_For_Type (Base_Typ);
8350 Set_Subprograms_For_Type (Base_Typ, V);
8351 Set_Subprograms_For_Type (V, Subp_Id);
8353 -- Check for a duplicate procedure
8355 while Present (Subp_Id) loop
8356 if Is_Default_Init_Cond_Procedure (Subp_Id) then
8357 raise Program_Error;
8360 Subp_Id := Subprograms_For_Type (Subp_Id);
8362 end Set_Default_Init_Cond_Procedure;
8364 -----------------------------
8365 -- Set_Invariant_Procedure --
8366 -----------------------------
8368 procedure Set_Invariant_Procedure (Id : E; V : E) is
8372 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8374 S := Subprograms_For_Type (Id);
8375 Set_Subprograms_For_Type (Id, V);
8376 Set_Subprograms_For_Type (V, S);
8378 -- Check for duplicate entry
8380 while Present (S) loop
8381 if Is_Invariant_Procedure (S) then
8382 raise Program_Error;
8384 S := Subprograms_For_Type (S);
8387 end Set_Invariant_Procedure;
8389 ----------------------------
8390 -- Set_Predicate_Function --
8391 ----------------------------
8393 procedure Set_Predicate_Function (Id : E; V : E) is
8397 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8399 S := Subprograms_For_Type (Id);
8400 Set_Subprograms_For_Type (Id, V);
8401 Set_Subprograms_For_Type (V, S);
8403 while Present (S) loop
8404 if Is_Predicate_Function (S) then
8405 raise Program_Error;
8407 S := Subprograms_For_Type (S);
8410 end Set_Predicate_Function;
8412 ------------------------------
8413 -- Set_Predicate_Function_M --
8414 ------------------------------
8416 procedure Set_Predicate_Function_M (Id : E; V : E) is
8420 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8422 S := Subprograms_For_Type (Id);
8423 Set_Subprograms_For_Type (Id, V);
8424 Set_Subprograms_For_Type (V, S);
8426 -- Check for duplicates
8428 while Present (S) loop
8429 if Is_Predicate_Function_M (S) then
8430 raise Program_Error;
8432 S := Subprograms_For_Type (S);
8435 end Set_Predicate_Function_M;
8441 function Size_Clause (Id : E) return N is
8443 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8446 ------------------------
8447 -- Stream_Size_Clause --
8448 ------------------------
8450 function Stream_Size_Clause (Id : E) return N is
8452 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8453 end Stream_Size_Clause;
8459 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8465 Kind := E_Access_Subtype;
8469 Kind := E_Array_Subtype;
8471 when E_Class_Wide_Type |
8472 E_Class_Wide_Subtype =>
8473 Kind := E_Class_Wide_Subtype;
8475 when E_Decimal_Fixed_Point_Type |
8476 E_Decimal_Fixed_Point_Subtype =>
8477 Kind := E_Decimal_Fixed_Point_Subtype;
8479 when E_Ordinary_Fixed_Point_Type |
8480 E_Ordinary_Fixed_Point_Subtype =>
8481 Kind := E_Ordinary_Fixed_Point_Subtype;
8483 when E_Private_Type |
8484 E_Private_Subtype =>
8485 Kind := E_Private_Subtype;
8487 when E_Limited_Private_Type |
8488 E_Limited_Private_Subtype =>
8489 Kind := E_Limited_Private_Subtype;
8491 when E_Record_Type_With_Private |
8492 E_Record_Subtype_With_Private =>
8493 Kind := E_Record_Subtype_With_Private;
8495 when E_Record_Type |
8497 Kind := E_Record_Subtype;
8499 when Enumeration_Kind =>
8500 Kind := E_Enumeration_Subtype;
8503 Kind := E_Floating_Point_Subtype;
8505 when Signed_Integer_Kind =>
8506 Kind := E_Signed_Integer_Subtype;
8508 when Modular_Integer_Kind =>
8509 Kind := E_Modular_Integer_Subtype;
8511 when Protected_Kind =>
8512 Kind := E_Protected_Subtype;
8515 Kind := E_Task_Subtype;
8519 raise Program_Error;
8525 ---------------------
8526 -- Type_High_Bound --
8527 ---------------------
8529 function Type_High_Bound (Id : E) return Node_Id is
8530 Rng : constant Node_Id := Scalar_Range (Id);
8532 if Nkind (Rng) = N_Subtype_Indication then
8533 return High_Bound (Range_Expression (Constraint (Rng)));
8535 return High_Bound (Rng);
8537 end Type_High_Bound;
8539 --------------------
8540 -- Type_Low_Bound --
8541 --------------------
8543 function Type_Low_Bound (Id : E) return Node_Id is
8544 Rng : constant Node_Id := Scalar_Range (Id);
8546 if Nkind (Rng) = N_Subtype_Indication then
8547 return Low_Bound (Range_Expression (Constraint (Rng)));
8549 return Low_Bound (Rng);
8553 ---------------------
8554 -- Underlying_Type --
8555 ---------------------
8557 function Underlying_Type (Id : E) return E is
8559 -- For record_with_private the underlying type is always the direct
8560 -- full view. Never try to take the full view of the parent it
8561 -- doesn't make sense.
8563 if Ekind (Id) = E_Record_Type_With_Private then
8564 return Full_View (Id);
8566 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8568 -- If we have an incomplete or private type with a full view,
8569 -- then we return the Underlying_Type of this full view.
8571 if Present (Full_View (Id)) then
8572 if Id = Full_View (Id) then
8574 -- Previous error in declaration
8579 return Underlying_Type (Full_View (Id));
8582 -- If we have a private type with an underlying full view, then we
8583 -- return the Underlying_Type of this underlying full view.
8585 elsif Ekind (Id) in Private_Kind
8586 and then Present (Underlying_Full_View (Id))
8588 return Underlying_Type (Underlying_Full_View (Id));
8590 -- If we have an incomplete entity that comes from the limited
8591 -- view then we return the Underlying_Type of its non-limited
8594 elsif From_Limited_With (Id)
8595 and then Present (Non_Limited_View (Id))
8597 return Underlying_Type (Non_Limited_View (Id));
8599 -- Otherwise check for the case where we have a derived type or
8600 -- subtype, and if so get the Underlying_Type of the parent type.
8602 elsif Etype (Id) /= Id then
8603 return Underlying_Type (Etype (Id));
8605 -- Otherwise we have an incomplete or private type that has
8606 -- no full view, which means that we have not encountered the
8607 -- completion, so return Empty to indicate the underlying type
8608 -- is not yet known.
8614 -- For non-incomplete, non-private types, return the type itself Also
8615 -- for entities that are not types at all return the entity itself.
8620 end Underlying_Type;
8622 ------------------------
8623 -- Write_Entity_Flags --
8624 ------------------------
8626 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8628 procedure W (Flag_Name : String; Flag : Boolean);
8629 -- Write out given flag if it is set
8635 procedure W (Flag_Name : String; Flag : Boolean) is
8639 Write_Str (Flag_Name);
8640 Write_Str (" = True");
8645 -- Start of processing for Write_Entity_Flags
8648 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8649 and then Is_Base_Type (Id)
8652 Write_Str ("Component_Alignment = ");
8654 case Component_Alignment (Id) is
8655 when Calign_Default =>
8656 Write_Str ("Calign_Default");
8658 when Calign_Component_Size =>
8659 Write_Str ("Calign_Component_Size");
8661 when Calign_Component_Size_4 =>
8662 Write_Str ("Calign_Component_Size_4");
8664 when Calign_Storage_Unit =>
8665 Write_Str ("Calign_Storage_Unit");
8671 W ("Address_Taken", Flag104 (Id));
8672 W ("Body_Needed_For_SAL", Flag40 (Id));
8673 W ("C_Pass_By_Copy", Flag125 (Id));
8674 W ("Can_Never_Be_Null", Flag38 (Id));
8675 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8676 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8677 W ("Debug_Info_Off", Flag166 (Id));
8678 W ("Default_Expressions_Processed", Flag108 (Id));
8679 W ("Delay_Cleanups", Flag114 (Id));
8680 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8681 W ("Depends_On_Private", Flag14 (Id));
8682 W ("Discard_Names", Flag88 (Id));
8683 W ("Elaboration_Entity_Required", Flag174 (Id));
8684 W ("Elaborate_Body_Desirable", Flag210 (Id));
8685 W ("Entry_Accepted", Flag152 (Id));
8686 W ("Can_Use_Internal_Rep", Flag229 (Id));
8687 W ("Finalize_Storage_Only", Flag158 (Id));
8688 W ("From_Limited_With", Flag159 (Id));
8689 W ("Has_Aliased_Components", Flag135 (Id));
8690 W ("Has_Alignment_Clause", Flag46 (Id));
8691 W ("Has_All_Calls_Remote", Flag79 (Id));
8692 W ("Has_Atomic_Components", Flag86 (Id));
8693 W ("Has_Biased_Representation", Flag139 (Id));
8694 W ("Has_Completion", Flag26 (Id));
8695 W ("Has_Completion_In_Body", Flag71 (Id));
8696 W ("Has_Complex_Representation", Flag140 (Id));
8697 W ("Has_Component_Size_Clause", Flag68 (Id));
8698 W ("Has_Contiguous_Rep", Flag181 (Id));
8699 W ("Has_Controlled_Component", Flag43 (Id));
8700 W ("Has_Controlling_Result", Flag98 (Id));
8701 W ("Has_Convention_Pragma", Flag119 (Id));
8702 W ("Has_Default_Aspect", Flag39 (Id));
8703 W ("Has_Default_Init_Cond", Flag3 (Id));
8704 W ("Has_Delayed_Aspects", Flag200 (Id));
8705 W ("Has_Delayed_Freeze", Flag18 (Id));
8706 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8707 W ("Has_Discriminants", Flag5 (Id));
8708 W ("Has_Dispatch_Table", Flag220 (Id));
8709 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8710 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8711 W ("Has_Exit", Flag47 (Id));
8712 W ("Has_Expanded_Contract", Flag240 (Id));
8713 W ("Has_Forward_Instantiation", Flag175 (Id));
8714 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8715 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8716 W ("Has_Homonym", Flag56 (Id));
8717 W ("Has_Implicit_Dereference", Flag251 (Id));
8718 W ("Has_Independent_Components", Flag34 (Id));
8719 W ("Has_Inheritable_Invariants", Flag248 (Id));
8720 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8721 W ("Has_Initial_Value", Flag219 (Id));
8722 W ("Has_Invariants", Flag232 (Id));
8723 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8724 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8725 W ("Has_Master_Entity", Flag21 (Id));
8726 W ("Has_Missing_Return", Flag142 (Id));
8727 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8728 W ("Has_Nested_Subprogram", Flag282 (Id));
8729 W ("Has_Non_Standard_Rep", Flag75 (Id));
8730 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8731 W ("Has_Object_Size_Clause", Flag172 (Id));
8732 W ("Has_Per_Object_Constraint", Flag154 (Id));
8733 W ("Has_Pragma_Controlled", Flag27 (Id));
8734 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8735 W ("Has_Pragma_Inline", Flag157 (Id));
8736 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8737 W ("Has_Pragma_No_Inline", Flag201 (Id));
8738 W ("Has_Pragma_Ordered", Flag198 (Id));
8739 W ("Has_Pragma_Pack", Flag121 (Id));
8740 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8741 W ("Has_Pragma_Pure", Flag203 (Id));
8742 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8743 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8744 W ("Has_Pragma_Unmodified", Flag233 (Id));
8745 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8746 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8747 W ("Has_Predicates", Flag250 (Id));
8748 W ("Has_Primitive_Operations", Flag120 (Id));
8749 W ("Has_Private_Ancestor", Flag151 (Id));
8750 W ("Has_Private_Declaration", Flag155 (Id));
8751 W ("Has_Protected", Flag271 (Id));
8752 W ("Has_Qualified_Name", Flag161 (Id));
8753 W ("Has_RACW", Flag214 (Id));
8754 W ("Has_Record_Rep_Clause", Flag65 (Id));
8755 W ("Has_Recursive_Call", Flag143 (Id));
8756 W ("Has_Shift_Operator", Flag267 (Id));
8757 W ("Has_Size_Clause", Flag29 (Id));
8758 W ("Has_Small_Clause", Flag67 (Id));
8759 W ("Has_Specified_Layout", Flag100 (Id));
8760 W ("Has_Specified_Stream_Input", Flag190 (Id));
8761 W ("Has_Specified_Stream_Output", Flag191 (Id));
8762 W ("Has_Specified_Stream_Read", Flag192 (Id));
8763 W ("Has_Specified_Stream_Write", Flag193 (Id));
8764 W ("Has_Static_Discriminants", Flag211 (Id));
8765 W ("Has_Static_Predicate", Flag269 (Id));
8766 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8767 W ("Has_Storage_Size_Clause", Flag23 (Id));
8768 W ("Has_Stream_Size_Clause", Flag184 (Id));
8769 W ("Has_Task", Flag30 (Id));
8770 W ("Has_Thunks", Flag228 (Id));
8771 W ("Has_Unchecked_Union", Flag123 (Id));
8772 W ("Has_Unknown_Discriminants", Flag72 (Id));
8773 W ("Has_Uplevel_Reference", Flag215 (Id));
8774 W ("Has_Visible_Refinement", Flag263 (Id));
8775 W ("Has_Volatile_Components", Flag87 (Id));
8776 W ("Has_Xref_Entry", Flag182 (Id));
8777 W ("In_Package_Body", Flag48 (Id));
8778 W ("In_Private_Part", Flag45 (Id));
8779 W ("In_Use", Flag8 (Id));
8780 W ("Is_Abstract_Subprogram", Flag19 (Id));
8781 W ("Is_Abstract_Type", Flag146 (Id));
8782 W ("Is_Access_Constant", Flag69 (Id));
8783 W ("Is_Ada_2005_Only", Flag185 (Id));
8784 W ("Is_Ada_2012_Only", Flag199 (Id));
8785 W ("Is_Aliased", Flag15 (Id));
8786 W ("Is_Asynchronous", Flag81 (Id));
8787 W ("Is_Atomic", Flag85 (Id));
8788 W ("Is_Bit_Packed_Array", Flag122 (Id));
8789 W ("Is_CPP_Class", Flag74 (Id));
8790 W ("Is_Called", Flag102 (Id));
8791 W ("Is_Character_Type", Flag63 (Id));
8792 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8793 W ("Is_Child_Unit", Flag73 (Id));
8794 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8795 W ("Is_Compilation_Unit", Flag149 (Id));
8796 W ("Is_Completely_Hidden", Flag103 (Id));
8797 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8798 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8799 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8800 W ("Is_Constrained", Flag12 (Id));
8801 W ("Is_Constructor", Flag76 (Id));
8802 W ("Is_Controlled", Flag42 (Id));
8803 W ("Is_Controlling_Formal", Flag97 (Id));
8804 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8805 W ("Is_Descendent_Of_Address", Flag223 (Id));
8806 W ("Is_Discrim_SO_Function", Flag176 (Id));
8807 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8808 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8809 W ("Is_Dispatching_Operation", Flag6 (Id));
8810 W ("Is_Eliminated", Flag124 (Id));
8811 W ("Is_Entry_Formal", Flag52 (Id));
8812 W ("Is_Exported", Flag99 (Id));
8813 W ("Is_First_Subtype", Flag70 (Id));
8814 W ("Is_For_Access_Subtype", Flag118 (Id));
8815 W ("Is_Formal_Subprogram", Flag111 (Id));
8816 W ("Is_Frozen", Flag4 (Id));
8817 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8818 W ("Is_Generic_Actual_Type", Flag94 (Id));
8819 W ("Is_Generic_Instance", Flag130 (Id));
8820 W ("Is_Generic_Type", Flag13 (Id));
8821 W ("Is_Hidden", Flag57 (Id));
8822 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8823 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8824 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8825 W ("Is_Immediately_Visible", Flag7 (Id));
8826 W ("Is_Implementation_Defined", Flag254 (Id));
8827 W ("Is_Imported", Flag24 (Id));
8828 W ("Is_Independent", Flag268 (Id));
8829 W ("Is_Inlined", Flag11 (Id));
8830 W ("Is_Inlined_Always", Flag1 (Id));
8831 W ("Is_Instantiated", Flag126 (Id));
8832 W ("Is_Interface", Flag186 (Id));
8833 W ("Is_Internal", Flag17 (Id));
8834 W ("Is_Interrupt_Handler", Flag89 (Id));
8835 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8836 W ("Is_Invariant_Procedure", Flag257 (Id));
8837 W ("Is_Itype", Flag91 (Id));
8838 W ("Is_Known_Non_Null", Flag37 (Id));
8839 W ("Is_Known_Null", Flag204 (Id));
8840 W ("Is_Known_Valid", Flag170 (Id));
8841 W ("Is_Limited_Composite", Flag106 (Id));
8842 W ("Is_Limited_Interface", Flag197 (Id));
8843 W ("Is_Limited_Record", Flag25 (Id));
8844 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8845 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8846 W ("Is_Non_Static_Subtype", Flag109 (Id));
8847 W ("Is_Null_Init_Proc", Flag178 (Id));
8848 W ("Is_Obsolescent", Flag153 (Id));
8849 W ("Is_Only_Out_Parameter", Flag226 (Id));
8850 W ("Is_Package_Body_Entity", Flag160 (Id));
8851 W ("Is_Packed", Flag51 (Id));
8852 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8853 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8854 W ("Is_Predicate_Function", Flag255 (Id));
8855 W ("Is_Predicate_Function_M", Flag256 (Id));
8856 W ("Is_Preelaborated", Flag59 (Id));
8857 W ("Is_Primitive", Flag218 (Id));
8858 W ("Is_Primitive_Wrapper", Flag195 (Id));
8859 W ("Is_Private_Composite", Flag107 (Id));
8860 W ("Is_Private_Descendant", Flag53 (Id));
8861 W ("Is_Private_Primitive", Flag245 (Id));
8862 W ("Is_Processed_Transient", Flag252 (Id));
8863 W ("Is_Public", Flag10 (Id));
8864 W ("Is_Pure", Flag44 (Id));
8865 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8866 W ("Is_RACW_Stub_Type", Flag244 (Id));
8867 W ("Is_Raised", Flag224 (Id));
8868 W ("Is_Remote_Call_Interface", Flag62 (Id));
8869 W ("Is_Remote_Types", Flag61 (Id));
8870 W ("Is_Renaming_Of_Object", Flag112 (Id));
8871 W ("Is_Return_Object", Flag209 (Id));
8872 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8873 W ("Is_Shared_Passive", Flag60 (Id));
8874 W ("Is_Static_Type", Flag281 (Id));
8875 W ("Is_Statically_Allocated", Flag28 (Id));
8876 W ("Is_Tag", Flag78 (Id));
8877 W ("Is_Tagged_Type", Flag55 (Id));
8878 W ("Is_Thunk", Flag225 (Id));
8879 W ("Is_Trivial_Subprogram", Flag235 (Id));
8880 W ("Is_True_Constant", Flag163 (Id));
8881 W ("Is_Unchecked_Union", Flag117 (Id));
8882 W ("Is_Underlying_Record_View", Flag246 (Id));
8883 W ("Is_Unimplemented", Flag284 (Id));
8884 W ("Is_Unsigned_Type", Flag144 (Id));
8885 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
8886 W ("Is_Valued_Procedure", Flag127 (Id));
8887 W ("Is_Visible_Formal", Flag206 (Id));
8888 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8889 W ("Is_Volatile", Flag16 (Id));
8890 W ("Is_Volatile_Full_Access", Flag285 (Id));
8891 W ("Itype_Printed", Flag202 (Id));
8892 W ("Kill_Elaboration_Checks", Flag32 (Id));
8893 W ("Kill_Range_Checks", Flag33 (Id));
8894 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8895 W ("Low_Bound_Tested", Flag205 (Id));
8896 W ("Machine_Radix_10", Flag84 (Id));
8897 W ("Materialize_Entity", Flag168 (Id));
8898 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8899 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8900 W ("Must_Have_Preelab_Init", Flag208 (Id));
8901 W ("Needs_Debug_Info", Flag147 (Id));
8902 W ("Needs_No_Actuals", Flag22 (Id));
8903 W ("Needs_Typedef", Flag286 (Id));
8904 W ("Never_Set_In_Source", Flag115 (Id));
8905 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8906 W ("No_Pool_Assigned", Flag131 (Id));
8907 W ("No_Predicate_On_actual", Flag275 (Id));
8908 W ("No_Return", Flag113 (Id));
8909 W ("No_Strict_Aliasing", Flag136 (Id));
8910 W ("Non_Binary_Modulus", Flag58 (Id));
8911 W ("Nonzero_Is_True", Flag162 (Id));
8912 W ("OK_To_Rename", Flag247 (Id));
8913 W ("OK_To_Reorder_Components", Flag239 (Id));
8914 W ("Optimize_Alignment_Space", Flag241 (Id));
8915 W ("Optimize_Alignment_Time", Flag242 (Id));
8916 W ("Overlays_Constant", Flag243 (Id));
8917 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
8918 W ("Reachable", Flag49 (Id));
8919 W ("Referenced", Flag156 (Id));
8920 W ("Referenced_As_LHS", Flag36 (Id));
8921 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8922 W ("Renamed_In_Spec", Flag231 (Id));
8923 W ("Requires_Overriding", Flag213 (Id));
8924 W ("Return_Present", Flag54 (Id));
8925 W ("Returns_By_Ref", Flag90 (Id));
8926 W ("Returns_Limited_View", Flag134 (Id));
8927 W ("Reverse_Bit_Order", Flag164 (Id));
8928 W ("Reverse_Storage_Order", Flag93 (Id));
8929 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8930 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8931 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8932 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8933 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8934 W ("SSO_Set_High_By_Default", Flag273 (Id));
8935 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8936 W ("Static_Elaboration_Desired", Flag77 (Id));
8937 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8938 W ("Strict_Alignment", Flag145 (Id));
8939 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8940 W ("Suppress_Initialization", Flag105 (Id));
8941 W ("Suppress_Style_Checks", Flag165 (Id));
8942 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8943 W ("Treat_As_Volatile", Flag41 (Id));
8944 W ("Universal_Aliasing", Flag216 (Id));
8945 W ("Used_As_Generic_Actual", Flag222 (Id));
8946 W ("Uses_Sec_Stack", Flag95 (Id));
8947 W ("Warnings_Off", Flag96 (Id));
8948 W ("Warnings_Off_Used", Flag236 (Id));
8949 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8950 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8951 W ("Was_Hidden", Flag196 (Id));
8952 end Write_Entity_Flags;
8954 -----------------------
8955 -- Write_Entity_Info --
8956 -----------------------
8958 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8960 procedure Write_Attribute (Which : String; Nam : E);
8961 -- Write attribute value with given string name
8963 procedure Write_Kind (Id : Entity_Id);
8964 -- Write Ekind field of entity
8966 ---------------------
8967 -- Write_Attribute --
8968 ---------------------
8970 procedure Write_Attribute (Which : String; Nam : E) is
8974 Write_Int (Int (Nam));
8976 Write_Name (Chars (Nam));
8978 end Write_Attribute;
8984 procedure Write_Kind (Id : Entity_Id) is
8985 K : constant String := Entity_Kind'Image (Ekind (Id));
8989 Write_Str (" Kind ");
8991 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8992 Write_Str ("TAGGED ");
8995 Write_Str (K (3 .. K'Length));
8998 if Is_Type (Id) and then Depends_On_Private (Id) then
8999 Write_Str ("Depends_On_Private ");
9003 -- Start of processing for Write_Entity_Info
9007 Write_Attribute ("Name ", Id);
9008 Write_Int (Int (Id));
9012 Write_Attribute (" Type ", Etype (Id));
9014 Write_Attribute (" Scope ", Scope (Id));
9019 when Discrete_Kind =>
9020 Write_Str ("Bounds: Id = ");
9022 if Present (Scalar_Range (Id)) then
9023 Write_Int (Int (Type_Low_Bound (Id)));
9024 Write_Str (" .. Id = ");
9025 Write_Int (Int (Type_High_Bound (Id)));
9027 Write_Str ("Empty");
9038 (" Component Type ", Component_Type (Id));
9041 Write_Str (" Indexes ");
9043 Index := First_Index (Id);
9044 while Present (Index) loop
9045 Write_Attribute (" ", Etype (Index));
9046 Index := Next_Index (Index);
9054 (" Directly Designated Type ",
9055 Directly_Designated_Type (Id));
9058 when Overloadable_Kind =>
9059 if Present (Homonym (Id)) then
9060 Write_Str (" Homonym ");
9061 Write_Name (Chars (Homonym (Id)));
9063 Write_Int (Int (Homonym (Id)));
9070 if Ekind (Scope (Id)) in Record_Kind then
9072 " Original_Record_Component ",
9073 Original_Record_Component (Id));
9074 Write_Int (Int (Original_Record_Component (Id)));
9078 when others => null;
9080 end Write_Entity_Info;
9082 -----------------------
9083 -- Write_Field6_Name --
9084 -----------------------
9086 procedure Write_Field6_Name (Id : Entity_Id) is
9087 pragma Unreferenced (Id);
9089 Write_Str ("First_Rep_Item");
9090 end Write_Field6_Name;
9092 -----------------------
9093 -- Write_Field7_Name --
9094 -----------------------
9096 procedure Write_Field7_Name (Id : Entity_Id) is
9097 pragma Unreferenced (Id);
9099 Write_Str ("Freeze_Node");
9100 end Write_Field7_Name;
9102 -----------------------
9103 -- Write_Field8_Name --
9104 -----------------------
9106 procedure Write_Field8_Name (Id : Entity_Id) is
9110 Write_Str ("Associated_Node_For_Itype");
9113 Write_Str ("Dependent_Instances");
9116 Write_Str ("First_Exit_Statement");
9119 Write_Str ("Hiding_Loop_Variable");
9123 E_Subprogram_Body =>
9124 Write_Str ("Mechanism");
9128 Write_Str ("Normalized_First_Bit");
9130 when E_Abstract_State =>
9131 Write_Str ("Refinement_Constituents");
9133 when E_Return_Statement =>
9134 Write_Str ("Return_Applies_To");
9137 Write_Str ("Field8??");
9139 end Write_Field8_Name;
9141 -----------------------
9142 -- Write_Field9_Name --
9143 -----------------------
9145 procedure Write_Field9_Name (Id : Entity_Id) is
9149 Write_Str ("Class_Wide_Type");
9152 Write_Str ("Current_Value");
9154 when E_Abstract_State =>
9155 Write_Str ("Part_Of_Constituents");
9158 E_Generic_Function |
9160 E_Generic_Procedure |
9163 Write_Str ("Renaming_Map");
9166 Write_Str ("Field9??");
9168 end Write_Field9_Name;
9170 ------------------------
9171 -- Write_Field10_Name --
9172 ------------------------
9174 procedure Write_Field10_Name (Id : Entity_Id) is
9177 when Class_Wide_Kind |
9183 Write_Str ("Direct_Primitive_Operations");
9185 when E_In_Parameter |
9187 Write_Str ("Discriminal_Link");
9190 Write_Str ("Float_Rep");
9196 Write_Str ("Handler_Records");
9200 Write_Str ("Normalized_Position_Max");
9203 Write_Str ("Field10??");
9205 end Write_Field10_Name;
9207 ------------------------
9208 -- Write_Field11_Name --
9209 ------------------------
9211 procedure Write_Field11_Name (Id : Entity_Id) is
9215 Write_Str ("Block_Node");
9219 Write_Str ("Component_Bit_Offset");
9222 Write_Str ("Entry_Component");
9224 when E_Enumeration_Literal =>
9225 Write_Str ("Enumeration_Pos");
9229 Write_Str ("Full_View");
9231 when E_Generic_Package =>
9232 Write_Str ("Generic_Homonym");
9238 Write_Str ("Protected_Body_Subprogram");
9241 Write_Str ("Field11??");
9243 end Write_Field11_Name;
9245 ------------------------
9246 -- Write_Field12_Name --
9247 ------------------------
9249 procedure Write_Field12_Name (Id : Entity_Id) is
9253 Write_Str ("Associated_Formal_Package");
9256 Write_Str ("Barrier_Function");
9258 when E_Enumeration_Literal =>
9259 Write_Str ("Enumeration_Rep");
9267 E_In_Out_Parameter |
9271 Write_Str ("Esize");
9275 Write_Str ("Next_Inlined_Subprogram");
9278 Write_Str ("Field12??");
9280 end Write_Field12_Name;
9282 ------------------------
9283 -- Write_Field13_Name --
9284 ------------------------
9286 procedure Write_Field13_Name (Id : Entity_Id) is
9291 Write_Str ("Component_Clause");
9294 Write_Str ("Elaboration_Entity");
9298 Generic_Unit_Kind =>
9299 Write_Str ("Elaboration_Entity");
9303 Write_Str ("Extra_Accessibility");
9306 Write_Str ("RM_Size");
9309 Write_Str ("Field13??");
9311 end Write_Field13_Name;
9313 -----------------------
9314 -- Write_Field14_Name --
9315 -----------------------
9317 procedure Write_Field14_Name (Id : Entity_Id) is
9326 Write_Str ("Alignment");
9330 Write_Str ("Normalized_Position");
9336 Write_Str ("Postconditions_Proc");
9338 when E_Generic_Package |
9340 Write_Str ("Shadow_Entities");
9343 Write_Str ("Field14??");
9345 end Write_Field14_Name;
9347 ------------------------
9348 -- Write_Field15_Name --
9349 ------------------------
9351 procedure Write_Field15_Name (Id : Entity_Id) is
9354 when E_Discriminant =>
9355 Write_Str ("Discriminant_Number");
9358 Write_Str ("DT_Entry_Count");
9362 Write_Str ("DT_Position");
9365 Write_Str ("Entry_Parameters_Type");
9368 Write_Str ("Extra_Formal");
9371 Write_Str ("Pending_Access_Types");
9375 Write_Str ("Related_Instance");
9379 Write_Str ("Status_Flag_Or_Transient_Decl");
9382 Write_Str ("Field15??");
9384 end Write_Field15_Name;
9386 ------------------------
9387 -- Write_Field16_Name --
9388 ------------------------
9390 procedure Write_Field16_Name (Id : Entity_Id) is
9393 when E_Record_Type |
9394 E_Record_Type_With_Private =>
9395 Write_Str ("Access_Disp_Table");
9397 when E_Abstract_State =>
9398 Write_Str ("Body_References");
9400 when E_Record_Subtype |
9401 E_Class_Wide_Subtype =>
9402 Write_Str ("Cloned_Subtype");
9406 Write_Str ("DTC_Entity");
9409 Write_Str ("Entry_Formal");
9414 Write_Str ("First_Private_Entity");
9416 when Enumeration_Kind =>
9417 Write_Str ("Lit_Strings");
9419 when Decimal_Fixed_Point_Kind =>
9420 Write_Str ("Scale_Value");
9422 when E_String_Literal_Subtype =>
9423 Write_Str ("String_Literal_Length");
9427 Write_Str ("Unset_Reference");
9430 Write_Str ("Field16??");
9432 end Write_Field16_Name;
9434 ------------------------
9435 -- Write_Field17_Name --
9436 ------------------------
9438 procedure Write_Field17_Name (Id : Entity_Id) is
9443 E_Generic_In_Out_Parameter |
9445 Write_Str ("Actual_Subtype");
9448 Write_Str ("Digits_Value");
9450 when E_Discriminant =>
9451 Write_Str ("Discriminal");
9460 E_Generic_Function |
9462 E_Generic_Procedure |
9470 E_Return_Statement |
9472 E_Subprogram_Type =>
9473 Write_Str ("First_Entity");
9476 Write_Str ("First_Index");
9478 when Enumeration_Kind =>
9479 Write_Str ("First_Literal");
9482 Write_Str ("Master_Id");
9484 when Modular_Integer_Kind =>
9485 Write_Str ("Modulus");
9488 Write_Str ("Prival");
9491 Write_Str ("Field17??");
9493 end Write_Field17_Name;
9495 ------------------------
9496 -- Write_Field18_Name --
9497 ------------------------
9499 procedure Write_Field18_Name (Id : Entity_Id) is
9502 when E_Enumeration_Literal |
9506 Write_Str ("Alias");
9508 when E_Record_Type =>
9509 Write_Str ("Corresponding_Concurrent_Type");
9511 when E_Subprogram_Body =>
9512 Write_Str ("Corresponding_Protected_Entry");
9514 when Concurrent_Kind =>
9515 Write_Str ("Corresponding_Record_Type");
9520 Write_Str ("Enclosing_Scope");
9522 when E_Entry_Index_Parameter =>
9523 Write_Str ("Entry_Index_Constant");
9525 when E_Class_Wide_Subtype |
9526 E_Access_Protected_Subprogram_Type |
9527 E_Anonymous_Access_Protected_Subprogram_Type |
9528 E_Access_Subprogram_Type |
9530 Write_Str ("Equivalent_Type");
9532 when Fixed_Point_Kind =>
9533 Write_Str ("Delta_Value");
9535 when Enumeration_Kind =>
9536 Write_Str ("Lit_Indexes");
9538 when Incomplete_Or_Private_Kind |
9540 Write_Str ("Private_Dependents");
9543 Write_Str ("Renamed_Object");
9547 E_Generic_Function |
9548 E_Generic_Procedure |
9549 E_Generic_Package =>
9550 Write_Str ("Renamed_Entity");
9552 when E_String_Literal_Subtype =>
9553 Write_Str ("String_Literal_Low_Bound");
9556 Write_Str ("Field18??");
9558 end Write_Field18_Name;
9560 -----------------------
9561 -- Write_Field19_Name --
9562 -----------------------
9564 procedure Write_Field19_Name (Id : Entity_Id) is
9568 E_Generic_Package =>
9569 Write_Str ("Body_Entity");
9571 when E_Discriminant =>
9572 Write_Str ("Corresponding_Discriminant");
9575 Write_Str ("Default_Aspect_Value");
9577 when E_Abstract_State |
9579 E_Incomplete_Type =>
9580 Write_Str ("Non_Limited_View");
9582 when E_Incomplete_Subtype =>
9583 if From_Limited_With (Id) then
9584 Write_Str ("Non_Limited_View");
9587 when E_Array_Type =>
9588 Write_Str ("Default_Component_Value");
9590 when E_Protected_Type =>
9591 Write_Str ("Entry_Bodies_Array");
9595 E_Subprogram_Type =>
9596 Write_Str ("Extra_Accessibility_Of_Result");
9598 when E_Record_Type =>
9599 Write_Str ("Parent_Subtype");
9603 Write_Str ("Size_Check_Code");
9605 when E_Package_Body |
9607 Write_Str ("Spec_Entity");
9609 when Private_Kind =>
9610 Write_Str ("Underlying_Full_View");
9613 Write_Str ("Field19??");
9615 end Write_Field19_Name;
9617 -----------------------
9618 -- Write_Field20_Name --
9619 -----------------------
9621 procedure Write_Field20_Name (Id : Entity_Id) is
9625 Write_Str ("Component_Type");
9627 when E_In_Parameter |
9628 E_Generic_In_Parameter =>
9629 Write_Str ("Default_Value");
9632 Write_Str ("Directly_Designated_Type");
9635 Write_Str ("Discriminant_Checking_Func");
9637 when E_Discriminant =>
9638 Write_Str ("Discriminant_Default_Value");
9647 E_Generic_Function |
9649 E_Generic_Procedure |
9657 E_Return_Statement |
9659 E_Subprogram_Type =>
9660 Write_Str ("Last_Entity");
9664 Write_Str ("Prival_Link");
9667 Write_Str ("Scalar_Range");
9670 Write_Str ("Register_Exception_Call");
9673 Write_Str ("Field20??");
9675 end Write_Field20_Name;
9677 -----------------------
9678 -- Write_Field21_Name --
9679 -----------------------
9681 procedure Write_Field21_Name (Id : Entity_Id) is
9685 Write_Str ("Accept_Address");
9687 when E_In_Parameter =>
9688 Write_Str ("Default_Expr_Function");
9690 when Concurrent_Kind |
9691 Incomplete_Or_Private_Kind |
9695 Write_Str ("Discriminant_Constraint");
9700 E_Generic_Function |
9702 E_Generic_Procedure |
9704 Write_Str ("Interface_Name");
9707 Modular_Integer_Kind =>
9708 Write_Str ("Original_Array_Type");
9710 when Fixed_Point_Kind =>
9711 Write_Str ("Small_Value");
9714 Write_Str ("Field21??");
9716 end Write_Field21_Name;
9718 -----------------------
9719 -- Write_Field22_Name --
9720 -----------------------
9722 procedure Write_Field22_Name (Id : Entity_Id) is
9726 Write_Str ("Associated_Storage_Pool");
9729 Write_Str ("Component_Size");
9731 when E_Record_Type =>
9732 Write_Str ("Corresponding_Remote_Type");
9736 Write_Str ("Original_Record_Component");
9738 when E_Enumeration_Literal =>
9739 Write_Str ("Enumeration_Rep_Expr");
9741 when E_Record_Type_With_Private |
9742 E_Record_Subtype_With_Private |
9745 E_Limited_Private_Type |
9746 E_Limited_Private_Subtype =>
9747 Write_Str ("Private_View");
9750 Write_Str ("Protected_Formal");
9760 E_Generic_Function |
9761 E_Generic_Procedure |
9764 E_Return_Statement |
9767 Write_Str ("Scope_Depth_Value");
9770 Write_Str ("Shared_Var_Procs_Instance");
9773 Write_Str ("Field22??");
9775 end Write_Field22_Name;
9777 ------------------------
9778 -- Write_Field23_Name --
9779 ------------------------
9781 procedure Write_Field23_Name (Id : Entity_Id) is
9784 when E_Discriminant =>
9785 Write_Str ("CR_Discriminant");
9788 Write_Str ("Entry_Cancel_Parameter");
9790 when E_Enumeration_Type =>
9791 Write_Str ("Enum_Pos_To_Rep");
9795 Write_Str ("Extra_Constrained");
9798 Write_Str ("Finalization_Master");
9800 when E_Generic_Function |
9802 E_Generic_Procedure =>
9803 Write_Str ("Inner_Instances");
9806 Write_Str ("Packed_Array_Impl_Type");
9809 Write_Str ("Protection_Object");
9811 when Concurrent_Kind |
9812 Incomplete_Or_Private_Kind |
9816 Write_Str ("Stored_Constraint");
9820 if Present (Scope (Id))
9821 and then Is_Protected_Type (Scope (Id))
9823 Write_Str ("Protection_Object");
9825 Write_Str ("Generic_Renamings");
9829 if Is_Generic_Instance (Id) then
9830 Write_Str ("Generic_Renamings");
9832 Write_Str ("Limited_View");
9836 Write_Str ("Field23??");
9838 end Write_Field23_Name;
9840 ------------------------
9841 -- Write_Field24_Name --
9842 ------------------------
9844 procedure Write_Field24_Name (Id : Entity_Id) is
9850 Write_Str ("Related_Expression");
9855 Write_Str ("Subps_Index");
9858 Write_Str ("Incomplete_Actuals");
9861 Write_Str ("Field24???");
9863 end Write_Field24_Name;
9865 ------------------------
9866 -- Write_Field25_Name --
9867 ------------------------
9869 procedure Write_Field25_Name (Id : Entity_Id) is
9872 when E_Generic_Package |
9874 Write_Str ("Abstract_States");
9877 Write_Str ("Debug_Renaming_Link");
9880 Write_Str ("DT_Offset_To_Top_Func");
9884 Write_Str ("Interface_Alias");
9886 when E_Record_Type |
9888 E_Record_Type_With_Private |
9889 E_Record_Subtype_With_Private =>
9890 Write_Str ("Interfaces");
9894 Write_Str ("Related_Array_Object");
9897 Write_Str ("Task_Body_Procedure");
9901 Write_Str ("PPC_Wrapper");
9903 when Discrete_Kind =>
9904 Write_Str ("Static_Discrete_Predicate");
9907 Write_Str ("Static_Real_Or_String_Predicate");
9910 Write_Str ("Field25??");
9912 end Write_Field25_Name;
9914 ------------------------
9915 -- Write_Field26_Name --
9916 ------------------------
9918 procedure Write_Field26_Name (Id : Entity_Id) is
9921 when E_Record_Type |
9922 E_Record_Type_With_Private =>
9923 Write_Str ("Dispatch_Table_Wrappers");
9925 when E_In_Out_Parameter |
9928 Write_Str ("Last_Assignment");
9932 Write_Str ("Overridden_Operation");
9934 when E_Generic_Package |
9936 Write_Str ("Package_Instantiation");
9940 Write_Str ("Related_Type");
9944 Write_Str ("Storage_Size_Variable");
9947 Write_Str ("Field26??");
9949 end Write_Field26_Name;
9951 ------------------------
9952 -- Write_Field27_Name --
9953 ------------------------
9955 procedure Write_Field27_Name (Id : Entity_Id) is
9960 Write_Str ("Current_Use_Clause");
9965 Write_Str ("Related_Type");
9969 Write_Str ("Wrapped_Entity");
9972 Write_Str ("Field27??");
9974 end Write_Field27_Name;
9976 ------------------------
9977 -- Write_Field28_Name --
9978 ------------------------
9980 procedure Write_Field28_Name (Id : Entity_Id) is
9988 E_Subprogram_Type =>
9989 Write_Str ("Extra_Formals");
9993 Write_Str ("Finalizer");
9997 Write_Str ("Initialization_Statements");
9999 when E_Access_Subprogram_Type =>
10000 Write_Str ("Original_Access_Type");
10003 Write_Str ("Relative_Deadline_Variable");
10005 when E_Record_Type =>
10006 Write_Str ("Underlying_Record_View");
10009 Write_Str ("Field28??");
10011 end Write_Field28_Name;
10013 ------------------------
10014 -- Write_Field29_Name --
10015 ------------------------
10017 procedure Write_Field29_Name (Id : Entity_Id) is
10022 Write_Str ("BIP_Initialization_Call");
10025 Write_Str ("Subprograms_For_Type");
10028 Write_Str ("Field29??");
10030 end Write_Field29_Name;
10032 ------------------------
10033 -- Write_Field30_Name --
10034 ------------------------
10036 procedure Write_Field30_Name (Id : Entity_Id) is
10040 Write_Str ("Corresponding_Equality");
10044 Write_Str ("Last_Aggregate_Assignment");
10046 when E_Procedure =>
10047 Write_Str ("Static_Initialization");
10050 Write_Str ("Field30??");
10052 end Write_Field30_Name;
10054 ------------------------
10055 -- Write_Field31_Name --
10056 ------------------------
10058 procedure Write_Field31_Name (Id : Entity_Id) is
10063 Write_Str ("Thunk_Entity");
10066 Write_Str ("Derived_Type_Link");
10070 E_In_Out_Parameter |
10074 Write_Str ("Activation_Record_Component");
10077 Write_Str ("Field31??");
10079 end Write_Field31_Name;
10081 ------------------------
10082 -- Write_Field32_Name --
10083 ------------------------
10085 procedure Write_Field32_Name (Id : Entity_Id) is
10088 when E_Abstract_State |
10091 Write_Str ("Encapsulating_State");
10094 E_Generic_Function |
10095 E_Generic_Package |
10096 E_Generic_Procedure |
10100 E_Subprogram_Body =>
10101 Write_Str ("SPARK_Pragma");
10104 Write_Str ("No_Tagged_Streams_Pragma");
10107 Write_Str ("Field32??");
10109 end Write_Field32_Name;
10111 ------------------------
10112 -- Write_Field33_Name --
10113 ------------------------
10115 procedure Write_Field33_Name (Id : Entity_Id) is
10118 when E_Generic_Package |
10121 Write_Str ("SPARK_Aux_Pragma");
10127 Write_Str ("Linker_Section_Pragma");
10130 Write_Str ("Field33??");
10132 end Write_Field33_Name;
10134 ------------------------
10135 -- Write_Field34_Name --
10136 ------------------------
10138 procedure Write_Field34_Name (Id : Entity_Id) is
10144 E_Generic_Package |
10147 E_Subprogram_Body |
10150 Generic_Subprogram_Kind |
10152 Write_Str ("Contract");
10155 Write_Str ("Field34??");
10157 end Write_Field34_Name;
10159 ------------------------
10160 -- Write_Field35_Name --
10161 ------------------------
10163 procedure Write_Field35_Name (Id : Entity_Id) is
10166 when Subprogram_Kind =>
10167 Write_Str ("Import_Pragma");
10170 Write_Str ("Field35??");
10172 end Write_Field35_Name;
10174 ------------------------
10175 -- Write_Field36_Name --
10176 ------------------------
10178 procedure Write_Field36_Name (Id : Entity_Id) is
10186 E_Subprogram_Body =>
10187 Write_Str ("Anonymous_Master");
10190 Write_Str ("Field36??");
10192 end Write_Field36_Name;
10194 ------------------------
10195 -- Write_Field37_Name --
10196 ------------------------
10198 procedure Write_Field37_Name (Id : Entity_Id) is
10199 pragma Unreferenced (Id);
10201 Write_Str ("Associated_Entity");
10202 end Write_Field37_Name;
10204 ------------------------
10205 -- Write_Field38_Name --
10206 ------------------------
10208 procedure Write_Field38_Name (Id : Entity_Id) is
10212 Write_Str ("Field38??");
10214 end Write_Field38_Name;
10216 ------------------------
10217 -- Write_Field39_Name --
10218 ------------------------
10220 procedure Write_Field39_Name (Id : Entity_Id) is
10224 Write_Str ("Field39??");
10226 end Write_Field39_Name;
10228 ------------------------
10229 -- Write_Field40_Name --
10230 ------------------------
10232 procedure Write_Field40_Name (Id : Entity_Id) is
10236 Write_Str ("Field40??");
10238 end Write_Field40_Name;
10240 ------------------------
10241 -- Write_Field41_Name --
10242 ------------------------
10244 procedure Write_Field41_Name (Id : Entity_Id) is
10248 Write_Str ("Field41??");
10250 end Write_Field41_Name;
10252 -------------------------
10253 -- Iterator Procedures --
10254 -------------------------
10256 procedure Proc_Next_Component (N : in out Node_Id) is
10258 N := Next_Component (N);
10259 end Proc_Next_Component;
10261 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10263 N := Next_Entity (N);
10264 while Present (N) loop
10265 exit when Ekind_In (N, E_Component, E_Discriminant);
10266 N := Next_Entity (N);
10268 end Proc_Next_Component_Or_Discriminant;
10270 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10272 N := Next_Discriminant (N);
10273 end Proc_Next_Discriminant;
10275 procedure Proc_Next_Formal (N : in out Node_Id) is
10277 N := Next_Formal (N);
10278 end Proc_Next_Formal;
10280 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10282 N := Next_Formal_With_Extras (N);
10283 end Proc_Next_Formal_With_Extras;
10285 procedure Proc_Next_Index (N : in out Node_Id) is
10287 N := Next_Index (N);
10288 end Proc_Next_Index;
10290 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10292 N := Next_Inlined_Subprogram (N);
10293 end Proc_Next_Inlined_Subprogram;
10295 procedure Proc_Next_Literal (N : in out Node_Id) is
10297 N := Next_Literal (N);
10298 end Proc_Next_Literal;
10300 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10302 N := Next_Stored_Discriminant (N);
10303 end Proc_Next_Stored_Discriminant;