1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2020, 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
74 -- Associated_Entity Node37
76 -- The usage of other fields (and the entity kinds to which it applies)
77 -- depends on the particular field (see Einfo spec for details).
79 -- Associated_Node_For_Itype Node8
80 -- Dependent_Instances Elist8
81 -- Hiding_Loop_Variable Node8
82 -- Mechanism Uint8 (but returns Mechanism_Type)
83 -- Normalized_First_Bit Uint8
84 -- Refinement_Constituents Elist8
85 -- Return_Applies_To Node8
86 -- First_Exit_Statement Node8
88 -- Class_Wide_Type Node9
89 -- Current_Value Node9
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
97 -- Part_Of_Constituents Elist10
100 -- Component_Bit_Offset Uint11
102 -- Entry_Component Node11
103 -- Enumeration_Pos Uint11
104 -- Generic_Homonym Node11
105 -- Part_Of_References Elist11
106 -- Protected_Body_Subprogram Node11
108 -- Barrier_Function Node12
109 -- Enumeration_Rep Uint12
111 -- Next_Inlined_Subprogram Node12
113 -- Component_Clause Node13
114 -- Elaboration_Entity Node13
115 -- Extra_Accessibility Node13
119 -- Normalized_Position Uint14
120 -- Postconditions_Proc Node14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Pending_Access_Types Elist15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
131 -- Access_Disp_Table Elist16
132 -- Body_References Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- Scale_Value Uint16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
153 -- Corresponding_Concurrent_Type Node18
154 -- Corresponding_Protected_Entry Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Lit_Indexes Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
163 -- String_Literal_Low_Bound Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Entry_Bodies_Array Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Non_Limited_View Node19
172 -- Parent_Subtype Node19
173 -- Receiving_Entry Node19
174 -- Size_Check_Code Node19
175 -- Spec_Entity Node19
176 -- Underlying_Full_View Node19
178 -- Component_Type Node20
179 -- Default_Value Node20
180 -- Directly_Designated_Type Node20
181 -- Discriminant_Checking_Func Node20
182 -- Discriminant_Default_Value Node20
183 -- Last_Entity Node20
184 -- Prival_Link Node20
185 -- Register_Exception_Call Node20
186 -- Scalar_Range Node20
188 -- Accept_Address Elist21
189 -- Corresponding_Record_Component Node21
190 -- Default_Expr_Function Node21
191 -- Discriminant_Constraint Elist21
192 -- Interface_Name Node21
193 -- Original_Array_Type Node21
194 -- Small_Value Ureal21
196 -- Associated_Storage_Pool Node22
197 -- Component_Size Uint22
198 -- Corresponding_Remote_Type Node22
199 -- Enumeration_Rep_Expr Node22
200 -- Original_Record_Component Node22
201 -- Protected_Formal Node22
202 -- Scope_Depth_Value Uint22
203 -- Shared_Var_Procs_Instance Node22
205 -- CR_Discriminant Node23
206 -- Entry_Cancel_Parameter Node23
207 -- Enum_Pos_To_Rep Node23
208 -- Extra_Constrained Node23
209 -- Finalization_Master Node23
210 -- Generic_Renamings Elist23
211 -- Inner_Instances Elist23
212 -- Limited_View Node23
213 -- Packed_Array_Impl_Type Node23
214 -- Protection_Object Node23
215 -- Stored_Constraint Elist23
217 -- Incomplete_Actuals Elist24
218 -- Minimum_Accessibility Node24
219 -- Related_Expression Node24
220 -- Subps_Index Uint24
222 -- Contract_Wrapper Node25
223 -- Debug_Renaming_Link Node25
224 -- DT_Offset_To_Top_Func Node25
225 -- Interface_Alias Node25
226 -- Interfaces Elist25
227 -- Related_Array_Object Node25
228 -- Static_Discrete_Predicate List25
229 -- Static_Real_Or_String_Predicate Node25
230 -- Task_Body_Procedure Node25
232 -- Dispatch_Table_Wrappers Elist26
233 -- Last_Assignment Node26
234 -- Overridden_Operation Node26
235 -- Package_Instantiation Node26
236 -- Storage_Size_Variable Node26
238 -- Current_Use_Clause Node27
239 -- Related_Type Node27
240 -- Wrapped_Entity Node27
242 -- Extra_Formals Node28
244 -- Initialization_Statements Node28
245 -- Original_Access_Type Node28
246 -- Relative_Deadline_Variable Node28
247 -- Underlying_Record_View Node28
249 -- Anonymous_Masters Elist29
250 -- BIP_Initialization_Call Node29
251 -- Subprograms_For_Type Elist29
253 -- Access_Disp_Table_Elab_Flag Node30
254 -- Anonymous_Object Node30
255 -- Corresponding_Equality Node30
256 -- Hidden_In_Formal_Instance Elist30
257 -- Last_Aggregate_Assignment Node30
258 -- Static_Initialization Node30
260 -- Activation_Record_Component Node31
261 -- Derived_Type_Link Node31
262 -- Thunk_Entity Node31
264 -- Corresponding_Function Node32
265 -- Corresponding_Procedure Node32
266 -- Encapsulating_State Node32
267 -- No_Tagged_Streams_Pragma Node32
269 -- Linker_Section_Pragma Node33
273 -- Anonymous_Designated_Type Node35
274 -- Entry_Max_Queue_Lengths_Array Node35
275 -- Import_Pragma Node35
277 -- Validated_Object Node38
278 -- Predicated_Parent Node38
279 -- Class_Wide_Clone Node38
281 -- Protected_Subprogram Node39
283 -- SPARK_Pragma Node40
285 -- Original_Protected_Subprogram Node41
286 -- SPARK_Aux_Pragma Node41
288 ---------------------------------------------
289 -- Usage of Flags in Defining Entity Nodes --
290 ---------------------------------------------
292 -- All flags are unique, there is no overlaying, so each flag is physically
293 -- present in every entity. However, for many of the flags, it only makes
294 -- sense for them to be set true for certain subsets of entity kinds. See
295 -- the spec of Einfo for further details.
297 -- Is_Inlined_Always Flag1
298 -- Is_Hidden_Non_Overridden_Subpgm Flag2
301 -- Has_Discriminants Flag5
302 -- Is_Dispatching_Operation Flag6
303 -- Is_Immediately_Visible Flag7
305 -- Is_Potentially_Use_Visible Flag9
309 -- Is_Constrained Flag12
310 -- Is_Generic_Type Flag13
311 -- Depends_On_Private Flag14
313 -- Is_Volatile Flag16
314 -- Is_Internal Flag17
315 -- Has_Delayed_Freeze Flag18
316 -- Is_Abstract_Subprogram Flag19
317 -- Is_Concurrent_Record_Type Flag20
319 -- Has_Master_Entity Flag21
320 -- Needs_No_Actuals Flag22
321 -- Has_Storage_Size_Clause Flag23
322 -- Is_Imported Flag24
323 -- Is_Limited_Record Flag25
324 -- Has_Completion Flag26
325 -- Has_Pragma_Controlled Flag27
326 -- Is_Statically_Allocated Flag28
327 -- Has_Size_Clause Flag29
330 -- Checks_May_Be_Suppressed Flag31
331 -- Kill_Elaboration_Checks Flag32
332 -- Kill_Range_Checks Flag33
333 -- Has_Independent_Components Flag34
334 -- Is_Class_Wide_Equivalent_Type Flag35
335 -- Referenced_As_LHS Flag36
336 -- Is_Known_Non_Null Flag37
337 -- Can_Never_Be_Null Flag38
338 -- Has_Default_Aspect Flag39
339 -- Body_Needed_For_SAL Flag40
341 -- Treat_As_Volatile Flag41
342 -- Is_Controlled_Active Flag42
343 -- Has_Controlled_Component Flag43
345 -- In_Private_Part Flag45
346 -- Has_Alignment_Clause Flag46
348 -- In_Package_Body Flag48
350 -- Delay_Subprogram_Descriptors Flag50
353 -- Is_Entry_Formal Flag52
354 -- Is_Private_Descendant Flag53
355 -- Return_Present Flag54
356 -- Is_Tagged_Type Flag55
357 -- Has_Homonym Flag56
359 -- Non_Binary_Modulus Flag58
360 -- Is_Preelaborated Flag59
361 -- Is_Shared_Passive Flag60
363 -- Is_Remote_Types Flag61
364 -- Is_Remote_Call_Interface Flag62
365 -- Is_Character_Type Flag63
366 -- Is_Intrinsic_Subprogram Flag64
367 -- Has_Record_Rep_Clause Flag65
368 -- Has_Enumeration_Rep_Clause Flag66
369 -- Has_Small_Clause Flag67
370 -- Has_Component_Size_Clause Flag68
371 -- Is_Access_Constant Flag69
372 -- Is_First_Subtype Flag70
374 -- Has_Completion_In_Body Flag71
375 -- Has_Unknown_Discriminants Flag72
376 -- Is_Child_Unit Flag73
377 -- Is_CPP_Class Flag74
378 -- Has_Non_Standard_Rep Flag75
379 -- Is_Constructor Flag76
380 -- Static_Elaboration_Desired Flag77
382 -- Has_All_Calls_Remote Flag79
383 -- Is_Constr_Subt_For_U_Nominal Flag80
385 -- Is_Asynchronous Flag81
386 -- Has_Gigi_Rep_Item Flag82
387 -- Has_Machine_Radix_Clause Flag83
388 -- Machine_Radix_10 Flag84
390 -- Has_Atomic_Components Flag86
391 -- Has_Volatile_Components Flag87
392 -- Discard_Names Flag88
393 -- Is_Interrupt_Handler Flag89
394 -- Returns_By_Ref Flag90
397 -- Size_Known_At_Compile_Time Flag92
398 -- Reverse_Storage_Order Flag93
399 -- Is_Generic_Actual_Type Flag94
400 -- Uses_Sec_Stack Flag95
401 -- Warnings_Off Flag96
402 -- Is_Controlling_Formal Flag97
403 -- Has_Controlling_Result Flag98
404 -- Is_Exported Flag99
405 -- Has_Specified_Layout Flag100
407 -- Has_Nested_Block_With_Handler Flag101
409 -- Is_Completely_Hidden Flag103
410 -- Address_Taken Flag104
411 -- Suppress_Initialization Flag105
412 -- Is_Limited_Composite Flag106
413 -- Is_Private_Composite Flag107
414 -- Default_Expressions_Processed Flag108
415 -- Is_Non_Static_Subtype Flag109
416 -- Has_Out_Or_In_Out_Parameter Flag110
418 -- Is_Formal_Subprogram Flag111
419 -- Is_Renaming_Of_Object Flag112
421 -- Delay_Cleanups Flag114
422 -- Never_Set_In_Source Flag115
423 -- Is_Visible_Lib_Unit Flag116
424 -- Is_Unchecked_Union Flag117
425 -- Has_Convention_Pragma Flag119
426 -- Has_Primitive_Operations Flag120
428 -- Has_Pragma_Pack Flag121
429 -- Is_Bit_Packed_Array Flag122
430 -- Has_Unchecked_Union Flag123
431 -- Is_Eliminated Flag124
432 -- C_Pass_By_Copy Flag125
433 -- Is_Instantiated Flag126
434 -- Is_Valued_Procedure Flag127
435 -- (used for Component_Alignment) Flag128
436 -- (used for Component_Alignment) Flag129
437 -- Is_Generic_Instance Flag130
439 -- No_Pool_Assigned Flag131
440 -- Is_DIC_Procedure Flag132
441 -- Has_Inherited_DIC Flag133
442 -- Has_Aliased_Components Flag135
443 -- No_Strict_Aliasing Flag136
444 -- Is_Machine_Code_Subprogram Flag137
445 -- Is_Packed_Array_Impl_Type Flag138
446 -- Has_Biased_Representation Flag139
447 -- Has_Complex_Representation Flag140
449 -- Is_Constr_Subt_For_UN_Aliased Flag141
450 -- Has_Missing_Return Flag142
451 -- Has_Recursive_Call Flag143
452 -- Is_Unsigned_Type Flag144
453 -- Strict_Alignment Flag145
454 -- Is_Abstract_Type Flag146
455 -- Needs_Debug_Info Flag147
456 -- Is_Elaboration_Checks_OK_Id Flag148
457 -- Is_Compilation_Unit Flag149
458 -- Has_Pragma_Elaborate_Body Flag150
460 -- Has_Private_Ancestor Flag151
461 -- Entry_Accepted Flag152
462 -- Is_Obsolescent Flag153
463 -- Has_Per_Object_Constraint Flag154
464 -- Has_Private_Declaration Flag155
465 -- Referenced Flag156
466 -- Has_Pragma_Inline Flag157
467 -- Finalize_Storage_Only Flag158
468 -- From_Limited_With Flag159
469 -- Is_Package_Body_Entity Flag160
471 -- Has_Qualified_Name Flag161
472 -- Nonzero_Is_True Flag162
473 -- Is_True_Constant Flag163
474 -- Reverse_Bit_Order Flag164
475 -- Suppress_Style_Checks Flag165
476 -- Debug_Info_Off Flag166
477 -- Sec_Stack_Needed_For_Return Flag167
478 -- Materialize_Entity Flag168
479 -- Has_Pragma_Thread_Local_Storage Flag169
480 -- Is_Known_Valid Flag170
482 -- Is_Hidden_Open_Scope Flag171
483 -- Has_Object_Size_Clause Flag172
484 -- Has_Fully_Qualified_Name Flag173
485 -- Elaboration_Entity_Required Flag174
486 -- Has_Forward_Instantiation Flag175
487 -- Is_Discrim_SO_Function Flag176
488 -- Size_Depends_On_Discriminant Flag177
489 -- Is_Null_Init_Proc Flag178
490 -- Has_Pragma_Pure_Function Flag179
491 -- Has_Pragma_Unreferenced Flag180
493 -- Has_Contiguous_Rep Flag181
494 -- Has_Xref_Entry Flag182
495 -- Must_Be_On_Byte_Boundary Flag183
496 -- Has_Stream_Size_Clause Flag184
497 -- Is_Ada_2005_Only Flag185
498 -- Is_Interface Flag186
499 -- Has_Constrained_Partial_View Flag187
500 -- Uses_Lock_Free Flag188
501 -- Is_Pure_Unit_Access_Type Flag189
502 -- Has_Specified_Stream_Input Flag190
504 -- Has_Specified_Stream_Output Flag191
505 -- Has_Specified_Stream_Read Flag192
506 -- Has_Specified_Stream_Write Flag193
507 -- Is_Local_Anonymous_Access Flag194
508 -- Is_Primitive_Wrapper Flag195
509 -- Was_Hidden Flag196
510 -- Is_Limited_Interface Flag197
511 -- Has_Pragma_Ordered Flag198
512 -- Is_Ada_2012_Only Flag199
514 -- Has_Delayed_Aspects Flag200
515 -- Has_Pragma_No_Inline Flag201
516 -- Itype_Printed Flag202
517 -- Has_Pragma_Pure Flag203
518 -- Is_Known_Null Flag204
519 -- Low_Bound_Tested Flag205
520 -- Is_Visible_Formal Flag206
521 -- Known_To_Have_Preelab_Init Flag207
522 -- Must_Have_Preelab_Init Flag208
523 -- Is_Return_Object Flag209
524 -- Elaborate_Body_Desirable Flag210
526 -- Has_Static_Discriminants Flag211
527 -- Has_Pragma_Unreferenced_Objects Flag212
528 -- Requires_Overriding Flag213
530 -- Is_Param_Block_Component_Type Flag215
531 -- Universal_Aliasing Flag216
532 -- Suppress_Value_Tracking_On_Call Flag217
533 -- Is_Primitive Flag218
534 -- Has_Initial_Value Flag219
535 -- Has_Dispatch_Table Flag220
537 -- Has_Pragma_Preelab_Init Flag221
538 -- Used_As_Generic_Actual Flag222
539 -- Is_Descendant_Of_Address Flag223
542 -- Is_Only_Out_Parameter Flag226
543 -- Referenced_As_Out_Parameter Flag227
544 -- Has_Thunks Flag228
545 -- Can_Use_Internal_Rep Flag229
546 -- Has_Pragma_Inline_Always Flag230
548 -- Renamed_In_Spec Flag231
549 -- Has_Own_Invariants Flag232
550 -- Has_Pragma_Unmodified Flag233
551 -- Is_Dispatch_Table_Entity Flag234
552 -- Is_Trivial_Subprogram Flag235
553 -- Warnings_Off_Used Flag236
554 -- Warnings_Off_Used_Unmodified Flag237
555 -- Warnings_Off_Used_Unreferenced Flag238
556 -- No_Reordering Flag239
557 -- Has_Expanded_Contract Flag240
559 -- Optimize_Alignment_Space Flag241
560 -- Optimize_Alignment_Time Flag242
561 -- Overlays_Constant Flag243
562 -- Is_RACW_Stub_Type Flag244
563 -- Is_Private_Primitive Flag245
564 -- Is_Underlying_Record_View Flag246
565 -- OK_To_Rename Flag247
566 -- Has_Inheritable_Invariants Flag248
567 -- Is_Safe_To_Reevaluate Flag249
568 -- Has_Predicates Flag250
570 -- Has_Implicit_Dereference Flag251
571 -- Is_Finalized_Transient Flag252
572 -- Disable_Controlled Flag253
573 -- Is_Implementation_Defined Flag254
574 -- Is_Predicate_Function Flag255
575 -- Is_Predicate_Function_M Flag256
576 -- Is_Invariant_Procedure Flag257
577 -- Has_Dynamic_Predicate_Aspect Flag258
578 -- Has_Static_Predicate_Aspect Flag259
579 -- Has_Loop_Entry_Attributes Flag260
581 -- Has_Delayed_Rep_Aspects Flag261
582 -- May_Inherit_Delayed_Rep_Aspects Flag262
583 -- Has_Visible_Refinement Flag263
584 -- Is_Discriminant_Check_Function Flag264
585 -- SPARK_Pragma_Inherited Flag265
586 -- SPARK_Aux_Pragma_Inherited Flag266
587 -- Has_Shift_Operator Flag267
588 -- Is_Independent Flag268
589 -- Has_Static_Predicate Flag269
590 -- Stores_Attribute_Old_Prefix Flag270
592 -- Has_Protected Flag271
593 -- SSO_Set_Low_By_Default Flag272
594 -- SSO_Set_High_By_Default Flag273
595 -- Is_Generic_Actual_Subprogram Flag274
596 -- No_Predicate_On_Actual Flag275
597 -- No_Dynamic_Predicate_On_Actual Flag276
598 -- Is_Checked_Ghost_Entity Flag277
599 -- Is_Ignored_Ghost_Entity Flag278
600 -- Contains_Ignored_Ghost_Code Flag279
601 -- Partial_View_Has_Unknown_Discr Flag280
603 -- Is_Static_Type Flag281
604 -- Has_Nested_Subprogram Flag282
605 -- Is_Uplevel_Referenced_Entity Flag283
606 -- Is_Unimplemented Flag284
607 -- Is_Volatile_Full_Access Flag285
608 -- Is_Exception_Handler Flag286
609 -- Rewritten_For_C Flag287
610 -- Predicates_Ignored Flag288
611 -- Has_Timing_Event Flag289
612 -- Is_Class_Wide_Clone Flag290
614 -- Has_Inherited_Invariants Flag291
615 -- Is_Partial_Invariant_Procedure Flag292
616 -- Is_Actual_Subtype Flag293
617 -- Has_Pragma_Unused Flag294
618 -- Is_Ignored_Transient Flag295
619 -- Has_Partial_Visible_Refinement Flag296
620 -- Is_Entry_Wrapper Flag297
621 -- Is_Underlying_Full_View Flag298
622 -- Body_Needed_For_Inlining Flag299
623 -- Has_Private_Extension Flag300
625 -- Ignore_SPARK_Mode_Pragmas Flag301
626 -- Is_Initial_Condition_Procedure Flag302
627 -- Suppress_Elaboration_Warnings Flag303
628 -- Is_Elaboration_Warnings_OK_Id Flag304
629 -- Is_Activation_Record Flag305
630 -- Needs_Activation_Record Flag306
631 -- Is_Loop_Parameter Flag307
632 -- Invariants_Ignored Flag308
636 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
638 -----------------------
639 -- Local subprograms --
640 -----------------------
643 (State_Id : Entity_Id;
644 Option_Nam : Name_Id) return Boolean;
645 -- Determine whether abstract state State_Id has particular option denoted
646 -- by the name Option_Nam.
652 function Float_Rep (Id : E) return F is
653 pragma Assert (Is_Floating_Point_Type (Id));
655 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
663 (State_Id : Entity_Id;
664 Option_Nam : Name_Id) return Boolean
666 Decl : constant Node_Id := Parent (State_Id);
671 pragma Assert (Ekind (State_Id) = E_Abstract_State);
673 -- The declaration of abstract states with options appear as an
674 -- extension aggregate. If this is not the case, the option is not
677 if Nkind (Decl) /= N_Extension_Aggregate then
683 Opt := First (Expressions (Decl));
684 while Present (Opt) loop
685 if Nkind (Opt) = N_Identifier and then Chars (Opt) = Option_Nam then
692 -- Complex options with various specifiers
694 Opt := First (Component_Associations (Decl));
695 while Present (Opt) loop
696 Opt_Nam := First (Choices (Opt));
698 if Nkind (Opt_Nam) = N_Identifier
699 and then Chars (Opt_Nam) = Option_Nam
710 --------------------------------
711 -- Attribute Access Functions --
712 --------------------------------
714 function Abstract_States (Id : E) return L is
716 pragma Assert (Is_Package_Or_Generic_Package (Id));
720 function Accept_Address (Id : E) return L is
725 function Access_Disp_Table (Id : E) return L is
727 pragma Assert (Ekind_In (Id, E_Record_Subtype,
729 E_Record_Type_With_Private));
730 return Elist16 (Implementation_Base_Type (Id));
731 end Access_Disp_Table;
733 function Access_Disp_Table_Elab_Flag (Id : E) return E is
735 pragma Assert (Ekind_In (Id, E_Record_Subtype,
737 E_Record_Type_With_Private));
738 return Node30 (Implementation_Base_Type (Id));
739 end Access_Disp_Table_Elab_Flag;
741 function Activation_Record_Component (Id : E) return E is
743 pragma Assert (Ekind_In (Id, E_Constant,
750 end Activation_Record_Component;
752 function Actual_Subtype (Id : E) return E is
755 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
756 or else Is_Formal (Id));
760 function Address_Taken (Id : E) return B is
765 function Alias (Id : E) return E is
768 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
772 function Alignment (Id : E) return U is
774 pragma Assert (Is_Type (Id)
775 or else Is_Formal (Id)
776 or else Ekind_In (Id, E_Loop_Parameter,
783 function Anonymous_Designated_Type (Id : E) return E is
785 pragma Assert (Ekind (Id) = E_Variable);
787 end Anonymous_Designated_Type;
789 function Anonymous_Masters (Id : E) return L is
791 pragma Assert (Ekind_In (Id, E_Function,
796 end Anonymous_Masters;
798 function Anonymous_Object (Id : E) return E is
800 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
802 end Anonymous_Object;
804 function Associated_Entity (Id : E) return E is
807 end Associated_Entity;
809 function Associated_Formal_Package (Id : E) return E is
811 pragma Assert (Ekind (Id) = E_Package);
813 end Associated_Formal_Package;
815 function Associated_Node_For_Itype (Id : E) return N is
818 end Associated_Node_For_Itype;
820 function Associated_Storage_Pool (Id : E) return E is
822 pragma Assert (Is_Access_Type (Id));
823 return Node22 (Root_Type (Id));
824 end Associated_Storage_Pool;
826 function Barrier_Function (Id : E) return N is
828 pragma Assert (Is_Entry (Id));
830 end Barrier_Function;
832 function Block_Node (Id : E) return N is
834 pragma Assert (Ekind (Id) = E_Block);
838 function Body_Entity (Id : E) return E is
840 pragma Assert (Is_Package_Or_Generic_Package (Id));
844 function Body_Needed_For_Inlining (Id : E) return B is
846 pragma Assert (Ekind (Id) = E_Package);
848 end Body_Needed_For_Inlining;
850 function Body_Needed_For_SAL (Id : E) return B is
853 (Ekind (Id) = E_Package
854 or else Is_Subprogram (Id)
855 or else Is_Generic_Unit (Id));
857 end Body_Needed_For_SAL;
859 function Body_References (Id : E) return L is
861 pragma Assert (Ekind (Id) = E_Abstract_State);
865 function BIP_Initialization_Call (Id : E) return N is
867 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
869 end BIP_Initialization_Call;
871 function C_Pass_By_Copy (Id : E) return B is
873 pragma Assert (Is_Record_Type (Id));
874 return Flag125 (Implementation_Base_Type (Id));
877 function Can_Never_Be_Null (Id : E) return B is
880 end Can_Never_Be_Null;
882 function Checks_May_Be_Suppressed (Id : E) return B is
885 end Checks_May_Be_Suppressed;
887 function Class_Wide_Clone (Id : E) return E is
889 pragma Assert (Is_Subprogram (Id));
891 end Class_Wide_Clone;
893 function Class_Wide_Type (Id : E) return E is
895 pragma Assert (Is_Type (Id));
899 function Cloned_Subtype (Id : E) return E is
901 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
905 function Component_Bit_Offset (Id : E) return U is
907 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
909 end Component_Bit_Offset;
911 function Component_Clause (Id : E) return N is
913 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
915 end Component_Clause;
917 function Component_Size (Id : E) return U is
919 pragma Assert (Is_Array_Type (Id));
920 return Uint22 (Implementation_Base_Type (Id));
923 function Component_Type (Id : E) return E is
925 pragma Assert (Is_Array_Type (Id));
926 return Node20 (Implementation_Base_Type (Id));
929 function Corresponding_Concurrent_Type (Id : E) return E is
931 pragma Assert (Ekind (Id) = E_Record_Type);
933 end Corresponding_Concurrent_Type;
935 function Corresponding_Discriminant (Id : E) return E is
937 pragma Assert (Ekind (Id) = E_Discriminant);
939 end Corresponding_Discriminant;
941 function Corresponding_Equality (Id : E) return E is
944 (Ekind (Id) = E_Function
945 and then not Comes_From_Source (Id)
946 and then Chars (Id) = Name_Op_Ne);
948 end Corresponding_Equality;
950 function Corresponding_Function (Id : E) return E is
952 pragma Assert (Ekind (Id) = E_Procedure);
954 end Corresponding_Function;
956 function Corresponding_Procedure (Id : E) return E is
958 pragma Assert (Ekind (Id) = E_Function);
960 end Corresponding_Procedure;
962 function Corresponding_Protected_Entry (Id : E) return E is
964 pragma Assert (Ekind (Id) = E_Subprogram_Body);
966 end Corresponding_Protected_Entry;
968 function Corresponding_Record_Component (Id : E) return E is
970 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
972 end Corresponding_Record_Component;
974 function Corresponding_Record_Type (Id : E) return E is
976 pragma Assert (Is_Concurrent_Type (Id));
978 end Corresponding_Record_Type;
980 function Corresponding_Remote_Type (Id : E) return E is
983 end Corresponding_Remote_Type;
985 function Current_Use_Clause (Id : E) return E is
987 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
989 end Current_Use_Clause;
991 function Current_Value (Id : E) return N is
993 pragma Assert (Ekind (Id) in Object_Kind);
997 function CR_Discriminant (Id : E) return E is
1000 end CR_Discriminant;
1002 function Debug_Info_Off (Id : E) return B is
1004 return Flag166 (Id);
1007 function Debug_Renaming_Link (Id : E) return E is
1010 end Debug_Renaming_Link;
1012 function Default_Aspect_Component_Value (Id : E) return N is
1014 pragma Assert (Is_Array_Type (Id));
1015 return Node19 (Base_Type (Id));
1016 end Default_Aspect_Component_Value;
1018 function Default_Aspect_Value (Id : E) return N is
1020 pragma Assert (Is_Scalar_Type (Id));
1021 return Node19 (Base_Type (Id));
1022 end Default_Aspect_Value;
1024 function Default_Expr_Function (Id : E) return E is
1026 pragma Assert (Is_Formal (Id));
1028 end Default_Expr_Function;
1030 function Default_Expressions_Processed (Id : E) return B is
1032 return Flag108 (Id);
1033 end Default_Expressions_Processed;
1035 function Default_Value (Id : E) return N is
1037 pragma Assert (Is_Formal (Id));
1041 function Delay_Cleanups (Id : E) return B is
1043 return Flag114 (Id);
1046 function Delay_Subprogram_Descriptors (Id : E) return B is
1049 end Delay_Subprogram_Descriptors;
1051 function Delta_Value (Id : E) return R is
1053 pragma Assert (Is_Fixed_Point_Type (Id));
1054 return Ureal18 (Id);
1057 function Dependent_Instances (Id : E) return L is
1059 pragma Assert (Is_Generic_Instance (Id));
1061 end Dependent_Instances;
1063 function Depends_On_Private (Id : E) return B is
1065 pragma Assert (Nkind (Id) in N_Entity);
1067 end Depends_On_Private;
1069 function Derived_Type_Link (Id : E) return E is
1071 pragma Assert (Is_Type (Id));
1072 return Node31 (Base_Type (Id));
1073 end Derived_Type_Link;
1075 function Digits_Value (Id : E) return U is
1078 (Is_Floating_Point_Type (Id)
1079 or else Is_Decimal_Fixed_Point_Type (Id));
1083 function Direct_Primitive_Operations (Id : E) return L is
1085 pragma Assert (Is_Tagged_Type (Id));
1086 return Elist10 (Id);
1087 end Direct_Primitive_Operations;
1089 function Directly_Designated_Type (Id : E) return E is
1091 pragma Assert (Is_Access_Type (Id));
1093 end Directly_Designated_Type;
1095 function Disable_Controlled (Id : E) return B is
1097 return Flag253 (Base_Type (Id));
1098 end Disable_Controlled;
1100 function Discard_Names (Id : E) return B is
1105 function Discriminal (Id : E) return E is
1107 pragma Assert (Ekind (Id) = E_Discriminant);
1111 function Discriminal_Link (Id : E) return N is
1114 end Discriminal_Link;
1116 function Discriminant_Checking_Func (Id : E) return E is
1118 pragma Assert (Ekind (Id) = E_Component);
1120 end Discriminant_Checking_Func;
1122 function Discriminant_Constraint (Id : E) return L is
1124 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1125 return Elist21 (Id);
1126 end Discriminant_Constraint;
1128 function Discriminant_Default_Value (Id : E) return N is
1130 pragma Assert (Ekind (Id) = E_Discriminant);
1132 end Discriminant_Default_Value;
1134 function Discriminant_Number (Id : E) return U is
1136 pragma Assert (Ekind (Id) = E_Discriminant);
1138 end Discriminant_Number;
1140 function Dispatch_Table_Wrappers (Id : E) return L is
1142 pragma Assert (Ekind_In (Id, E_Record_Type,
1144 return Elist26 (Implementation_Base_Type (Id));
1145 end Dispatch_Table_Wrappers;
1147 function DT_Entry_Count (Id : E) return U is
1149 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1153 function DT_Offset_To_Top_Func (Id : E) return E is
1155 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1157 end DT_Offset_To_Top_Func;
1159 function DT_Position (Id : E) return U is
1161 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1162 and then Present (DTC_Entity (Id)));
1166 function DTC_Entity (Id : E) return E is
1168 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1172 function Elaborate_Body_Desirable (Id : E) return B is
1174 pragma Assert (Ekind (Id) = E_Package);
1175 return Flag210 (Id);
1176 end Elaborate_Body_Desirable;
1178 function Elaboration_Entity (Id : E) return E is
1183 Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
1185 Is_Generic_Unit (Id));
1187 end Elaboration_Entity;
1189 function Elaboration_Entity_Required (Id : E) return B is
1194 Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
1196 Is_Generic_Unit (Id));
1197 return Flag174 (Id);
1198 end Elaboration_Entity_Required;
1200 function Encapsulating_State (Id : E) return N is
1202 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1204 end Encapsulating_State;
1206 function Enclosing_Scope (Id : E) return E is
1209 end Enclosing_Scope;
1211 function Entry_Accepted (Id : E) return B is
1213 pragma Assert (Is_Entry (Id));
1214 return Flag152 (Id);
1217 function Entry_Bodies_Array (Id : E) return E is
1220 end Entry_Bodies_Array;
1222 function Entry_Cancel_Parameter (Id : E) return E is
1225 end Entry_Cancel_Parameter;
1227 function Entry_Component (Id : E) return E is
1230 end Entry_Component;
1232 function Entry_Formal (Id : E) return E is
1237 function Entry_Index_Constant (Id : E) return N is
1239 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1241 end Entry_Index_Constant;
1243 function Entry_Max_Queue_Lengths_Array (Id : E) return N is
1245 pragma Assert (Ekind (Id) = E_Protected_Type);
1247 end Entry_Max_Queue_Lengths_Array;
1249 function Contains_Ignored_Ghost_Code (Id : E) return B is
1252 (Ekind_In (Id, E_Block,
1256 E_Generic_Procedure,
1260 E_Subprogram_Body));
1261 return Flag279 (Id);
1262 end Contains_Ignored_Ghost_Code;
1264 function Contract (Id : E) return N is
1267 (Ekind_In (Id, E_Protected_Type, -- concurrent types
1271 Ekind_In (Id, E_Constant, -- objects
1274 Ekind_In (Id, E_Entry, -- overloadable
1278 E_Generic_Procedure,
1283 Ekind_In (Id, E_Generic_Package, -- packages
1287 Ekind (Id) = E_Void); -- special purpose
1291 function Contract_Wrapper (Id : E) return E is
1293 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
1295 end Contract_Wrapper;
1297 function Entry_Parameters_Type (Id : E) return E is
1300 end Entry_Parameters_Type;
1302 function Enum_Pos_To_Rep (Id : E) return E is
1304 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1306 end Enum_Pos_To_Rep;
1308 function Enumeration_Pos (Id : E) return Uint is
1310 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1312 end Enumeration_Pos;
1314 function Enumeration_Rep (Id : E) return U is
1316 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1318 end Enumeration_Rep;
1320 function Enumeration_Rep_Expr (Id : E) return N is
1322 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1324 end Enumeration_Rep_Expr;
1326 function Equivalent_Type (Id : E) return E is
1329 (Ekind_In (Id, E_Class_Wide_Type,
1330 E_Class_Wide_Subtype,
1331 E_Access_Subprogram_Type,
1332 E_Access_Protected_Subprogram_Type,
1333 E_Anonymous_Access_Protected_Subprogram_Type,
1334 E_Access_Subprogram_Type,
1337 end Equivalent_Type;
1339 function Esize (Id : E) return Uint is
1344 function Extra_Accessibility (Id : E) return E is
1347 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1349 end Extra_Accessibility;
1351 function Extra_Accessibility_Of_Result (Id : E) return E is
1353 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1355 end Extra_Accessibility_Of_Result;
1357 function Extra_Constrained (Id : E) return E is
1359 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1361 end Extra_Constrained;
1363 function Extra_Formal (Id : E) return E is
1368 function Extra_Formals (Id : E) return E is
1371 (Is_Overloadable (Id)
1372 or else Ekind_In (Id, E_Entry_Family,
1374 E_Subprogram_Type));
1378 function Can_Use_Internal_Rep (Id : E) return B is
1380 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1381 return Flag229 (Base_Type (Id));
1382 end Can_Use_Internal_Rep;
1384 function Finalization_Master (Id : E) return E is
1386 pragma Assert (Is_Access_Type (Id));
1387 return Node23 (Root_Type (Id));
1388 end Finalization_Master;
1390 function Finalize_Storage_Only (Id : E) return B is
1392 pragma Assert (Is_Type (Id));
1393 return Flag158 (Base_Type (Id));
1394 end Finalize_Storage_Only;
1396 function Finalizer (Id : E) return E is
1398 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1402 function First_Entity (Id : E) return E is
1407 function First_Exit_Statement (Id : E) return N is
1409 pragma Assert (Ekind (Id) = E_Loop);
1411 end First_Exit_Statement;
1413 function First_Index (Id : E) return N is
1415 pragma Assert (Is_Array_Type (Id));
1419 function First_Literal (Id : E) return E is
1421 pragma Assert (Is_Enumeration_Type (Id));
1425 function First_Private_Entity (Id : E) return E is
1427 pragma Assert (Is_Package_Or_Generic_Package (Id)
1428 or else Is_Concurrent_Type (Id));
1430 end First_Private_Entity;
1432 function First_Rep_Item (Id : E) return E is
1437 function Freeze_Node (Id : E) return N is
1442 function From_Limited_With (Id : E) return B is
1444 return Flag159 (Id);
1445 end From_Limited_With;
1447 function Full_View (Id : E) return E is
1449 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1453 function Generic_Homonym (Id : E) return E is
1455 pragma Assert (Ekind (Id) = E_Generic_Package);
1457 end Generic_Homonym;
1459 function Generic_Renamings (Id : E) return L is
1461 return Elist23 (Id);
1462 end Generic_Renamings;
1464 function Handler_Records (Id : E) return S is
1467 end Handler_Records;
1469 function Has_Aliased_Components (Id : E) return B is
1471 return Flag135 (Implementation_Base_Type (Id));
1472 end Has_Aliased_Components;
1474 function Has_Alignment_Clause (Id : E) return B is
1477 end Has_Alignment_Clause;
1479 function Has_All_Calls_Remote (Id : E) return B is
1482 end Has_All_Calls_Remote;
1484 function Has_Atomic_Components (Id : E) return B is
1486 return Flag86 (Implementation_Base_Type (Id));
1487 end Has_Atomic_Components;
1489 function Has_Biased_Representation (Id : E) return B is
1491 return Flag139 (Id);
1492 end Has_Biased_Representation;
1494 function Has_Completion (Id : E) return B is
1499 function Has_Completion_In_Body (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1503 end Has_Completion_In_Body;
1505 function Has_Complex_Representation (Id : E) return B is
1507 pragma Assert (Is_Record_Type (Id));
1508 return Flag140 (Implementation_Base_Type (Id));
1509 end Has_Complex_Representation;
1511 function Has_Component_Size_Clause (Id : E) return B is
1513 pragma Assert (Is_Array_Type (Id));
1514 return Flag68 (Implementation_Base_Type (Id));
1515 end Has_Component_Size_Clause;
1517 function Has_Constrained_Partial_View (Id : E) return B is
1519 pragma Assert (Is_Type (Id));
1520 return Flag187 (Id);
1521 end Has_Constrained_Partial_View;
1523 function Has_Controlled_Component (Id : E) return B is
1525 return Flag43 (Base_Type (Id));
1526 end Has_Controlled_Component;
1528 function Has_Contiguous_Rep (Id : E) return B is
1530 return Flag181 (Id);
1531 end Has_Contiguous_Rep;
1533 function Has_Controlling_Result (Id : E) return B is
1536 end Has_Controlling_Result;
1538 function Has_Convention_Pragma (Id : E) return B is
1540 return Flag119 (Id);
1541 end Has_Convention_Pragma;
1543 function Has_Default_Aspect (Id : E) return B is
1545 return Flag39 (Base_Type (Id));
1546 end Has_Default_Aspect;
1548 function Has_Delayed_Aspects (Id : E) return B is
1550 pragma Assert (Nkind (Id) in N_Entity);
1551 return Flag200 (Id);
1552 end Has_Delayed_Aspects;
1554 function Has_Delayed_Freeze (Id : E) return B is
1556 pragma Assert (Nkind (Id) in N_Entity);
1558 end Has_Delayed_Freeze;
1560 function Has_Delayed_Rep_Aspects (Id : E) return B is
1562 pragma Assert (Nkind (Id) in N_Entity);
1563 return Flag261 (Id);
1564 end Has_Delayed_Rep_Aspects;
1566 function Has_Discriminants (Id : E) return B is
1568 pragma Assert (Is_Type (Id));
1570 end Has_Discriminants;
1572 function Has_Dispatch_Table (Id : E) return B is
1574 pragma Assert (Is_Tagged_Type (Id));
1575 return Flag220 (Id);
1576 end Has_Dispatch_Table;
1578 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1580 pragma Assert (Is_Type (Id));
1581 return Flag258 (Id);
1582 end Has_Dynamic_Predicate_Aspect;
1584 function Has_Enumeration_Rep_Clause (Id : E) return B is
1586 pragma Assert (Is_Enumeration_Type (Id));
1588 end Has_Enumeration_Rep_Clause;
1590 function Has_Exit (Id : E) return B is
1595 function Has_Expanded_Contract (Id : E) return B is
1597 pragma Assert (Is_Subprogram (Id));
1598 return Flag240 (Id);
1599 end Has_Expanded_Contract;
1601 function Has_Forward_Instantiation (Id : E) return B is
1603 return Flag175 (Id);
1604 end Has_Forward_Instantiation;
1606 function Has_Fully_Qualified_Name (Id : E) return B is
1608 return Flag173 (Id);
1609 end Has_Fully_Qualified_Name;
1611 function Has_Gigi_Rep_Item (Id : E) return B is
1614 end Has_Gigi_Rep_Item;
1616 function Has_Homonym (Id : E) return B is
1621 function Has_Implicit_Dereference (Id : E) return B is
1623 return Flag251 (Id);
1624 end Has_Implicit_Dereference;
1626 function Has_Independent_Components (Id : E) return B is
1628 return Flag34 (Implementation_Base_Type (Id));
1629 end Has_Independent_Components;
1631 function Has_Inheritable_Invariants (Id : E) return B is
1633 pragma Assert (Is_Type (Id));
1634 return Flag248 (Base_Type (Id));
1635 end Has_Inheritable_Invariants;
1637 function Has_Inherited_DIC (Id : E) return B is
1639 pragma Assert (Is_Type (Id));
1640 return Flag133 (Base_Type (Id));
1641 end Has_Inherited_DIC;
1643 function Has_Inherited_Invariants (Id : E) return B is
1645 pragma Assert (Is_Type (Id));
1646 return Flag291 (Base_Type (Id));
1647 end Has_Inherited_Invariants;
1649 function Has_Initial_Value (Id : E) return B is
1651 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1652 return Flag219 (Id);
1653 end Has_Initial_Value;
1655 function Has_Loop_Entry_Attributes (Id : E) return B is
1657 pragma Assert (Ekind (Id) = E_Loop);
1658 return Flag260 (Id);
1659 end Has_Loop_Entry_Attributes;
1661 function Has_Machine_Radix_Clause (Id : E) return B is
1663 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1665 end Has_Machine_Radix_Clause;
1667 function Has_Master_Entity (Id : E) return B is
1670 end Has_Master_Entity;
1672 function Has_Missing_Return (Id : E) return B is
1674 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1675 return Flag142 (Id);
1676 end Has_Missing_Return;
1678 function Has_Nested_Block_With_Handler (Id : E) return B is
1680 return Flag101 (Id);
1681 end Has_Nested_Block_With_Handler;
1683 function Has_Nested_Subprogram (Id : E) return B is
1685 pragma Assert (Is_Subprogram (Id));
1686 return Flag282 (Id);
1687 end Has_Nested_Subprogram;
1689 function Has_Non_Standard_Rep (Id : E) return B is
1691 return Flag75 (Implementation_Base_Type (Id));
1692 end Has_Non_Standard_Rep;
1694 function Has_Object_Size_Clause (Id : E) return B is
1696 pragma Assert (Is_Type (Id));
1697 return Flag172 (Id);
1698 end Has_Object_Size_Clause;
1700 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1703 (Ekind_In (Id, E_Entry, E_Entry_Family)
1704 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1705 return Flag110 (Id);
1706 end Has_Out_Or_In_Out_Parameter;
1708 function Has_Own_DIC (Id : E) return B is
1710 pragma Assert (Is_Type (Id));
1711 return Flag3 (Base_Type (Id));
1714 function Has_Own_Invariants (Id : E) return B is
1716 pragma Assert (Is_Type (Id));
1717 return Flag232 (Base_Type (Id));
1718 end Has_Own_Invariants;
1720 function Has_Partial_Visible_Refinement (Id : E) return B is
1722 pragma Assert (Ekind (Id) = E_Abstract_State);
1723 return Flag296 (Id);
1724 end Has_Partial_Visible_Refinement;
1726 function Has_Per_Object_Constraint (Id : E) return B is
1728 return Flag154 (Id);
1729 end Has_Per_Object_Constraint;
1731 function Has_Pragma_Controlled (Id : E) return B is
1733 pragma Assert (Is_Access_Type (Id));
1734 return Flag27 (Implementation_Base_Type (Id));
1735 end Has_Pragma_Controlled;
1737 function Has_Pragma_Elaborate_Body (Id : E) return B is
1739 return Flag150 (Id);
1740 end Has_Pragma_Elaborate_Body;
1742 function Has_Pragma_Inline (Id : E) return B is
1744 return Flag157 (Id);
1745 end Has_Pragma_Inline;
1747 function Has_Pragma_Inline_Always (Id : E) return B is
1749 return Flag230 (Id);
1750 end Has_Pragma_Inline_Always;
1752 function Has_Pragma_No_Inline (Id : E) return B is
1754 return Flag201 (Id);
1755 end Has_Pragma_No_Inline;
1757 function Has_Pragma_Ordered (Id : E) return B is
1759 pragma Assert (Is_Enumeration_Type (Id));
1760 return Flag198 (Implementation_Base_Type (Id));
1761 end Has_Pragma_Ordered;
1763 function Has_Pragma_Pack (Id : E) return B is
1765 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1766 return Flag121 (Implementation_Base_Type (Id));
1767 end Has_Pragma_Pack;
1769 function Has_Pragma_Preelab_Init (Id : E) return B is
1771 return Flag221 (Id);
1772 end Has_Pragma_Preelab_Init;
1774 function Has_Pragma_Pure (Id : E) return B is
1776 return Flag203 (Id);
1777 end Has_Pragma_Pure;
1779 function Has_Pragma_Pure_Function (Id : E) return B is
1781 return Flag179 (Id);
1782 end Has_Pragma_Pure_Function;
1784 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1786 return Flag169 (Id);
1787 end Has_Pragma_Thread_Local_Storage;
1789 function Has_Pragma_Unmodified (Id : E) return B is
1791 return Flag233 (Id);
1792 end Has_Pragma_Unmodified;
1794 function Has_Pragma_Unreferenced (Id : E) return B is
1796 return Flag180 (Id);
1797 end Has_Pragma_Unreferenced;
1799 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1801 pragma Assert (Is_Type (Id));
1802 return Flag212 (Id);
1803 end Has_Pragma_Unreferenced_Objects;
1805 function Has_Pragma_Unused (Id : E) return B is
1807 return Flag294 (Id);
1808 end Has_Pragma_Unused;
1810 function Has_Predicates (Id : E) return B is
1812 pragma Assert (Is_Type (Id));
1813 return Flag250 (Id);
1816 function Has_Primitive_Operations (Id : E) return B is
1818 pragma Assert (Is_Type (Id));
1819 return Flag120 (Base_Type (Id));
1820 end Has_Primitive_Operations;
1822 function Has_Private_Ancestor (Id : E) return B is
1824 return Flag151 (Id);
1825 end Has_Private_Ancestor;
1827 function Has_Private_Declaration (Id : E) return B is
1829 return Flag155 (Id);
1830 end Has_Private_Declaration;
1832 function Has_Private_Extension (Id : E) return B is
1834 pragma Assert (Is_Tagged_Type (Id));
1835 return Flag300 (Id);
1836 end Has_Private_Extension;
1838 function Has_Protected (Id : E) return B is
1840 return Flag271 (Base_Type (Id));
1843 function Has_Qualified_Name (Id : E) return B is
1845 return Flag161 (Id);
1846 end Has_Qualified_Name;
1848 function Has_RACW (Id : E) return B is
1850 pragma Assert (Ekind (Id) = E_Package);
1851 return Flag214 (Id);
1854 function Has_Record_Rep_Clause (Id : E) return B is
1856 pragma Assert (Is_Record_Type (Id));
1857 return Flag65 (Implementation_Base_Type (Id));
1858 end Has_Record_Rep_Clause;
1860 function Has_Recursive_Call (Id : E) return B is
1862 pragma Assert (Is_Subprogram (Id));
1863 return Flag143 (Id);
1864 end Has_Recursive_Call;
1866 function Has_Shift_Operator (Id : E) return B is
1868 pragma Assert (Is_Integer_Type (Id));
1869 return Flag267 (Base_Type (Id));
1870 end Has_Shift_Operator;
1872 function Has_Size_Clause (Id : E) return B is
1875 end Has_Size_Clause;
1877 function Has_Small_Clause (Id : E) return B is
1879 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
1881 end Has_Small_Clause;
1883 function Has_Specified_Layout (Id : E) return B is
1885 pragma Assert (Is_Type (Id));
1886 return Flag100 (Implementation_Base_Type (Id));
1887 end Has_Specified_Layout;
1889 function Has_Specified_Stream_Input (Id : E) return B is
1891 pragma Assert (Is_Type (Id));
1892 return Flag190 (Id);
1893 end Has_Specified_Stream_Input;
1895 function Has_Specified_Stream_Output (Id : E) return B is
1897 pragma Assert (Is_Type (Id));
1898 return Flag191 (Id);
1899 end Has_Specified_Stream_Output;
1901 function Has_Specified_Stream_Read (Id : E) return B is
1903 pragma Assert (Is_Type (Id));
1904 return Flag192 (Id);
1905 end Has_Specified_Stream_Read;
1907 function Has_Specified_Stream_Write (Id : E) return B is
1909 pragma Assert (Is_Type (Id));
1910 return Flag193 (Id);
1911 end Has_Specified_Stream_Write;
1913 function Has_Static_Discriminants (Id : E) return B is
1915 pragma Assert (Is_Type (Id));
1916 return Flag211 (Id);
1917 end Has_Static_Discriminants;
1919 function Has_Static_Predicate (Id : E) return B is
1921 pragma Assert (Is_Type (Id));
1922 return Flag269 (Id);
1923 end Has_Static_Predicate;
1925 function Has_Static_Predicate_Aspect (Id : E) return B is
1927 pragma Assert (Is_Type (Id));
1928 return Flag259 (Id);
1929 end Has_Static_Predicate_Aspect;
1931 function Has_Storage_Size_Clause (Id : E) return B is
1933 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1934 return Flag23 (Implementation_Base_Type (Id));
1935 end Has_Storage_Size_Clause;
1937 function Has_Stream_Size_Clause (Id : E) return B is
1939 return Flag184 (Id);
1940 end Has_Stream_Size_Clause;
1942 function Has_Task (Id : E) return B is
1944 return Flag30 (Base_Type (Id));
1947 function Has_Thunks (Id : E) return B is
1949 return Flag228 (Id);
1952 function Has_Timing_Event (Id : E) return B is
1954 return Flag289 (Base_Type (Id));
1955 end Has_Timing_Event;
1957 function Has_Unchecked_Union (Id : E) return B is
1959 return Flag123 (Base_Type (Id));
1960 end Has_Unchecked_Union;
1962 function Has_Unknown_Discriminants (Id : E) return B is
1964 pragma Assert (Is_Type (Id));
1966 end Has_Unknown_Discriminants;
1968 function Has_Visible_Refinement (Id : E) return B is
1970 pragma Assert (Ekind (Id) = E_Abstract_State);
1971 return Flag263 (Id);
1972 end Has_Visible_Refinement;
1974 function Has_Volatile_Components (Id : E) return B is
1976 return Flag87 (Implementation_Base_Type (Id));
1977 end Has_Volatile_Components;
1979 function Has_Xref_Entry (Id : E) return B is
1981 return Flag182 (Id);
1984 function Hiding_Loop_Variable (Id : E) return E is
1986 pragma Assert (Ekind (Id) = E_Variable);
1988 end Hiding_Loop_Variable;
1990 function Hidden_In_Formal_Instance (Id : E) return L is
1992 pragma Assert (Ekind (Id) = E_Package);
1993 return Elist30 (Id);
1994 end Hidden_In_Formal_Instance;
1996 function Homonym (Id : E) return E is
2001 function Ignore_SPARK_Mode_Pragmas (Id : E) return B is
2004 (Ekind_In (Id, E_Protected_Body, -- concurrent types
2009 Ekind_In (Id, E_Entry, -- overloadable
2013 E_Generic_Procedure,
2018 Ekind_In (Id, E_Generic_Package, -- packages
2021 return Flag301 (Id);
2022 end Ignore_SPARK_Mode_Pragmas;
2024 function Import_Pragma (Id : E) return E is
2026 pragma Assert (Is_Subprogram (Id));
2030 function Incomplete_Actuals (Id : E) return L is
2032 pragma Assert (Ekind (Id) = E_Package);
2033 return Elist24 (Id);
2034 end Incomplete_Actuals;
2036 function Interface_Alias (Id : E) return E is
2038 pragma Assert (Is_Subprogram (Id));
2040 end Interface_Alias;
2042 function Interfaces (Id : E) return L is
2044 pragma Assert (Is_Record_Type (Id));
2045 return Elist25 (Id);
2048 function In_Package_Body (Id : E) return B is
2051 end In_Package_Body;
2053 function In_Private_Part (Id : E) return B is
2056 end In_Private_Part;
2058 function In_Use (Id : E) return B is
2060 pragma Assert (Nkind (Id) in N_Entity);
2064 function Initialization_Statements (Id : E) return N is
2066 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2068 end Initialization_Statements;
2070 function Inner_Instances (Id : E) return L is
2072 return Elist23 (Id);
2073 end Inner_Instances;
2075 function Interface_Name (Id : E) return N is
2080 function Invariants_Ignored (Id : E) return B is
2082 pragma Assert (Is_Type (Id));
2083 return Flag308 (Id);
2084 end Invariants_Ignored;
2086 function Is_Abstract_Subprogram (Id : E) return B is
2088 pragma Assert (Is_Overloadable (Id));
2090 end Is_Abstract_Subprogram;
2092 function Is_Abstract_Type (Id : E) return B is
2094 pragma Assert (Is_Type (Id));
2095 return Flag146 (Id);
2096 end Is_Abstract_Type;
2098 function Is_Access_Constant (Id : E) return B is
2100 pragma Assert (Is_Access_Type (Id));
2102 end Is_Access_Constant;
2104 function Is_Activation_Record (Id : E) return B is
2106 pragma Assert (Ekind (Id) = E_In_Parameter);
2107 return Flag305 (Id);
2108 end Is_Activation_Record;
2110 function Is_Actual_Subtype (Id : E) return B is
2112 pragma Assert (Is_Type (Id));
2113 return Flag293 (Id);
2114 end Is_Actual_Subtype;
2116 function Is_Ada_2005_Only (Id : E) return B is
2118 return Flag185 (Id);
2119 end Is_Ada_2005_Only;
2121 function Is_Ada_2012_Only (Id : E) return B is
2123 return Flag199 (Id);
2124 end Is_Ada_2012_Only;
2126 function Is_Aliased (Id : E) return B is
2128 pragma Assert (Nkind (Id) in N_Entity);
2132 function Is_Asynchronous (Id : E) return B is
2134 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
2136 end Is_Asynchronous;
2138 function Is_Atomic (Id : E) return B is
2143 function Is_Bit_Packed_Array (Id : E) return B is
2145 return Flag122 (Implementation_Base_Type (Id));
2146 end Is_Bit_Packed_Array;
2148 function Is_Called (Id : E) return B is
2150 pragma Assert (Ekind_In (Id, E_Procedure, E_Function, E_Package));
2151 return Flag102 (Id);
2154 function Is_Character_Type (Id : E) return B is
2157 end Is_Character_Type;
2159 function Is_Checked_Ghost_Entity (Id : E) return B is
2161 -- Allow this attribute to appear on unanalyzed entities
2163 pragma Assert (Nkind (Id) in N_Entity
2164 or else Ekind (Id) = E_Void);
2165 return Flag277 (Id);
2166 end Is_Checked_Ghost_Entity;
2168 function Is_Child_Unit (Id : E) return B is
2173 function Is_Class_Wide_Clone (Id : E) return B is
2175 return Flag290 (Id);
2176 end Is_Class_Wide_Clone;
2178 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2181 end Is_Class_Wide_Equivalent_Type;
2183 function Is_Compilation_Unit (Id : E) return B is
2185 return Flag149 (Id);
2186 end Is_Compilation_Unit;
2188 function Is_Completely_Hidden (Id : E) return B is
2190 pragma Assert (Ekind (Id) = E_Discriminant);
2191 return Flag103 (Id);
2192 end Is_Completely_Hidden;
2194 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2197 end Is_Constr_Subt_For_U_Nominal;
2199 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2201 return Flag141 (Id);
2202 end Is_Constr_Subt_For_UN_Aliased;
2204 function Is_Constrained (Id : E) return B is
2206 pragma Assert (Nkind (Id) in N_Entity);
2210 function Is_Constructor (Id : E) return B is
2215 function Is_Controlled_Active (Id : E) return B is
2217 return Flag42 (Base_Type (Id));
2218 end Is_Controlled_Active;
2220 function Is_Controlling_Formal (Id : E) return B is
2222 pragma Assert (Is_Formal (Id));
2224 end Is_Controlling_Formal;
2226 function Is_CPP_Class (Id : E) return B is
2231 function Is_DIC_Procedure (Id : E) return B is
2233 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2234 return Flag132 (Id);
2235 end Is_DIC_Procedure;
2237 function Is_Descendant_Of_Address (Id : E) return B is
2239 return Flag223 (Id);
2240 end Is_Descendant_Of_Address;
2242 function Is_Discrim_SO_Function (Id : E) return B is
2244 return Flag176 (Id);
2245 end Is_Discrim_SO_Function;
2247 function Is_Discriminant_Check_Function (Id : E) return B is
2249 return Flag264 (Id);
2250 end Is_Discriminant_Check_Function;
2252 function Is_Dispatch_Table_Entity (Id : E) return B is
2254 return Flag234 (Id);
2255 end Is_Dispatch_Table_Entity;
2257 function Is_Dispatching_Operation (Id : E) return B is
2259 pragma Assert (Nkind (Id) in N_Entity);
2261 end Is_Dispatching_Operation;
2263 function Is_Elaboration_Checks_OK_Id (Id : E) return B is
2265 pragma Assert (Is_Elaboration_Target (Id));
2266 return Flag148 (Id);
2267 end Is_Elaboration_Checks_OK_Id;
2269 function Is_Elaboration_Warnings_OK_Id (Id : E) return B is
2271 pragma Assert (Is_Elaboration_Target (Id) or else Ekind (Id) = E_Void);
2272 return Flag304 (Id);
2273 end Is_Elaboration_Warnings_OK_Id;
2275 function Is_Eliminated (Id : E) return B is
2277 return Flag124 (Id);
2280 function Is_Entry_Formal (Id : E) return B is
2283 end Is_Entry_Formal;
2285 function Is_Entry_Wrapper (Id : E) return B is
2287 return Flag297 (Id);
2288 end Is_Entry_Wrapper;
2290 function Is_Exception_Handler (Id : E) return B is
2292 pragma Assert (Ekind (Id) = E_Block);
2293 return Flag286 (Id);
2294 end Is_Exception_Handler;
2296 function Is_Exported (Id : E) return B is
2301 function Is_Finalized_Transient (Id : E) return B is
2303 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2304 return Flag252 (Id);
2305 end Is_Finalized_Transient;
2307 function Is_First_Subtype (Id : E) return B is
2310 end Is_First_Subtype;
2312 function Is_Formal_Subprogram (Id : E) return B is
2314 return Flag111 (Id);
2315 end Is_Formal_Subprogram;
2317 function Is_Frozen (Id : E) return B is
2322 function Is_Generic_Actual_Subprogram (Id : E) return B is
2324 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2325 return Flag274 (Id);
2326 end Is_Generic_Actual_Subprogram;
2328 function Is_Generic_Actual_Type (Id : E) return B is
2330 pragma Assert (Is_Type (Id));
2332 end Is_Generic_Actual_Type;
2334 function Is_Generic_Instance (Id : E) return B is
2336 return Flag130 (Id);
2337 end Is_Generic_Instance;
2339 function Is_Generic_Type (Id : E) return B is
2341 pragma Assert (Nkind (Id) in N_Entity);
2343 end Is_Generic_Type;
2345 function Is_Hidden (Id : E) return B is
2350 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2353 end Is_Hidden_Non_Overridden_Subpgm;
2355 function Is_Hidden_Open_Scope (Id : E) return B is
2357 return Flag171 (Id);
2358 end Is_Hidden_Open_Scope;
2360 function Is_Ignored_Ghost_Entity (Id : E) return B is
2362 -- Allow this attribute to appear on unanalyzed entities
2364 pragma Assert (Nkind (Id) in N_Entity
2365 or else Ekind (Id) = E_Void);
2366 return Flag278 (Id);
2367 end Is_Ignored_Ghost_Entity;
2369 function Is_Ignored_Transient (Id : E) return B is
2371 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2372 return Flag295 (Id);
2373 end Is_Ignored_Transient;
2375 function Is_Immediately_Visible (Id : E) return B is
2377 pragma Assert (Nkind (Id) in N_Entity);
2379 end Is_Immediately_Visible;
2381 function Is_Implementation_Defined (Id : E) return B is
2383 return Flag254 (Id);
2384 end Is_Implementation_Defined;
2386 function Is_Imported (Id : E) return B is
2391 function Is_Independent (Id : E) return B is
2393 return Flag268 (Id);
2396 function Is_Initial_Condition_Procedure (Id : E) return B is
2398 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2399 return Flag302 (Id);
2400 end Is_Initial_Condition_Procedure;
2402 function Is_Inlined (Id : E) return B is
2407 function Is_Inlined_Always (Id : E) return B is
2409 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2411 end Is_Inlined_Always;
2413 function Is_Interface (Id : E) return B is
2415 return Flag186 (Id);
2418 function Is_Instantiated (Id : E) return B is
2420 return Flag126 (Id);
2421 end Is_Instantiated;
2423 function Is_Internal (Id : E) return B is
2425 pragma Assert (Nkind (Id) in N_Entity);
2429 function Is_Interrupt_Handler (Id : E) return B is
2431 pragma Assert (Nkind (Id) in N_Entity);
2433 end Is_Interrupt_Handler;
2435 function Is_Intrinsic_Subprogram (Id : E) return B is
2438 end Is_Intrinsic_Subprogram;
2440 function Is_Invariant_Procedure (Id : E) return B is
2442 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2443 return Flag257 (Id);
2444 end Is_Invariant_Procedure;
2446 function Is_Itype (Id : E) return B is
2451 function Is_Known_Non_Null (Id : E) return B is
2454 end Is_Known_Non_Null;
2456 function Is_Known_Null (Id : E) return B is
2458 return Flag204 (Id);
2461 function Is_Known_Valid (Id : E) return B is
2463 return Flag170 (Id);
2466 function Is_Limited_Composite (Id : E) return B is
2468 return Flag106 (Id);
2469 end Is_Limited_Composite;
2471 function Is_Limited_Interface (Id : E) return B is
2473 return Flag197 (Id);
2474 end Is_Limited_Interface;
2476 function Is_Limited_Record (Id : E) return B is
2479 end Is_Limited_Record;
2481 function Is_Local_Anonymous_Access (Id : E) return B is
2483 pragma Assert (Is_Access_Type (Id));
2484 return Flag194 (Id);
2485 end Is_Local_Anonymous_Access;
2487 function Is_Loop_Parameter (Id : E) return B is
2489 return Flag307 (Id);
2490 end Is_Loop_Parameter;
2492 function Is_Machine_Code_Subprogram (Id : E) return B is
2494 pragma Assert (Is_Subprogram (Id));
2495 return Flag137 (Id);
2496 end Is_Machine_Code_Subprogram;
2498 function Is_Non_Static_Subtype (Id : E) return B is
2500 pragma Assert (Is_Type (Id));
2501 return Flag109 (Id);
2502 end Is_Non_Static_Subtype;
2504 function Is_Null_Init_Proc (Id : E) return B is
2506 pragma Assert (Ekind (Id) = E_Procedure);
2507 return Flag178 (Id);
2508 end Is_Null_Init_Proc;
2510 function Is_Obsolescent (Id : E) return B is
2512 return Flag153 (Id);
2515 function Is_Only_Out_Parameter (Id : E) return B is
2517 pragma Assert (Is_Formal (Id));
2518 return Flag226 (Id);
2519 end Is_Only_Out_Parameter;
2521 function Is_Package_Body_Entity (Id : E) return B is
2523 return Flag160 (Id);
2524 end Is_Package_Body_Entity;
2526 function Is_Packed (Id : E) return B is
2528 return Flag51 (Implementation_Base_Type (Id));
2531 function Is_Packed_Array_Impl_Type (Id : E) return B is
2533 return Flag138 (Id);
2534 end Is_Packed_Array_Impl_Type;
2536 function Is_Param_Block_Component_Type (Id : E) return B is
2538 pragma Assert (Is_Access_Type (Id));
2539 return Flag215 (Base_Type (Id));
2540 end Is_Param_Block_Component_Type;
2542 function Is_Partial_Invariant_Procedure (Id : E) return B is
2544 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2545 return Flag292 (Id);
2546 end Is_Partial_Invariant_Procedure;
2548 function Is_Potentially_Use_Visible (Id : E) return B is
2550 pragma Assert (Nkind (Id) in N_Entity);
2552 end Is_Potentially_Use_Visible;
2554 function Is_Predicate_Function (Id : E) return B is
2556 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2557 return Flag255 (Id);
2558 end Is_Predicate_Function;
2560 function Is_Predicate_Function_M (Id : E) return B is
2562 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2563 return Flag256 (Id);
2564 end Is_Predicate_Function_M;
2566 function Is_Preelaborated (Id : E) return B is
2569 end Is_Preelaborated;
2571 function Is_Primitive (Id : E) return B is
2574 (Is_Overloadable (Id)
2575 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2576 return Flag218 (Id);
2579 function Is_Primitive_Wrapper (Id : E) return B is
2581 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2582 return Flag195 (Id);
2583 end Is_Primitive_Wrapper;
2585 function Is_Private_Composite (Id : E) return B is
2587 pragma Assert (Is_Type (Id));
2588 return Flag107 (Id);
2589 end Is_Private_Composite;
2591 function Is_Private_Descendant (Id : E) return B is
2594 end Is_Private_Descendant;
2596 function Is_Private_Primitive (Id : E) return B is
2598 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2599 return Flag245 (Id);
2600 end Is_Private_Primitive;
2602 function Is_Public (Id : E) return B is
2604 pragma Assert (Nkind (Id) in N_Entity);
2608 function Is_Pure (Id : E) return B is
2613 function Is_Pure_Unit_Access_Type (Id : E) return B is
2615 pragma Assert (Is_Access_Type (Id));
2616 return Flag189 (Id);
2617 end Is_Pure_Unit_Access_Type;
2619 function Is_RACW_Stub_Type (Id : E) return B is
2621 pragma Assert (Is_Type (Id));
2622 return Flag244 (Id);
2623 end Is_RACW_Stub_Type;
2625 function Is_Raised (Id : E) return B is
2627 pragma Assert (Ekind (Id) = E_Exception);
2628 return Flag224 (Id);
2631 function Is_Remote_Call_Interface (Id : E) return B is
2634 end Is_Remote_Call_Interface;
2636 function Is_Remote_Types (Id : E) return B is
2639 end Is_Remote_Types;
2641 function Is_Renaming_Of_Object (Id : E) return B is
2643 return Flag112 (Id);
2644 end Is_Renaming_Of_Object;
2646 function Is_Return_Object (Id : E) return B is
2648 return Flag209 (Id);
2649 end Is_Return_Object;
2651 function Is_Safe_To_Reevaluate (Id : E) return B is
2653 return Flag249 (Id);
2654 end Is_Safe_To_Reevaluate;
2656 function Is_Shared_Passive (Id : E) return B is
2659 end Is_Shared_Passive;
2661 function Is_Static_Type (Id : E) return B is
2663 return Flag281 (Id);
2666 function Is_Statically_Allocated (Id : E) return B is
2669 end Is_Statically_Allocated;
2671 function Is_Tag (Id : E) return B is
2673 pragma Assert (Nkind (Id) in N_Entity);
2677 function Is_Tagged_Type (Id : E) return B is
2682 function Is_Thunk (Id : E) return B is
2684 return Flag225 (Id);
2687 function Is_Trivial_Subprogram (Id : E) return B is
2689 return Flag235 (Id);
2690 end Is_Trivial_Subprogram;
2692 function Is_True_Constant (Id : E) return B is
2694 return Flag163 (Id);
2695 end Is_True_Constant;
2697 function Is_Unchecked_Union (Id : E) return B is
2699 return Flag117 (Implementation_Base_Type (Id));
2700 end Is_Unchecked_Union;
2702 function Is_Underlying_Full_View (Id : E) return B is
2704 return Flag298 (Id);
2705 end Is_Underlying_Full_View;
2707 function Is_Underlying_Record_View (Id : E) return B is
2709 return Flag246 (Id);
2710 end Is_Underlying_Record_View;
2712 function Is_Unimplemented (Id : E) return B is
2714 return Flag284 (Id);
2715 end Is_Unimplemented;
2717 function Is_Unsigned_Type (Id : E) return B is
2719 pragma Assert (Is_Type (Id));
2720 return Flag144 (Id);
2721 end Is_Unsigned_Type;
2723 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2725 return Flag283 (Id);
2726 end Is_Uplevel_Referenced_Entity;
2728 function Is_Valued_Procedure (Id : E) return B is
2730 pragma Assert (Ekind (Id) = E_Procedure);
2731 return Flag127 (Id);
2732 end Is_Valued_Procedure;
2734 function Is_Visible_Formal (Id : E) return B is
2736 return Flag206 (Id);
2737 end Is_Visible_Formal;
2739 function Is_Visible_Lib_Unit (Id : E) return B is
2741 return Flag116 (Id);
2742 end Is_Visible_Lib_Unit;
2744 function Is_Volatile (Id : E) return B is
2746 pragma Assert (Nkind (Id) in N_Entity);
2748 if Is_Type (Id) then
2749 return Flag16 (Base_Type (Id));
2755 function Is_Volatile_Full_Access (Id : E) return B is
2757 return Flag285 (Id);
2758 end Is_Volatile_Full_Access;
2760 function Itype_Printed (Id : E) return B is
2762 pragma Assert (Is_Itype (Id));
2763 return Flag202 (Id);
2766 function Kill_Elaboration_Checks (Id : E) return B is
2769 end Kill_Elaboration_Checks;
2771 function Kill_Range_Checks (Id : E) return B is
2774 end Kill_Range_Checks;
2776 function Known_To_Have_Preelab_Init (Id : E) return B is
2778 pragma Assert (Is_Type (Id));
2779 return Flag207 (Id);
2780 end Known_To_Have_Preelab_Init;
2782 function Last_Aggregate_Assignment (Id : E) return N is
2784 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2786 end Last_Aggregate_Assignment;
2788 function Last_Assignment (Id : E) return N is
2790 pragma Assert (Is_Assignable (Id));
2792 end Last_Assignment;
2794 function Last_Entity (Id : E) return E is
2799 function Limited_View (Id : E) return E is
2801 pragma Assert (Ekind (Id) = E_Package);
2805 function Linker_Section_Pragma (Id : E) return N is
2808 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
2810 end Linker_Section_Pragma;
2812 function Lit_Indexes (Id : E) return E is
2814 pragma Assert (Is_Enumeration_Type (Id));
2818 function Lit_Strings (Id : E) return E is
2820 pragma Assert (Is_Enumeration_Type (Id));
2824 function Low_Bound_Tested (Id : E) return B is
2826 return Flag205 (Id);
2827 end Low_Bound_Tested;
2829 function Machine_Radix_10 (Id : E) return B is
2831 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2833 end Machine_Radix_10;
2835 function Master_Id (Id : E) return E is
2837 pragma Assert (Is_Access_Type (Id));
2841 function Materialize_Entity (Id : E) return B is
2843 return Flag168 (Id);
2844 end Materialize_Entity;
2846 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2848 return Flag262 (Id);
2849 end May_Inherit_Delayed_Rep_Aspects;
2851 function Mechanism (Id : E) return M is
2853 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2854 return UI_To_Int (Uint8 (Id));
2857 function Minimum_Accessibility (Id : E) return E is
2859 pragma Assert (Ekind (Id) in Formal_Kind);
2861 end Minimum_Accessibility;
2863 function Modulus (Id : E) return Uint is
2865 pragma Assert (Is_Modular_Integer_Type (Id));
2866 return Uint17 (Base_Type (Id));
2869 function Must_Be_On_Byte_Boundary (Id : E) return B is
2871 pragma Assert (Is_Type (Id));
2872 return Flag183 (Id);
2873 end Must_Be_On_Byte_Boundary;
2875 function Must_Have_Preelab_Init (Id : E) return B is
2877 pragma Assert (Is_Type (Id));
2878 return Flag208 (Id);
2879 end Must_Have_Preelab_Init;
2881 function Needs_Activation_Record (Id : E) return B is
2883 return Flag306 (Id);
2884 end Needs_Activation_Record;
2886 function Needs_Debug_Info (Id : E) return B is
2888 return Flag147 (Id);
2889 end Needs_Debug_Info;
2891 function Needs_No_Actuals (Id : E) return B is
2894 (Is_Overloadable (Id)
2895 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2897 end Needs_No_Actuals;
2899 function Never_Set_In_Source (Id : E) return B is
2901 return Flag115 (Id);
2902 end Never_Set_In_Source;
2904 function Next_Inlined_Subprogram (Id : E) return E is
2907 end Next_Inlined_Subprogram;
2909 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2911 pragma Assert (Is_Discrete_Type (Id));
2912 return Flag276 (Id);
2913 end No_Dynamic_Predicate_On_Actual;
2915 function No_Pool_Assigned (Id : E) return B is
2917 pragma Assert (Is_Access_Type (Id));
2918 return Flag131 (Root_Type (Id));
2919 end No_Pool_Assigned;
2921 function No_Predicate_On_Actual (Id : E) return Boolean is
2923 pragma Assert (Is_Discrete_Type (Id));
2924 return Flag275 (Id);
2925 end No_Predicate_On_Actual;
2927 function No_Reordering (Id : E) return B is
2929 pragma Assert (Is_Record_Type (Id));
2930 return Flag239 (Implementation_Base_Type (Id));
2933 function No_Return (Id : E) return B is
2935 return Flag113 (Id);
2938 function No_Strict_Aliasing (Id : E) return B is
2940 pragma Assert (Is_Access_Type (Id));
2941 return Flag136 (Base_Type (Id));
2942 end No_Strict_Aliasing;
2944 function No_Tagged_Streams_Pragma (Id : E) return N is
2946 pragma Assert (Is_Tagged_Type (Id));
2948 end No_Tagged_Streams_Pragma;
2950 function Non_Binary_Modulus (Id : E) return B is
2952 pragma Assert (Is_Type (Id));
2953 return Flag58 (Base_Type (Id));
2954 end Non_Binary_Modulus;
2956 function Non_Limited_View (Id : E) return E is
2959 (Ekind (Id) in Incomplete_Kind
2961 Ekind (Id) in Class_Wide_Kind
2963 Ekind (Id) = E_Abstract_State);
2965 end Non_Limited_View;
2967 function Nonzero_Is_True (Id : E) return B is
2969 pragma Assert (Root_Type (Id) = Standard_Boolean);
2970 return Flag162 (Base_Type (Id));
2971 end Nonzero_Is_True;
2973 function Normalized_First_Bit (Id : E) return U is
2975 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2977 end Normalized_First_Bit;
2979 function Normalized_Position (Id : E) return U is
2981 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2983 end Normalized_Position;
2985 function Normalized_Position_Max (Id : E) return U is
2987 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2989 end Normalized_Position_Max;
2991 function OK_To_Rename (Id : E) return B is
2993 pragma Assert (Ekind (Id) = E_Variable);
2994 return Flag247 (Id);
2997 function Optimize_Alignment_Space (Id : E) return B is
3000 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
3001 return Flag241 (Id);
3002 end Optimize_Alignment_Space;
3004 function Optimize_Alignment_Time (Id : E) return B is
3007 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
3008 return Flag242 (Id);
3009 end Optimize_Alignment_Time;
3011 function Original_Access_Type (Id : E) return E is
3013 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
3015 end Original_Access_Type;
3017 function Original_Array_Type (Id : E) return E is
3019 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
3021 end Original_Array_Type;
3023 function Original_Protected_Subprogram (Id : E) return N is
3026 end Original_Protected_Subprogram;
3028 function Original_Record_Component (Id : E) return E is
3030 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
3032 end Original_Record_Component;
3034 function Overlays_Constant (Id : E) return B is
3036 return Flag243 (Id);
3037 end Overlays_Constant;
3039 function Overridden_Operation (Id : E) return E is
3041 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
3043 end Overridden_Operation;
3045 function Package_Instantiation (Id : E) return N is
3047 pragma Assert (Is_Package_Or_Generic_Package (Id));
3049 end Package_Instantiation;
3051 function Packed_Array_Impl_Type (Id : E) return E is
3053 pragma Assert (Is_Array_Type (Id));
3055 end Packed_Array_Impl_Type;
3057 function Parent_Subtype (Id : E) return E is
3059 pragma Assert (Is_Record_Type (Id));
3060 return Node19 (Base_Type (Id));
3063 function Part_Of_Constituents (Id : E) return L is
3065 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3066 return Elist10 (Id);
3067 end Part_Of_Constituents;
3069 function Part_Of_References (Id : E) return L is
3071 pragma Assert (Ekind (Id) = E_Variable);
3072 return Elist11 (Id);
3073 end Part_Of_References;
3075 function Partial_View_Has_Unknown_Discr (Id : E) return B is
3077 pragma Assert (Is_Type (Id));
3078 return Flag280 (Id);
3079 end Partial_View_Has_Unknown_Discr;
3081 function Pending_Access_Types (Id : E) return L is
3083 pragma Assert (Is_Type (Id));
3084 return Elist15 (Id);
3085 end Pending_Access_Types;
3087 function Postconditions_Proc (Id : E) return E is
3089 pragma Assert (Ekind_In (Id, E_Entry,
3094 end Postconditions_Proc;
3096 function Predicated_Parent (Id : E) return E is
3098 pragma Assert (Ekind_In (Id, E_Array_Subtype,
3100 E_Record_Subtype_With_Private));
3102 end Predicated_Parent;
3104 function Predicates_Ignored (Id : E) return B is
3106 pragma Assert (Is_Type (Id));
3107 return Flag288 (Id);
3108 end Predicates_Ignored;
3110 function Prev_Entity (Id : E) return E is
3115 function Prival (Id : E) return E is
3117 pragma Assert (Is_Protected_Component (Id));
3121 function Prival_Link (Id : E) return E is
3123 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3127 function Private_Dependents (Id : E) return L is
3129 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
3130 return Elist18 (Id);
3131 end Private_Dependents;
3133 function Protected_Body_Subprogram (Id : E) return E is
3135 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
3137 end Protected_Body_Subprogram;
3139 function Protected_Formal (Id : E) return E is
3141 pragma Assert (Is_Formal (Id));
3143 end Protected_Formal;
3145 function Protected_Subprogram (Id : E) return N is
3147 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3149 end Protected_Subprogram;
3151 function Protection_Object (Id : E) return E is
3153 pragma Assert (Ekind_In (Id, E_Entry,
3158 end Protection_Object;
3160 function Reachable (Id : E) return B is
3165 function Receiving_Entry (Id : E) return E is
3167 pragma Assert (Ekind (Id) = E_Procedure);
3169 end Receiving_Entry;
3171 function Referenced (Id : E) return B is
3173 return Flag156 (Id);
3176 function Referenced_As_LHS (Id : E) return B is
3179 end Referenced_As_LHS;
3181 function Referenced_As_Out_Parameter (Id : E) return B is
3183 return Flag227 (Id);
3184 end Referenced_As_Out_Parameter;
3186 function Refinement_Constituents (Id : E) return L is
3188 pragma Assert (Ekind (Id) = E_Abstract_State);
3190 end Refinement_Constituents;
3192 function Register_Exception_Call (Id : E) return N is
3194 pragma Assert (Ekind (Id) = E_Exception);
3196 end Register_Exception_Call;
3198 function Related_Array_Object (Id : E) return E is
3200 pragma Assert (Is_Array_Type (Id));
3202 end Related_Array_Object;
3204 function Related_Expression (Id : E) return N is
3206 pragma Assert (Ekind (Id) in Type_Kind
3207 or else Ekind_In (Id, E_Constant, E_Variable));
3209 end Related_Expression;
3211 function Related_Instance (Id : E) return E is
3213 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3215 end Related_Instance;
3217 function Related_Type (Id : E) return E is
3219 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
3223 function Relative_Deadline_Variable (Id : E) return E is
3225 pragma Assert (Is_Task_Type (Id));
3226 return Node28 (Implementation_Base_Type (Id));
3227 end Relative_Deadline_Variable;
3229 function Renamed_Entity (Id : E) return N is
3234 function Renamed_In_Spec (Id : E) return B is
3236 pragma Assert (Ekind (Id) = E_Package);
3237 return Flag231 (Id);
3238 end Renamed_In_Spec;
3240 function Renamed_Object (Id : E) return N is
3245 function Renaming_Map (Id : E) return U is
3250 function Requires_Overriding (Id : E) return B is
3252 pragma Assert (Is_Overloadable (Id));
3253 return Flag213 (Id);
3254 end Requires_Overriding;
3256 function Return_Present (Id : E) return B is
3261 function Return_Applies_To (Id : E) return N is
3264 end Return_Applies_To;
3266 function Returns_By_Ref (Id : E) return B is
3271 function Reverse_Bit_Order (Id : E) return B is
3273 pragma Assert (Is_Record_Type (Id));
3274 return Flag164 (Base_Type (Id));
3275 end Reverse_Bit_Order;
3277 function Reverse_Storage_Order (Id : E) return B is
3279 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3280 return Flag93 (Base_Type (Id));
3281 end Reverse_Storage_Order;
3283 function Rewritten_For_C (Id : E) return B is
3285 pragma Assert (Ekind (Id) = E_Function);
3286 return Flag287 (Id);
3287 end Rewritten_For_C;
3289 function RM_Size (Id : E) return U is
3291 pragma Assert (Is_Type (Id));
3295 function Scalar_Range (Id : E) return N is
3300 function Scale_Value (Id : E) return U is
3305 function Scope_Depth_Value (Id : E) return U is
3308 end Scope_Depth_Value;
3310 function Sec_Stack_Needed_For_Return (Id : E) return B is
3312 return Flag167 (Id);
3313 end Sec_Stack_Needed_For_Return;
3315 function Shared_Var_Procs_Instance (Id : E) return E is
3317 pragma Assert (Ekind (Id) = E_Variable);
3319 end Shared_Var_Procs_Instance;
3321 function Size_Check_Code (Id : E) return N is
3323 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3325 end Size_Check_Code;
3327 function Size_Depends_On_Discriminant (Id : E) return B is
3329 return Flag177 (Id);
3330 end Size_Depends_On_Discriminant;
3332 function Size_Known_At_Compile_Time (Id : E) return B is
3335 end Size_Known_At_Compile_Time;
3337 function Small_Value (Id : E) return R is
3339 pragma Assert (Is_Fixed_Point_Type (Id));
3340 return Ureal21 (Id);
3343 function SPARK_Aux_Pragma (Id : E) return N is
3346 (Ekind_In (Id, E_Protected_Type, -- concurrent types
3349 Ekind_In (Id, E_Generic_Package, -- packages
3353 end SPARK_Aux_Pragma;
3355 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3358 (Ekind_In (Id, E_Protected_Type, -- concurrent types
3361 Ekind_In (Id, E_Generic_Package, -- packages
3364 return Flag266 (Id);
3365 end SPARK_Aux_Pragma_Inherited;
3367 function SPARK_Pragma (Id : E) return N is
3370 (Ekind_In (Id, E_Constant, -- objects
3373 Ekind_In (Id, E_Abstract_State, -- overloadable
3378 E_Generic_Procedure,
3383 Ekind_In (Id, E_Generic_Package, -- packages
3387 Ekind (Id) = E_Void -- special purpose
3389 Ekind_In (Id, E_Protected_Body, -- types
3396 function SPARK_Pragma_Inherited (Id : E) return B is
3399 (Ekind_In (Id, E_Constant, -- objects
3402 Ekind_In (Id, E_Abstract_State, -- overloadable
3407 E_Generic_Procedure,
3412 Ekind_In (Id, E_Generic_Package, -- packages
3416 Ekind (Id) = E_Void -- special purpose
3418 Ekind_In (Id, E_Protected_Body, -- types
3422 return Flag265 (Id);
3423 end SPARK_Pragma_Inherited;
3425 function Spec_Entity (Id : E) return E is
3427 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3431 function SSO_Set_High_By_Default (Id : E) return B is
3433 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3434 return Flag273 (Base_Type (Id));
3435 end SSO_Set_High_By_Default;
3437 function SSO_Set_Low_By_Default (Id : E) return B is
3439 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3440 return Flag272 (Base_Type (Id));
3441 end SSO_Set_Low_By_Default;
3443 function Static_Discrete_Predicate (Id : E) return S is
3445 pragma Assert (Is_Discrete_Type (Id));
3447 end Static_Discrete_Predicate;
3449 function Static_Real_Or_String_Predicate (Id : E) return N is
3451 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3453 end Static_Real_Or_String_Predicate;
3455 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3457 pragma Assert (Ekind_In (Id, E_Constant,
3461 end Status_Flag_Or_Transient_Decl;
3463 function Storage_Size_Variable (Id : E) return E is
3465 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3466 return Node26 (Implementation_Base_Type (Id));
3467 end Storage_Size_Variable;
3469 function Static_Elaboration_Desired (Id : E) return B is
3471 pragma Assert (Ekind (Id) = E_Package);
3473 end Static_Elaboration_Desired;
3475 function Static_Initialization (Id : E) return N is
3478 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3480 end Static_Initialization;
3482 function Stored_Constraint (Id : E) return L is
3485 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3486 return Elist23 (Id);
3487 end Stored_Constraint;
3489 function Stores_Attribute_Old_Prefix (Id : E) return B is
3491 return Flag270 (Id);
3492 end Stores_Attribute_Old_Prefix;
3494 function Strict_Alignment (Id : E) return B is
3496 return Flag145 (Implementation_Base_Type (Id));
3497 end Strict_Alignment;
3499 function String_Literal_Length (Id : E) return U is
3502 end String_Literal_Length;
3504 function String_Literal_Low_Bound (Id : E) return N is
3507 end String_Literal_Low_Bound;
3509 function Subprograms_For_Type (Id : E) return L is
3511 pragma Assert (Is_Type (Id));
3512 return Elist29 (Id);
3513 end Subprograms_For_Type;
3515 function Subps_Index (Id : E) return U is
3517 pragma Assert (Is_Subprogram (Id));
3521 function Suppress_Elaboration_Warnings (Id : E) return B is
3523 return Flag303 (Id);
3524 end Suppress_Elaboration_Warnings;
3526 function Suppress_Initialization (Id : E) return B is
3528 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3529 return Flag105 (Id);
3530 end Suppress_Initialization;
3532 function Suppress_Style_Checks (Id : E) return B is
3534 return Flag165 (Id);
3535 end Suppress_Style_Checks;
3537 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3539 return Flag217 (Id);
3540 end Suppress_Value_Tracking_On_Call;
3542 function Task_Body_Procedure (Id : E) return N is
3544 pragma Assert (Ekind (Id) in Task_Kind);
3546 end Task_Body_Procedure;
3548 function Thunk_Entity (Id : E) return E is
3550 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3551 and then Is_Thunk (Id));
3555 function Treat_As_Volatile (Id : E) return B is
3558 end Treat_As_Volatile;
3560 function Underlying_Full_View (Id : E) return E is
3562 pragma Assert (Ekind (Id) in Private_Kind);
3564 end Underlying_Full_View;
3566 function Underlying_Record_View (Id : E) return E is
3569 end Underlying_Record_View;
3571 function Universal_Aliasing (Id : E) return B is
3573 pragma Assert (Is_Type (Id));
3574 return Flag216 (Implementation_Base_Type (Id));
3575 end Universal_Aliasing;
3577 function Unset_Reference (Id : E) return N is
3580 end Unset_Reference;
3582 function Used_As_Generic_Actual (Id : E) return B is
3584 return Flag222 (Id);
3585 end Used_As_Generic_Actual;
3587 function Uses_Lock_Free (Id : E) return B is
3589 pragma Assert (Is_Protected_Type (Id));
3590 return Flag188 (Id);
3593 function Uses_Sec_Stack (Id : E) return B is
3598 function Validated_Object (Id : E) return N is
3600 pragma Assert (Ekind (Id) = E_Variable);
3602 end Validated_Object;
3604 function Warnings_Off (Id : E) return B is
3609 function Warnings_Off_Used (Id : E) return B is
3611 return Flag236 (Id);
3612 end Warnings_Off_Used;
3614 function Warnings_Off_Used_Unmodified (Id : E) return B is
3616 return Flag237 (Id);
3617 end Warnings_Off_Used_Unmodified;
3619 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3621 return Flag238 (Id);
3622 end Warnings_Off_Used_Unreferenced;
3624 function Wrapped_Entity (Id : E) return E is
3626 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3627 and then Is_Primitive_Wrapper (Id));
3631 function Was_Hidden (Id : E) return B is
3633 return Flag196 (Id);
3636 ------------------------------
3637 -- Classification Functions --
3638 ------------------------------
3640 function Is_Access_Type (Id : E) return B is
3642 return Ekind (Id) in Access_Kind;
3645 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3647 return Ekind (Id) in Access_Protected_Kind;
3648 end Is_Access_Protected_Subprogram_Type;
3650 function Is_Access_Subprogram_Type (Id : E) return B is
3652 return Ekind (Id) in Access_Subprogram_Kind;
3653 end Is_Access_Subprogram_Type;
3655 function Is_Aggregate_Type (Id : E) return B is
3657 return Ekind (Id) in Aggregate_Kind;
3658 end Is_Aggregate_Type;
3660 function Is_Anonymous_Access_Type (Id : E) return B is
3662 return Ekind (Id) in Anonymous_Access_Kind;
3663 end Is_Anonymous_Access_Type;
3665 function Is_Array_Type (Id : E) return B is
3667 return Ekind (Id) in Array_Kind;
3670 function Is_Assignable (Id : E) return B is
3672 return Ekind (Id) in Assignable_Kind;
3675 function Is_Class_Wide_Type (Id : E) return B is
3677 return Ekind (Id) in Class_Wide_Kind;
3678 end Is_Class_Wide_Type;
3680 function Is_Composite_Type (Id : E) return B is
3682 return Ekind (Id) in Composite_Kind;
3683 end Is_Composite_Type;
3685 function Is_Concurrent_Body (Id : E) return B is
3687 return Ekind (Id) in Concurrent_Body_Kind;
3688 end Is_Concurrent_Body;
3690 function Is_Concurrent_Record_Type (Id : E) return B is
3693 end Is_Concurrent_Record_Type;
3695 function Is_Concurrent_Type (Id : E) return B is
3697 return Ekind (Id) in Concurrent_Kind;
3698 end Is_Concurrent_Type;
3700 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3702 return Ekind (Id) in Decimal_Fixed_Point_Kind;
3703 end Is_Decimal_Fixed_Point_Type;
3705 function Is_Digits_Type (Id : E) return B is
3707 return Ekind (Id) in Digits_Kind;
3710 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3712 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3713 end Is_Discrete_Or_Fixed_Point_Type;
3715 function Is_Discrete_Type (Id : E) return B is
3717 return Ekind (Id) in Discrete_Kind;
3718 end Is_Discrete_Type;
3720 function Is_Elementary_Type (Id : E) return B is
3722 return Ekind (Id) in Elementary_Kind;
3723 end Is_Elementary_Type;
3725 function Is_Entry (Id : E) return B is
3727 return Ekind (Id) in Entry_Kind;
3730 function Is_Enumeration_Type (Id : E) return B is
3732 return Ekind (Id) in Enumeration_Kind;
3733 end Is_Enumeration_Type;
3735 function Is_Fixed_Point_Type (Id : E) return B is
3737 return Ekind (Id) in Fixed_Point_Kind;
3738 end Is_Fixed_Point_Type;
3740 function Is_Floating_Point_Type (Id : E) return B is
3742 return Ekind (Id) in Float_Kind;
3743 end Is_Floating_Point_Type;
3745 function Is_Formal (Id : E) return B is
3747 return Ekind (Id) in Formal_Kind;
3750 function Is_Formal_Object (Id : E) return B is
3752 return Ekind (Id) in Formal_Object_Kind;
3753 end Is_Formal_Object;
3755 function Is_Generic_Subprogram (Id : E) return B is
3757 return Ekind (Id) in Generic_Subprogram_Kind;
3758 end Is_Generic_Subprogram;
3760 function Is_Generic_Unit (Id : E) return B is
3762 return Ekind (Id) in Generic_Unit_Kind;
3763 end Is_Generic_Unit;
3765 function Is_Ghost_Entity (Id : Entity_Id) return Boolean is
3767 return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id);
3768 end Is_Ghost_Entity;
3770 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3772 return Ekind (Id) in Incomplete_Or_Private_Kind;
3773 end Is_Incomplete_Or_Private_Type;
3775 function Is_Incomplete_Type (Id : E) return B is
3777 return Ekind (Id) in Incomplete_Kind;
3778 end Is_Incomplete_Type;
3780 function Is_Integer_Type (Id : E) return B is
3782 return Ekind (Id) in Integer_Kind;
3783 end Is_Integer_Type;
3785 function Is_Modular_Integer_Type (Id : E) return B is
3787 return Ekind (Id) in Modular_Integer_Kind;
3788 end Is_Modular_Integer_Type;
3790 function Is_Named_Number (Id : E) return B is
3792 return Ekind (Id) in Named_Kind;
3793 end Is_Named_Number;
3795 function Is_Numeric_Type (Id : E) return B is
3797 return Ekind (Id) in Numeric_Kind;
3798 end Is_Numeric_Type;
3800 function Is_Object (Id : E) return B is
3802 return Ekind (Id) in Object_Kind;
3805 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3807 return Ekind (Id) in Ordinary_Fixed_Point_Kind;
3808 end Is_Ordinary_Fixed_Point_Type;
3810 function Is_Overloadable (Id : E) return B is
3812 return Ekind (Id) in Overloadable_Kind;
3813 end Is_Overloadable;
3815 function Is_Private_Type (Id : E) return B is
3817 return Ekind (Id) in Private_Kind;
3818 end Is_Private_Type;
3820 function Is_Protected_Type (Id : E) return B is
3822 return Ekind (Id) in Protected_Kind;
3823 end Is_Protected_Type;
3825 function Is_Real_Type (Id : E) return B is
3827 return Ekind (Id) in Real_Kind;
3830 function Is_Record_Type (Id : E) return B is
3832 return Ekind (Id) in Record_Kind;
3835 function Is_Scalar_Type (Id : E) return B is
3837 return Ekind (Id) in Scalar_Kind;
3840 function Is_Signed_Integer_Type (Id : E) return B is
3842 return Ekind (Id) in Signed_Integer_Kind;
3843 end Is_Signed_Integer_Type;
3845 function Is_Subprogram (Id : E) return B is
3847 return Ekind (Id) in Subprogram_Kind;
3850 function Is_Subprogram_Or_Entry (Id : E) return B is
3852 return Ekind (Id) in Subprogram_Kind
3854 Ekind (Id) in Entry_Kind;
3855 end Is_Subprogram_Or_Entry;
3857 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3859 return Ekind (Id) in Subprogram_Kind
3861 Ekind (Id) in Generic_Subprogram_Kind;
3862 end Is_Subprogram_Or_Generic_Subprogram;
3864 function Is_Task_Type (Id : E) return B is
3866 return Ekind (Id) in Task_Kind;
3869 function Is_Type (Id : E) return B is
3871 return Ekind (Id) in Type_Kind;
3874 ------------------------------
3875 -- Attribute Set Procedures --
3876 ------------------------------
3878 -- Note: in many of these set procedures an "obvious" assertion is missing.
3879 -- The reason for this is that in many cases, a field is set before the
3880 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3881 -- it is possible to add assertions that specifically include the E_Void
3882 -- possibility, but in some cases, we just omit the assertions.
3884 procedure Set_Abstract_States (Id : E; V : L) is
3886 pragma Assert (Is_Package_Or_Generic_Package (Id));
3887 Set_Elist25 (Id, V);
3888 end Set_Abstract_States;
3890 procedure Set_Accept_Address (Id : E; V : L) is
3892 Set_Elist21 (Id, V);
3893 end Set_Accept_Address;
3895 procedure Set_Access_Disp_Table (Id : E; V : L) is
3897 pragma Assert (Ekind (Id) = E_Record_Type
3898 and then Id = Implementation_Base_Type (Id));
3899 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3900 Set_Elist16 (Id, V);
3901 end Set_Access_Disp_Table;
3903 procedure Set_Access_Disp_Table_Elab_Flag (Id : E; V : E) is
3905 pragma Assert (Ekind (Id) = E_Record_Type
3906 and then Id = Implementation_Base_Type (Id));
3907 pragma Assert (Is_Tagged_Type (Id));
3909 end Set_Access_Disp_Table_Elab_Flag;
3911 procedure Set_Anonymous_Designated_Type (Id : E; V : E) is
3913 pragma Assert (Ekind (Id) = E_Variable);
3915 end Set_Anonymous_Designated_Type;
3917 procedure Set_Anonymous_Masters (Id : E; V : L) is
3919 pragma Assert (Ekind_In (Id, E_Function,
3922 E_Subprogram_Body));
3923 Set_Elist29 (Id, V);
3924 end Set_Anonymous_Masters;
3926 procedure Set_Anonymous_Object (Id : E; V : E) is
3928 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
3930 end Set_Anonymous_Object;
3932 procedure Set_Associated_Entity (Id : E; V : E) is
3935 end Set_Associated_Entity;
3937 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3940 end Set_Associated_Formal_Package;
3942 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3945 end Set_Associated_Node_For_Itype;
3947 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3949 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3951 end Set_Associated_Storage_Pool;
3953 procedure Set_Activation_Record_Component (Id : E; V : E) is
3955 pragma Assert (Ekind_In (Id, E_Constant,
3962 end Set_Activation_Record_Component;
3964 procedure Set_Actual_Subtype (Id : E; V : E) is
3967 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3968 or else Is_Formal (Id));
3970 end Set_Actual_Subtype;
3972 procedure Set_Address_Taken (Id : E; V : B := True) is
3974 Set_Flag104 (Id, V);
3975 end Set_Address_Taken;
3977 procedure Set_Alias (Id : E; V : E) is
3980 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3984 procedure Set_Alignment (Id : E; V : U) is
3986 pragma Assert (Is_Type (Id)
3987 or else Is_Formal (Id)
3988 or else Ekind_In (Id, E_Loop_Parameter,
3995 procedure Set_Barrier_Function (Id : E; V : N) is
3997 pragma Assert (Is_Entry (Id));
3999 end Set_Barrier_Function;
4001 procedure Set_Block_Node (Id : E; V : N) is
4003 pragma Assert (Ekind (Id) = E_Block);
4007 procedure Set_Body_Entity (Id : E; V : E) is
4009 pragma Assert (Is_Package_Or_Generic_Package (Id));
4011 end Set_Body_Entity;
4013 procedure Set_Body_Needed_For_Inlining (Id : E; V : B := True) is
4015 pragma Assert (Ekind (Id) = E_Package);
4016 Set_Flag299 (Id, V);
4017 end Set_Body_Needed_For_Inlining;
4019 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
4022 (Ekind (Id) = E_Package
4023 or else Is_Subprogram (Id)
4024 or else Is_Generic_Unit (Id));
4026 end Set_Body_Needed_For_SAL;
4028 procedure Set_Body_References (Id : E; V : L) is
4030 pragma Assert (Ekind (Id) = E_Abstract_State);
4031 Set_Elist16 (Id, V);
4032 end Set_Body_References;
4034 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
4036 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4038 end Set_BIP_Initialization_Call;
4040 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
4042 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4043 Set_Flag125 (Id, V);
4044 end Set_C_Pass_By_Copy;
4046 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
4049 end Set_Can_Never_Be_Null;
4051 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
4054 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
4055 Set_Flag229 (Id, V);
4056 end Set_Can_Use_Internal_Rep;
4058 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
4061 end Set_Checks_May_Be_Suppressed;
4063 procedure Set_Class_Wide_Clone (Id : E; V : E) is
4065 pragma Assert (Is_Subprogram (Id));
4067 end Set_Class_Wide_Clone;
4069 procedure Set_Class_Wide_Type (Id : E; V : E) is
4071 pragma Assert (Is_Type (Id));
4073 end Set_Class_Wide_Type;
4075 procedure Set_Cloned_Subtype (Id : E; V : E) is
4077 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
4079 end Set_Cloned_Subtype;
4081 procedure Set_Component_Bit_Offset (Id : E; V : U) is
4083 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4085 end Set_Component_Bit_Offset;
4087 procedure Set_Component_Clause (Id : E; V : N) is
4089 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4091 end Set_Component_Clause;
4093 procedure Set_Component_Size (Id : E; V : U) is
4095 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4097 end Set_Component_Size;
4099 procedure Set_Component_Type (Id : E; V : E) is
4101 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4103 end Set_Component_Type;
4105 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
4108 (Ekind_In (Id, E_Block,
4112 E_Generic_Procedure,
4116 E_Subprogram_Body));
4117 Set_Flag279 (Id, V);
4118 end Set_Contains_Ignored_Ghost_Code;
4120 procedure Set_Contract (Id : E; V : N) is
4123 (Ekind_In (Id, E_Protected_Type, -- concurrent types
4127 Ekind_In (Id, E_Constant, -- objects
4130 Ekind_In (Id, E_Entry, -- overloadable
4134 E_Generic_Procedure,
4139 Ekind_In (Id, E_Generic_Package, -- packages
4143 Ekind (Id) = E_Void); -- special purpose
4147 procedure Set_Contract_Wrapper (Id : E; V : E) is
4149 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4151 end Set_Contract_Wrapper;
4153 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
4156 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
4158 end Set_Corresponding_Concurrent_Type;
4160 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
4162 pragma Assert (Ekind (Id) = E_Discriminant);
4164 end Set_Corresponding_Discriminant;
4166 procedure Set_Corresponding_Equality (Id : E; V : E) is
4169 (Ekind (Id) = E_Function
4170 and then not Comes_From_Source (Id)
4171 and then Chars (Id) = Name_Op_Ne);
4173 end Set_Corresponding_Equality;
4175 procedure Set_Corresponding_Function (Id : E; V : E) is
4177 pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
4179 end Set_Corresponding_Function;
4181 procedure Set_Corresponding_Procedure (Id : E; V : E) is
4183 pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
4185 end Set_Corresponding_Procedure;
4187 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
4189 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
4191 end Set_Corresponding_Protected_Entry;
4193 procedure Set_Corresponding_Record_Component (Id : E; V : E) is
4195 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4197 end Set_Corresponding_Record_Component;
4199 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
4201 pragma Assert (Is_Concurrent_Type (Id));
4203 end Set_Corresponding_Record_Type;
4205 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
4208 end Set_Corresponding_Remote_Type;
4210 procedure Set_Current_Use_Clause (Id : E; V : E) is
4212 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
4214 end Set_Current_Use_Clause;
4216 procedure Set_Current_Value (Id : E; V : N) is
4218 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
4220 end Set_Current_Value;
4222 procedure Set_CR_Discriminant (Id : E; V : E) is
4225 end Set_CR_Discriminant;
4227 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
4229 Set_Flag166 (Id, V);
4230 end Set_Debug_Info_Off;
4232 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
4235 end Set_Debug_Renaming_Link;
4237 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
4239 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4241 end Set_Default_Aspect_Component_Value;
4243 procedure Set_Default_Aspect_Value (Id : E; V : E) is
4245 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
4247 end Set_Default_Aspect_Value;
4249 procedure Set_Default_Expr_Function (Id : E; V : E) is
4251 pragma Assert (Is_Formal (Id));
4253 end Set_Default_Expr_Function;
4255 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
4257 Set_Flag108 (Id, V);
4258 end Set_Default_Expressions_Processed;
4260 procedure Set_Default_Value (Id : E; V : N) is
4262 pragma Assert (Is_Formal (Id));
4264 end Set_Default_Value;
4266 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
4270 or else Is_Task_Type (Id)
4271 or else Ekind (Id) = E_Block);
4272 Set_Flag114 (Id, V);
4273 end Set_Delay_Cleanups;
4275 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
4278 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
4281 end Set_Delay_Subprogram_Descriptors;
4283 procedure Set_Delta_Value (Id : E; V : R) is
4285 pragma Assert (Is_Fixed_Point_Type (Id));
4286 Set_Ureal18 (Id, V);
4287 end Set_Delta_Value;
4289 procedure Set_Dependent_Instances (Id : E; V : L) is
4291 pragma Assert (Is_Generic_Instance (Id));
4293 end Set_Dependent_Instances;
4295 procedure Set_Depends_On_Private (Id : E; V : B := True) is
4297 pragma Assert (Nkind (Id) in N_Entity);
4299 end Set_Depends_On_Private;
4301 procedure Set_Derived_Type_Link (Id : E; V : E) is
4303 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4305 end Set_Derived_Type_Link;
4307 procedure Set_Digits_Value (Id : E; V : U) is
4310 (Is_Floating_Point_Type (Id)
4311 or else Is_Decimal_Fixed_Point_Type (Id));
4313 end Set_Digits_Value;
4315 procedure Set_Directly_Designated_Type (Id : E; V : E) is
4318 end Set_Directly_Designated_Type;
4320 procedure Set_Disable_Controlled (Id : E; V : B := True) is
4322 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4323 Set_Flag253 (Id, V);
4324 end Set_Disable_Controlled;
4326 procedure Set_Discard_Names (Id : E; V : B := True) is
4329 end Set_Discard_Names;
4331 procedure Set_Discriminal (Id : E; V : E) is
4333 pragma Assert (Ekind (Id) = E_Discriminant);
4335 end Set_Discriminal;
4337 procedure Set_Discriminal_Link (Id : E; V : E) is
4340 end Set_Discriminal_Link;
4342 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
4344 pragma Assert (Ekind (Id) = E_Component);
4346 end Set_Discriminant_Checking_Func;
4348 procedure Set_Discriminant_Constraint (Id : E; V : L) is
4350 pragma Assert (Nkind (Id) in N_Entity);
4351 Set_Elist21 (Id, V);
4352 end Set_Discriminant_Constraint;
4354 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
4357 end Set_Discriminant_Default_Value;
4359 procedure Set_Discriminant_Number (Id : E; V : U) is
4362 end Set_Discriminant_Number;
4364 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
4366 pragma Assert (Ekind (Id) = E_Record_Type
4367 and then Id = Implementation_Base_Type (Id));
4368 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
4369 Set_Elist26 (Id, V);
4370 end Set_Dispatch_Table_Wrappers;
4372 procedure Set_DT_Entry_Count (Id : E; V : U) is
4374 pragma Assert (Ekind (Id) = E_Component);
4376 end Set_DT_Entry_Count;
4378 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4380 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4382 end Set_DT_Offset_To_Top_Func;
4384 procedure Set_DT_Position (Id : E; V : U) is
4386 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4388 end Set_DT_Position;
4390 procedure Set_DTC_Entity (Id : E; V : E) is
4392 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4396 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4398 pragma Assert (Ekind (Id) = E_Package);
4399 Set_Flag210 (Id, V);
4400 end Set_Elaborate_Body_Desirable;
4402 procedure Set_Elaboration_Entity (Id : E; V : E) is
4407 Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
4409 Is_Generic_Unit (Id));
4411 end Set_Elaboration_Entity;
4413 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4418 Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
4420 Is_Generic_Unit (Id));
4421 Set_Flag174 (Id, V);
4422 end Set_Elaboration_Entity_Required;
4424 procedure Set_Encapsulating_State (Id : E; V : E) is
4426 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4428 end Set_Encapsulating_State;
4430 procedure Set_Enclosing_Scope (Id : E; V : E) is
4433 end Set_Enclosing_Scope;
4435 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4437 pragma Assert (Is_Entry (Id));
4438 Set_Flag152 (Id, V);
4439 end Set_Entry_Accepted;
4441 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4444 end Set_Entry_Bodies_Array;
4446 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4449 end Set_Entry_Cancel_Parameter;
4451 procedure Set_Entry_Component (Id : E; V : E) is
4454 end Set_Entry_Component;
4456 procedure Set_Entry_Formal (Id : E; V : E) is
4459 end Set_Entry_Formal;
4461 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4463 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4465 end Set_Entry_Index_Constant;
4467 procedure Set_Entry_Max_Queue_Lengths_Array (Id : E; V : E) is
4469 pragma Assert (Ekind (Id) = E_Protected_Type);
4471 end Set_Entry_Max_Queue_Lengths_Array;
4473 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4476 end Set_Entry_Parameters_Type;
4478 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4480 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4482 end Set_Enum_Pos_To_Rep;
4484 procedure Set_Enumeration_Pos (Id : E; V : U) is
4486 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4488 end Set_Enumeration_Pos;
4490 procedure Set_Enumeration_Rep (Id : E; V : U) is
4492 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4494 end Set_Enumeration_Rep;
4496 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4498 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4500 end Set_Enumeration_Rep_Expr;
4502 procedure Set_Equivalent_Type (Id : E; V : E) is
4505 (Ekind_In (Id, E_Class_Wide_Type,
4506 E_Class_Wide_Subtype,
4507 E_Access_Protected_Subprogram_Type,
4508 E_Anonymous_Access_Protected_Subprogram_Type,
4509 E_Access_Subprogram_Type,
4512 end Set_Equivalent_Type;
4514 procedure Set_Esize (Id : E; V : U) is
4519 procedure Set_Extra_Accessibility (Id : E; V : E) is
4522 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4524 end Set_Extra_Accessibility;
4526 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4528 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4530 end Set_Extra_Accessibility_Of_Result;
4532 procedure Set_Extra_Constrained (Id : E; V : E) is
4534 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4536 end Set_Extra_Constrained;
4538 procedure Set_Extra_Formal (Id : E; V : E) is
4541 end Set_Extra_Formal;
4543 procedure Set_Extra_Formals (Id : E; V : E) is
4546 (Is_Overloadable (Id)
4547 or else Ekind_In (Id, E_Entry_Family,
4549 E_Subprogram_Type));
4551 end Set_Extra_Formals;
4553 procedure Set_Finalization_Master (Id : E; V : E) is
4555 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4557 end Set_Finalization_Master;
4559 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4561 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4562 Set_Flag158 (Id, V);
4563 end Set_Finalize_Storage_Only;
4565 procedure Set_Finalizer (Id : E; V : E) is
4567 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4571 procedure Set_First_Entity (Id : E; V : E) is
4574 end Set_First_Entity;
4576 procedure Set_First_Exit_Statement (Id : E; V : N) is
4578 pragma Assert (Ekind (Id) = E_Loop);
4580 end Set_First_Exit_Statement;
4582 procedure Set_First_Index (Id : E; V : N) is
4584 pragma Assert (Is_Array_Type (Id));
4586 end Set_First_Index;
4588 procedure Set_First_Literal (Id : E; V : E) is
4590 pragma Assert (Is_Enumeration_Type (Id));
4592 end Set_First_Literal;
4594 procedure Set_First_Private_Entity (Id : E; V : E) is
4596 pragma Assert (Is_Package_Or_Generic_Package (Id)
4597 or else Is_Concurrent_Type (Id));
4599 end Set_First_Private_Entity;
4601 procedure Set_First_Rep_Item (Id : E; V : N) is
4604 end Set_First_Rep_Item;
4606 procedure Set_Float_Rep (Id : E; V : F) is
4607 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4609 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4612 procedure Set_Freeze_Node (Id : E; V : N) is
4615 end Set_Freeze_Node;
4617 procedure Set_From_Limited_With (Id : E; V : B := True) is
4620 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4621 Set_Flag159 (Id, V);
4622 end Set_From_Limited_With;
4624 procedure Set_Full_View (Id : E; V : E) is
4626 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4630 procedure Set_Generic_Homonym (Id : E; V : E) is
4633 end Set_Generic_Homonym;
4635 procedure Set_Generic_Renamings (Id : E; V : L) is
4637 Set_Elist23 (Id, V);
4638 end Set_Generic_Renamings;
4640 procedure Set_Handler_Records (Id : E; V : S) is
4643 end Set_Handler_Records;
4645 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4647 pragma Assert (Id = Base_Type (Id));
4648 Set_Flag135 (Id, V);
4649 end Set_Has_Aliased_Components;
4651 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4654 end Set_Has_Alignment_Clause;
4656 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4659 end Set_Has_All_Calls_Remote;
4661 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4663 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4665 end Set_Has_Atomic_Components;
4667 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4670 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4671 Set_Flag139 (Id, V);
4672 end Set_Has_Biased_Representation;
4674 procedure Set_Has_Completion (Id : E; V : B := True) is
4677 end Set_Has_Completion;
4679 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4681 pragma Assert (Is_Type (Id));
4683 end Set_Has_Completion_In_Body;
4685 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4687 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4688 Set_Flag140 (Id, V);
4689 end Set_Has_Complex_Representation;
4691 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4693 pragma Assert (Ekind (Id) = E_Array_Type);
4695 end Set_Has_Component_Size_Clause;
4697 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4699 pragma Assert (Is_Type (Id));
4700 Set_Flag187 (Id, V);
4701 end Set_Has_Constrained_Partial_View;
4703 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4705 Set_Flag181 (Id, V);
4706 end Set_Has_Contiguous_Rep;
4708 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4710 pragma Assert (Id = Base_Type (Id));
4712 end Set_Has_Controlled_Component;
4714 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4717 end Set_Has_Controlling_Result;
4719 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4721 Set_Flag119 (Id, V);
4722 end Set_Has_Convention_Pragma;
4724 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4727 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4728 and then Is_Base_Type (Id));
4730 end Set_Has_Default_Aspect;
4732 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4734 pragma Assert (Nkind (Id) in N_Entity);
4735 Set_Flag200 (Id, V);
4736 end Set_Has_Delayed_Aspects;
4738 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4740 pragma Assert (Nkind (Id) in N_Entity);
4742 end Set_Has_Delayed_Freeze;
4744 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4746 pragma Assert (Nkind (Id) in N_Entity);
4747 Set_Flag261 (Id, V);
4748 end Set_Has_Delayed_Rep_Aspects;
4750 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4752 pragma Assert (Is_Type (Id));
4754 end Set_Has_Discriminants;
4756 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4758 pragma Assert (Ekind (Id) = E_Record_Type
4759 and then Is_Tagged_Type (Id));
4760 Set_Flag220 (Id, V);
4761 end Set_Has_Dispatch_Table;
4763 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4765 pragma Assert (Is_Type (Id));
4766 Set_Flag258 (Id, V);
4767 end Set_Has_Dynamic_Predicate_Aspect;
4769 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4771 pragma Assert (Is_Enumeration_Type (Id));
4773 end Set_Has_Enumeration_Rep_Clause;
4775 procedure Set_Has_Exit (Id : E; V : B := True) is
4780 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4782 pragma Assert (Ekind_In (Id, E_Entry,
4786 Set_Flag240 (Id, V);
4787 end Set_Has_Expanded_Contract;
4789 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4791 Set_Flag175 (Id, V);
4792 end Set_Has_Forward_Instantiation;
4794 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4796 Set_Flag173 (Id, V);
4797 end Set_Has_Fully_Qualified_Name;
4799 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4802 end Set_Has_Gigi_Rep_Item;
4804 procedure Set_Has_Homonym (Id : E; V : B := True) is
4807 end Set_Has_Homonym;
4809 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4811 Set_Flag251 (Id, V);
4812 end Set_Has_Implicit_Dereference;
4814 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4816 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4818 end Set_Has_Independent_Components;
4820 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4822 pragma Assert (Is_Type (Id));
4823 Set_Flag248 (Base_Type (Id), V);
4824 end Set_Has_Inheritable_Invariants;
4826 procedure Set_Has_Inherited_DIC (Id : E; V : B := True) is
4828 pragma Assert (Is_Type (Id));
4829 Set_Flag133 (Base_Type (Id), V);
4830 end Set_Has_Inherited_DIC;
4832 procedure Set_Has_Inherited_Invariants (Id : E; V : B := True) is
4834 pragma Assert (Is_Type (Id));
4835 Set_Flag291 (Base_Type (Id), V);
4836 end Set_Has_Inherited_Invariants;
4838 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4840 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4841 Set_Flag219 (Id, V);
4842 end Set_Has_Initial_Value;
4844 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4846 pragma Assert (Ekind (Id) = E_Loop);
4847 Set_Flag260 (Id, V);
4848 end Set_Has_Loop_Entry_Attributes;
4850 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4852 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4854 end Set_Has_Machine_Radix_Clause;
4856 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4859 end Set_Has_Master_Entity;
4861 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4863 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4864 Set_Flag142 (Id, V);
4865 end Set_Has_Missing_Return;
4867 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4869 Set_Flag101 (Id, V);
4870 end Set_Has_Nested_Block_With_Handler;
4872 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4874 pragma Assert (Is_Subprogram (Id));
4875 Set_Flag282 (Id, V);
4876 end Set_Has_Nested_Subprogram;
4878 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4880 pragma Assert (Id = Base_Type (Id));
4882 end Set_Has_Non_Standard_Rep;
4884 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4886 pragma Assert (Is_Type (Id));
4887 Set_Flag172 (Id, V);
4888 end Set_Has_Object_Size_Clause;
4890 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4893 (Ekind_In (Id, E_Entry, E_Entry_Family)
4894 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4895 Set_Flag110 (Id, V);
4896 end Set_Has_Out_Or_In_Out_Parameter;
4898 procedure Set_Has_Own_DIC (Id : E; V : B := True) is
4900 pragma Assert (Is_Type (Id));
4901 Set_Flag3 (Base_Type (Id), V);
4902 end Set_Has_Own_DIC;
4904 procedure Set_Has_Own_Invariants (Id : E; V : B := True) is
4906 pragma Assert (Is_Type (Id));
4907 Set_Flag232 (Base_Type (Id), V);
4908 end Set_Has_Own_Invariants;
4910 procedure Set_Has_Partial_Visible_Refinement (Id : E; V : B := True) is
4912 pragma Assert (Ekind (Id) = E_Abstract_State);
4913 Set_Flag296 (Id, V);
4914 end Set_Has_Partial_Visible_Refinement;
4916 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4918 Set_Flag154 (Id, V);
4919 end Set_Has_Per_Object_Constraint;
4921 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4923 pragma Assert (Is_Access_Type (Id));
4924 Set_Flag27 (Base_Type (Id), V);
4925 end Set_Has_Pragma_Controlled;
4927 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4929 Set_Flag150 (Id, V);
4930 end Set_Has_Pragma_Elaborate_Body;
4932 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4934 Set_Flag157 (Id, V);
4935 end Set_Has_Pragma_Inline;
4937 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4939 Set_Flag230 (Id, V);
4940 end Set_Has_Pragma_Inline_Always;
4942 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4944 Set_Flag201 (Id, V);
4945 end Set_Has_Pragma_No_Inline;
4947 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4949 pragma Assert (Is_Enumeration_Type (Id));
4950 pragma Assert (Id = Base_Type (Id));
4951 Set_Flag198 (Id, V);
4952 end Set_Has_Pragma_Ordered;
4954 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4956 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4957 pragma Assert (Id = Base_Type (Id));
4958 Set_Flag121 (Id, V);
4959 end Set_Has_Pragma_Pack;
4961 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4963 Set_Flag221 (Id, V);
4964 end Set_Has_Pragma_Preelab_Init;
4966 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4968 Set_Flag203 (Id, V);
4969 end Set_Has_Pragma_Pure;
4971 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4973 Set_Flag179 (Id, V);
4974 end Set_Has_Pragma_Pure_Function;
4976 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4978 Set_Flag169 (Id, V);
4979 end Set_Has_Pragma_Thread_Local_Storage;
4981 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4983 Set_Flag233 (Id, V);
4984 end Set_Has_Pragma_Unmodified;
4986 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4988 Set_Flag180 (Id, V);
4989 end Set_Has_Pragma_Unreferenced;
4991 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4993 pragma Assert (Is_Type (Id));
4994 Set_Flag212 (Id, V);
4995 end Set_Has_Pragma_Unreferenced_Objects;
4997 procedure Set_Has_Pragma_Unused (Id : E; V : B := True) is
4999 Set_Flag294 (Id, V);
5000 end Set_Has_Pragma_Unused;
5002 procedure Set_Has_Predicates (Id : E; V : B := True) is
5004 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
5005 Set_Flag250 (Id, V);
5006 end Set_Has_Predicates;
5008 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
5010 pragma Assert (Id = Base_Type (Id));
5011 Set_Flag120 (Id, V);
5012 end Set_Has_Primitive_Operations;
5014 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
5016 pragma Assert (Is_Type (Id));
5017 Set_Flag151 (Id, V);
5018 end Set_Has_Private_Ancestor;
5020 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
5022 Set_Flag155 (Id, V);
5023 end Set_Has_Private_Declaration;
5025 procedure Set_Has_Private_Extension (Id : E; V : B := True) is
5027 pragma Assert (Is_Tagged_Type (Id));
5028 Set_Flag300 (Id, V);
5029 end Set_Has_Private_Extension;
5031 procedure Set_Has_Protected (Id : E; V : B := True) is
5033 Set_Flag271 (Id, V);
5034 end Set_Has_Protected;
5036 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
5038 Set_Flag161 (Id, V);
5039 end Set_Has_Qualified_Name;
5041 procedure Set_Has_RACW (Id : E; V : B := True) is
5043 pragma Assert (Ekind (Id) = E_Package);
5044 Set_Flag214 (Id, V);
5047 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
5049 pragma Assert (Id = Base_Type (Id));
5051 end Set_Has_Record_Rep_Clause;
5053 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
5055 pragma Assert (Is_Subprogram (Id));
5056 Set_Flag143 (Id, V);
5057 end Set_Has_Recursive_Call;
5059 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
5061 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
5062 Set_Flag267 (Id, V);
5063 end Set_Has_Shift_Operator;
5065 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
5068 end Set_Has_Size_Clause;
5070 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
5072 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
5074 end Set_Has_Small_Clause;
5076 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
5078 pragma Assert (Id = Base_Type (Id));
5079 Set_Flag100 (Id, V);
5080 end Set_Has_Specified_Layout;
5082 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
5084 pragma Assert (Is_Type (Id));
5085 Set_Flag190 (Id, V);
5086 end Set_Has_Specified_Stream_Input;
5088 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
5090 pragma Assert (Is_Type (Id));
5091 Set_Flag191 (Id, V);
5092 end Set_Has_Specified_Stream_Output;
5094 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
5096 pragma Assert (Is_Type (Id));
5097 Set_Flag192 (Id, V);
5098 end Set_Has_Specified_Stream_Read;
5100 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
5102 pragma Assert (Is_Type (Id));
5103 Set_Flag193 (Id, V);
5104 end Set_Has_Specified_Stream_Write;
5106 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
5108 Set_Flag211 (Id, V);
5109 end Set_Has_Static_Discriminants;
5111 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
5113 pragma Assert (Is_Type (Id));
5114 Set_Flag269 (Id, V);
5115 end Set_Has_Static_Predicate;
5117 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
5119 pragma Assert (Is_Type (Id));
5120 Set_Flag259 (Id, V);
5121 end Set_Has_Static_Predicate_Aspect;
5123 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
5125 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5126 pragma Assert (Id = Base_Type (Id));
5128 end Set_Has_Storage_Size_Clause;
5130 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
5132 pragma Assert (Is_Elementary_Type (Id));
5133 Set_Flag184 (Id, V);
5134 end Set_Has_Stream_Size_Clause;
5136 procedure Set_Has_Task (Id : E; V : B := True) is
5138 pragma Assert (Id = Base_Type (Id));
5142 procedure Set_Has_Thunks (Id : E; V : B := True) is
5144 pragma Assert (Is_Tag (Id));
5145 Set_Flag228 (Id, V);
5148 procedure Set_Has_Timing_Event (Id : E; V : B := True) is
5150 pragma Assert (Id = Base_Type (Id));
5151 Set_Flag289 (Id, V);
5152 end Set_Has_Timing_Event;
5154 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
5156 pragma Assert (Id = Base_Type (Id));
5157 Set_Flag123 (Id, V);
5158 end Set_Has_Unchecked_Union;
5160 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
5162 pragma Assert (Is_Type (Id));
5164 end Set_Has_Unknown_Discriminants;
5166 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
5168 pragma Assert (Ekind (Id) = E_Abstract_State);
5169 Set_Flag263 (Id, V);
5170 end Set_Has_Visible_Refinement;
5172 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
5174 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
5176 end Set_Has_Volatile_Components;
5178 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
5180 Set_Flag182 (Id, V);
5181 end Set_Has_Xref_Entry;
5183 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
5185 pragma Assert (Ekind (Id) = E_Variable);
5187 end Set_Hiding_Loop_Variable;
5189 procedure Set_Hidden_In_Formal_Instance (Id : E; V : L) is
5191 pragma Assert (Ekind (Id) = E_Package);
5192 Set_Elist30 (Id, V);
5193 end Set_Hidden_In_Formal_Instance;
5195 procedure Set_Homonym (Id : E; V : E) is
5197 pragma Assert (Id /= V);
5201 procedure Set_Incomplete_Actuals (Id : E; V : L) is
5203 pragma Assert (Ekind (Id) = E_Package);
5204 Set_Elist24 (Id, V);
5205 end Set_Incomplete_Actuals;
5207 procedure Set_Ignore_SPARK_Mode_Pragmas (Id : E; V : B := True) is
5210 (Ekind_In (Id, E_Protected_Body, -- concurrent types
5215 Ekind_In (Id, E_Entry, -- overloadable
5219 E_Generic_Procedure,
5224 Ekind_In (Id, E_Generic_Package, -- packages
5227 Set_Flag301 (Id, V);
5228 end Set_Ignore_SPARK_Mode_Pragmas;
5230 procedure Set_Import_Pragma (Id : E; V : E) is
5232 pragma Assert (Is_Subprogram (Id));
5234 end Set_Import_Pragma;
5236 procedure Set_Interface_Alias (Id : E; V : E) is
5240 and then Is_Hidden (Id)
5241 and then (Ekind_In (Id, E_Procedure, E_Function)));
5243 end Set_Interface_Alias;
5245 procedure Set_Interfaces (Id : E; V : L) is
5247 pragma Assert (Is_Record_Type (Id));
5248 Set_Elist25 (Id, V);
5251 procedure Set_In_Package_Body (Id : E; V : B := True) is
5254 end Set_In_Package_Body;
5256 procedure Set_In_Private_Part (Id : E; V : B := True) is
5259 end Set_In_Private_Part;
5261 procedure Set_In_Use (Id : E; V : B := True) is
5263 pragma Assert (Nkind (Id) in N_Entity);
5267 procedure Set_Initialization_Statements (Id : E; V : N) is
5269 -- Tolerate an E_Void entity since this can be called while resolving
5270 -- an aggregate used as the initialization expression for an object
5271 -- declaration, and this occurs before the Ekind for the object is set.
5273 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
5275 end Set_Initialization_Statements;
5277 procedure Set_Inner_Instances (Id : E; V : L) is
5279 Set_Elist23 (Id, V);
5280 end Set_Inner_Instances;
5282 procedure Set_Interface_Name (Id : E; V : N) is
5285 end Set_Interface_Name;
5287 procedure Set_Invariants_Ignored (Id : E; V : B := True) is
5289 pragma Assert (Is_Type (Id));
5290 Set_Flag308 (Id, V);
5291 end Set_Invariants_Ignored;
5293 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
5295 pragma Assert (Is_Overloadable (Id));
5297 end Set_Is_Abstract_Subprogram;
5299 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
5301 pragma Assert (Is_Type (Id));
5302 Set_Flag146 (Id, V);
5303 end Set_Is_Abstract_Type;
5305 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
5307 pragma Assert (Is_Access_Type (Id));
5308 Set_Flag194 (Id, V);
5309 end Set_Is_Local_Anonymous_Access;
5311 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
5313 pragma Assert (Is_Access_Type (Id));
5315 end Set_Is_Access_Constant;
5317 procedure Set_Is_Activation_Record (Id : E; V : B := True) is
5319 pragma Assert (Ekind (Id) = E_In_Parameter);
5320 Set_Flag305 (Id, V);
5321 end Set_Is_Activation_Record;
5323 procedure Set_Is_Actual_Subtype (Id : E; V : B := True) is
5325 pragma Assert (Is_Type (Id));
5326 Set_Flag293 (Id, V);
5327 end Set_Is_Actual_Subtype;
5329 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
5331 Set_Flag185 (Id, V);
5332 end Set_Is_Ada_2005_Only;
5334 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
5336 Set_Flag199 (Id, V);
5337 end Set_Is_Ada_2012_Only;
5339 procedure Set_Is_Aliased (Id : E; V : B := True) is
5341 pragma Assert (Nkind (Id) in N_Entity);
5345 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
5348 (Ekind (Id) = E_Procedure or else Is_Type (Id));
5350 end Set_Is_Asynchronous;
5352 procedure Set_Is_Atomic (Id : E; V : B := True) is
5357 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
5359 pragma Assert ((not V)
5360 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
5361 Set_Flag122 (Id, V);
5362 end Set_Is_Bit_Packed_Array;
5364 procedure Set_Is_Called (Id : E; V : B := True) is
5366 pragma Assert (Ekind_In (Id, E_Procedure, E_Function, E_Package));
5367 Set_Flag102 (Id, V);
5370 procedure Set_Is_Character_Type (Id : E; V : B := True) is
5373 end Set_Is_Character_Type;
5375 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
5377 -- Allow this attribute to appear on unanalyzed entities
5379 pragma Assert (Nkind (Id) in N_Entity
5380 or else Ekind (Id) = E_Void);
5381 Set_Flag277 (Id, V);
5382 end Set_Is_Checked_Ghost_Entity;
5384 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
5387 end Set_Is_Child_Unit;
5389 procedure Set_Is_Class_Wide_Clone (Id : E; V : B := True) is
5391 Set_Flag290 (Id, V);
5392 end Set_Is_Class_Wide_Clone;
5394 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
5397 end Set_Is_Class_Wide_Equivalent_Type;
5399 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
5401 Set_Flag149 (Id, V);
5402 end Set_Is_Compilation_Unit;
5404 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
5406 pragma Assert (Ekind (Id) = E_Discriminant);
5407 Set_Flag103 (Id, V);
5408 end Set_Is_Completely_Hidden;
5410 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
5413 end Set_Is_Concurrent_Record_Type;
5415 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
5418 end Set_Is_Constr_Subt_For_U_Nominal;
5420 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
5422 Set_Flag141 (Id, V);
5423 end Set_Is_Constr_Subt_For_UN_Aliased;
5425 procedure Set_Is_Constrained (Id : E; V : B := True) is
5427 pragma Assert (Nkind (Id) in N_Entity);
5429 end Set_Is_Constrained;
5431 procedure Set_Is_Constructor (Id : E; V : B := True) is
5434 end Set_Is_Constructor;
5436 procedure Set_Is_Controlled_Active (Id : E; V : B := True) is
5438 pragma Assert (Id = Base_Type (Id));
5440 end Set_Is_Controlled_Active;
5442 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5444 pragma Assert (Is_Formal (Id));
5446 end Set_Is_Controlling_Formal;
5448 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5451 end Set_Is_CPP_Class;
5453 procedure Set_Is_DIC_Procedure (Id : E; V : B := True) is
5455 pragma Assert (Ekind (Id) = E_Procedure);
5456 Set_Flag132 (Id, V);
5457 end Set_Is_DIC_Procedure;
5459 procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
5461 pragma Assert (Is_Type (Id));
5462 Set_Flag223 (Id, V);
5463 end Set_Is_Descendant_Of_Address;
5465 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5467 Set_Flag176 (Id, V);
5468 end Set_Is_Discrim_SO_Function;
5470 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5472 Set_Flag264 (Id, V);
5473 end Set_Is_Discriminant_Check_Function;
5475 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5477 Set_Flag234 (Id, V);
5478 end Set_Is_Dispatch_Table_Entity;
5480 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5485 Is_Overloadable (Id)
5487 Ekind (Id) = E_Subprogram_Type);
5490 end Set_Is_Dispatching_Operation;
5492 procedure Set_Is_Elaboration_Checks_OK_Id (Id : E; V : B := True) is
5494 pragma Assert (Is_Elaboration_Target (Id));
5495 Set_Flag148 (Id, V);
5496 end Set_Is_Elaboration_Checks_OK_Id;
5498 procedure Set_Is_Elaboration_Warnings_OK_Id (Id : E; V : B := True) is
5500 pragma Assert (Is_Elaboration_Target (Id));
5501 Set_Flag304 (Id, V);
5502 end Set_Is_Elaboration_Warnings_OK_Id;
5504 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5506 Set_Flag124 (Id, V);
5507 end Set_Is_Eliminated;
5509 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5512 end Set_Is_Entry_Formal;
5514 procedure Set_Is_Entry_Wrapper (Id : E; V : B := True) is
5516 Set_Flag297 (Id, V);
5517 end Set_Is_Entry_Wrapper;
5519 procedure Set_Is_Exception_Handler (Id : E; V : B := True) is
5521 pragma Assert (Ekind (Id) = E_Block);
5522 Set_Flag286 (Id, V);
5523 end Set_Is_Exception_Handler;
5525 procedure Set_Is_Exported (Id : E; V : B := True) is
5528 end Set_Is_Exported;
5530 procedure Set_Is_Finalized_Transient (Id : E; V : B := True) is
5532 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5533 Set_Flag252 (Id, V);
5534 end Set_Is_Finalized_Transient;
5536 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5539 end Set_Is_First_Subtype;
5541 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5543 Set_Flag111 (Id, V);
5544 end Set_Is_Formal_Subprogram;
5546 procedure Set_Is_Frozen (Id : E; V : B := True) is
5548 pragma Assert (Nkind (Id) in N_Entity);
5552 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5554 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5555 Set_Flag274 (Id, V);
5556 end Set_Is_Generic_Actual_Subprogram;
5558 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5560 pragma Assert (Is_Type (Id));
5562 end Set_Is_Generic_Actual_Type;
5564 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5566 Set_Flag130 (Id, V);
5567 end Set_Is_Generic_Instance;
5569 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5571 pragma Assert (Nkind (Id) in N_Entity);
5573 end Set_Is_Generic_Type;
5575 procedure Set_Is_Hidden (Id : E; V : B := True) is
5580 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5582 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5584 end Set_Is_Hidden_Non_Overridden_Subpgm;
5586 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5588 Set_Flag171 (Id, V);
5589 end Set_Is_Hidden_Open_Scope;
5591 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5593 -- Allow this attribute to appear on unanalyzed entities
5595 pragma Assert (Nkind (Id) in N_Entity
5596 or else Ekind (Id) = E_Void);
5597 Set_Flag278 (Id, V);
5598 end Set_Is_Ignored_Ghost_Entity;
5600 procedure Set_Is_Ignored_Transient (Id : E; V : B := True) is
5602 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5603 Set_Flag295 (Id, V);
5604 end Set_Is_Ignored_Transient;
5606 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5608 pragma Assert (Nkind (Id) in N_Entity);
5610 end Set_Is_Immediately_Visible;
5612 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5614 Set_Flag254 (Id, V);
5615 end Set_Is_Implementation_Defined;
5617 procedure Set_Is_Imported (Id : E; V : B := True) is
5620 end Set_Is_Imported;
5622 procedure Set_Is_Independent (Id : E; V : B := True) is
5624 Set_Flag268 (Id, V);
5625 end Set_Is_Independent;
5627 procedure Set_Is_Initial_Condition_Procedure (Id : E; V : B := True) is
5629 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5630 Set_Flag302 (Id, V);
5631 end Set_Is_Initial_Condition_Procedure;
5633 procedure Set_Is_Inlined (Id : E; V : B := True) is
5638 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5640 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5642 end Set_Is_Inlined_Always;
5644 procedure Set_Is_Interface (Id : E; V : B := True) is
5646 pragma Assert (Is_Record_Type (Id));
5647 Set_Flag186 (Id, V);
5648 end Set_Is_Interface;
5650 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5652 Set_Flag126 (Id, V);
5653 end Set_Is_Instantiated;
5655 procedure Set_Is_Internal (Id : E; V : B := True) is
5657 pragma Assert (Nkind (Id) in N_Entity);
5659 end Set_Is_Internal;
5661 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5663 pragma Assert (Nkind (Id) in N_Entity);
5665 end Set_Is_Interrupt_Handler;
5667 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5670 end Set_Is_Intrinsic_Subprogram;
5672 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5674 pragma Assert (Ekind (Id) = E_Procedure);
5675 Set_Flag257 (Id, V);
5676 end Set_Is_Invariant_Procedure;
5678 procedure Set_Is_Itype (Id : E; V : B := True) is
5683 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5686 end Set_Is_Known_Non_Null;
5688 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5690 Set_Flag204 (Id, V);
5691 end Set_Is_Known_Null;
5693 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5695 Set_Flag170 (Id, V);
5696 end Set_Is_Known_Valid;
5698 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5700 pragma Assert (Is_Type (Id));
5701 Set_Flag106 (Id, V);
5702 end Set_Is_Limited_Composite;
5704 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5706 pragma Assert (Is_Interface (Id));
5707 Set_Flag197 (Id, V);
5708 end Set_Is_Limited_Interface;
5710 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5713 end Set_Is_Limited_Record;
5715 procedure Set_Is_Loop_Parameter (Id : E; V : B := True) is
5717 Set_Flag307 (Id, V);
5718 end Set_Is_Loop_Parameter;
5720 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5722 pragma Assert (Is_Subprogram (Id));
5723 Set_Flag137 (Id, V);
5724 end Set_Is_Machine_Code_Subprogram;
5726 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5728 pragma Assert (Is_Type (Id));
5729 Set_Flag109 (Id, V);
5730 end Set_Is_Non_Static_Subtype;
5732 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5734 pragma Assert (Ekind (Id) = E_Procedure);
5735 Set_Flag178 (Id, V);
5736 end Set_Is_Null_Init_Proc;
5738 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5740 Set_Flag153 (Id, V);
5741 end Set_Is_Obsolescent;
5743 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5745 pragma Assert (Ekind (Id) = E_Out_Parameter);
5746 Set_Flag226 (Id, V);
5747 end Set_Is_Only_Out_Parameter;
5749 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5751 Set_Flag160 (Id, V);
5752 end Set_Is_Package_Body_Entity;
5754 procedure Set_Is_Packed (Id : E; V : B := True) is
5756 pragma Assert (Id = Base_Type (Id));
5760 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5762 Set_Flag138 (Id, V);
5763 end Set_Is_Packed_Array_Impl_Type;
5765 procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
5767 pragma Assert (Ekind_In (Id, E_Void, E_General_Access_Type));
5768 Set_Flag215 (Id, V);
5769 end Set_Is_Param_Block_Component_Type;
5771 procedure Set_Is_Partial_Invariant_Procedure (Id : E; V : B := True) is
5773 pragma Assert (Ekind (Id) = E_Procedure);
5774 Set_Flag292 (Id, V);
5775 end Set_Is_Partial_Invariant_Procedure;
5777 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5779 pragma Assert (Nkind (Id) in N_Entity);
5781 end Set_Is_Potentially_Use_Visible;
5783 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5785 pragma Assert (Ekind (Id) = E_Function);
5786 Set_Flag255 (Id, V);
5787 end Set_Is_Predicate_Function;
5789 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5791 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5792 Set_Flag256 (Id, V);
5793 end Set_Is_Predicate_Function_M;
5795 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5798 end Set_Is_Preelaborated;
5800 procedure Set_Is_Primitive (Id : E; V : B := True) is
5803 (Is_Overloadable (Id)
5804 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5805 Set_Flag218 (Id, V);
5806 end Set_Is_Primitive;
5808 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5810 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5811 Set_Flag195 (Id, V);
5812 end Set_Is_Primitive_Wrapper;
5814 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5816 pragma Assert (Is_Type (Id));
5817 Set_Flag107 (Id, V);
5818 end Set_Is_Private_Composite;
5820 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5823 end Set_Is_Private_Descendant;
5825 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5827 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5828 Set_Flag245 (Id, V);
5829 end Set_Is_Private_Primitive;
5831 procedure Set_Is_Public (Id : E; V : B := True) is
5833 pragma Assert (Nkind (Id) in N_Entity);
5837 procedure Set_Is_Pure (Id : E; V : B := True) is
5842 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5844 pragma Assert (Is_Access_Type (Id));
5845 Set_Flag189 (Id, V);
5846 end Set_Is_Pure_Unit_Access_Type;
5848 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5850 pragma Assert (Is_Type (Id));
5851 Set_Flag244 (Id, V);
5852 end Set_Is_RACW_Stub_Type;
5854 procedure Set_Is_Raised (Id : E; V : B := True) is
5856 pragma Assert (Ekind (Id) = E_Exception);
5857 Set_Flag224 (Id, V);
5860 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5863 end Set_Is_Remote_Call_Interface;
5865 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5868 end Set_Is_Remote_Types;
5870 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5872 Set_Flag112 (Id, V);
5873 end Set_Is_Renaming_Of_Object;
5875 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5877 Set_Flag209 (Id, V);
5878 end Set_Is_Return_Object;
5880 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5882 pragma Assert (Ekind (Id) = E_Variable);
5883 Set_Flag249 (Id, V);
5884 end Set_Is_Safe_To_Reevaluate;
5886 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5889 end Set_Is_Shared_Passive;
5891 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5893 pragma Assert (Is_Type (Id));
5894 Set_Flag281 (Id, V);
5895 end Set_Is_Static_Type;
5897 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5901 or else Ekind_In (Id, E_Exception,
5906 end Set_Is_Statically_Allocated;
5908 procedure Set_Is_Tag (Id : E; V : B := True) is
5910 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5914 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5917 end Set_Is_Tagged_Type;
5919 procedure Set_Is_Thunk (Id : E; V : B := True) is
5921 pragma Assert (Is_Subprogram (Id));
5922 Set_Flag225 (Id, V);
5925 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5927 Set_Flag235 (Id, V);
5928 end Set_Is_Trivial_Subprogram;
5930 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5932 Set_Flag163 (Id, V);
5933 end Set_Is_True_Constant;
5935 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5937 pragma Assert (Id = Base_Type (Id));
5938 Set_Flag117 (Id, V);
5939 end Set_Is_Unchecked_Union;
5941 procedure Set_Is_Underlying_Full_View (Id : E; V : B := True) is
5943 pragma Assert (Is_Type (Id));
5944 Set_Flag298 (Id, V);
5945 end Set_Is_Underlying_Full_View;
5947 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5949 pragma Assert (Ekind (Id) = E_Record_Type);
5950 Set_Flag246 (Id, V);
5951 end Set_Is_Underlying_Record_View;
5953 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5955 Set_Flag284 (Id, V);
5956 end Set_Is_Unimplemented;
5958 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5960 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5961 Set_Flag144 (Id, V);
5962 end Set_Is_Unsigned_Type;
5964 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5967 (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable)
5968 or else Is_Formal (Id)
5969 or else Is_Type (Id));
5970 Set_Flag283 (Id, V);
5971 end Set_Is_Uplevel_Referenced_Entity;
5973 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5975 pragma Assert (Ekind (Id) = E_Procedure);
5976 Set_Flag127 (Id, V);
5977 end Set_Is_Valued_Procedure;
5979 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5981 Set_Flag206 (Id, V);
5982 end Set_Is_Visible_Formal;
5984 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5986 Set_Flag116 (Id, V);
5987 end Set_Is_Visible_Lib_Unit;
5989 procedure Set_Is_Volatile (Id : E; V : B := True) is
5991 pragma Assert (Nkind (Id) in N_Entity);
5993 end Set_Is_Volatile;
5995 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
5997 Set_Flag285 (Id, V);
5998 end Set_Is_Volatile_Full_Access;
6000 procedure Set_Itype_Printed (Id : E; V : B := True) is
6002 pragma Assert (Is_Itype (Id));
6003 Set_Flag202 (Id, V);
6004 end Set_Itype_Printed;
6006 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
6009 end Set_Kill_Elaboration_Checks;
6011 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
6014 end Set_Kill_Range_Checks;
6016 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
6018 pragma Assert (Is_Type (Id));
6019 Set_Flag207 (Id, V);
6020 end Set_Known_To_Have_Preelab_Init;
6022 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
6024 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6026 end Set_Last_Aggregate_Assignment;
6028 procedure Set_Last_Assignment (Id : E; V : N) is
6030 pragma Assert (Is_Assignable (Id));
6032 end Set_Last_Assignment;
6034 procedure Set_Last_Entity (Id : E; V : E) is
6037 end Set_Last_Entity;
6039 procedure Set_Limited_View (Id : E; V : E) is
6041 pragma Assert (Ekind (Id) = E_Package);
6043 end Set_Limited_View;
6045 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
6048 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
6050 end Set_Linker_Section_Pragma;
6052 procedure Set_Lit_Indexes (Id : E; V : E) is
6054 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6056 end Set_Lit_Indexes;
6058 procedure Set_Lit_Strings (Id : E; V : E) is
6060 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6062 end Set_Lit_Strings;
6064 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
6066 pragma Assert (Is_Formal (Id));
6067 Set_Flag205 (Id, V);
6068 end Set_Low_Bound_Tested;
6070 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
6072 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
6074 end Set_Machine_Radix_10;
6076 procedure Set_Master_Id (Id : E; V : E) is
6078 pragma Assert (Is_Access_Type (Id));
6082 procedure Set_Materialize_Entity (Id : E; V : B := True) is
6084 Set_Flag168 (Id, V);
6085 end Set_Materialize_Entity;
6087 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
6089 Set_Flag262 (Id, V);
6090 end Set_May_Inherit_Delayed_Rep_Aspects;
6092 procedure Set_Mechanism (Id : E; V : M) is
6094 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
6095 Set_Uint8 (Id, UI_From_Int (V));
6098 procedure Set_Minimum_Accessibility (Id : E; V : E) is
6100 pragma Assert (Ekind (Id) in Formal_Kind);
6102 end Set_Minimum_Accessibility;
6104 procedure Set_Modulus (Id : E; V : U) is
6106 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
6110 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
6112 pragma Assert (Is_Type (Id));
6113 Set_Flag183 (Id, V);
6114 end Set_Must_Be_On_Byte_Boundary;
6116 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
6118 pragma Assert (Is_Type (Id));
6119 Set_Flag208 (Id, V);
6120 end Set_Must_Have_Preelab_Init;
6122 procedure Set_Needs_Activation_Record (Id : E; V : B := True) is
6124 Set_Flag306 (Id, V);
6125 end Set_Needs_Activation_Record;
6127 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
6129 Set_Flag147 (Id, V);
6130 end Set_Needs_Debug_Info;
6132 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
6135 (Is_Overloadable (Id)
6136 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
6138 end Set_Needs_No_Actuals;
6140 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
6142 Set_Flag115 (Id, V);
6143 end Set_Never_Set_In_Source;
6145 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
6148 end Set_Next_Inlined_Subprogram;
6150 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
6152 pragma Assert (Is_Discrete_Type (Id));
6153 Set_Flag276 (Id, V);
6154 end Set_No_Dynamic_Predicate_On_Actual;
6156 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
6158 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6159 Set_Flag131 (Id, V);
6160 end Set_No_Pool_Assigned;
6162 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
6164 pragma Assert (Is_Discrete_Type (Id));
6165 Set_Flag275 (Id, V);
6166 end Set_No_Predicate_On_Actual;
6168 procedure Set_No_Reordering (Id : E; V : B := True) is
6170 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
6171 Set_Flag239 (Id, V);
6172 end Set_No_Reordering;
6174 procedure Set_No_Return (Id : E; V : B := True) is
6177 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
6178 Set_Flag113 (Id, V);
6181 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
6183 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6184 Set_Flag136 (Id, V);
6185 end Set_No_Strict_Aliasing;
6187 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
6189 pragma Assert (Is_Tagged_Type (Id));
6191 end Set_No_Tagged_Streams_Pragma;
6193 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
6195 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6197 end Set_Non_Binary_Modulus;
6199 procedure Set_Non_Limited_View (Id : E; V : E) is
6202 (Ekind (Id) in Incomplete_Kind
6203 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
6205 end Set_Non_Limited_View;
6207 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
6210 (Root_Type (Id) = Standard_Boolean
6211 and then Ekind (Id) = E_Enumeration_Type);
6212 Set_Flag162 (Id, V);
6213 end Set_Nonzero_Is_True;
6215 procedure Set_Normalized_First_Bit (Id : E; V : U) is
6217 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6219 end Set_Normalized_First_Bit;
6221 procedure Set_Normalized_Position (Id : E; V : U) is
6223 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6225 end Set_Normalized_Position;
6227 procedure Set_Normalized_Position_Max (Id : E; V : U) is
6229 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6231 end Set_Normalized_Position_Max;
6233 procedure Set_OK_To_Rename (Id : E; V : B := True) is
6235 pragma Assert (Ekind (Id) = E_Variable);
6236 Set_Flag247 (Id, V);
6237 end Set_OK_To_Rename;
6239 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
6242 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
6243 Set_Flag241 (Id, V);
6244 end Set_Optimize_Alignment_Space;
6246 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
6249 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
6250 Set_Flag242 (Id, V);
6251 end Set_Optimize_Alignment_Time;
6253 procedure Set_Original_Access_Type (Id : E; V : E) is
6255 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
6257 end Set_Original_Access_Type;
6259 procedure Set_Original_Array_Type (Id : E; V : E) is
6261 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
6263 end Set_Original_Array_Type;
6265 procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
6267 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6269 end Set_Original_Protected_Subprogram;
6271 procedure Set_Original_Record_Component (Id : E; V : E) is
6273 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
6275 end Set_Original_Record_Component;
6277 procedure Set_Overlays_Constant (Id : E; V : B := True) is
6279 Set_Flag243 (Id, V);
6280 end Set_Overlays_Constant;
6282 procedure Set_Overridden_Operation (Id : E; V : E) is
6284 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
6286 end Set_Overridden_Operation;
6288 procedure Set_Package_Instantiation (Id : E; V : N) is
6290 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
6292 end Set_Package_Instantiation;
6294 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
6296 pragma Assert (Is_Array_Type (Id));
6298 end Set_Packed_Array_Impl_Type;
6300 procedure Set_Parent_Subtype (Id : E; V : E) is
6302 pragma Assert (Ekind (Id) = E_Record_Type);
6304 end Set_Parent_Subtype;
6306 procedure Set_Part_Of_Constituents (Id : E; V : L) is
6308 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
6309 Set_Elist10 (Id, V);
6310 end Set_Part_Of_Constituents;
6312 procedure Set_Part_Of_References (Id : E; V : L) is
6314 pragma Assert (Ekind (Id) = E_Variable);
6315 Set_Elist11 (Id, V);
6316 end Set_Part_Of_References;
6318 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
6320 pragma Assert (Is_Type (Id));
6321 Set_Flag280 (Id, V);
6322 end Set_Partial_View_Has_Unknown_Discr;
6324 procedure Set_Pending_Access_Types (Id : E; V : L) is
6326 pragma Assert (Is_Type (Id));
6327 Set_Elist15 (Id, V);
6328 end Set_Pending_Access_Types;
6330 procedure Set_Postconditions_Proc (Id : E; V : E) is
6332 pragma Assert (Ekind_In (Id, E_Entry,
6337 end Set_Postconditions_Proc;
6339 procedure Set_Predicated_Parent (Id : E; V : E) is
6341 pragma Assert (Ekind_In (Id, E_Array_Subtype,
6343 E_Record_Subtype_With_Private));
6345 end Set_Predicated_Parent;
6347 procedure Set_Predicates_Ignored (Id : E; V : B) is
6349 pragma Assert (Is_Type (Id));
6350 Set_Flag288 (Id, V);
6351 end Set_Predicates_Ignored;
6353 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
6355 pragma Assert (Is_Tagged_Type (Id));
6356 Set_Elist10 (Id, V);
6357 end Set_Direct_Primitive_Operations;
6359 procedure Set_Prival (Id : E; V : E) is
6361 pragma Assert (Is_Protected_Component (Id));
6365 procedure Set_Prival_Link (Id : E; V : E) is
6367 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6369 end Set_Prival_Link;
6371 procedure Set_Private_Dependents (Id : E; V : L) is
6373 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
6374 Set_Elist18 (Id, V);
6375 end Set_Private_Dependents;
6377 procedure Set_Prev_Entity (Id : E; V : E) is
6380 end Set_Prev_Entity;
6382 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
6384 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
6386 end Set_Protected_Body_Subprogram;
6388 procedure Set_Protected_Formal (Id : E; V : E) is
6390 pragma Assert (Is_Formal (Id));
6392 end Set_Protected_Formal;
6394 procedure Set_Protected_Subprogram (Id : E; V : E) is
6396 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6398 end Set_Protected_Subprogram;
6400 procedure Set_Protection_Object (Id : E; V : E) is
6402 pragma Assert (Ekind_In (Id, E_Entry,
6407 end Set_Protection_Object;
6409 procedure Set_Reachable (Id : E; V : B := True) is
6414 procedure Set_Receiving_Entry (Id : E; V : E) is
6416 pragma Assert (Ekind (Id) = E_Procedure);
6418 end Set_Receiving_Entry;
6420 procedure Set_Referenced (Id : E; V : B := True) is
6422 Set_Flag156 (Id, V);
6425 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
6428 end Set_Referenced_As_LHS;
6430 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
6432 Set_Flag227 (Id, V);
6433 end Set_Referenced_As_Out_Parameter;
6435 procedure Set_Refinement_Constituents (Id : E; V : L) is
6437 pragma Assert (Ekind (Id) = E_Abstract_State);
6439 end Set_Refinement_Constituents;
6441 procedure Set_Register_Exception_Call (Id : E; V : N) is
6443 pragma Assert (Ekind (Id) = E_Exception);
6445 end Set_Register_Exception_Call;
6447 procedure Set_Related_Array_Object (Id : E; V : E) is
6449 pragma Assert (Is_Array_Type (Id));
6451 end Set_Related_Array_Object;
6453 procedure Set_Related_Expression (Id : E; V : N) is
6455 pragma Assert (Ekind (Id) in Type_Kind
6456 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
6458 end Set_Related_Expression;
6460 procedure Set_Related_Instance (Id : E; V : E) is
6462 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
6464 end Set_Related_Instance;
6466 procedure Set_Related_Type (Id : E; V : E) is
6468 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
6470 end Set_Related_Type;
6472 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
6474 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
6476 end Set_Relative_Deadline_Variable;
6478 procedure Set_Renamed_Entity (Id : E; V : N) is
6481 end Set_Renamed_Entity;
6483 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
6485 pragma Assert (Ekind (Id) = E_Package);
6486 Set_Flag231 (Id, V);
6487 end Set_Renamed_In_Spec;
6489 procedure Set_Renamed_Object (Id : E; V : N) is
6492 end Set_Renamed_Object;
6494 procedure Set_Renaming_Map (Id : E; V : U) is
6497 end Set_Renaming_Map;
6499 procedure Set_Requires_Overriding (Id : E; V : B := True) is
6501 pragma Assert (Is_Overloadable (Id));
6502 Set_Flag213 (Id, V);
6503 end Set_Requires_Overriding;
6505 procedure Set_Return_Present (Id : E; V : B := True) is
6508 end Set_Return_Present;
6510 procedure Set_Return_Applies_To (Id : E; V : N) is
6513 end Set_Return_Applies_To;
6515 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
6518 end Set_Returns_By_Ref;
6520 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6523 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6524 Set_Flag164 (Id, V);
6525 end Set_Reverse_Bit_Order;
6527 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6531 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6533 end Set_Reverse_Storage_Order;
6535 procedure Set_Rewritten_For_C (Id : E; V : B := True) is
6537 pragma Assert (Ekind (Id) = E_Function);
6538 Set_Flag287 (Id, V);
6539 end Set_Rewritten_For_C;
6541 procedure Set_RM_Size (Id : E; V : U) is
6543 pragma Assert (Is_Type (Id));
6547 procedure Set_Scalar_Range (Id : E; V : N) is
6550 end Set_Scalar_Range;
6552 procedure Set_Scale_Value (Id : E; V : U) is
6555 end Set_Scale_Value;
6557 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6559 pragma Assert (not Is_Record_Type (Id));
6561 end Set_Scope_Depth_Value;
6563 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6565 Set_Flag167 (Id, V);
6566 end Set_Sec_Stack_Needed_For_Return;
6568 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6570 pragma Assert (Ekind (Id) = E_Variable);
6572 end Set_Shared_Var_Procs_Instance;
6574 procedure Set_Size_Check_Code (Id : E; V : N) is
6576 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6578 end Set_Size_Check_Code;
6580 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6582 Set_Flag177 (Id, V);
6583 end Set_Size_Depends_On_Discriminant;
6585 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6588 end Set_Size_Known_At_Compile_Time;
6590 procedure Set_Small_Value (Id : E; V : R) is
6592 pragma Assert (Is_Fixed_Point_Type (Id));
6593 Set_Ureal21 (Id, V);
6594 end Set_Small_Value;
6596 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6599 (Ekind_In (Id, E_Protected_Type, -- concurrent types
6602 Ekind_In (Id, E_Generic_Package, -- packages
6606 end Set_SPARK_Aux_Pragma;
6608 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6611 (Ekind_In (Id, E_Protected_Type, -- concurrent types
6614 Ekind_In (Id, E_Generic_Package, -- packages
6617 Set_Flag266 (Id, V);
6618 end Set_SPARK_Aux_Pragma_Inherited;
6620 procedure Set_SPARK_Pragma (Id : E; V : N) is
6623 (Ekind_In (Id, E_Constant, -- objects
6626 Ekind_In (Id, E_Abstract_State, -- overloadable
6631 E_Generic_Procedure,
6636 Ekind_In (Id, E_Generic_Package, -- packages
6640 Ekind (Id) = E_Void -- special purpose
6642 Ekind_In (Id, E_Protected_Body, -- types
6647 end Set_SPARK_Pragma;
6649 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6652 (Ekind_In (Id, E_Constant, -- objects
6655 Ekind_In (Id, E_Abstract_State, -- overloadable
6660 E_Generic_Procedure,
6665 Ekind_In (Id, E_Generic_Package, -- packages
6669 Ekind (Id) = E_Void -- special purpose
6671 Ekind_In (Id, E_Protected_Body, -- types
6675 Set_Flag265 (Id, V);
6676 end Set_SPARK_Pragma_Inherited;
6678 procedure Set_Spec_Entity (Id : E; V : E) is
6680 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6682 end Set_Spec_Entity;
6684 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6688 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6689 Set_Flag273 (Id, V);
6690 end Set_SSO_Set_High_By_Default;
6692 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6696 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6697 Set_Flag272 (Id, V);
6698 end Set_SSO_Set_Low_By_Default;
6700 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6702 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6704 end Set_Static_Discrete_Predicate;
6706 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6708 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6709 and then Has_Predicates (Id));
6711 end Set_Static_Real_Or_String_Predicate;
6713 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6715 pragma Assert (Ekind_In (Id, E_Constant,
6719 end Set_Status_Flag_Or_Transient_Decl;
6721 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6723 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6724 pragma Assert (Id = Base_Type (Id));
6726 end Set_Storage_Size_Variable;
6728 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6730 pragma Assert (Ekind (Id) = E_Package);
6732 end Set_Static_Elaboration_Desired;
6734 procedure Set_Static_Initialization (Id : E; V : N) is
6737 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6739 end Set_Static_Initialization;
6741 procedure Set_Stored_Constraint (Id : E; V : L) is
6743 pragma Assert (Nkind (Id) in N_Entity);
6744 Set_Elist23 (Id, V);
6745 end Set_Stored_Constraint;
6747 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6749 pragma Assert (Ekind (Id) = E_Constant);
6750 Set_Flag270 (Id, V);
6751 end Set_Stores_Attribute_Old_Prefix;
6753 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6755 pragma Assert (Id = Base_Type (Id));
6756 Set_Flag145 (Id, V);
6757 end Set_Strict_Alignment;
6759 procedure Set_String_Literal_Length (Id : E; V : U) is
6761 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6763 end Set_String_Literal_Length;
6765 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6767 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6769 end Set_String_Literal_Low_Bound;
6771 procedure Set_Subprograms_For_Type (Id : E; V : L) is
6773 pragma Assert (Is_Type (Id));
6774 Set_Elist29 (Id, V);
6775 end Set_Subprograms_For_Type;
6777 procedure Set_Subps_Index (Id : E; V : U) is
6779 pragma Assert (Is_Subprogram (Id));
6781 end Set_Subps_Index;
6783 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6785 Set_Flag303 (Id, V);
6786 end Set_Suppress_Elaboration_Warnings;
6788 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6790 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6791 Set_Flag105 (Id, V);
6792 end Set_Suppress_Initialization;
6794 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6796 Set_Flag165 (Id, V);
6797 end Set_Suppress_Style_Checks;
6799 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6801 Set_Flag217 (Id, V);
6802 end Set_Suppress_Value_Tracking_On_Call;
6804 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6806 pragma Assert (Ekind (Id) in Task_Kind);
6808 end Set_Task_Body_Procedure;
6810 procedure Set_Thunk_Entity (Id : E; V : E) is
6812 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6813 and then Is_Thunk (Id));
6815 end Set_Thunk_Entity;
6817 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6820 end Set_Treat_As_Volatile;
6822 procedure Set_Underlying_Full_View (Id : E; V : E) is
6824 pragma Assert (Ekind (Id) in Private_Kind);
6826 end Set_Underlying_Full_View;
6828 procedure Set_Underlying_Record_View (Id : E; V : E) is
6830 pragma Assert (Ekind (Id) = E_Record_Type);
6832 end Set_Underlying_Record_View;
6834 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6836 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6837 Set_Flag216 (Id, V);
6838 end Set_Universal_Aliasing;
6840 procedure Set_Unset_Reference (Id : E; V : N) is
6843 end Set_Unset_Reference;
6845 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6847 Set_Flag222 (Id, V);
6848 end Set_Used_As_Generic_Actual;
6850 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6852 pragma Assert (Ekind (Id) = E_Protected_Type);
6853 Set_Flag188 (Id, V);
6854 end Set_Uses_Lock_Free;
6856 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6859 end Set_Uses_Sec_Stack;
6861 procedure Set_Validated_Object (Id : E; V : N) is
6863 pragma Assert (Ekind (Id) = E_Variable);
6865 end Set_Validated_Object;
6867 procedure Set_Warnings_Off (Id : E; V : B := True) is
6870 end Set_Warnings_Off;
6872 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6874 Set_Flag236 (Id, V);
6875 end Set_Warnings_Off_Used;
6877 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6879 Set_Flag237 (Id, V);
6880 end Set_Warnings_Off_Used_Unmodified;
6882 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6884 Set_Flag238 (Id, V);
6885 end Set_Warnings_Off_Used_Unreferenced;
6887 procedure Set_Was_Hidden (Id : E; V : B := True) is
6889 Set_Flag196 (Id, V);
6892 procedure Set_Wrapped_Entity (Id : E; V : E) is
6894 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6895 and then Is_Primitive_Wrapper (Id));
6897 end Set_Wrapped_Entity;
6899 -----------------------------------
6900 -- Field Initialization Routines --
6901 -----------------------------------
6903 procedure Init_Alignment (Id : E) is
6905 Set_Uint14 (Id, Uint_0);
6908 procedure Init_Alignment (Id : E; V : Int) is
6910 Set_Uint14 (Id, UI_From_Int (V));
6913 procedure Init_Component_Bit_Offset (Id : E) is
6915 Set_Uint11 (Id, No_Uint);
6916 end Init_Component_Bit_Offset;
6918 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6920 Set_Uint11 (Id, UI_From_Int (V));
6921 end Init_Component_Bit_Offset;
6923 procedure Init_Component_Size (Id : E) is
6925 Set_Uint22 (Id, Uint_0);
6926 end Init_Component_Size;
6928 procedure Init_Component_Size (Id : E; V : Int) is
6930 Set_Uint22 (Id, UI_From_Int (V));
6931 end Init_Component_Size;
6933 procedure Init_Digits_Value (Id : E) is
6935 Set_Uint17 (Id, Uint_0);
6936 end Init_Digits_Value;
6938 procedure Init_Digits_Value (Id : E; V : Int) is
6940 Set_Uint17 (Id, UI_From_Int (V));
6941 end Init_Digits_Value;
6943 procedure Init_Esize (Id : E) is
6945 Set_Uint12 (Id, Uint_0);
6948 procedure Init_Esize (Id : E; V : Int) is
6950 Set_Uint12 (Id, UI_From_Int (V));
6953 procedure Init_Normalized_First_Bit (Id : E) is
6955 Set_Uint8 (Id, No_Uint);
6956 end Init_Normalized_First_Bit;
6958 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6960 Set_Uint8 (Id, UI_From_Int (V));
6961 end Init_Normalized_First_Bit;
6963 procedure Init_Normalized_Position (Id : E) is
6965 Set_Uint14 (Id, No_Uint);
6966 end Init_Normalized_Position;
6968 procedure Init_Normalized_Position (Id : E; V : Int) is
6970 Set_Uint14 (Id, UI_From_Int (V));
6971 end Init_Normalized_Position;
6973 procedure Init_Normalized_Position_Max (Id : E) is
6975 Set_Uint10 (Id, No_Uint);
6976 end Init_Normalized_Position_Max;
6978 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6980 Set_Uint10 (Id, UI_From_Int (V));
6981 end Init_Normalized_Position_Max;
6983 procedure Init_RM_Size (Id : E) is
6985 Set_Uint13 (Id, Uint_0);
6988 procedure Init_RM_Size (Id : E; V : Int) is
6990 Set_Uint13 (Id, UI_From_Int (V));
6993 -----------------------------
6994 -- Init_Component_Location --
6995 -----------------------------
6997 procedure Init_Component_Location (Id : E) is
6999 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
7000 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
7001 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
7002 Set_Uint12 (Id, Uint_0); -- Esize
7003 Set_Uint14 (Id, No_Uint); -- Normalized_Position
7004 end Init_Component_Location;
7006 ----------------------------
7007 -- Init_Object_Size_Align --
7008 ----------------------------
7010 procedure Init_Object_Size_Align (Id : E) is
7012 Set_Uint12 (Id, Uint_0); -- Esize
7013 Set_Uint14 (Id, Uint_0); -- Alignment
7014 end Init_Object_Size_Align;
7020 procedure Init_Size (Id : E; V : Int) is
7022 pragma Assert (not Is_Object (Id));
7023 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
7024 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
7027 ---------------------
7028 -- Init_Size_Align --
7029 ---------------------
7031 procedure Init_Size_Align (Id : E) is
7033 pragma Assert (not Is_Object (Id));
7034 Set_Uint12 (Id, Uint_0); -- Esize
7035 Set_Uint13 (Id, Uint_0); -- RM_Size
7036 Set_Uint14 (Id, Uint_0); -- Alignment
7037 end Init_Size_Align;
7039 ----------------------------------------------
7040 -- Type Representation Attribute Predicates --
7041 ----------------------------------------------
7043 function Known_Alignment (E : Entity_Id) return B is
7045 return Uint14 (E) /= Uint_0
7046 and then Uint14 (E) /= No_Uint;
7047 end Known_Alignment;
7049 function Known_Component_Bit_Offset (E : Entity_Id) return B is
7051 return Uint11 (E) /= No_Uint;
7052 end Known_Component_Bit_Offset;
7054 function Known_Component_Size (E : Entity_Id) return B is
7056 return Uint22 (Base_Type (E)) /= Uint_0
7057 and then Uint22 (Base_Type (E)) /= No_Uint;
7058 end Known_Component_Size;
7060 function Known_Esize (E : Entity_Id) return B is
7062 return Uint12 (E) /= Uint_0
7063 and then Uint12 (E) /= No_Uint;
7066 function Known_Normalized_First_Bit (E : Entity_Id) return B is
7068 return Uint8 (E) /= No_Uint;
7069 end Known_Normalized_First_Bit;
7071 function Known_Normalized_Position (E : Entity_Id) return B is
7073 return Uint14 (E) /= No_Uint;
7074 end Known_Normalized_Position;
7076 function Known_Normalized_Position_Max (E : Entity_Id) return B is
7078 return Uint10 (E) /= No_Uint;
7079 end Known_Normalized_Position_Max;
7081 function Known_RM_Size (E : Entity_Id) return B is
7083 return Uint13 (E) /= No_Uint
7084 and then (Uint13 (E) /= Uint_0
7085 or else Is_Discrete_Type (E)
7086 or else Is_Fixed_Point_Type (E));
7089 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
7091 return Uint11 (E) /= No_Uint
7092 and then Uint11 (E) >= Uint_0;
7093 end Known_Static_Component_Bit_Offset;
7095 function Known_Static_Component_Size (E : Entity_Id) return B is
7097 return Uint22 (Base_Type (E)) > Uint_0;
7098 end Known_Static_Component_Size;
7100 function Known_Static_Esize (E : Entity_Id) return B is
7102 return Uint12 (E) > Uint_0
7103 and then not Is_Generic_Type (E);
7104 end Known_Static_Esize;
7106 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
7108 return Uint8 (E) /= No_Uint
7109 and then Uint8 (E) >= Uint_0;
7110 end Known_Static_Normalized_First_Bit;
7112 function Known_Static_Normalized_Position (E : Entity_Id) return B is
7114 return Uint14 (E) /= No_Uint
7115 and then Uint14 (E) >= Uint_0;
7116 end Known_Static_Normalized_Position;
7118 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
7120 return Uint10 (E) /= No_Uint
7121 and then Uint10 (E) >= Uint_0;
7122 end Known_Static_Normalized_Position_Max;
7124 function Known_Static_RM_Size (E : Entity_Id) return B is
7126 return (Uint13 (E) > Uint_0
7127 or else Is_Discrete_Type (E)
7128 or else Is_Fixed_Point_Type (E))
7129 and then not Is_Generic_Type (E);
7130 end Known_Static_RM_Size;
7132 function Unknown_Alignment (E : Entity_Id) return B is
7134 return Uint14 (E) = Uint_0
7135 or else Uint14 (E) = No_Uint;
7136 end Unknown_Alignment;
7138 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
7140 return Uint11 (E) = No_Uint;
7141 end Unknown_Component_Bit_Offset;
7143 function Unknown_Component_Size (E : Entity_Id) return B is
7145 return Uint22 (Base_Type (E)) = Uint_0
7147 Uint22 (Base_Type (E)) = No_Uint;
7148 end Unknown_Component_Size;
7150 function Unknown_Esize (E : Entity_Id) return B is
7152 return Uint12 (E) = No_Uint
7154 Uint12 (E) = Uint_0;
7157 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
7159 return Uint8 (E) = No_Uint;
7160 end Unknown_Normalized_First_Bit;
7162 function Unknown_Normalized_Position (E : Entity_Id) return B is
7164 return Uint14 (E) = No_Uint;
7165 end Unknown_Normalized_Position;
7167 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
7169 return Uint10 (E) = No_Uint;
7170 end Unknown_Normalized_Position_Max;
7172 function Unknown_RM_Size (E : Entity_Id) return B is
7174 return (Uint13 (E) = Uint_0
7175 and then not Is_Discrete_Type (E)
7176 and then not Is_Fixed_Point_Type (E))
7177 or else Uint13 (E) = No_Uint;
7178 end Unknown_RM_Size;
7180 --------------------
7181 -- Address_Clause --
7182 --------------------
7184 function Address_Clause (Id : E) return N is
7186 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
7193 function Aft_Value (Id : E) return U is
7195 Delta_Val : Ureal := Delta_Value (Id);
7197 while Delta_Val < Ureal_Tenth loop
7198 Delta_Val := Delta_Val * Ureal_10;
7199 Result := Result + 1;
7202 return UI_From_Int (Result);
7205 ----------------------
7206 -- Alignment_Clause --
7207 ----------------------
7209 function Alignment_Clause (Id : E) return N is
7211 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
7212 end Alignment_Clause;
7218 procedure Append_Entity (Id : Entity_Id; Scop : Entity_Id) is
7219 Last : constant Entity_Id := Last_Entity (Scop);
7222 Set_Scope (Id, Scop);
7223 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
7225 -- The entity chain is empty
7228 Set_First_Entity (Scop, Id);
7230 -- Otherwise the entity chain has at least one element
7233 Link_Entities (Last, Id); -- Last <-- Id, Last --> Id
7236 -- NOTE: The setting of the Next_Entity attribute of Id must happen
7237 -- here as opposed to at the beginning of the routine because doing
7238 -- so causes the binder to hang. It is not clear why ???
7240 Set_Next_Entity (Id, Empty); -- Id --> Empty
7242 Set_Last_Entity (Scop, Id);
7249 function Base_Type (Id : E) return E is
7251 if Is_Base_Type (Id) then
7254 pragma Assert (Is_Type (Id));
7259 -------------------------
7260 -- Component_Alignment --
7261 -------------------------
7263 -- Component Alignment is encoded using two flags, Flag128/129 as
7264 -- follows. Note that both flags False = Align_Default, so that the
7265 -- default initialization of flags to False initializes component
7266 -- alignment to the default value as required.
7268 -- Flag128 Flag129 Value
7269 -- ------- ------- -----
7270 -- False False Calign_Default
7271 -- False True Calign_Component_Size
7272 -- True False Calign_Component_Size_4
7273 -- True True Calign_Storage_Unit
7275 function Component_Alignment (Id : E) return C is
7276 BT : constant Node_Id := Base_Type (Id);
7279 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
7281 if Flag128 (BT) then
7282 if Flag129 (BT) then
7283 return Calign_Storage_Unit;
7285 return Calign_Component_Size_4;
7289 if Flag129 (BT) then
7290 return Calign_Component_Size;
7292 return Calign_Default;
7295 end Component_Alignment;
7297 ----------------------
7298 -- Declaration_Node --
7299 ----------------------
7301 function Declaration_Node (Id : E) return N is
7305 if Ekind (Id) = E_Incomplete_Type
7306 and then Present (Full_View (Id))
7308 P := Parent (Full_View (Id));
7314 if Nkind_In (P, N_Selected_Component, N_Expanded_Name)
7315 or else (Nkind (P) = N_Defining_Program_Unit_Name
7316 and then Is_Child_Unit (Id))
7323 end Declaration_Node;
7325 ---------------------
7326 -- Designated_Type --
7327 ---------------------
7329 function Designated_Type (Id : E) return E is
7333 Desig_Type := Directly_Designated_Type (Id);
7335 if Is_Incomplete_Type (Desig_Type)
7336 and then Present (Full_View (Desig_Type))
7338 return Full_View (Desig_Type);
7340 elsif Is_Class_Wide_Type (Desig_Type)
7341 and then Is_Incomplete_Type (Etype (Desig_Type))
7342 and then Present (Full_View (Etype (Desig_Type)))
7343 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
7345 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
7350 end Designated_Type;
7356 function DIC_Procedure (Id : E) return E is
7357 Subp_Elmt : Elmt_Id;
7358 Subp_Id : Entity_Id;
7362 pragma Assert (Is_Type (Id));
7364 Subps := Subprograms_For_Type (Base_Type (Id));
7366 if Present (Subps) then
7367 Subp_Elmt := First_Elmt (Subps);
7368 while Present (Subp_Elmt) loop
7369 Subp_Id := Node (Subp_Elmt);
7371 if Is_DIC_Procedure (Subp_Id) then
7375 Next_Elmt (Subp_Elmt);
7382 ----------------------
7383 -- Entry_Index_Type --
7384 ----------------------
7386 function Entry_Index_Type (Id : E) return N is
7388 pragma Assert (Ekind (Id) = E_Entry_Family);
7389 return Etype (Discrete_Subtype_Definition (Parent (Id)));
7390 end Entry_Index_Type;
7392 ---------------------
7393 -- First_Component --
7394 ---------------------
7396 function First_Component (Id : E) return E is
7401 (Is_Concurrent_Type (Id)
7402 or else Is_Incomplete_Or_Private_Type (Id)
7403 or else Is_Record_Type (Id));
7405 Comp_Id := First_Entity (Id);
7406 while Present (Comp_Id) loop
7407 exit when Ekind (Comp_Id) = E_Component;
7408 Next_Entity (Comp_Id);
7412 end First_Component;
7414 -------------------------------------
7415 -- First_Component_Or_Discriminant --
7416 -------------------------------------
7418 function First_Component_Or_Discriminant (Id : E) return E is
7423 (Is_Concurrent_Type (Id)
7424 or else Is_Incomplete_Or_Private_Type (Id)
7425 or else Is_Record_Type (Id)
7426 or else Has_Discriminants (Id));
7428 Comp_Id := First_Entity (Id);
7429 while Present (Comp_Id) loop
7430 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7431 Next_Entity (Comp_Id);
7435 end First_Component_Or_Discriminant;
7441 function First_Formal (Id : E) return E is
7446 (Is_Generic_Subprogram (Id)
7447 or else Is_Overloadable (Id)
7448 or else Ekind_In (Id, E_Entry_Family,
7450 E_Subprogram_Type));
7452 if Ekind (Id) = E_Enumeration_Literal then
7456 Formal := First_Entity (Id);
7458 -- Deal with the common, non-generic case first
7460 if No (Formal) or else Is_Formal (Formal) then
7464 -- The first/next entity chain of a generic subprogram contains all
7465 -- generic formal parameters, followed by the formal parameters.
7467 if Is_Generic_Subprogram (Id) then
7468 while Present (Formal) and then not Is_Formal (Formal) loop
7469 Next_Entity (Formal);
7478 ------------------------------
7479 -- First_Formal_With_Extras --
7480 ------------------------------
7482 function First_Formal_With_Extras (Id : E) return E is
7487 (Is_Generic_Subprogram (Id)
7488 or else Is_Overloadable (Id)
7489 or else Ekind_In (Id, E_Entry_Family,
7491 E_Subprogram_Type));
7493 if Ekind (Id) = E_Enumeration_Literal then
7497 Formal := First_Entity (Id);
7499 -- The first/next entity chain of a generic subprogram contains all
7500 -- generic formal parameters, followed by the formal parameters. Go
7501 -- directly to the parameters by skipping the formal part.
7503 if Is_Generic_Subprogram (Id) then
7504 while Present (Formal) and then not Is_Formal (Formal) loop
7505 Next_Entity (Formal);
7509 if Present (Formal) and then Is_Formal (Formal) then
7512 return Extra_Formals (Id); -- Empty if no extra formals
7515 end First_Formal_With_Extras;
7517 -------------------------------------
7518 -- Get_Attribute_Definition_Clause --
7519 -------------------------------------
7521 function Get_Attribute_Definition_Clause
7523 Id : Attribute_Id) return Node_Id
7528 N := First_Rep_Item (E);
7529 while Present (N) loop
7530 if Nkind (N) = N_Attribute_Definition_Clause
7531 and then Get_Attribute_Id (Chars (N)) = Id
7540 end Get_Attribute_Definition_Clause;
7542 ---------------------------
7543 -- Get_Class_Wide_Pragma --
7544 ---------------------------
7546 function Get_Class_Wide_Pragma
7548 Id : Pragma_Id) return Node_Id
7554 Items := Contract (E);
7560 Item := Pre_Post_Conditions (Items);
7561 while Present (Item) loop
7562 if Nkind (Item) = N_Pragma
7563 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7564 and then Class_Present (Item)
7569 Item := Next_Pragma (Item);
7573 end Get_Class_Wide_Pragma;
7579 function Get_Full_View (T : Entity_Id) return Entity_Id is
7581 if Is_Incomplete_Type (T) and then Present (Full_View (T)) then
7582 return Full_View (T);
7584 elsif Is_Class_Wide_Type (T)
7585 and then Is_Incomplete_Type (Root_Type (T))
7586 and then Present (Full_View (Root_Type (T)))
7588 return Class_Wide_Type (Full_View (Root_Type (T)));
7599 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
7601 -- Classification pragmas
7603 Is_CLS : constant Boolean :=
7604 Id = Pragma_Abstract_State or else
7605 Id = Pragma_Attach_Handler or else
7606 Id = Pragma_Async_Readers or else
7607 Id = Pragma_Async_Writers or else
7608 Id = Pragma_Constant_After_Elaboration or else
7609 Id = Pragma_Depends or else
7610 Id = Pragma_Effective_Reads or else
7611 Id = Pragma_Effective_Writes or else
7612 Id = Pragma_Extensions_Visible or else
7613 Id = Pragma_Global or else
7614 Id = Pragma_Initial_Condition or else
7615 Id = Pragma_Initializes or else
7616 Id = Pragma_Interrupt_Handler or else
7617 Id = Pragma_No_Caching or else
7618 Id = Pragma_Part_Of or else
7619 Id = Pragma_Refined_Depends or else
7620 Id = Pragma_Refined_Global or else
7621 Id = Pragma_Refined_State or else
7622 Id = Pragma_Volatile_Function;
7624 -- Contract / test case pragmas
7626 Is_CTC : constant Boolean :=
7627 Id = Pragma_Contract_Cases or else
7628 Id = Pragma_Test_Case;
7630 -- Pre / postcondition pragmas
7632 Is_PPC : constant Boolean :=
7633 Id = Pragma_Precondition or else
7634 Id = Pragma_Postcondition or else
7635 Id = Pragma_Refined_Post;
7637 In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC;
7643 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7644 -- extracted from their specialized list.
7647 Items := Contract (E);
7653 Item := Classifications (Items);
7656 Item := Contract_Test_Cases (Items);
7659 Item := Pre_Post_Conditions (Items);
7665 Item := First_Rep_Item (E);
7668 while Present (Item) loop
7669 if Nkind (Item) = N_Pragma
7670 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7674 -- All nodes in N_Contract are chained using Next_Pragma
7676 elsif In_Contract then
7677 Item := Next_Pragma (Item);
7682 Next_Rep_Item (Item);
7689 --------------------------------------
7690 -- Get_Record_Representation_Clause --
7691 --------------------------------------
7693 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7697 N := First_Rep_Item (E);
7698 while Present (N) loop
7699 if Nkind (N) = N_Record_Representation_Clause then
7707 end Get_Record_Representation_Clause;
7709 ------------------------
7710 -- Has_Attach_Handler --
7711 ------------------------
7713 function Has_Attach_Handler (Id : E) return B is
7717 pragma Assert (Is_Protected_Type (Id));
7719 Ritem := First_Rep_Item (Id);
7720 while Present (Ritem) loop
7721 if Nkind (Ritem) = N_Pragma
7722 and then Pragma_Name (Ritem) = Name_Attach_Handler
7726 Next_Rep_Item (Ritem);
7731 end Has_Attach_Handler;
7737 function Has_DIC (Id : E) return B is
7739 return Has_Own_DIC (Id) or else Has_Inherited_DIC (Id);
7746 function Has_Entries (Id : E) return B is
7750 pragma Assert (Is_Concurrent_Type (Id));
7752 Ent := First_Entity (Id);
7753 while Present (Ent) loop
7754 if Is_Entry (Ent) then
7764 ----------------------------
7765 -- Has_Foreign_Convention --
7766 ----------------------------
7768 function Has_Foreign_Convention (Id : E) return B is
7770 -- While regular Intrinsics such as the Standard operators fit in the
7771 -- "Ada" convention, those with an Interface_Name materialize GCC
7772 -- builtin imports for which Ada special treatments shouldn't apply.
7774 return Convention (Id) in Foreign_Convention
7775 or else (Convention (Id) = Convention_Intrinsic
7776 and then Present (Interface_Name (Id)));
7777 end Has_Foreign_Convention;
7779 ---------------------------
7780 -- Has_Interrupt_Handler --
7781 ---------------------------
7783 function Has_Interrupt_Handler (Id : E) return B is
7787 pragma Assert (Is_Protected_Type (Id));
7789 Ritem := First_Rep_Item (Id);
7790 while Present (Ritem) loop
7791 if Nkind (Ritem) = N_Pragma
7792 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7796 Next_Rep_Item (Ritem);
7801 end Has_Interrupt_Handler;
7803 --------------------
7804 -- Has_Invariants --
7805 --------------------
7807 function Has_Invariants (Id : E) return B is
7809 return Has_Own_Invariants (Id) or else Has_Inherited_Invariants (Id);
7812 --------------------------
7813 -- Has_Non_Limited_View --
7814 --------------------------
7816 function Has_Non_Limited_View (Id : E) return B is
7818 return (Ekind (Id) in Incomplete_Kind
7819 or else Ekind (Id) in Class_Wide_Kind
7820 or else Ekind (Id) = E_Abstract_State)
7821 and then Present (Non_Limited_View (Id));
7822 end Has_Non_Limited_View;
7824 ---------------------------------
7825 -- Has_Non_Null_Abstract_State --
7826 ---------------------------------
7828 function Has_Non_Null_Abstract_State (Id : E) return B is
7830 pragma Assert (Is_Package_Or_Generic_Package (Id));
7833 Present (Abstract_States (Id))
7835 not Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7836 end Has_Non_Null_Abstract_State;
7838 -------------------------------------
7839 -- Has_Non_Null_Visible_Refinement --
7840 -------------------------------------
7842 function Has_Non_Null_Visible_Refinement (Id : E) return B is
7843 Constits : Elist_Id;
7846 -- "Refinement" is a concept applicable only to abstract states
7848 pragma Assert (Ekind (Id) = E_Abstract_State);
7849 Constits := Refinement_Constituents (Id);
7851 -- A partial refinement is always non-null. For a full refinement to be
7852 -- non-null, the first constituent must be anything other than null.
7855 Has_Partial_Visible_Refinement (Id)
7856 or else (Has_Visible_Refinement (Id)
7857 and then Present (Constits)
7858 and then Nkind (Node (First_Elmt (Constits))) /= N_Null);
7859 end Has_Non_Null_Visible_Refinement;
7861 -----------------------------
7862 -- Has_Null_Abstract_State --
7863 -----------------------------
7865 function Has_Null_Abstract_State (Id : E) return B is
7866 pragma Assert (Is_Package_Or_Generic_Package (Id));
7868 States : constant Elist_Id := Abstract_States (Id);
7871 -- Check first available state of related package. A null abstract
7872 -- state always appears as the sole element of the state list.
7876 and then Is_Null_State (Node (First_Elmt (States)));
7877 end Has_Null_Abstract_State;
7879 ---------------------------------
7880 -- Has_Null_Visible_Refinement --
7881 ---------------------------------
7883 function Has_Null_Visible_Refinement (Id : E) return B is
7884 Constits : Elist_Id;
7887 -- "Refinement" is a concept applicable only to abstract states
7889 pragma Assert (Ekind (Id) = E_Abstract_State);
7890 Constits := Refinement_Constituents (Id);
7892 -- For a refinement to be null, the state's sole constituent must be a
7896 Has_Visible_Refinement (Id)
7897 and then Present (Constits)
7898 and then Nkind (Node (First_Elmt (Constits))) = N_Null;
7899 end Has_Null_Visible_Refinement;
7901 --------------------
7902 -- Has_Unmodified --
7903 --------------------
7905 function Has_Unmodified (E : Entity_Id) return Boolean is
7907 if Has_Pragma_Unmodified (E) then
7909 elsif Warnings_Off (E) then
7910 Set_Warnings_Off_Used_Unmodified (E);
7917 ---------------------
7918 -- Has_Unreferenced --
7919 ---------------------
7921 function Has_Unreferenced (E : Entity_Id) return Boolean is
7923 if Has_Pragma_Unreferenced (E) then
7925 elsif Warnings_Off (E) then
7926 Set_Warnings_Off_Used_Unreferenced (E);
7931 end Has_Unreferenced;
7933 ----------------------
7934 -- Has_Warnings_Off --
7935 ----------------------
7937 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7939 if Warnings_Off (E) then
7940 Set_Warnings_Off_Used (E);
7945 end Has_Warnings_Off;
7947 ------------------------------
7948 -- Implementation_Base_Type --
7949 ------------------------------
7951 function Implementation_Base_Type (Id : E) return E is
7956 Bastyp := Base_Type (Id);
7958 if Is_Incomplete_Or_Private_Type (Bastyp) then
7959 Imptyp := Underlying_Type (Bastyp);
7961 -- If we have an implementation type, then just return it,
7962 -- otherwise we return the Base_Type anyway. This can only
7963 -- happen in error situations and should avoid some error bombs.
7965 if Present (Imptyp) then
7966 return Base_Type (Imptyp);
7974 end Implementation_Base_Type;
7976 -------------------------
7977 -- Invariant_Procedure --
7978 -------------------------
7980 function Invariant_Procedure (Id : E) return E is
7981 Subp_Elmt : Elmt_Id;
7982 Subp_Id : Entity_Id;
7986 pragma Assert (Is_Type (Id));
7988 Subps := Subprograms_For_Type (Base_Type (Id));
7990 if Present (Subps) then
7991 Subp_Elmt := First_Elmt (Subps);
7992 while Present (Subp_Elmt) loop
7993 Subp_Id := Node (Subp_Elmt);
7995 if Is_Invariant_Procedure (Subp_Id) then
7999 Next_Elmt (Subp_Elmt);
8004 end Invariant_Procedure;
8006 ----------------------
8007 -- Is_Atomic_Or_VFA --
8008 ----------------------
8010 function Is_Atomic_Or_VFA (Id : E) return B is
8012 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
8013 end Is_Atomic_Or_VFA;
8019 -- Global flag table allowing rapid computation of this function
8021 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
8022 (E_Enumeration_Subtype |
8023 E_Incomplete_Subtype |
8024 E_Signed_Integer_Subtype |
8025 E_Modular_Integer_Subtype |
8026 E_Floating_Point_Subtype |
8027 E_Ordinary_Fixed_Point_Subtype |
8028 E_Decimal_Fixed_Point_Subtype |
8032 E_Record_Subtype_With_Private |
8033 E_Limited_Private_Subtype |
8035 E_Protected_Subtype |
8037 E_String_Literal_Subtype |
8038 E_Class_Wide_Subtype => False,
8041 function Is_Base_Type (Id : E) return Boolean is
8043 return Entity_Is_Base_Type (Ekind (Id));
8046 ---------------------
8047 -- Is_Boolean_Type --
8048 ---------------------
8050 function Is_Boolean_Type (Id : E) return B is
8052 return Root_Type (Id) = Standard_Boolean;
8053 end Is_Boolean_Type;
8055 ------------------------
8056 -- Is_Constant_Object --
8057 ------------------------
8059 function Is_Constant_Object (Id : E) return B is
8061 return Ekind_In (Id, E_Constant, E_In_Parameter, E_Loop_Parameter);
8062 end Is_Constant_Object;
8068 function Is_Controlled (Id : E) return B is
8070 return Is_Controlled_Active (Id) and then not Disable_Controlled (Id);
8073 --------------------
8074 -- Is_Discriminal --
8075 --------------------
8077 function Is_Discriminal (Id : E) return B is
8079 return Ekind_In (Id, E_Constant, E_In_Parameter)
8080 and then Present (Discriminal_Link (Id));
8083 ----------------------
8084 -- Is_Dynamic_Scope --
8085 ----------------------
8087 function Is_Dynamic_Scope (Id : E) return B is
8090 Ekind (Id) = E_Block
8092 Ekind (Id) = E_Function
8094 Ekind (Id) = E_Procedure
8096 Ekind (Id) = E_Subprogram_Body
8098 Ekind (Id) = E_Task_Type
8100 (Ekind (Id) = E_Limited_Private_Type
8101 and then Present (Full_View (Id))
8102 and then Ekind (Full_View (Id)) = E_Task_Type)
8104 Ekind (Id) = E_Entry
8106 Ekind (Id) = E_Entry_Family
8108 Ekind (Id) = E_Return_Statement;
8109 end Is_Dynamic_Scope;
8111 --------------------
8112 -- Is_Entity_Name --
8113 --------------------
8115 function Is_Entity_Name (N : Node_Id) return Boolean is
8116 Kind : constant Node_Kind := Nkind (N);
8119 -- Identifiers, operator symbols, expanded names are entity names
8121 return Kind = N_Identifier
8122 or else Kind = N_Operator_Symbol
8123 or else Kind = N_Expanded_Name
8125 -- Attribute references are entity names if they refer to an entity.
8126 -- Note that we don't do this by testing for the presence of the
8127 -- Entity field in the N_Attribute_Reference node, since it may not
8128 -- have been set yet.
8130 or else (Kind = N_Attribute_Reference
8131 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
8134 ---------------------------
8135 -- Is_Elaboration_Target --
8136 ---------------------------
8138 function Is_Elaboration_Target (Id : Entity_Id) return Boolean is
8141 Ekind_In (Id, E_Constant, E_Package, E_Variable)
8142 or else Is_Entry (Id)
8143 or else Is_Generic_Unit (Id)
8144 or else Is_Subprogram (Id)
8145 or else Is_Task_Type (Id);
8146 end Is_Elaboration_Target;
8148 -----------------------
8149 -- Is_External_State --
8150 -----------------------
8152 function Is_External_State (Id : E) return B is
8154 -- To qualify, the abstract state must appear with option "external" or
8155 -- "synchronous" (SPARK RM 7.1.4(7) and (9)).
8158 Ekind (Id) = E_Abstract_State
8159 and then (Has_Option (Id, Name_External)
8161 Has_Option (Id, Name_Synchronous));
8162 end Is_External_State;
8168 function Is_Finalizer (Id : E) return B is
8170 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
8177 function Is_Null_State (Id : E) return B is
8180 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
8183 ---------------------
8184 -- Is_Packed_Array --
8185 ---------------------
8187 function Is_Packed_Array (Id : E) return B is
8189 return Is_Array_Type (Id) and then Is_Packed (Id);
8190 end Is_Packed_Array;
8192 -----------------------------------
8193 -- Is_Package_Or_Generic_Package --
8194 -----------------------------------
8196 function Is_Package_Or_Generic_Package (Id : E) return B is
8198 return Ekind_In (Id, E_Generic_Package, E_Package);
8199 end Is_Package_Or_Generic_Package;
8205 function Is_Prival (Id : E) return B is
8207 return Ekind_In (Id, E_Constant, E_Variable)
8208 and then Present (Prival_Link (Id));
8211 ----------------------------
8212 -- Is_Protected_Component --
8213 ----------------------------
8215 function Is_Protected_Component (Id : E) return B is
8217 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
8218 end Is_Protected_Component;
8220 ----------------------------
8221 -- Is_Protected_Interface --
8222 ----------------------------
8224 function Is_Protected_Interface (Id : E) return B is
8225 Typ : constant Entity_Id := Base_Type (Id);
8227 if not Is_Interface (Typ) then
8229 elsif Is_Class_Wide_Type (Typ) then
8230 return Is_Protected_Interface (Etype (Typ));
8232 return Protected_Present (Type_Definition (Parent (Typ)));
8234 end Is_Protected_Interface;
8236 ------------------------------
8237 -- Is_Protected_Record_Type --
8238 ------------------------------
8240 function Is_Protected_Record_Type (Id : E) return B is
8243 Is_Concurrent_Record_Type (Id)
8244 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
8245 end Is_Protected_Record_Type;
8247 --------------------------------
8248 -- Is_Standard_Character_Type --
8249 --------------------------------
8251 function Is_Standard_Character_Type (Id : E) return B is
8253 if Is_Type (Id) then
8255 R : constant Entity_Id := Root_Type (Id);
8258 R = Standard_Character
8260 R = Standard_Wide_Character
8262 R = Standard_Wide_Wide_Character;
8268 end Is_Standard_Character_Type;
8270 -----------------------------
8271 -- Is_Standard_String_Type --
8272 -----------------------------
8274 function Is_Standard_String_Type (Id : E) return B is
8276 if Is_Type (Id) then
8278 R : constant Entity_Id := Root_Type (Id);
8283 R = Standard_Wide_String
8285 R = Standard_Wide_Wide_String;
8291 end Is_Standard_String_Type;
8293 --------------------
8294 -- Is_String_Type --
8295 --------------------
8297 function Is_String_Type (Id : E) return B is
8299 return Is_Array_Type (Id)
8300 and then Id /= Any_Composite
8301 and then Number_Dimensions (Id) = 1
8302 and then Is_Character_Type (Component_Type (Id));
8305 -------------------------------
8306 -- Is_Synchronized_Interface --
8307 -------------------------------
8309 function Is_Synchronized_Interface (Id : E) return B is
8310 Typ : constant Entity_Id := Base_Type (Id);
8313 if not Is_Interface (Typ) then
8316 elsif Is_Class_Wide_Type (Typ) then
8317 return Is_Synchronized_Interface (Etype (Typ));
8320 return Protected_Present (Type_Definition (Parent (Typ)))
8321 or else Synchronized_Present (Type_Definition (Parent (Typ)))
8322 or else Task_Present (Type_Definition (Parent (Typ)));
8324 end Is_Synchronized_Interface;
8326 ---------------------------
8327 -- Is_Synchronized_State --
8328 ---------------------------
8330 function Is_Synchronized_State (Id : E) return B is
8332 -- To qualify, the abstract state must appear with simple option
8333 -- "synchronous" (SPARK RM 7.1.4(9)).
8336 Ekind (Id) = E_Abstract_State
8337 and then Has_Option (Id, Name_Synchronous);
8338 end Is_Synchronized_State;
8340 -----------------------
8341 -- Is_Task_Interface --
8342 -----------------------
8344 function Is_Task_Interface (Id : E) return B is
8345 Typ : constant Entity_Id := Base_Type (Id);
8347 if not Is_Interface (Typ) then
8349 elsif Is_Class_Wide_Type (Typ) then
8350 return Is_Task_Interface (Etype (Typ));
8352 return Task_Present (Type_Definition (Parent (Typ)));
8354 end Is_Task_Interface;
8356 -------------------------
8357 -- Is_Task_Record_Type --
8358 -------------------------
8360 function Is_Task_Record_Type (Id : E) return B is
8363 Is_Concurrent_Record_Type (Id)
8364 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
8365 end Is_Task_Record_Type;
8367 ------------------------
8368 -- Is_Wrapper_Package --
8369 ------------------------
8371 function Is_Wrapper_Package (Id : E) return B is
8373 return Ekind (Id) = E_Package and then Present (Related_Instance (Id));
8374 end Is_Wrapper_Package;
8380 function Last_Formal (Id : E) return E is
8385 (Is_Overloadable (Id)
8386 or else Ekind_In (Id, E_Entry_Family,
8388 E_Subprogram_Type));
8390 if Ekind (Id) = E_Enumeration_Literal then
8394 Formal := First_Formal (Id);
8396 if Present (Formal) then
8397 while Present (Next_Formal (Formal)) loop
8398 Formal := Next_Formal (Formal);
8410 procedure Link_Entities (First : Entity_Id; Second : Node_Id) is
8412 if Present (Second) then
8413 Set_Prev_Entity (Second, First); -- First <-- Second
8416 Set_Next_Entity (First, Second); -- First --> Second
8419 ----------------------
8420 -- Model_Emin_Value --
8421 ----------------------
8423 function Model_Emin_Value (Id : E) return Uint is
8425 return Machine_Emin_Value (Id);
8426 end Model_Emin_Value;
8428 -------------------------
8429 -- Model_Epsilon_Value --
8430 -------------------------
8432 function Model_Epsilon_Value (Id : E) return Ureal is
8433 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8435 return Radix ** (1 - Model_Mantissa_Value (Id));
8436 end Model_Epsilon_Value;
8438 --------------------------
8439 -- Model_Mantissa_Value --
8440 --------------------------
8442 function Model_Mantissa_Value (Id : E) return Uint is
8444 return Machine_Mantissa_Value (Id);
8445 end Model_Mantissa_Value;
8447 -----------------------
8448 -- Model_Small_Value --
8449 -----------------------
8451 function Model_Small_Value (Id : E) return Ureal is
8452 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8454 return Radix ** (Model_Emin_Value (Id) - 1);
8455 end Model_Small_Value;
8457 ------------------------
8458 -- Machine_Emax_Value --
8459 ------------------------
8461 function Machine_Emax_Value (Id : E) return Uint is
8462 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8465 case Float_Rep (Id) is
8468 when 1 .. 6 => return Uint_128;
8469 when 7 .. 15 => return 2**10;
8470 when 16 .. 33 => return 2**14;
8471 when others => return No_Uint;
8475 return Uint_2 ** Uint_7 - Uint_1;
8477 end Machine_Emax_Value;
8479 ------------------------
8480 -- Machine_Emin_Value --
8481 ------------------------
8483 function Machine_Emin_Value (Id : E) return Uint is
8485 case Float_Rep (Id) is
8486 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
8487 when AAMP => return -Machine_Emax_Value (Id);
8489 end Machine_Emin_Value;
8491 ----------------------------
8492 -- Machine_Mantissa_Value --
8493 ----------------------------
8495 function Machine_Mantissa_Value (Id : E) return Uint is
8496 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8499 case Float_Rep (Id) is
8502 when 1 .. 6 => return Uint_24;
8503 when 7 .. 15 => return UI_From_Int (53);
8504 when 16 .. 18 => return Uint_64;
8505 when 19 .. 33 => return UI_From_Int (113);
8506 when others => return No_Uint;
8511 when 1 .. 6 => return Uint_24;
8512 when 7 .. 9 => return UI_From_Int (40);
8513 when others => return No_Uint;
8516 end Machine_Mantissa_Value;
8518 -------------------------
8519 -- Machine_Radix_Value --
8520 -------------------------
8522 function Machine_Radix_Value (Id : E) return U is
8524 case Float_Rep (Id) is
8530 end Machine_Radix_Value;
8532 --------------------
8533 -- Next_Component --
8534 --------------------
8536 function Next_Component (Id : E) return E is
8540 Comp_Id := Next_Entity (Id);
8541 while Present (Comp_Id) loop
8542 exit when Ekind (Comp_Id) = E_Component;
8543 Next_Entity (Comp_Id);
8549 ------------------------------------
8550 -- Next_Component_Or_Discriminant --
8551 ------------------------------------
8553 function Next_Component_Or_Discriminant (Id : E) return E is
8557 Comp_Id := Next_Entity (Id);
8558 while Present (Comp_Id) loop
8559 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
8560 Next_Entity (Comp_Id);
8564 end Next_Component_Or_Discriminant;
8566 -----------------------
8567 -- Next_Discriminant --
8568 -----------------------
8570 -- This function actually implements both Next_Discriminant and
8571 -- Next_Stored_Discriminant by making sure that the Discriminant
8572 -- returned is of the same variety as Id.
8574 function Next_Discriminant (Id : E) return E is
8576 -- Derived Tagged types with private extensions look like this...
8578 -- E_Discriminant d1
8579 -- E_Discriminant d2
8581 -- E_Discriminant d1
8582 -- E_Discriminant d2
8585 -- so it is critical not to go past the leading discriminants
8590 pragma Assert (Ekind (Id) = E_Discriminant);
8595 or else (Ekind (D) /= E_Discriminant
8596 and then not Is_Itype (D))
8601 exit when Ekind (D) = E_Discriminant
8602 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
8606 end Next_Discriminant;
8612 function Next_Formal (Id : E) return E is
8616 -- Follow the chain of declared entities as long as the kind of the
8617 -- entity corresponds to a formal parameter. Skip internal entities
8618 -- that may have been created for implicit subtypes, in the process
8619 -- of analyzing default expressions.
8625 if No (P) or else Is_Formal (P) then
8627 elsif not Is_Internal (P) then
8633 -----------------------------
8634 -- Next_Formal_With_Extras --
8635 -----------------------------
8637 function Next_Formal_With_Extras (Id : E) return E is
8639 if Present (Extra_Formal (Id)) then
8640 return Extra_Formal (Id);
8642 return Next_Formal (Id);
8644 end Next_Formal_With_Extras;
8650 function Next_Index (Id : Node_Id) return Node_Id is
8659 function Next_Literal (Id : E) return E is
8661 pragma Assert (Nkind (Id) in N_Entity);
8665 ------------------------------
8666 -- Next_Stored_Discriminant --
8667 ------------------------------
8669 function Next_Stored_Discriminant (Id : E) return E is
8671 -- See comment in Next_Discriminant
8673 return Next_Discriminant (Id);
8674 end Next_Stored_Discriminant;
8676 -----------------------
8677 -- Number_Dimensions --
8678 -----------------------
8680 function Number_Dimensions (Id : E) return Pos is
8685 if Ekind (Id) = E_String_Literal_Subtype then
8690 T := First_Index (Id);
8691 while Present (T) loop
8698 end Number_Dimensions;
8700 --------------------
8701 -- Number_Entries --
8702 --------------------
8704 function Number_Entries (Id : E) return Nat is
8709 pragma Assert (Is_Concurrent_Type (Id));
8712 Ent := First_Entity (Id);
8713 while Present (Ent) loop
8714 if Is_Entry (Ent) then
8724 --------------------
8725 -- Number_Formals --
8726 --------------------
8728 function Number_Formals (Id : E) return Pos is
8734 Formal := First_Formal (Id);
8735 while Present (Formal) loop
8737 Next_Formal (Formal);
8743 ------------------------
8744 -- Object_Size_Clause --
8745 ------------------------
8747 function Object_Size_Clause (Id : E) return N is
8749 return Get_Attribute_Definition_Clause (Id, Attribute_Object_Size);
8750 end Object_Size_Clause;
8752 --------------------
8753 -- Parameter_Mode --
8754 --------------------
8756 function Parameter_Mode (Id : E) return Formal_Kind is
8761 ---------------------------------
8762 -- Partial_Invariant_Procedure --
8763 ---------------------------------
8765 function Partial_Invariant_Procedure (Id : E) return E is
8766 Subp_Elmt : Elmt_Id;
8767 Subp_Id : Entity_Id;
8771 pragma Assert (Is_Type (Id));
8773 Subps := Subprograms_For_Type (Base_Type (Id));
8775 if Present (Subps) then
8776 Subp_Elmt := First_Elmt (Subps);
8777 while Present (Subp_Elmt) loop
8778 Subp_Id := Node (Subp_Elmt);
8780 if Is_Partial_Invariant_Procedure (Subp_Id) then
8784 Next_Elmt (Subp_Elmt);
8789 end Partial_Invariant_Procedure;
8791 -------------------------------------
8792 -- Partial_Refinement_Constituents --
8793 -------------------------------------
8795 function Partial_Refinement_Constituents (Id : E) return L is
8796 Constits : Elist_Id := No_Elist;
8798 procedure Add_Usable_Constituents (Item : E);
8799 -- Add global item Item and/or its constituents to list Constits when
8800 -- they can be used in a global refinement within the current scope. The
8802 -- 1) If Item is an abstract state with full refinement visible, add
8803 -- its constituents.
8804 -- 2) If Item is an abstract state with only partial refinement
8805 -- visible, add both Item and its constituents.
8806 -- 3) If Item is an abstract state without a visible refinement, add
8808 -- 4) If Id is not an abstract state, add it.
8810 procedure Add_Usable_Constituents (List : Elist_Id);
8811 -- Apply Add_Usable_Constituents to every constituent in List
8813 -----------------------------
8814 -- Add_Usable_Constituents --
8815 -----------------------------
8817 procedure Add_Usable_Constituents (Item : E) is
8819 if Ekind (Item) = E_Abstract_State then
8820 if Has_Visible_Refinement (Item) then
8821 Add_Usable_Constituents (Refinement_Constituents (Item));
8823 elsif Has_Partial_Visible_Refinement (Item) then
8824 Append_New_Elmt (Item, Constits);
8825 Add_Usable_Constituents (Part_Of_Constituents (Item));
8828 Append_New_Elmt (Item, Constits);
8832 Append_New_Elmt (Item, Constits);
8834 end Add_Usable_Constituents;
8836 procedure Add_Usable_Constituents (List : Elist_Id) is
8837 Constit_Elmt : Elmt_Id;
8839 if Present (List) then
8840 Constit_Elmt := First_Elmt (List);
8841 while Present (Constit_Elmt) loop
8842 Add_Usable_Constituents (Node (Constit_Elmt));
8843 Next_Elmt (Constit_Elmt);
8846 end Add_Usable_Constituents;
8848 -- Start of processing for Partial_Refinement_Constituents
8851 -- "Refinement" is a concept applicable only to abstract states
8853 pragma Assert (Ekind (Id) = E_Abstract_State);
8855 if Has_Visible_Refinement (Id) then
8856 Constits := Refinement_Constituents (Id);
8858 -- A refinement may be partially visible when objects declared in the
8859 -- private part of a package are subject to a Part_Of indicator.
8861 elsif Has_Partial_Visible_Refinement (Id) then
8862 Add_Usable_Constituents (Part_Of_Constituents (Id));
8864 -- Function should only be called when full or partial refinement is
8868 raise Program_Error;
8872 end Partial_Refinement_Constituents;
8874 ------------------------
8875 -- Predicate_Function --
8876 ------------------------
8878 function Predicate_Function (Id : E) return E is
8879 Subp_Elmt : Elmt_Id;
8880 Subp_Id : Entity_Id;
8885 pragma Assert (Is_Type (Id));
8887 -- If type is private and has a completion, predicate may be defined on
8890 if Is_Private_Type (Id)
8892 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8893 and then Present (Full_View (Id))
8895 Typ := Full_View (Id);
8897 elsif Ekind_In (Id, E_Array_Subtype,
8899 E_Record_Subtype_With_Private)
8900 and then Present (Predicated_Parent (Id))
8902 Typ := Predicated_Parent (Id);
8908 Subps := Subprograms_For_Type (Typ);
8910 if Present (Subps) then
8911 Subp_Elmt := First_Elmt (Subps);
8912 while Present (Subp_Elmt) loop
8913 Subp_Id := Node (Subp_Elmt);
8915 if Ekind (Subp_Id) = E_Function
8916 and then Is_Predicate_Function (Subp_Id)
8921 Next_Elmt (Subp_Elmt);
8926 end Predicate_Function;
8928 --------------------------
8929 -- Predicate_Function_M --
8930 --------------------------
8932 function Predicate_Function_M (Id : E) return E is
8933 Subp_Elmt : Elmt_Id;
8934 Subp_Id : Entity_Id;
8939 pragma Assert (Is_Type (Id));
8941 -- If type is private and has a completion, predicate may be defined on
8944 if Is_Private_Type (Id)
8946 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8947 and then Present (Full_View (Id))
8949 Typ := Full_View (Id);
8955 Subps := Subprograms_For_Type (Typ);
8957 if Present (Subps) then
8958 Subp_Elmt := First_Elmt (Subps);
8959 while Present (Subp_Elmt) loop
8960 Subp_Id := Node (Subp_Elmt);
8962 if Ekind (Subp_Id) = E_Function
8963 and then Is_Predicate_Function_M (Subp_Id)
8968 Next_Elmt (Subp_Elmt);
8973 end Predicate_Function_M;
8975 -------------------------
8976 -- Present_In_Rep_Item --
8977 -------------------------
8979 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8983 Ritem := First_Rep_Item (E);
8985 while Present (Ritem) loop
8990 Next_Rep_Item (Ritem);
8994 end Present_In_Rep_Item;
8996 --------------------------
8997 -- Primitive_Operations --
8998 --------------------------
9000 function Primitive_Operations (Id : E) return L is
9002 if Is_Concurrent_Type (Id) then
9003 if Present (Corresponding_Record_Type (Id)) then
9004 return Direct_Primitive_Operations
9005 (Corresponding_Record_Type (Id));
9007 -- If expansion is disabled the corresponding record type is absent,
9008 -- but if the type has ancestors it may have primitive operations.
9010 elsif Is_Tagged_Type (Id) then
9011 return Direct_Primitive_Operations (Id);
9017 return Direct_Primitive_Operations (Id);
9019 end Primitive_Operations;
9021 ---------------------
9022 -- Record_Rep_Item --
9023 ---------------------
9025 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
9027 Set_Next_Rep_Item (N, First_Rep_Item (E));
9028 Set_First_Rep_Item (E, N);
9029 end Record_Rep_Item;
9035 procedure Remove_Entity (Id : Entity_Id) is
9036 Next : constant Entity_Id := Next_Entity (Id);
9037 Prev : constant Entity_Id := Prev_Entity (Id);
9038 Scop : constant Entity_Id := Scope (Id);
9039 First : constant Entity_Id := First_Entity (Scop);
9040 Last : constant Entity_Id := Last_Entity (Scop);
9043 -- Eliminate any existing linkages from the entity
9045 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
9046 Set_Next_Entity (Id, Empty); -- Id --> Empty
9048 -- The eliminated entity was the only element in the entity chain
9050 if Id = First and then Id = Last then
9051 Set_First_Entity (Scop, Empty);
9052 Set_Last_Entity (Scop, Empty);
9054 -- The eliminated entity was the head of the entity chain
9056 elsif Id = First then
9057 Set_First_Entity (Scop, Next);
9059 -- The eliminated entity was the tail of the entity chain
9061 elsif Id = Last then
9062 Set_Last_Entity (Scop, Prev);
9064 -- Otherwise the eliminated entity comes from the middle of the entity
9068 Link_Entities (Prev, Next); -- Prev <-- Next, Prev --> Next
9076 function Root_Type (Id : E) return E is
9080 pragma Assert (Nkind (Id) in N_Entity);
9082 T := Base_Type (Id);
9084 if Ekind (T) = E_Class_Wide_Type then
9096 -- Following test catches some error cases resulting from
9099 elsif No (Etyp) then
9100 Check_Error_Detected;
9103 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
9106 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
9112 -- Return if there is a circularity in the inheritance chain. This
9113 -- happens in some error situations and we do not want to get
9114 -- stuck in this loop.
9116 if T = Base_Type (Id) then
9123 ---------------------
9124 -- Safe_Emax_Value --
9125 ---------------------
9127 function Safe_Emax_Value (Id : E) return Uint is
9129 return Machine_Emax_Value (Id);
9130 end Safe_Emax_Value;
9132 ----------------------
9133 -- Safe_First_Value --
9134 ----------------------
9136 function Safe_First_Value (Id : E) return Ureal is
9138 return -Safe_Last_Value (Id);
9139 end Safe_First_Value;
9141 ---------------------
9142 -- Safe_Last_Value --
9143 ---------------------
9145 function Safe_Last_Value (Id : E) return Ureal is
9146 Radix : constant Uint := Machine_Radix_Value (Id);
9147 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
9148 Emax : constant Uint := Safe_Emax_Value (Id);
9149 Significand : constant Uint := Radix ** Mantissa - 1;
9150 Exponent : constant Uint := Emax - Mantissa;
9156 (Num => Significand * 2 ** (Exponent mod 4),
9157 Den => -Exponent / 4,
9162 (Num => Significand,
9166 end Safe_Last_Value;
9172 function Scope_Depth (Id : E) return Uint is
9177 while Is_Record_Type (Scop) loop
9178 Scop := Scope (Scop);
9181 return Scope_Depth_Value (Scop);
9184 ---------------------
9185 -- Scope_Depth_Set --
9186 ---------------------
9188 function Scope_Depth_Set (Id : E) return B is
9190 return not Is_Record_Type (Id)
9191 and then Field22 (Id) /= Union_Id (Empty);
9192 end Scope_Depth_Set;
9194 -----------------------------
9195 -- Set_Component_Alignment --
9196 -----------------------------
9198 -- Component Alignment is encoded using two flags, Flag128/129 as
9199 -- follows. Note that both flags False = Align_Default, so that the
9200 -- default initialization of flags to False initializes component
9201 -- alignment to the default value as required.
9203 -- Flag128 Flag129 Value
9204 -- ------- ------- -----
9205 -- False False Calign_Default
9206 -- False True Calign_Component_Size
9207 -- True False Calign_Component_Size_4
9208 -- True True Calign_Storage_Unit
9210 procedure Set_Component_Alignment (Id : E; V : C) is
9212 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
9213 and then Is_Base_Type (Id));
9216 when Calign_Default =>
9217 Set_Flag128 (Id, False);
9218 Set_Flag129 (Id, False);
9220 when Calign_Component_Size =>
9221 Set_Flag128 (Id, False);
9222 Set_Flag129 (Id, True);
9224 when Calign_Component_Size_4 =>
9225 Set_Flag128 (Id, True);
9226 Set_Flag129 (Id, False);
9228 when Calign_Storage_Unit =>
9229 Set_Flag128 (Id, True);
9230 Set_Flag129 (Id, True);
9232 end Set_Component_Alignment;
9234 -----------------------
9235 -- Set_DIC_Procedure --
9236 -----------------------
9238 procedure Set_DIC_Procedure (Id : E; V : E) is
9239 Base_Typ : Entity_Id;
9240 Subp_Elmt : Elmt_Id;
9241 Subp_Id : Entity_Id;
9245 pragma Assert (Is_Type (Id));
9247 Base_Typ := Base_Type (Id);
9248 Subps := Subprograms_For_Type (Base_Typ);
9251 Subps := New_Elmt_List;
9252 Set_Subprograms_For_Type (Base_Typ, Subps);
9255 Subp_Elmt := First_Elmt (Subps);
9256 Prepend_Elmt (V, Subps);
9258 -- Check for a duplicate default initial condition procedure
9260 while Present (Subp_Elmt) loop
9261 Subp_Id := Node (Subp_Elmt);
9263 if Is_DIC_Procedure (Subp_Id) then
9264 raise Program_Error;
9267 Next_Elmt (Subp_Elmt);
9269 end Set_DIC_Procedure;
9271 -----------------------------
9272 -- Set_Invariant_Procedure --
9273 -----------------------------
9275 procedure Set_Invariant_Procedure (Id : E; V : E) is
9276 Base_Typ : Entity_Id;
9277 Subp_Elmt : Elmt_Id;
9278 Subp_Id : Entity_Id;
9282 pragma Assert (Is_Type (Id));
9284 Base_Typ := Base_Type (Id);
9285 Subps := Subprograms_For_Type (Base_Typ);
9288 Subps := New_Elmt_List;
9289 Set_Subprograms_For_Type (Base_Typ, Subps);
9292 Subp_Elmt := First_Elmt (Subps);
9293 Prepend_Elmt (V, Subps);
9295 -- Check for a duplicate invariant procedure
9297 while Present (Subp_Elmt) loop
9298 Subp_Id := Node (Subp_Elmt);
9300 if Is_Invariant_Procedure (Subp_Id) then
9301 raise Program_Error;
9304 Next_Elmt (Subp_Elmt);
9306 end Set_Invariant_Procedure;
9308 -------------------------------------
9309 -- Set_Partial_Invariant_Procedure --
9310 -------------------------------------
9312 procedure Set_Partial_Invariant_Procedure (Id : E; V : E) is
9313 Base_Typ : Entity_Id;
9314 Subp_Elmt : Elmt_Id;
9315 Subp_Id : Entity_Id;
9319 pragma Assert (Is_Type (Id));
9321 Base_Typ := Base_Type (Id);
9322 Subps := Subprograms_For_Type (Base_Typ);
9325 Subps := New_Elmt_List;
9326 Set_Subprograms_For_Type (Base_Typ, Subps);
9329 Subp_Elmt := First_Elmt (Subps);
9330 Prepend_Elmt (V, Subps);
9332 -- Check for a duplicate partial invariant procedure
9334 while Present (Subp_Elmt) loop
9335 Subp_Id := Node (Subp_Elmt);
9337 if Is_Partial_Invariant_Procedure (Subp_Id) then
9338 raise Program_Error;
9341 Next_Elmt (Subp_Elmt);
9343 end Set_Partial_Invariant_Procedure;
9345 ----------------------------
9346 -- Set_Predicate_Function --
9347 ----------------------------
9349 procedure Set_Predicate_Function (Id : E; V : E) is
9350 Subp_Elmt : Elmt_Id;
9351 Subp_Id : Entity_Id;
9355 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9357 Subps := Subprograms_For_Type (Id);
9360 Subps := New_Elmt_List;
9361 Set_Subprograms_For_Type (Id, Subps);
9364 Subp_Elmt := First_Elmt (Subps);
9365 Prepend_Elmt (V, Subps);
9367 -- Check for a duplicate predication function
9369 while Present (Subp_Elmt) loop
9370 Subp_Id := Node (Subp_Elmt);
9372 if Ekind (Subp_Id) = E_Function
9373 and then Is_Predicate_Function (Subp_Id)
9375 raise Program_Error;
9378 Next_Elmt (Subp_Elmt);
9380 end Set_Predicate_Function;
9382 ------------------------------
9383 -- Set_Predicate_Function_M --
9384 ------------------------------
9386 procedure Set_Predicate_Function_M (Id : E; V : E) is
9387 Subp_Elmt : Elmt_Id;
9388 Subp_Id : Entity_Id;
9392 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9394 Subps := Subprograms_For_Type (Id);
9397 Subps := New_Elmt_List;
9398 Set_Subprograms_For_Type (Id, Subps);
9401 Subp_Elmt := First_Elmt (Subps);
9402 Prepend_Elmt (V, Subps);
9404 -- Check for a duplicate predication function
9406 while Present (Subp_Elmt) loop
9407 Subp_Id := Node (Subp_Elmt);
9409 if Ekind (Subp_Id) = E_Function
9410 and then Is_Predicate_Function_M (Subp_Id)
9412 raise Program_Error;
9415 Next_Elmt (Subp_Elmt);
9417 end Set_Predicate_Function_M;
9423 function Size_Clause (Id : E) return N is
9425 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
9428 ------------------------
9429 -- Stream_Size_Clause --
9430 ------------------------
9432 function Stream_Size_Clause (Id : E) return N is
9434 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
9435 end Stream_Size_Clause;
9441 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
9447 Kind := E_Access_Subtype;
9449 when E_Array_Subtype
9452 Kind := E_Array_Subtype;
9454 when E_Class_Wide_Subtype
9457 Kind := E_Class_Wide_Subtype;
9459 when E_Decimal_Fixed_Point_Subtype
9460 | E_Decimal_Fixed_Point_Type
9462 Kind := E_Decimal_Fixed_Point_Subtype;
9464 when E_Ordinary_Fixed_Point_Subtype
9465 | E_Ordinary_Fixed_Point_Type
9467 Kind := E_Ordinary_Fixed_Point_Subtype;
9469 when E_Private_Subtype
9472 Kind := E_Private_Subtype;
9474 when E_Limited_Private_Subtype
9475 | E_Limited_Private_Type
9477 Kind := E_Limited_Private_Subtype;
9479 when E_Record_Subtype_With_Private
9480 | E_Record_Type_With_Private
9482 Kind := E_Record_Subtype_With_Private;
9484 when E_Record_Subtype
9487 Kind := E_Record_Subtype;
9489 when Enumeration_Kind =>
9490 Kind := E_Enumeration_Subtype;
9492 when E_Incomplete_Type =>
9493 Kind := E_Incomplete_Subtype;
9496 Kind := E_Floating_Point_Subtype;
9498 when Signed_Integer_Kind =>
9499 Kind := E_Signed_Integer_Subtype;
9501 when Modular_Integer_Kind =>
9502 Kind := E_Modular_Integer_Subtype;
9504 when Protected_Kind =>
9505 Kind := E_Protected_Subtype;
9508 Kind := E_Task_Subtype;
9512 raise Program_Error;
9518 ---------------------
9519 -- Type_High_Bound --
9520 ---------------------
9522 function Type_High_Bound (Id : E) return Node_Id is
9523 Rng : constant Node_Id := Scalar_Range (Id);
9525 if Nkind (Rng) = N_Subtype_Indication then
9526 return High_Bound (Range_Expression (Constraint (Rng)));
9528 return High_Bound (Rng);
9530 end Type_High_Bound;
9532 --------------------
9533 -- Type_Low_Bound --
9534 --------------------
9536 function Type_Low_Bound (Id : E) return Node_Id is
9537 Rng : constant Node_Id := Scalar_Range (Id);
9539 if Nkind (Rng) = N_Subtype_Indication then
9540 return Low_Bound (Range_Expression (Constraint (Rng)));
9542 return Low_Bound (Rng);
9546 ---------------------
9547 -- Underlying_Type --
9548 ---------------------
9550 function Underlying_Type (Id : E) return E is
9552 -- For record_with_private the underlying type is always the direct full
9553 -- view. Never try to take the full view of the parent it does not make
9556 if Ekind (Id) = E_Record_Type_With_Private then
9557 return Full_View (Id);
9559 -- If we have a class-wide type that comes from the limited view then we
9560 -- return the Underlying_Type of its nonlimited view.
9562 elsif Ekind (Id) = E_Class_Wide_Type
9563 and then From_Limited_With (Id)
9564 and then Present (Non_Limited_View (Id))
9566 return Underlying_Type (Non_Limited_View (Id));
9568 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
9570 -- If we have an incomplete or private type with a full view, then we
9571 -- return the Underlying_Type of this full view.
9573 if Present (Full_View (Id)) then
9574 if Id = Full_View (Id) then
9576 -- Previous error in declaration
9581 return Underlying_Type (Full_View (Id));
9584 -- If we have a private type with an underlying full view, then we
9585 -- return the Underlying_Type of this underlying full view.
9587 elsif Ekind (Id) in Private_Kind
9588 and then Present (Underlying_Full_View (Id))
9590 return Underlying_Type (Underlying_Full_View (Id));
9592 -- If we have an incomplete entity that comes from the limited view
9593 -- then we return the Underlying_Type of its nonlimited view.
9595 elsif From_Limited_With (Id)
9596 and then Present (Non_Limited_View (Id))
9598 return Underlying_Type (Non_Limited_View (Id));
9600 -- Otherwise check for the case where we have a derived type or
9601 -- subtype, and if so get the Underlying_Type of the parent type.
9603 elsif Etype (Id) /= Id then
9604 return Underlying_Type (Etype (Id));
9606 -- Otherwise we have an incomplete or private type that has no full
9607 -- view, which means that we have not encountered the completion, so
9608 -- return Empty to indicate the underlying type is not yet known.
9614 -- For non-incomplete, non-private types, return the type itself Also
9615 -- for entities that are not types at all return the entity itself.
9620 end Underlying_Type;
9622 ------------------------
9623 -- Unlink_Next_Entity --
9624 ------------------------
9626 procedure Unlink_Next_Entity (Id : Entity_Id) is
9627 Next : constant Entity_Id := Next_Entity (Id);
9630 if Present (Next) then
9631 Set_Prev_Entity (Next, Empty); -- Empty <-- Next
9634 Set_Next_Entity (Id, Empty); -- Id --> Empty
9635 end Unlink_Next_Entity;
9637 ------------------------
9638 -- Write_Entity_Flags --
9639 ------------------------
9641 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
9643 procedure W (Flag_Name : String; Flag : Boolean);
9644 -- Write out given flag if it is set
9650 procedure W (Flag_Name : String; Flag : Boolean) is
9654 Write_Str (Flag_Name);
9655 Write_Str (" = True");
9660 -- Start of processing for Write_Entity_Flags
9663 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
9664 and then Is_Base_Type (Id)
9667 Write_Str ("Component_Alignment = ");
9669 case Component_Alignment (Id) is
9670 when Calign_Default =>
9671 Write_Str ("Calign_Default");
9673 when Calign_Component_Size =>
9674 Write_Str ("Calign_Component_Size");
9676 when Calign_Component_Size_4 =>
9677 Write_Str ("Calign_Component_Size_4");
9679 when Calign_Storage_Unit =>
9680 Write_Str ("Calign_Storage_Unit");
9686 W ("Address_Taken", Flag104 (Id));
9687 W ("Body_Needed_For_Inlining", Flag299 (Id));
9688 W ("Body_Needed_For_SAL", Flag40 (Id));
9689 W ("C_Pass_By_Copy", Flag125 (Id));
9690 W ("Can_Never_Be_Null", Flag38 (Id));
9691 W ("Checks_May_Be_Suppressed", Flag31 (Id));
9692 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
9693 W ("Debug_Info_Off", Flag166 (Id));
9694 W ("Default_Expressions_Processed", Flag108 (Id));
9695 W ("Delay_Cleanups", Flag114 (Id));
9696 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
9697 W ("Depends_On_Private", Flag14 (Id));
9698 W ("Discard_Names", Flag88 (Id));
9699 W ("Elaboration_Entity_Required", Flag174 (Id));
9700 W ("Elaborate_Body_Desirable", Flag210 (Id));
9701 W ("Entry_Accepted", Flag152 (Id));
9702 W ("Can_Use_Internal_Rep", Flag229 (Id));
9703 W ("Finalize_Storage_Only", Flag158 (Id));
9704 W ("From_Limited_With", Flag159 (Id));
9705 W ("Has_Aliased_Components", Flag135 (Id));
9706 W ("Has_Alignment_Clause", Flag46 (Id));
9707 W ("Has_All_Calls_Remote", Flag79 (Id));
9708 W ("Has_Atomic_Components", Flag86 (Id));
9709 W ("Has_Biased_Representation", Flag139 (Id));
9710 W ("Has_Completion", Flag26 (Id));
9711 W ("Has_Completion_In_Body", Flag71 (Id));
9712 W ("Has_Complex_Representation", Flag140 (Id));
9713 W ("Has_Component_Size_Clause", Flag68 (Id));
9714 W ("Has_Contiguous_Rep", Flag181 (Id));
9715 W ("Has_Controlled_Component", Flag43 (Id));
9716 W ("Has_Controlling_Result", Flag98 (Id));
9717 W ("Has_Convention_Pragma", Flag119 (Id));
9718 W ("Has_Default_Aspect", Flag39 (Id));
9719 W ("Has_Delayed_Aspects", Flag200 (Id));
9720 W ("Has_Delayed_Freeze", Flag18 (Id));
9721 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
9722 W ("Has_Discriminants", Flag5 (Id));
9723 W ("Has_Dispatch_Table", Flag220 (Id));
9724 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
9725 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
9726 W ("Has_Exit", Flag47 (Id));
9727 W ("Has_Expanded_Contract", Flag240 (Id));
9728 W ("Has_Forward_Instantiation", Flag175 (Id));
9729 W ("Has_Fully_Qualified_Name", Flag173 (Id));
9730 W ("Has_Gigi_Rep_Item", Flag82 (Id));
9731 W ("Has_Homonym", Flag56 (Id));
9732 W ("Has_Implicit_Dereference", Flag251 (Id));
9733 W ("Has_Independent_Components", Flag34 (Id));
9734 W ("Has_Inheritable_Invariants", Flag248 (Id));
9735 W ("Has_Inherited_DIC", Flag133 (Id));
9736 W ("Has_Inherited_Invariants", Flag291 (Id));
9737 W ("Has_Initial_Value", Flag219 (Id));
9738 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
9739 W ("Has_Machine_Radix_Clause", Flag83 (Id));
9740 W ("Has_Master_Entity", Flag21 (Id));
9741 W ("Has_Missing_Return", Flag142 (Id));
9742 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
9743 W ("Has_Nested_Subprogram", Flag282 (Id));
9744 W ("Has_Non_Standard_Rep", Flag75 (Id));
9745 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
9746 W ("Has_Object_Size_Clause", Flag172 (Id));
9747 W ("Has_Own_DIC", Flag3 (Id));
9748 W ("Has_Own_Invariants", Flag232 (Id));
9749 W ("Has_Per_Object_Constraint", Flag154 (Id));
9750 W ("Has_Pragma_Controlled", Flag27 (Id));
9751 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
9752 W ("Has_Pragma_Inline", Flag157 (Id));
9753 W ("Has_Pragma_Inline_Always", Flag230 (Id));
9754 W ("Has_Pragma_No_Inline", Flag201 (Id));
9755 W ("Has_Pragma_Ordered", Flag198 (Id));
9756 W ("Has_Pragma_Pack", Flag121 (Id));
9757 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
9758 W ("Has_Pragma_Pure", Flag203 (Id));
9759 W ("Has_Pragma_Pure_Function", Flag179 (Id));
9760 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
9761 W ("Has_Pragma_Unmodified", Flag233 (Id));
9762 W ("Has_Pragma_Unreferenced", Flag180 (Id));
9763 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
9764 W ("Has_Pragma_Unused", Flag294 (Id));
9765 W ("Has_Predicates", Flag250 (Id));
9766 W ("Has_Primitive_Operations", Flag120 (Id));
9767 W ("Has_Private_Ancestor", Flag151 (Id));
9768 W ("Has_Private_Declaration", Flag155 (Id));
9769 W ("Has_Private_Extension", Flag300 (Id));
9770 W ("Has_Protected", Flag271 (Id));
9771 W ("Has_Qualified_Name", Flag161 (Id));
9772 W ("Has_RACW", Flag214 (Id));
9773 W ("Has_Record_Rep_Clause", Flag65 (Id));
9774 W ("Has_Recursive_Call", Flag143 (Id));
9775 W ("Has_Shift_Operator", Flag267 (Id));
9776 W ("Has_Size_Clause", Flag29 (Id));
9777 W ("Has_Small_Clause", Flag67 (Id));
9778 W ("Has_Specified_Layout", Flag100 (Id));
9779 W ("Has_Specified_Stream_Input", Flag190 (Id));
9780 W ("Has_Specified_Stream_Output", Flag191 (Id));
9781 W ("Has_Specified_Stream_Read", Flag192 (Id));
9782 W ("Has_Specified_Stream_Write", Flag193 (Id));
9783 W ("Has_Static_Discriminants", Flag211 (Id));
9784 W ("Has_Static_Predicate", Flag269 (Id));
9785 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
9786 W ("Has_Storage_Size_Clause", Flag23 (Id));
9787 W ("Has_Stream_Size_Clause", Flag184 (Id));
9788 W ("Has_Task", Flag30 (Id));
9789 W ("Has_Timing_Event", Flag289 (Id));
9790 W ("Has_Thunks", Flag228 (Id));
9791 W ("Has_Unchecked_Union", Flag123 (Id));
9792 W ("Has_Unknown_Discriminants", Flag72 (Id));
9793 W ("Has_Visible_Refinement", Flag263 (Id));
9794 W ("Has_Volatile_Components", Flag87 (Id));
9795 W ("Has_Xref_Entry", Flag182 (Id));
9796 W ("Ignore_SPARK_Mode_Pragmas", Flag301 (Id));
9797 W ("In_Package_Body", Flag48 (Id));
9798 W ("In_Private_Part", Flag45 (Id));
9799 W ("In_Use", Flag8 (Id));
9800 W ("Invariants_Ignored", Flag308 (Id));
9801 W ("Is_Abstract_Subprogram", Flag19 (Id));
9802 W ("Is_Abstract_Type", Flag146 (Id));
9803 W ("Is_Access_Constant", Flag69 (Id));
9804 W ("Is_Activation_Record", Flag305 (Id));
9805 W ("Is_Actual_Subtype", Flag293 (Id));
9806 W ("Is_Ada_2005_Only", Flag185 (Id));
9807 W ("Is_Ada_2012_Only", Flag199 (Id));
9808 W ("Is_Aliased", Flag15 (Id));
9809 W ("Is_Asynchronous", Flag81 (Id));
9810 W ("Is_Atomic", Flag85 (Id));
9811 W ("Is_Bit_Packed_Array", Flag122 (Id));
9812 W ("Is_CPP_Class", Flag74 (Id));
9813 W ("Is_Called", Flag102 (Id));
9814 W ("Is_Character_Type", Flag63 (Id));
9815 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
9816 W ("Is_Child_Unit", Flag73 (Id));
9817 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
9818 W ("Is_Compilation_Unit", Flag149 (Id));
9819 W ("Is_Completely_Hidden", Flag103 (Id));
9820 W ("Is_Concurrent_Record_Type", Flag20 (Id));
9821 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
9822 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
9823 W ("Is_Constrained", Flag12 (Id));
9824 W ("Is_Constructor", Flag76 (Id));
9825 W ("Is_Controlled_Active", Flag42 (Id));
9826 W ("Is_Controlling_Formal", Flag97 (Id));
9827 W ("Is_Descendant_Of_Address", Flag223 (Id));
9828 W ("Is_DIC_Procedure", Flag132 (Id));
9829 W ("Is_Discrim_SO_Function", Flag176 (Id));
9830 W ("Is_Discriminant_Check_Function", Flag264 (Id));
9831 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
9832 W ("Is_Dispatching_Operation", Flag6 (Id));
9833 W ("Is_Elaboration_Checks_OK_Id", Flag148 (Id));
9834 W ("Is_Elaboration_Warnings_OK_Id", Flag304 (Id));
9835 W ("Is_Eliminated", Flag124 (Id));
9836 W ("Is_Entry_Formal", Flag52 (Id));
9837 W ("Is_Exception_Handler", Flag286 (Id));
9838 W ("Is_Exported", Flag99 (Id));
9839 W ("Is_Finalized_Transient", Flag252 (Id));
9840 W ("Is_First_Subtype", Flag70 (Id));
9841 W ("Is_Formal_Subprogram", Flag111 (Id));
9842 W ("Is_Frozen", Flag4 (Id));
9843 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
9844 W ("Is_Generic_Actual_Type", Flag94 (Id));
9845 W ("Is_Generic_Instance", Flag130 (Id));
9846 W ("Is_Generic_Type", Flag13 (Id));
9847 W ("Is_Hidden", Flag57 (Id));
9848 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
9849 W ("Is_Hidden_Open_Scope", Flag171 (Id));
9850 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
9851 W ("Is_Ignored_Transient", Flag295 (Id));
9852 W ("Is_Immediately_Visible", Flag7 (Id));
9853 W ("Is_Implementation_Defined", Flag254 (Id));
9854 W ("Is_Imported", Flag24 (Id));
9855 W ("Is_Independent", Flag268 (Id));
9856 W ("Is_Initial_Condition_Procedure", Flag302 (Id));
9857 W ("Is_Inlined", Flag11 (Id));
9858 W ("Is_Inlined_Always", Flag1 (Id));
9859 W ("Is_Instantiated", Flag126 (Id));
9860 W ("Is_Interface", Flag186 (Id));
9861 W ("Is_Internal", Flag17 (Id));
9862 W ("Is_Interrupt_Handler", Flag89 (Id));
9863 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
9864 W ("Is_Invariant_Procedure", Flag257 (Id));
9865 W ("Is_Itype", Flag91 (Id));
9866 W ("Is_Known_Non_Null", Flag37 (Id));
9867 W ("Is_Known_Null", Flag204 (Id));
9868 W ("Is_Known_Valid", Flag170 (Id));
9869 W ("Is_Limited_Composite", Flag106 (Id));
9870 W ("Is_Limited_Interface", Flag197 (Id));
9871 W ("Is_Limited_Record", Flag25 (Id));
9872 W ("Is_Local_Anonymous_Access", Flag194 (Id));
9873 W ("Is_Loop_Parameter", Flag307 (Id));
9874 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
9875 W ("Is_Non_Static_Subtype", Flag109 (Id));
9876 W ("Is_Null_Init_Proc", Flag178 (Id));
9877 W ("Is_Obsolescent", Flag153 (Id));
9878 W ("Is_Only_Out_Parameter", Flag226 (Id));
9879 W ("Is_Package_Body_Entity", Flag160 (Id));
9880 W ("Is_Packed", Flag51 (Id));
9881 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
9882 W ("Is_Param_Block_Component_Type", Flag215 (Id));
9883 W ("Is_Partial_Invariant_Procedure", Flag292 (Id));
9884 W ("Is_Potentially_Use_Visible", Flag9 (Id));
9885 W ("Is_Predicate_Function", Flag255 (Id));
9886 W ("Is_Predicate_Function_M", Flag256 (Id));
9887 W ("Is_Preelaborated", Flag59 (Id));
9888 W ("Is_Primitive", Flag218 (Id));
9889 W ("Is_Primitive_Wrapper", Flag195 (Id));
9890 W ("Is_Private_Composite", Flag107 (Id));
9891 W ("Is_Private_Descendant", Flag53 (Id));
9892 W ("Is_Private_Primitive", Flag245 (Id));
9893 W ("Is_Public", Flag10 (Id));
9894 W ("Is_Pure", Flag44 (Id));
9895 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
9896 W ("Is_RACW_Stub_Type", Flag244 (Id));
9897 W ("Is_Raised", Flag224 (Id));
9898 W ("Is_Remote_Call_Interface", Flag62 (Id));
9899 W ("Is_Remote_Types", Flag61 (Id));
9900 W ("Is_Renaming_Of_Object", Flag112 (Id));
9901 W ("Is_Return_Object", Flag209 (Id));
9902 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
9903 W ("Is_Shared_Passive", Flag60 (Id));
9904 W ("Is_Static_Type", Flag281 (Id));
9905 W ("Is_Statically_Allocated", Flag28 (Id));
9906 W ("Is_Tag", Flag78 (Id));
9907 W ("Is_Tagged_Type", Flag55 (Id));
9908 W ("Is_Thunk", Flag225 (Id));
9909 W ("Is_Trivial_Subprogram", Flag235 (Id));
9910 W ("Is_True_Constant", Flag163 (Id));
9911 W ("Is_Unchecked_Union", Flag117 (Id));
9912 W ("Is_Underlying_Full_View", Flag298 (Id));
9913 W ("Is_Underlying_Record_View", Flag246 (Id));
9914 W ("Is_Unimplemented", Flag284 (Id));
9915 W ("Is_Unsigned_Type", Flag144 (Id));
9916 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
9917 W ("Is_Valued_Procedure", Flag127 (Id));
9918 W ("Is_Visible_Formal", Flag206 (Id));
9919 W ("Is_Visible_Lib_Unit", Flag116 (Id));
9920 W ("Is_Volatile", Flag16 (Id));
9921 W ("Is_Volatile_Full_Access", Flag285 (Id));
9922 W ("Itype_Printed", Flag202 (Id));
9923 W ("Kill_Elaboration_Checks", Flag32 (Id));
9924 W ("Kill_Range_Checks", Flag33 (Id));
9925 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
9926 W ("Low_Bound_Tested", Flag205 (Id));
9927 W ("Machine_Radix_10", Flag84 (Id));
9928 W ("Materialize_Entity", Flag168 (Id));
9929 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
9930 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
9931 W ("Must_Have_Preelab_Init", Flag208 (Id));
9932 W ("Needs_Activation_Record", Flag306 (Id));
9933 W ("Needs_Debug_Info", Flag147 (Id));
9934 W ("Needs_No_Actuals", Flag22 (Id));
9935 W ("Never_Set_In_Source", Flag115 (Id));
9936 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
9937 W ("No_Pool_Assigned", Flag131 (Id));
9938 W ("No_Predicate_On_actual", Flag275 (Id));
9939 W ("No_Reordering", Flag239 (Id));
9940 W ("No_Return", Flag113 (Id));
9941 W ("No_Strict_Aliasing", Flag136 (Id));
9942 W ("Non_Binary_Modulus", Flag58 (Id));
9943 W ("Nonzero_Is_True", Flag162 (Id));
9944 W ("OK_To_Rename", Flag247 (Id));
9945 W ("Optimize_Alignment_Space", Flag241 (Id));
9946 W ("Optimize_Alignment_Time", Flag242 (Id));
9947 W ("Overlays_Constant", Flag243 (Id));
9948 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
9949 W ("Reachable", Flag49 (Id));
9950 W ("Referenced", Flag156 (Id));
9951 W ("Referenced_As_LHS", Flag36 (Id));
9952 W ("Referenced_As_Out_Parameter", Flag227 (Id));
9953 W ("Renamed_In_Spec", Flag231 (Id));
9954 W ("Requires_Overriding", Flag213 (Id));
9955 W ("Return_Present", Flag54 (Id));
9956 W ("Returns_By_Ref", Flag90 (Id));
9957 W ("Reverse_Bit_Order", Flag164 (Id));
9958 W ("Reverse_Storage_Order", Flag93 (Id));
9959 W ("Rewritten_For_C", Flag287 (Id));
9960 W ("Predicates_Ignored", Flag288 (Id));
9961 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
9962 W ("Size_Depends_On_Discriminant", Flag177 (Id));
9963 W ("Size_Known_At_Compile_Time", Flag92 (Id));
9964 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
9965 W ("SPARK_Pragma_Inherited", Flag265 (Id));
9966 W ("SSO_Set_High_By_Default", Flag273 (Id));
9967 W ("SSO_Set_Low_By_Default", Flag272 (Id));
9968 W ("Static_Elaboration_Desired", Flag77 (Id));
9969 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
9970 W ("Strict_Alignment", Flag145 (Id));
9971 W ("Suppress_Elaboration_Warnings", Flag303 (Id));
9972 W ("Suppress_Initialization", Flag105 (Id));
9973 W ("Suppress_Style_Checks", Flag165 (Id));
9974 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
9975 W ("Treat_As_Volatile", Flag41 (Id));
9976 W ("Universal_Aliasing", Flag216 (Id));
9977 W ("Used_As_Generic_Actual", Flag222 (Id));
9978 W ("Uses_Sec_Stack", Flag95 (Id));
9979 W ("Warnings_Off", Flag96 (Id));
9980 W ("Warnings_Off_Used", Flag236 (Id));
9981 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
9982 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
9983 W ("Was_Hidden", Flag196 (Id));
9984 end Write_Entity_Flags;
9986 -----------------------
9987 -- Write_Entity_Info --
9988 -----------------------
9990 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
9992 procedure Write_Attribute (Which : String; Nam : E);
9993 -- Write attribute value with given string name
9995 procedure Write_Kind (Id : Entity_Id);
9996 -- Write Ekind field of entity
9998 ---------------------
9999 -- Write_Attribute --
10000 ---------------------
10002 procedure Write_Attribute (Which : String; Nam : E) is
10004 Write_Str (Prefix);
10006 Write_Int (Int (Nam));
10008 Write_Name (Chars (Nam));
10010 end Write_Attribute;
10016 procedure Write_Kind (Id : Entity_Id) is
10017 K : constant String := Entity_Kind'Image (Ekind (Id));
10020 Write_Str (Prefix);
10021 Write_Str (" Kind ");
10023 if Is_Type (Id) and then Is_Tagged_Type (Id) then
10024 Write_Str ("TAGGED ");
10027 Write_Str (K (3 .. K'Length));
10030 if Is_Type (Id) and then Depends_On_Private (Id) then
10031 Write_Str ("Depends_On_Private ");
10035 -- Start of processing for Write_Entity_Info
10039 Write_Attribute ("Name ", Id);
10040 Write_Int (Int (Id));
10044 Write_Attribute (" Type ", Etype (Id));
10046 if Id /= Standard_Standard then
10047 Write_Attribute (" Scope ", Scope (Id));
10052 when Discrete_Kind =>
10053 Write_Str ("Bounds: Id = ");
10055 if Present (Scalar_Range (Id)) then
10056 Write_Int (Int (Type_Low_Bound (Id)));
10057 Write_Str (" .. Id = ");
10058 Write_Int (Int (Type_High_Bound (Id)));
10060 Write_Str ("Empty");
10071 (" Component Type ", Component_Type (Id));
10073 Write_Str (Prefix);
10074 Write_Str (" Indexes ");
10076 Index := First_Index (Id);
10077 while Present (Index) loop
10078 Write_Attribute (" ", Etype (Index));
10079 Index := Next_Index (Index);
10085 when Access_Kind =>
10087 (" Directly Designated Type ",
10088 Directly_Designated_Type (Id));
10091 when Overloadable_Kind =>
10092 if Present (Homonym (Id)) then
10093 Write_Str (" Homonym ");
10094 Write_Name (Chars (Homonym (Id)));
10096 Write_Int (Int (Homonym (Id)));
10102 when E_Component =>
10103 if Ekind (Scope (Id)) in Record_Kind then
10105 " Original_Record_Component ",
10106 Original_Record_Component (Id));
10107 Write_Int (Int (Original_Record_Component (Id)));
10114 end Write_Entity_Info;
10116 -----------------------
10117 -- Write_Field6_Name --
10118 -----------------------
10120 procedure Write_Field6_Name (Id : Entity_Id) is
10121 pragma Unreferenced (Id);
10123 Write_Str ("First_Rep_Item");
10124 end Write_Field6_Name;
10126 -----------------------
10127 -- Write_Field7_Name --
10128 -----------------------
10130 procedure Write_Field7_Name (Id : Entity_Id) is
10131 pragma Unreferenced (Id);
10133 Write_Str ("Freeze_Node");
10134 end Write_Field7_Name;
10136 -----------------------
10137 -- Write_Field8_Name --
10138 -----------------------
10140 procedure Write_Field8_Name (Id : Entity_Id) is
10144 Write_Str ("Associated_Node_For_Itype");
10147 Write_Str ("Dependent_Instances");
10150 Write_Str ("First_Exit_Statement");
10153 Write_Str ("Hiding_Loop_Variable");
10157 | E_Subprogram_Body
10159 Write_Str ("Mechanism");
10164 Write_Str ("Normalized_First_Bit");
10166 when E_Abstract_State =>
10167 Write_Str ("Refinement_Constituents");
10169 when E_Return_Statement =>
10170 Write_Str ("Return_Applies_To");
10173 Write_Str ("Field8??");
10175 end Write_Field8_Name;
10177 -----------------------
10178 -- Write_Field9_Name --
10179 -----------------------
10181 procedure Write_Field9_Name (Id : Entity_Id) is
10185 Write_Str ("Class_Wide_Type");
10187 when Object_Kind =>
10188 Write_Str ("Current_Value");
10191 | E_Generic_Function
10192 | E_Generic_Package
10193 | E_Generic_Procedure
10197 Write_Str ("Renaming_Map");
10200 Write_Str ("Field9??");
10202 end Write_Field9_Name;
10204 ------------------------
10205 -- Write_Field10_Name --
10206 ------------------------
10208 procedure Write_Field10_Name (Id : Entity_Id) is
10211 when Class_Wide_Kind
10218 Write_Str ("Direct_Primitive_Operations");
10223 Write_Str ("Discriminal_Link");
10226 Write_Str ("Float_Rep");
10233 Write_Str ("Handler_Records");
10238 Write_Str ("Normalized_Position_Max");
10240 when E_Abstract_State
10243 Write_Str ("Part_Of_Constituents");
10246 Write_Str ("Field10??");
10248 end Write_Field10_Name;
10250 ------------------------
10251 -- Write_Field11_Name --
10252 ------------------------
10254 procedure Write_Field11_Name (Id : Entity_Id) is
10258 Write_Str ("Block_Node");
10263 Write_Str ("Component_Bit_Offset");
10265 when Formal_Kind =>
10266 Write_Str ("Entry_Component");
10268 when E_Enumeration_Literal =>
10269 Write_Str ("Enumeration_Pos");
10274 Write_Str ("Full_View");
10276 when E_Generic_Package =>
10277 Write_Str ("Generic_Homonym");
10280 Write_Str ("Part_Of_References");
10287 Write_Str ("Protected_Body_Subprogram");
10290 Write_Str ("Field11??");
10292 end Write_Field11_Name;
10294 ------------------------
10295 -- Write_Field12_Name --
10296 ------------------------
10298 procedure Write_Field12_Name (Id : Entity_Id) is
10302 Write_Str ("Associated_Formal_Package");
10305 Write_Str ("Barrier_Function");
10307 when E_Enumeration_Literal =>
10308 Write_Str ("Enumeration_Rep");
10316 | E_In_Out_Parameter
10321 Write_Str ("Esize");
10326 Write_Str ("Next_Inlined_Subprogram");
10329 Write_Str ("Field12??");
10331 end Write_Field12_Name;
10333 ------------------------
10334 -- Write_Field13_Name --
10335 ------------------------
10337 procedure Write_Field13_Name (Id : Entity_Id) is
10343 Write_Str ("Component_Clause");
10350 | Generic_Unit_Kind
10352 Write_Str ("Elaboration_Entity");
10357 Write_Str ("Extra_Accessibility");
10360 Write_Str ("RM_Size");
10363 Write_Str ("Field13??");
10365 end Write_Field13_Name;
10367 -----------------------
10368 -- Write_Field14_Name --
10369 -----------------------
10371 procedure Write_Field14_Name (Id : Entity_Id) is
10381 Write_Str ("Alignment");
10386 Write_Str ("Normalized_Position");
10393 Write_Str ("Postconditions_Proc");
10396 Write_Str ("Field14??");
10398 end Write_Field14_Name;
10400 ------------------------
10401 -- Write_Field15_Name --
10402 ------------------------
10404 procedure Write_Field15_Name (Id : Entity_Id) is
10407 when E_Discriminant =>
10408 Write_Str ("Discriminant_Number");
10410 when E_Component =>
10411 Write_Str ("DT_Entry_Count");
10416 Write_Str ("DT_Position");
10419 Write_Str ("Entry_Parameters_Type");
10421 when Formal_Kind =>
10422 Write_Str ("Extra_Formal");
10425 Write_Str ("Pending_Access_Types");
10430 Write_Str ("Related_Instance");
10436 Write_Str ("Status_Flag_Or_Transient_Decl");
10439 Write_Str ("Field15??");
10441 end Write_Field15_Name;
10443 ------------------------
10444 -- Write_Field16_Name --
10445 ------------------------
10447 procedure Write_Field16_Name (Id : Entity_Id) is
10451 | E_Record_Type_With_Private
10453 Write_Str ("Access_Disp_Table");
10455 when E_Abstract_State =>
10456 Write_Str ("Body_References");
10458 when E_Class_Wide_Subtype
10461 Write_Str ("Cloned_Subtype");
10466 Write_Str ("DTC_Entity");
10468 when E_Component =>
10469 Write_Str ("Entry_Formal");
10471 when Concurrent_Kind
10472 | E_Generic_Package
10475 Write_Str ("First_Private_Entity");
10477 when Enumeration_Kind =>
10478 Write_Str ("Lit_Strings");
10480 when Decimal_Fixed_Point_Kind =>
10481 Write_Str ("Scale_Value");
10483 when E_String_Literal_Subtype =>
10484 Write_Str ("String_Literal_Length");
10486 when E_Out_Parameter
10489 Write_Str ("Unset_Reference");
10492 Write_Str ("Field16??");
10494 end Write_Field16_Name;
10496 ------------------------
10497 -- Write_Field17_Name --
10498 ------------------------
10500 procedure Write_Field17_Name (Id : Entity_Id) is
10505 | E_Generic_In_Out_Parameter
10508 Write_Str ("Actual_Subtype");
10510 when Digits_Kind =>
10511 Write_Str ("Digits_Value");
10513 when E_Discriminant =>
10514 Write_Str ("Discriminal");
10516 when Class_Wide_Kind
10523 | E_Generic_Function
10524 | E_Generic_Package
10525 | E_Generic_Procedure
10533 | E_Return_Statement
10534 | E_Subprogram_Body
10535 | E_Subprogram_Type
10537 Write_Str ("First_Entity");
10540 Write_Str ("First_Index");
10542 when Enumeration_Kind =>
10543 Write_Str ("First_Literal");
10545 when Access_Kind =>
10546 Write_Str ("Master_Id");
10548 when Modular_Integer_Kind =>
10549 Write_Str ("Modulus");
10551 when E_Component =>
10552 Write_Str ("Prival");
10555 Write_Str ("Field17??");
10557 end Write_Field17_Name;
10559 ------------------------
10560 -- Write_Field18_Name --
10561 ------------------------
10563 procedure Write_Field18_Name (Id : Entity_Id) is
10566 when E_Enumeration_Literal
10571 Write_Str ("Alias");
10573 when E_Record_Type =>
10574 Write_Str ("Corresponding_Concurrent_Type");
10576 when E_Subprogram_Body =>
10577 Write_Str ("Corresponding_Protected_Entry");
10579 when Concurrent_Kind =>
10580 Write_Str ("Corresponding_Record_Type");
10586 Write_Str ("Enclosing_Scope");
10588 when E_Entry_Index_Parameter =>
10589 Write_Str ("Entry_Index_Constant");
10591 when E_Access_Protected_Subprogram_Type
10592 | E_Access_Subprogram_Type
10593 | E_Anonymous_Access_Protected_Subprogram_Type
10595 | E_Class_Wide_Subtype
10597 Write_Str ("Equivalent_Type");
10599 when Fixed_Point_Kind =>
10600 Write_Str ("Delta_Value");
10602 when Enumeration_Kind =>
10603 Write_Str ("Lit_Indexes");
10605 when Incomplete_Or_Private_Kind
10608 Write_Str ("Private_Dependents");
10611 | E_Generic_Function
10612 | E_Generic_Package
10613 | E_Generic_Procedure
10616 Write_Str ("Renamed_Entity");
10618 when Object_Kind =>
10619 Write_Str ("Renamed_Object");
10621 when E_String_Literal_Subtype =>
10622 Write_Str ("String_Literal_Low_Bound");
10625 Write_Str ("Field18??");
10627 end Write_Field18_Name;
10629 -----------------------
10630 -- Write_Field19_Name --
10631 -----------------------
10633 procedure Write_Field19_Name (Id : Entity_Id) is
10636 when E_Generic_Package
10639 Write_Str ("Body_Entity");
10641 when E_Discriminant =>
10642 Write_Str ("Corresponding_Discriminant");
10644 when Scalar_Kind =>
10645 Write_Str ("Default_Aspect_Value");
10647 when E_Array_Type =>
10648 Write_Str ("Default_Component_Value");
10650 when E_Protected_Type =>
10651 Write_Str ("Entry_Bodies_Array");
10655 | E_Subprogram_Type
10657 Write_Str ("Extra_Accessibility_Of_Result");
10659 when E_Abstract_State
10660 | E_Class_Wide_Type
10661 | E_Incomplete_Type
10663 Write_Str ("Non_Limited_View");
10665 when E_Incomplete_Subtype =>
10666 if From_Limited_With (Id) then
10667 Write_Str ("Non_Limited_View");
10670 when E_Record_Type =>
10671 Write_Str ("Parent_Subtype");
10673 when E_Procedure =>
10674 Write_Str ("Receiving_Entry");
10679 Write_Str ("Size_Check_Code");
10684 Write_Str ("Spec_Entity");
10686 when Private_Kind =>
10687 Write_Str ("Underlying_Full_View");
10690 Write_Str ("Field19??");
10692 end Write_Field19_Name;
10694 -----------------------
10695 -- Write_Field20_Name --
10696 -----------------------
10698 procedure Write_Field20_Name (Id : Entity_Id) is
10702 Write_Str ("Component_Type");
10704 when E_Generic_In_Parameter
10707 Write_Str ("Default_Value");
10709 when Access_Kind =>
10710 Write_Str ("Directly_Designated_Type");
10712 when E_Component =>
10713 Write_Str ("Discriminant_Checking_Func");
10715 when E_Discriminant =>
10716 Write_Str ("Discriminant_Default_Value");
10718 when Class_Wide_Kind
10725 | E_Generic_Function
10726 | E_Generic_Package
10727 | E_Generic_Procedure
10735 | E_Return_Statement
10736 | E_Subprogram_Body
10737 | E_Subprogram_Type
10739 Write_Str ("Last_Entity");
10744 Write_Str ("Prival_Link");
10746 when E_Exception =>
10747 Write_Str ("Register_Exception_Call");
10749 when Scalar_Kind =>
10750 Write_Str ("Scalar_Range");
10753 Write_Str ("Field20??");
10755 end Write_Field20_Name;
10757 -----------------------
10758 -- Write_Field21_Name --
10759 -----------------------
10761 procedure Write_Field21_Name (Id : Entity_Id) is
10765 Write_Str ("Accept_Address");
10770 Write_Str ("Corresponding_Record_Component");
10772 when E_In_Parameter =>
10773 Write_Str ("Default_Expr_Function");
10775 when Concurrent_Kind
10776 | Incomplete_Or_Private_Kind
10781 Write_Str ("Discriminant_Constraint");
10786 | E_Generic_Function
10787 | E_Generic_Procedure
10791 Write_Str ("Interface_Name");
10794 | Modular_Integer_Kind
10796 Write_Str ("Original_Array_Type");
10798 when Fixed_Point_Kind =>
10799 Write_Str ("Small_Value");
10802 Write_Str ("Field21??");
10804 end Write_Field21_Name;
10806 -----------------------
10807 -- Write_Field22_Name --
10808 -----------------------
10810 procedure Write_Field22_Name (Id : Entity_Id) is
10813 when Access_Kind =>
10814 Write_Str ("Associated_Storage_Pool");
10817 Write_Str ("Component_Size");
10819 when E_Record_Type =>
10820 Write_Str ("Corresponding_Remote_Type");
10825 Write_Str ("Original_Record_Component");
10827 when E_Enumeration_Literal =>
10828 Write_Str ("Enumeration_Rep_Expr");
10830 when Formal_Kind =>
10831 Write_Str ("Protected_Formal");
10837 | E_Generic_Function
10838 | E_Generic_Package
10839 | E_Generic_Procedure
10845 | E_Return_Statement
10846 | E_Subprogram_Body
10849 Write_Str ("Scope_Depth_Value");
10852 Write_Str ("Shared_Var_Procs_Instance");
10855 Write_Str ("Field22??");
10857 end Write_Field22_Name;
10859 ------------------------
10860 -- Write_Field23_Name --
10861 ------------------------
10863 procedure Write_Field23_Name (Id : Entity_Id) is
10866 when E_Discriminant =>
10867 Write_Str ("CR_Discriminant");
10870 Write_Str ("Entry_Cancel_Parameter");
10872 when E_Enumeration_Type =>
10873 Write_Str ("Enum_Pos_To_Rep");
10878 Write_Str ("Extra_Constrained");
10880 when Access_Kind =>
10881 Write_Str ("Finalization_Master");
10883 when E_Generic_Function
10884 | E_Generic_Package
10885 | E_Generic_Procedure
10887 Write_Str ("Inner_Instances");
10890 Write_Str ("Packed_Array_Impl_Type");
10893 Write_Str ("Protection_Object");
10895 when Class_Wide_Kind
10897 | Incomplete_Or_Private_Kind
10901 Write_Str ("Stored_Constraint");
10906 if Present (Scope (Id))
10907 and then Is_Protected_Type (Scope (Id))
10909 Write_Str ("Protection_Object");
10911 Write_Str ("Generic_Renamings");
10915 if Is_Generic_Instance (Id) then
10916 Write_Str ("Generic_Renamings");
10918 Write_Str ("Limited_View");
10922 Write_Str ("Field23??");
10924 end Write_Field23_Name;
10926 ------------------------
10927 -- Write_Field24_Name --
10928 ------------------------
10930 procedure Write_Field24_Name (Id : Entity_Id) is
10934 Write_Str ("Incomplete_Actuals");
10940 Write_Str ("Related_Expression");
10942 when Formal_Kind =>
10943 Write_Str ("Minimum_Accessibility");
10949 Write_Str ("Subps_Index");
10952 Write_Str ("Field24???");
10954 end Write_Field24_Name;
10956 ------------------------
10957 -- Write_Field25_Name --
10958 ------------------------
10960 procedure Write_Field25_Name (Id : Entity_Id) is
10963 when E_Generic_Package
10966 Write_Str ("Abstract_States");
10971 Write_Str ("Contract_Wrapper");
10974 Write_Str ("Debug_Renaming_Link");
10976 when E_Component =>
10977 Write_Str ("DT_Offset_To_Top_Func");
10982 Write_Str ("Interface_Alias");
10984 when E_Record_Subtype
10985 | E_Record_Subtype_With_Private
10987 | E_Record_Type_With_Private
10989 Write_Str ("Interfaces");
10991 when E_Array_Subtype
10994 Write_Str ("Related_Array_Object");
10996 when Discrete_Kind =>
10997 Write_Str ("Static_Discrete_Predicate");
11000 Write_Str ("Static_Real_Or_String_Predicate");
11003 Write_Str ("Task_Body_Procedure");
11006 Write_Str ("Field25??");
11008 end Write_Field25_Name;
11010 ------------------------
11011 -- Write_Field26_Name --
11012 ------------------------
11014 procedure Write_Field26_Name (Id : Entity_Id) is
11018 | E_Record_Type_With_Private
11020 Write_Str ("Dispatch_Table_Wrappers");
11022 when E_In_Out_Parameter
11026 Write_Str ("Last_Assignment");
11031 Write_Str ("Overridden_Operation");
11033 when E_Generic_Package
11036 Write_Str ("Package_Instantiation");
11041 Write_Str ("Related_Type");
11046 Write_Str ("Storage_Size_Variable");
11049 Write_Str ("Field26??");
11051 end Write_Field26_Name;
11053 ------------------------
11054 -- Write_Field27_Name --
11055 ------------------------
11057 procedure Write_Field27_Name (Id : Entity_Id) is
11063 Write_Str ("Current_Use_Clause");
11069 Write_Str ("Related_Type");
11074 Write_Str ("Wrapped_Entity");
11077 Write_Str ("Field27??");
11079 end Write_Field27_Name;
11081 ------------------------
11082 -- Write_Field28_Name --
11083 ------------------------
11085 procedure Write_Field28_Name (Id : Entity_Id) is
11092 | E_Subprogram_Body
11093 | E_Subprogram_Type
11095 Write_Str ("Extra_Formals");
11100 Write_Str ("Finalizer");
11105 Write_Str ("Initialization_Statements");
11107 when E_Access_Subprogram_Type =>
11108 Write_Str ("Original_Access_Type");
11111 Write_Str ("Relative_Deadline_Variable");
11113 when E_Record_Type =>
11114 Write_Str ("Underlying_Record_View");
11117 Write_Str ("Field28??");
11119 end Write_Field28_Name;
11121 ------------------------
11122 -- Write_Field29_Name --
11123 ------------------------
11125 procedure Write_Field29_Name (Id : Entity_Id) is
11131 | E_Subprogram_Body
11133 Write_Str ("Anonymous_Masters");
11138 Write_Str ("BIP_Initialization_Call");
11141 Write_Str ("Subprograms_For_Type");
11144 Write_Str ("Field29??");
11146 end Write_Field29_Name;
11148 ------------------------
11149 -- Write_Field30_Name --
11150 ------------------------
11152 procedure Write_Field30_Name (Id : Entity_Id) is
11156 | E_Record_Type_With_Private
11158 Write_Str ("Access_Disp_Table_Elab_Flag");
11160 when E_Protected_Type
11163 Write_Str ("Anonymous_Object");
11166 Write_Str ("Corresponding_Equality");
11171 Write_Str ("Last_Aggregate_Assignment");
11173 when E_Procedure =>
11174 Write_Str ("Static_Initialization");
11177 Write_Str ("Field30??");
11179 end Write_Field30_Name;
11181 ------------------------
11182 -- Write_Field31_Name --
11183 ------------------------
11185 procedure Write_Field31_Name (Id : Entity_Id) is
11190 | E_In_Out_Parameter
11195 Write_Str ("Activation_Record_Component");
11198 Write_Str ("Derived_Type_Link");
11203 Write_Str ("Thunk_Entity");
11206 Write_Str ("Field31??");
11208 end Write_Field31_Name;
11210 ------------------------
11211 -- Write_Field32_Name --
11212 ------------------------
11214 procedure Write_Field32_Name (Id : Entity_Id) is
11217 when E_Procedure =>
11218 Write_Str ("Corresponding_Function");
11221 Write_Str ("Corresponding_Procedure");
11223 when E_Abstract_State
11227 Write_Str ("Encapsulating_State");
11230 Write_Str ("No_Tagged_Streams_Pragma");
11233 Write_Str ("Field32??");
11235 end Write_Field32_Name;
11237 ------------------------
11238 -- Write_Field33_Name --
11239 ------------------------
11241 procedure Write_Field33_Name (Id : Entity_Id) is
11244 when Subprogram_Kind
11249 Write_Str ("Linker_Section_Pragma");
11252 Write_Str ("Field33??");
11254 end Write_Field33_Name;
11256 ------------------------
11257 -- Write_Field34_Name --
11258 ------------------------
11260 procedure Write_Field34_Name (Id : Entity_Id) is
11267 | E_Generic_Function
11268 | E_Generic_Package
11269 | E_Generic_Procedure
11275 | E_Subprogram_Body
11281 Write_Str ("Contract");
11284 Write_Str ("Field34??");
11286 end Write_Field34_Name;
11288 ------------------------
11289 -- Write_Field35_Name --
11290 ------------------------
11292 procedure Write_Field35_Name (Id : Entity_Id) is
11296 Write_Str ("Anonymous_Designated_Type");
11301 Write_Str ("Entry_Max_Queue_Lenghts_Array");
11303 when Subprogram_Kind =>
11304 Write_Str ("Import_Pragma");
11307 Write_Str ("Field35??");
11309 end Write_Field35_Name;
11311 ------------------------
11312 -- Write_Field36_Name --
11313 ------------------------
11315 procedure Write_Field36_Name (Id : Entity_Id) is
11316 pragma Unreferenced (Id);
11318 Write_Str ("Prev_Entity");
11319 end Write_Field36_Name;
11321 ------------------------
11322 -- Write_Field37_Name --
11323 ------------------------
11325 procedure Write_Field37_Name (Id : Entity_Id) is
11326 pragma Unreferenced (Id);
11328 Write_Str ("Associated_Entity");
11329 end Write_Field37_Name;
11331 ------------------------
11332 -- Write_Field38_Name --
11333 ------------------------
11335 procedure Write_Field38_Name (Id : Entity_Id) is
11341 Write_Str ("Class_Wide_Clone");
11343 when E_Array_Subtype
11345 | E_Record_Subtype_With_Private
11347 Write_Str ("Predicated_Parent");
11350 Write_Str ("Validated_Object");
11353 Write_Str ("Field38??");
11355 end Write_Field38_Name;
11357 ------------------------
11358 -- Write_Field39_Name --
11359 ------------------------
11361 procedure Write_Field39_Name (Id : Entity_Id) is
11367 Write_Str ("Protected_Subprogram");
11370 Write_Str ("Field39??");
11372 end Write_Field39_Name;
11374 ------------------------
11375 -- Write_Field40_Name --
11376 ------------------------
11378 procedure Write_Field40_Name (Id : Entity_Id) is
11381 when E_Abstract_State
11386 | E_Generic_Function
11387 | E_Generic_Package
11388 | E_Generic_Procedure
11394 | E_Subprogram_Body
11400 Write_Str ("SPARK_Pragma");
11403 Write_Str ("Field40??");
11405 end Write_Field40_Name;
11407 ------------------------
11408 -- Write_Field41_Name --
11409 ------------------------
11411 procedure Write_Field41_Name (Id : Entity_Id) is
11417 Write_Str ("Original_Protected_Subprogram");
11419 when E_Generic_Package
11425 Write_Str ("SPARK_Aux_Pragma");
11428 Write_Str ("Field41??");
11430 end Write_Field41_Name;
11432 -------------------------
11433 -- Iterator Procedures --
11434 -------------------------
11436 procedure Proc_Next_Component (N : in out Node_Id) is
11438 N := Next_Component (N);
11439 end Proc_Next_Component;
11441 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
11443 N := Next_Entity (N);
11444 while Present (N) loop
11445 exit when Ekind_In (N, E_Component, E_Discriminant);
11446 N := Next_Entity (N);
11448 end Proc_Next_Component_Or_Discriminant;
11450 procedure Proc_Next_Discriminant (N : in out Node_Id) is
11452 N := Next_Discriminant (N);
11453 end Proc_Next_Discriminant;
11455 procedure Proc_Next_Formal (N : in out Node_Id) is
11457 N := Next_Formal (N);
11458 end Proc_Next_Formal;
11460 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
11462 N := Next_Formal_With_Extras (N);
11463 end Proc_Next_Formal_With_Extras;
11465 procedure Proc_Next_Index (N : in out Node_Id) is
11467 N := Next_Index (N);
11468 end Proc_Next_Index;
11470 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
11472 N := Next_Inlined_Subprogram (N);
11473 end Proc_Next_Inlined_Subprogram;
11475 procedure Proc_Next_Literal (N : in out Node_Id) is
11477 N := Next_Literal (N);
11478 end Proc_Next_Literal;
11480 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
11482 N := Next_Stored_Discriminant (N);
11483 end Proc_Next_Stored_Discriminant;