1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2018, 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 -- Related_Expression Node24
219 -- Subps_Index Uint24
221 -- Contract_Wrapper Node25
222 -- Debug_Renaming_Link Node25
223 -- DT_Offset_To_Top_Func Node25
224 -- Interface_Alias Node25
225 -- Interfaces Elist25
226 -- Related_Array_Object Node25
227 -- Static_Discrete_Predicate List25
228 -- Static_Real_Or_String_Predicate Node25
229 -- Task_Body_Procedure Node25
231 -- Dispatch_Table_Wrappers Elist26
232 -- Last_Assignment Node26
233 -- Overridden_Operation Node26
234 -- Package_Instantiation Node26
235 -- Storage_Size_Variable Node26
237 -- Current_Use_Clause Node27
238 -- Related_Type Node27
239 -- Wrapped_Entity Node27
241 -- Extra_Formals Node28
243 -- Initialization_Statements Node28
244 -- Original_Access_Type Node28
245 -- Relative_Deadline_Variable Node28
246 -- Underlying_Record_View Node28
248 -- Anonymous_Masters Elist29
249 -- BIP_Initialization_Call Node29
250 -- Subprograms_For_Type Elist29
252 -- Access_Disp_Table_Elab_Flag Node30
253 -- Anonymous_Object Node30
254 -- Corresponding_Equality Node30
255 -- Hidden_In_Formal_Instance Elist30
256 -- Last_Aggregate_Assignment Node30
257 -- Static_Initialization Node30
259 -- Activation_Record_Component Node31
260 -- Derived_Type_Link Node31
261 -- Thunk_Entity Node31
263 -- Corresponding_Function Node32
264 -- Corresponding_Procedure Node32
265 -- Encapsulating_State Node32
266 -- No_Tagged_Streams_Pragma Node32
268 -- Linker_Section_Pragma Node33
272 -- Anonymous_Designated_Type Node35
273 -- Entry_Max_Queue_Lengths_Array Node35
274 -- Import_Pragma Node35
276 -- Validated_Object Node38
277 -- Predicated_Parent Node38
278 -- Class_Wide_Clone Node38
280 -- Protected_Subprogram Node39
282 -- SPARK_Pragma Node40
284 -- Original_Protected_Subprogram Node41
285 -- SPARK_Aux_Pragma Node41
287 ---------------------------------------------
288 -- Usage of Flags in Defining Entity Nodes --
289 ---------------------------------------------
291 -- All flags are unique, there is no overlaying, so each flag is physically
292 -- present in every entity. However, for many of the flags, it only makes
293 -- sense for them to be set true for certain subsets of entity kinds. See
294 -- the spec of Einfo for further details.
296 -- Is_Inlined_Always Flag1
297 -- Is_Hidden_Non_Overridden_Subpgm Flag2
300 -- Has_Discriminants Flag5
301 -- Is_Dispatching_Operation Flag6
302 -- Is_Immediately_Visible Flag7
304 -- Is_Potentially_Use_Visible Flag9
308 -- Is_Constrained Flag12
309 -- Is_Generic_Type Flag13
310 -- Depends_On_Private Flag14
312 -- Is_Volatile Flag16
313 -- Is_Internal Flag17
314 -- Has_Delayed_Freeze Flag18
315 -- Is_Abstract_Subprogram Flag19
316 -- Is_Concurrent_Record_Type Flag20
318 -- Has_Master_Entity Flag21
319 -- Needs_No_Actuals Flag22
320 -- Has_Storage_Size_Clause Flag23
321 -- Is_Imported Flag24
322 -- Is_Limited_Record Flag25
323 -- Has_Completion Flag26
324 -- Has_Pragma_Controlled Flag27
325 -- Is_Statically_Allocated Flag28
326 -- Has_Size_Clause Flag29
329 -- Checks_May_Be_Suppressed Flag31
330 -- Kill_Elaboration_Checks Flag32
331 -- Kill_Range_Checks Flag33
332 -- Has_Independent_Components Flag34
333 -- Is_Class_Wide_Equivalent_Type Flag35
334 -- Referenced_As_LHS Flag36
335 -- Is_Known_Non_Null Flag37
336 -- Can_Never_Be_Null Flag38
337 -- Has_Default_Aspect Flag39
338 -- Body_Needed_For_SAL Flag40
340 -- Treat_As_Volatile Flag41
341 -- Is_Controlled_Active Flag42
342 -- Has_Controlled_Component Flag43
344 -- In_Private_Part Flag45
345 -- Has_Alignment_Clause Flag46
347 -- In_Package_Body Flag48
349 -- Delay_Subprogram_Descriptors Flag50
352 -- Is_Entry_Formal Flag52
353 -- Is_Private_Descendant Flag53
354 -- Return_Present Flag54
355 -- Is_Tagged_Type Flag55
356 -- Has_Homonym Flag56
358 -- Non_Binary_Modulus Flag58
359 -- Is_Preelaborated Flag59
360 -- Is_Shared_Passive Flag60
362 -- Is_Remote_Types Flag61
363 -- Is_Remote_Call_Interface Flag62
364 -- Is_Character_Type Flag63
365 -- Is_Intrinsic_Subprogram Flag64
366 -- Has_Record_Rep_Clause Flag65
367 -- Has_Enumeration_Rep_Clause Flag66
368 -- Has_Small_Clause Flag67
369 -- Has_Component_Size_Clause Flag68
370 -- Is_Access_Constant Flag69
371 -- Is_First_Subtype Flag70
373 -- Has_Completion_In_Body Flag71
374 -- Has_Unknown_Discriminants Flag72
375 -- Is_Child_Unit Flag73
376 -- Is_CPP_Class Flag74
377 -- Has_Non_Standard_Rep Flag75
378 -- Is_Constructor Flag76
379 -- Static_Elaboration_Desired Flag77
381 -- Has_All_Calls_Remote Flag79
382 -- Is_Constr_Subt_For_U_Nominal Flag80
384 -- Is_Asynchronous Flag81
385 -- Has_Gigi_Rep_Item Flag82
386 -- Has_Machine_Radix_Clause Flag83
387 -- Machine_Radix_10 Flag84
389 -- Has_Atomic_Components Flag86
390 -- Has_Volatile_Components Flag87
391 -- Discard_Names Flag88
392 -- Is_Interrupt_Handler Flag89
393 -- Returns_By_Ref Flag90
396 -- Size_Known_At_Compile_Time Flag92
397 -- Reverse_Storage_Order Flag93
398 -- Is_Generic_Actual_Type Flag94
399 -- Uses_Sec_Stack Flag95
400 -- Warnings_Off Flag96
401 -- Is_Controlling_Formal Flag97
402 -- Has_Controlling_Result Flag98
403 -- Is_Exported Flag99
404 -- Has_Specified_Layout Flag100
406 -- Has_Nested_Block_With_Handler Flag101
408 -- Is_Completely_Hidden Flag103
409 -- Address_Taken Flag104
410 -- Suppress_Initialization Flag105
411 -- Is_Limited_Composite Flag106
412 -- Is_Private_Composite Flag107
413 -- Default_Expressions_Processed Flag108
414 -- Is_Non_Static_Subtype Flag109
415 -- Has_Out_Or_In_Out_Parameter Flag110
417 -- Is_Formal_Subprogram Flag111
418 -- Is_Renaming_Of_Object Flag112
420 -- Delay_Cleanups Flag114
421 -- Never_Set_In_Source Flag115
422 -- Is_Visible_Lib_Unit Flag116
423 -- Is_Unchecked_Union Flag117
424 -- Is_For_Access_Subtype Flag118
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
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 (Ekind_In (Id, E_Generic_Package, E_Package));
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 (Ekind_In (Id, E_Package, E_Generic_Package));
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 (Ekind_In (Id, E_Package, E_Generic_Package)
1428 or else Ekind (Id) in Concurrent_Kind);
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 Is_Abstract_Subprogram (Id : E) return B is
2082 pragma Assert (Is_Overloadable (Id));
2084 end Is_Abstract_Subprogram;
2086 function Is_Abstract_Type (Id : E) return B is
2088 pragma Assert (Is_Type (Id));
2089 return Flag146 (Id);
2090 end Is_Abstract_Type;
2092 function Is_Access_Constant (Id : E) return B is
2094 pragma Assert (Is_Access_Type (Id));
2096 end Is_Access_Constant;
2098 function Is_Activation_Record (Id : E) return B is
2100 pragma Assert (Ekind (Id) = E_In_Parameter);
2101 return Flag305 (Id);
2102 end Is_Activation_Record;
2104 function Is_Actual_Subtype (Id : E) return B is
2106 pragma Assert (Is_Type (Id));
2107 return Flag293 (Id);
2108 end Is_Actual_Subtype;
2110 function Is_Ada_2005_Only (Id : E) return B is
2112 return Flag185 (Id);
2113 end Is_Ada_2005_Only;
2115 function Is_Ada_2012_Only (Id : E) return B is
2117 return Flag199 (Id);
2118 end Is_Ada_2012_Only;
2120 function Is_Aliased (Id : E) return B is
2122 pragma Assert (Nkind (Id) in N_Entity);
2126 function Is_Asynchronous (Id : E) return B is
2128 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
2130 end Is_Asynchronous;
2132 function Is_Atomic (Id : E) return B is
2137 function Is_Bit_Packed_Array (Id : E) return B is
2139 return Flag122 (Implementation_Base_Type (Id));
2140 end Is_Bit_Packed_Array;
2142 function Is_Called (Id : E) return B is
2144 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
2145 return Flag102 (Id);
2148 function Is_Character_Type (Id : E) return B is
2151 end Is_Character_Type;
2153 function Is_Checked_Ghost_Entity (Id : E) return B is
2155 -- Allow this attribute to appear on unanalyzed entities
2157 pragma Assert (Nkind (Id) in N_Entity
2158 or else Ekind (Id) = E_Void);
2159 return Flag277 (Id);
2160 end Is_Checked_Ghost_Entity;
2162 function Is_Child_Unit (Id : E) return B is
2167 function Is_Class_Wide_Clone (Id : E) return B is
2169 return Flag290 (Id);
2170 end Is_Class_Wide_Clone;
2172 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2175 end Is_Class_Wide_Equivalent_Type;
2177 function Is_Compilation_Unit (Id : E) return B is
2179 return Flag149 (Id);
2180 end Is_Compilation_Unit;
2182 function Is_Completely_Hidden (Id : E) return B is
2184 pragma Assert (Ekind (Id) = E_Discriminant);
2185 return Flag103 (Id);
2186 end Is_Completely_Hidden;
2188 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2191 end Is_Constr_Subt_For_U_Nominal;
2193 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2195 return Flag141 (Id);
2196 end Is_Constr_Subt_For_UN_Aliased;
2198 function Is_Constrained (Id : E) return B is
2200 pragma Assert (Nkind (Id) in N_Entity);
2204 function Is_Constructor (Id : E) return B is
2209 function Is_Controlled_Active (Id : E) return B is
2211 return Flag42 (Base_Type (Id));
2212 end Is_Controlled_Active;
2214 function Is_Controlling_Formal (Id : E) return B is
2216 pragma Assert (Is_Formal (Id));
2218 end Is_Controlling_Formal;
2220 function Is_CPP_Class (Id : E) return B is
2225 function Is_DIC_Procedure (Id : E) return B is
2227 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2228 return Flag132 (Id);
2229 end Is_DIC_Procedure;
2231 function Is_Descendant_Of_Address (Id : E) return B is
2233 return Flag223 (Id);
2234 end Is_Descendant_Of_Address;
2236 function Is_Discrim_SO_Function (Id : E) return B is
2238 return Flag176 (Id);
2239 end Is_Discrim_SO_Function;
2241 function Is_Discriminant_Check_Function (Id : E) return B is
2243 return Flag264 (Id);
2244 end Is_Discriminant_Check_Function;
2246 function Is_Dispatch_Table_Entity (Id : E) return B is
2248 return Flag234 (Id);
2249 end Is_Dispatch_Table_Entity;
2251 function Is_Dispatching_Operation (Id : E) return B is
2253 pragma Assert (Nkind (Id) in N_Entity);
2255 end Is_Dispatching_Operation;
2257 function Is_Elaboration_Checks_OK_Id (Id : E) return B is
2259 pragma Assert (Is_Elaboration_Target (Id));
2260 return Flag148 (Id);
2261 end Is_Elaboration_Checks_OK_Id;
2263 function Is_Elaboration_Warnings_OK_Id (Id : E) return B is
2265 pragma Assert (Is_Elaboration_Target (Id) or else Ekind (Id) = E_Void);
2266 return Flag304 (Id);
2267 end Is_Elaboration_Warnings_OK_Id;
2269 function Is_Eliminated (Id : E) return B is
2271 return Flag124 (Id);
2274 function Is_Entry_Formal (Id : E) return B is
2277 end Is_Entry_Formal;
2279 function Is_Entry_Wrapper (Id : E) return B is
2281 return Flag297 (Id);
2282 end Is_Entry_Wrapper;
2284 function Is_Exception_Handler (Id : E) return B is
2286 pragma Assert (Ekind (Id) = E_Block);
2287 return Flag286 (Id);
2288 end Is_Exception_Handler;
2290 function Is_Exported (Id : E) return B is
2295 function Is_Finalized_Transient (Id : E) return B is
2297 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2298 return Flag252 (Id);
2299 end Is_Finalized_Transient;
2301 function Is_First_Subtype (Id : E) return B is
2304 end Is_First_Subtype;
2306 function Is_For_Access_Subtype (Id : E) return B is
2308 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2309 return Flag118 (Id);
2310 end Is_For_Access_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 (Id) = E_Function or else Ekind (Id) = 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 Modulus (Id : E) return Uint is
2859 pragma Assert (Is_Modular_Integer_Type (Id));
2860 return Uint17 (Base_Type (Id));
2863 function Must_Be_On_Byte_Boundary (Id : E) return B is
2865 pragma Assert (Is_Type (Id));
2866 return Flag183 (Id);
2867 end Must_Be_On_Byte_Boundary;
2869 function Must_Have_Preelab_Init (Id : E) return B is
2871 pragma Assert (Is_Type (Id));
2872 return Flag208 (Id);
2873 end Must_Have_Preelab_Init;
2875 function Needs_Activation_Record (Id : E) return B is
2877 return Flag306 (Id);
2878 end Needs_Activation_Record;
2880 function Needs_Debug_Info (Id : E) return B is
2882 return Flag147 (Id);
2883 end Needs_Debug_Info;
2885 function Needs_No_Actuals (Id : E) return B is
2888 (Is_Overloadable (Id)
2889 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2891 end Needs_No_Actuals;
2893 function Never_Set_In_Source (Id : E) return B is
2895 return Flag115 (Id);
2896 end Never_Set_In_Source;
2898 function Next_Inlined_Subprogram (Id : E) return E is
2901 end Next_Inlined_Subprogram;
2903 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2905 pragma Assert (Is_Discrete_Type (Id));
2906 return Flag276 (Id);
2907 end No_Dynamic_Predicate_On_Actual;
2909 function No_Pool_Assigned (Id : E) return B is
2911 pragma Assert (Is_Access_Type (Id));
2912 return Flag131 (Root_Type (Id));
2913 end No_Pool_Assigned;
2915 function No_Predicate_On_Actual (Id : E) return Boolean is
2917 pragma Assert (Is_Discrete_Type (Id));
2918 return Flag275 (Id);
2919 end No_Predicate_On_Actual;
2921 function No_Reordering (Id : E) return B is
2923 pragma Assert (Is_Record_Type (Id));
2924 return Flag239 (Implementation_Base_Type (Id));
2927 function No_Return (Id : E) return B is
2929 return Flag113 (Id);
2932 function No_Strict_Aliasing (Id : E) return B is
2934 pragma Assert (Is_Access_Type (Id));
2935 return Flag136 (Base_Type (Id));
2936 end No_Strict_Aliasing;
2938 function No_Tagged_Streams_Pragma (Id : E) return N is
2940 pragma Assert (Is_Tagged_Type (Id));
2942 end No_Tagged_Streams_Pragma;
2944 function Non_Binary_Modulus (Id : E) return B is
2946 pragma Assert (Is_Type (Id));
2947 return Flag58 (Base_Type (Id));
2948 end Non_Binary_Modulus;
2950 function Non_Limited_View (Id : E) return E is
2953 (Ekind (Id) in Incomplete_Kind
2955 Ekind (Id) in Class_Wide_Kind
2957 Ekind (Id) = E_Abstract_State);
2959 end Non_Limited_View;
2961 function Nonzero_Is_True (Id : E) return B is
2963 pragma Assert (Root_Type (Id) = Standard_Boolean);
2964 return Flag162 (Base_Type (Id));
2965 end Nonzero_Is_True;
2967 function Normalized_First_Bit (Id : E) return U is
2969 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2971 end Normalized_First_Bit;
2973 function Normalized_Position (Id : E) return U is
2975 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2977 end Normalized_Position;
2979 function Normalized_Position_Max (Id : E) return U is
2981 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2983 end Normalized_Position_Max;
2985 function OK_To_Rename (Id : E) return B is
2987 pragma Assert (Ekind (Id) = E_Variable);
2988 return Flag247 (Id);
2991 function Optimize_Alignment_Space (Id : E) return B is
2994 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2995 return Flag241 (Id);
2996 end Optimize_Alignment_Space;
2998 function Optimize_Alignment_Time (Id : E) return B is
3001 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
3002 return Flag242 (Id);
3003 end Optimize_Alignment_Time;
3005 function Original_Access_Type (Id : E) return E is
3007 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
3009 end Original_Access_Type;
3011 function Original_Array_Type (Id : E) return E is
3013 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
3015 end Original_Array_Type;
3017 function Original_Protected_Subprogram (Id : E) return N is
3020 end Original_Protected_Subprogram;
3022 function Original_Record_Component (Id : E) return E is
3024 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
3026 end Original_Record_Component;
3028 function Overlays_Constant (Id : E) return B is
3030 return Flag243 (Id);
3031 end Overlays_Constant;
3033 function Overridden_Operation (Id : E) return E is
3035 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
3037 end Overridden_Operation;
3039 function Package_Instantiation (Id : E) return N is
3041 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3043 end Package_Instantiation;
3045 function Packed_Array_Impl_Type (Id : E) return E is
3047 pragma Assert (Is_Array_Type (Id));
3049 end Packed_Array_Impl_Type;
3051 function Parent_Subtype (Id : E) return E is
3053 pragma Assert (Is_Record_Type (Id));
3054 return Node19 (Base_Type (Id));
3057 function Part_Of_Constituents (Id : E) return L is
3059 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3060 return Elist10 (Id);
3061 end Part_Of_Constituents;
3063 function Part_Of_References (Id : E) return L is
3065 pragma Assert (Ekind (Id) = E_Variable);
3066 return Elist11 (Id);
3067 end Part_Of_References;
3069 function Partial_View_Has_Unknown_Discr (Id : E) return B is
3071 pragma Assert (Is_Type (Id));
3072 return Flag280 (Id);
3073 end Partial_View_Has_Unknown_Discr;
3075 function Pending_Access_Types (Id : E) return L is
3077 pragma Assert (Is_Type (Id));
3078 return Elist15 (Id);
3079 end Pending_Access_Types;
3081 function Postconditions_Proc (Id : E) return E is
3083 pragma Assert (Ekind_In (Id, E_Entry,
3088 end Postconditions_Proc;
3090 function Predicated_Parent (Id : E) return E is
3092 pragma Assert (Ekind_In (Id, E_Array_Subtype,
3094 E_Record_Subtype_With_Private));
3096 end Predicated_Parent;
3098 function Predicates_Ignored (Id : E) return B is
3100 pragma Assert (Is_Type (Id));
3101 return Flag288 (Id);
3102 end Predicates_Ignored;
3104 function Prev_Entity (Id : E) return E is
3109 function Prival (Id : E) return E is
3111 pragma Assert (Is_Protected_Component (Id));
3115 function Prival_Link (Id : E) return E is
3117 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3121 function Private_Dependents (Id : E) return L is
3123 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
3124 return Elist18 (Id);
3125 end Private_Dependents;
3127 function Protected_Body_Subprogram (Id : E) return E is
3129 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
3131 end Protected_Body_Subprogram;
3133 function Protected_Formal (Id : E) return E is
3135 pragma Assert (Is_Formal (Id));
3137 end Protected_Formal;
3139 function Protected_Subprogram (Id : E) return N is
3141 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3143 end Protected_Subprogram;
3145 function Protection_Object (Id : E) return E is
3147 pragma Assert (Ekind_In (Id, E_Entry,
3152 end Protection_Object;
3154 function Reachable (Id : E) return B is
3159 function Receiving_Entry (Id : E) return E is
3161 pragma Assert (Ekind (Id) = E_Procedure);
3163 end Receiving_Entry;
3165 function Referenced (Id : E) return B is
3167 return Flag156 (Id);
3170 function Referenced_As_LHS (Id : E) return B is
3173 end Referenced_As_LHS;
3175 function Referenced_As_Out_Parameter (Id : E) return B is
3177 return Flag227 (Id);
3178 end Referenced_As_Out_Parameter;
3180 function Refinement_Constituents (Id : E) return L is
3182 pragma Assert (Ekind (Id) = E_Abstract_State);
3184 end Refinement_Constituents;
3186 function Register_Exception_Call (Id : E) return N is
3188 pragma Assert (Ekind (Id) = E_Exception);
3190 end Register_Exception_Call;
3192 function Related_Array_Object (Id : E) return E is
3194 pragma Assert (Is_Array_Type (Id));
3196 end Related_Array_Object;
3198 function Related_Expression (Id : E) return N is
3200 pragma Assert (Ekind (Id) in Type_Kind
3201 or else Ekind_In (Id, E_Constant, E_Variable));
3203 end Related_Expression;
3205 function Related_Instance (Id : E) return E is
3207 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3209 end Related_Instance;
3211 function Related_Type (Id : E) return E is
3213 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
3217 function Relative_Deadline_Variable (Id : E) return E is
3219 pragma Assert (Is_Task_Type (Id));
3220 return Node28 (Implementation_Base_Type (Id));
3221 end Relative_Deadline_Variable;
3223 function Renamed_Entity (Id : E) return N is
3228 function Renamed_In_Spec (Id : E) return B is
3230 pragma Assert (Ekind (Id) = E_Package);
3231 return Flag231 (Id);
3232 end Renamed_In_Spec;
3234 function Renamed_Object (Id : E) return N is
3239 function Renaming_Map (Id : E) return U is
3244 function Requires_Overriding (Id : E) return B is
3246 pragma Assert (Is_Overloadable (Id));
3247 return Flag213 (Id);
3248 end Requires_Overriding;
3250 function Return_Present (Id : E) return B is
3255 function Return_Applies_To (Id : E) return N is
3258 end Return_Applies_To;
3260 function Returns_By_Ref (Id : E) return B is
3265 function Reverse_Bit_Order (Id : E) return B is
3267 pragma Assert (Is_Record_Type (Id));
3268 return Flag164 (Base_Type (Id));
3269 end Reverse_Bit_Order;
3271 function Reverse_Storage_Order (Id : E) return B is
3273 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3274 return Flag93 (Base_Type (Id));
3275 end Reverse_Storage_Order;
3277 function Rewritten_For_C (Id : E) return B is
3279 pragma Assert (Ekind (Id) = E_Function);
3280 return Flag287 (Id);
3281 end Rewritten_For_C;
3283 function RM_Size (Id : E) return U is
3285 pragma Assert (Is_Type (Id));
3289 function Scalar_Range (Id : E) return N is
3294 function Scale_Value (Id : E) return U is
3299 function Scope_Depth_Value (Id : E) return U is
3302 end Scope_Depth_Value;
3304 function Sec_Stack_Needed_For_Return (Id : E) return B is
3306 return Flag167 (Id);
3307 end Sec_Stack_Needed_For_Return;
3309 function Shared_Var_Procs_Instance (Id : E) return E is
3311 pragma Assert (Ekind (Id) = E_Variable);
3313 end Shared_Var_Procs_Instance;
3315 function Size_Check_Code (Id : E) return N is
3317 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3319 end Size_Check_Code;
3321 function Size_Depends_On_Discriminant (Id : E) return B is
3323 return Flag177 (Id);
3324 end Size_Depends_On_Discriminant;
3326 function Size_Known_At_Compile_Time (Id : E) return B is
3329 end Size_Known_At_Compile_Time;
3331 function Small_Value (Id : E) return R is
3333 pragma Assert (Is_Fixed_Point_Type (Id));
3334 return Ureal21 (Id);
3337 function SPARK_Aux_Pragma (Id : E) return N is
3340 (Ekind_In (Id, E_Protected_Type, -- concurrent types
3343 Ekind_In (Id, E_Generic_Package, -- packages
3347 end SPARK_Aux_Pragma;
3349 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3352 (Ekind_In (Id, E_Protected_Type, -- concurrent types
3355 Ekind_In (Id, E_Generic_Package, -- packages
3358 return Flag266 (Id);
3359 end SPARK_Aux_Pragma_Inherited;
3361 function SPARK_Pragma (Id : E) return N is
3364 (Ekind_In (Id, E_Constant, -- objects
3367 Ekind_In (Id, E_Abstract_State, -- overloadable
3372 E_Generic_Procedure,
3377 Ekind_In (Id, E_Generic_Package, -- packages
3381 Ekind (Id) = E_Void -- special purpose
3383 Ekind_In (Id, E_Protected_Body, -- types
3390 function SPARK_Pragma_Inherited (Id : E) return B is
3393 (Ekind_In (Id, E_Constant, -- objects
3396 Ekind_In (Id, E_Abstract_State, -- overloadable
3401 E_Generic_Procedure,
3406 Ekind_In (Id, E_Generic_Package, -- packages
3410 Ekind (Id) = E_Void -- special purpose
3412 Ekind_In (Id, E_Protected_Body, -- types
3416 return Flag265 (Id);
3417 end SPARK_Pragma_Inherited;
3419 function Spec_Entity (Id : E) return E is
3421 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3425 function SSO_Set_High_By_Default (Id : E) return B is
3427 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3428 return Flag273 (Base_Type (Id));
3429 end SSO_Set_High_By_Default;
3431 function SSO_Set_Low_By_Default (Id : E) return B is
3433 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3434 return Flag272 (Base_Type (Id));
3435 end SSO_Set_Low_By_Default;
3437 function Static_Discrete_Predicate (Id : E) return S is
3439 pragma Assert (Is_Discrete_Type (Id));
3441 end Static_Discrete_Predicate;
3443 function Static_Real_Or_String_Predicate (Id : E) return N is
3445 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3447 end Static_Real_Or_String_Predicate;
3449 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3451 pragma Assert (Ekind_In (Id, E_Constant,
3455 end Status_Flag_Or_Transient_Decl;
3457 function Storage_Size_Variable (Id : E) return E is
3459 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3460 return Node26 (Implementation_Base_Type (Id));
3461 end Storage_Size_Variable;
3463 function Static_Elaboration_Desired (Id : E) return B is
3465 pragma Assert (Ekind (Id) = E_Package);
3467 end Static_Elaboration_Desired;
3469 function Static_Initialization (Id : E) return N is
3472 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3474 end Static_Initialization;
3476 function Stored_Constraint (Id : E) return L is
3479 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3480 return Elist23 (Id);
3481 end Stored_Constraint;
3483 function Stores_Attribute_Old_Prefix (Id : E) return B is
3485 return Flag270 (Id);
3486 end Stores_Attribute_Old_Prefix;
3488 function Strict_Alignment (Id : E) return B is
3490 return Flag145 (Implementation_Base_Type (Id));
3491 end Strict_Alignment;
3493 function String_Literal_Length (Id : E) return U is
3496 end String_Literal_Length;
3498 function String_Literal_Low_Bound (Id : E) return N is
3501 end String_Literal_Low_Bound;
3503 function Subprograms_For_Type (Id : E) return L is
3505 pragma Assert (Is_Type (Id));
3506 return Elist29 (Id);
3507 end Subprograms_For_Type;
3509 function Subps_Index (Id : E) return U is
3511 pragma Assert (Is_Subprogram (Id));
3515 function Suppress_Elaboration_Warnings (Id : E) return B is
3517 return Flag303 (Id);
3518 end Suppress_Elaboration_Warnings;
3520 function Suppress_Initialization (Id : E) return B is
3522 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3523 return Flag105 (Id);
3524 end Suppress_Initialization;
3526 function Suppress_Style_Checks (Id : E) return B is
3528 return Flag165 (Id);
3529 end Suppress_Style_Checks;
3531 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3533 return Flag217 (Id);
3534 end Suppress_Value_Tracking_On_Call;
3536 function Task_Body_Procedure (Id : E) return N is
3538 pragma Assert (Ekind (Id) in Task_Kind);
3540 end Task_Body_Procedure;
3542 function Thunk_Entity (Id : E) return E is
3544 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3545 and then Is_Thunk (Id));
3549 function Treat_As_Volatile (Id : E) return B is
3552 end Treat_As_Volatile;
3554 function Underlying_Full_View (Id : E) return E is
3556 pragma Assert (Ekind (Id) in Private_Kind);
3558 end Underlying_Full_View;
3560 function Underlying_Record_View (Id : E) return E is
3563 end Underlying_Record_View;
3565 function Universal_Aliasing (Id : E) return B is
3567 pragma Assert (Is_Type (Id));
3568 return Flag216 (Implementation_Base_Type (Id));
3569 end Universal_Aliasing;
3571 function Unset_Reference (Id : E) return N is
3574 end Unset_Reference;
3576 function Used_As_Generic_Actual (Id : E) return B is
3578 return Flag222 (Id);
3579 end Used_As_Generic_Actual;
3581 function Uses_Lock_Free (Id : E) return B is
3583 pragma Assert (Is_Protected_Type (Id));
3584 return Flag188 (Id);
3587 function Uses_Sec_Stack (Id : E) return B is
3592 function Validated_Object (Id : E) return N is
3594 pragma Assert (Ekind (Id) = E_Variable);
3596 end Validated_Object;
3598 function Warnings_Off (Id : E) return B is
3603 function Warnings_Off_Used (Id : E) return B is
3605 return Flag236 (Id);
3606 end Warnings_Off_Used;
3608 function Warnings_Off_Used_Unmodified (Id : E) return B is
3610 return Flag237 (Id);
3611 end Warnings_Off_Used_Unmodified;
3613 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3615 return Flag238 (Id);
3616 end Warnings_Off_Used_Unreferenced;
3618 function Wrapped_Entity (Id : E) return E is
3620 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3621 and then Is_Primitive_Wrapper (Id));
3625 function Was_Hidden (Id : E) return B is
3627 return Flag196 (Id);
3630 ------------------------------
3631 -- Classification Functions --
3632 ------------------------------
3634 function Is_Access_Type (Id : E) return B is
3636 return Ekind (Id) in Access_Kind;
3639 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3641 return Ekind (Id) in Access_Protected_Kind;
3642 end Is_Access_Protected_Subprogram_Type;
3644 function Is_Access_Subprogram_Type (Id : E) return B is
3646 return Ekind (Id) in Access_Subprogram_Kind;
3647 end Is_Access_Subprogram_Type;
3649 function Is_Aggregate_Type (Id : E) return B is
3651 return Ekind (Id) in Aggregate_Kind;
3652 end Is_Aggregate_Type;
3654 function Is_Anonymous_Access_Type (Id : E) return B is
3656 return Ekind (Id) in Anonymous_Access_Kind;
3657 end Is_Anonymous_Access_Type;
3659 function Is_Array_Type (Id : E) return B is
3661 return Ekind (Id) in Array_Kind;
3664 function Is_Assignable (Id : E) return B is
3666 return Ekind (Id) in Assignable_Kind;
3669 function Is_Class_Wide_Type (Id : E) return B is
3671 return Ekind (Id) in Class_Wide_Kind;
3672 end Is_Class_Wide_Type;
3674 function Is_Composite_Type (Id : E) return B is
3676 return Ekind (Id) in Composite_Kind;
3677 end Is_Composite_Type;
3679 function Is_Concurrent_Body (Id : E) return B is
3681 return Ekind (Id) in Concurrent_Body_Kind;
3682 end Is_Concurrent_Body;
3684 function Is_Concurrent_Record_Type (Id : E) return B is
3687 end Is_Concurrent_Record_Type;
3689 function Is_Concurrent_Type (Id : E) return B is
3691 return Ekind (Id) in Concurrent_Kind;
3692 end Is_Concurrent_Type;
3694 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3696 return Ekind (Id) in Decimal_Fixed_Point_Kind;
3697 end Is_Decimal_Fixed_Point_Type;
3699 function Is_Digits_Type (Id : E) return B is
3701 return Ekind (Id) in Digits_Kind;
3704 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3706 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3707 end Is_Discrete_Or_Fixed_Point_Type;
3709 function Is_Discrete_Type (Id : E) return B is
3711 return Ekind (Id) in Discrete_Kind;
3712 end Is_Discrete_Type;
3714 function Is_Elementary_Type (Id : E) return B is
3716 return Ekind (Id) in Elementary_Kind;
3717 end Is_Elementary_Type;
3719 function Is_Entry (Id : E) return B is
3721 return Ekind (Id) in Entry_Kind;
3724 function Is_Enumeration_Type (Id : E) return B is
3726 return Ekind (Id) in Enumeration_Kind;
3727 end Is_Enumeration_Type;
3729 function Is_Fixed_Point_Type (Id : E) return B is
3731 return Ekind (Id) in Fixed_Point_Kind;
3732 end Is_Fixed_Point_Type;
3734 function Is_Floating_Point_Type (Id : E) return B is
3736 return Ekind (Id) in Float_Kind;
3737 end Is_Floating_Point_Type;
3739 function Is_Formal (Id : E) return B is
3741 return Ekind (Id) in Formal_Kind;
3744 function Is_Formal_Object (Id : E) return B is
3746 return Ekind (Id) in Formal_Object_Kind;
3747 end Is_Formal_Object;
3749 function Is_Generic_Subprogram (Id : E) return B is
3751 return Ekind (Id) in Generic_Subprogram_Kind;
3752 end Is_Generic_Subprogram;
3754 function Is_Generic_Unit (Id : E) return B is
3756 return Ekind (Id) in Generic_Unit_Kind;
3757 end Is_Generic_Unit;
3759 function Is_Ghost_Entity (Id : Entity_Id) return Boolean is
3761 return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id);
3762 end Is_Ghost_Entity;
3764 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3766 return Ekind (Id) in Incomplete_Or_Private_Kind;
3767 end Is_Incomplete_Or_Private_Type;
3769 function Is_Incomplete_Type (Id : E) return B is
3771 return Ekind (Id) in Incomplete_Kind;
3772 end Is_Incomplete_Type;
3774 function Is_Integer_Type (Id : E) return B is
3776 return Ekind (Id) in Integer_Kind;
3777 end Is_Integer_Type;
3779 function Is_Modular_Integer_Type (Id : E) return B is
3781 return Ekind (Id) in Modular_Integer_Kind;
3782 end Is_Modular_Integer_Type;
3784 function Is_Named_Number (Id : E) return B is
3786 return Ekind (Id) in Named_Kind;
3787 end Is_Named_Number;
3789 function Is_Numeric_Type (Id : E) return B is
3791 return Ekind (Id) in Numeric_Kind;
3792 end Is_Numeric_Type;
3794 function Is_Object (Id : E) return B is
3796 return Ekind (Id) in Object_Kind;
3799 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3801 return Ekind (Id) in Ordinary_Fixed_Point_Kind;
3802 end Is_Ordinary_Fixed_Point_Type;
3804 function Is_Overloadable (Id : E) return B is
3806 return Ekind (Id) in Overloadable_Kind;
3807 end Is_Overloadable;
3809 function Is_Private_Type (Id : E) return B is
3811 return Ekind (Id) in Private_Kind;
3812 end Is_Private_Type;
3814 function Is_Protected_Type (Id : E) return B is
3816 return Ekind (Id) in Protected_Kind;
3817 end Is_Protected_Type;
3819 function Is_Real_Type (Id : E) return B is
3821 return Ekind (Id) in Real_Kind;
3824 function Is_Record_Type (Id : E) return B is
3826 return Ekind (Id) in Record_Kind;
3829 function Is_Scalar_Type (Id : E) return B is
3831 return Ekind (Id) in Scalar_Kind;
3834 function Is_Signed_Integer_Type (Id : E) return B is
3836 return Ekind (Id) in Signed_Integer_Kind;
3837 end Is_Signed_Integer_Type;
3839 function Is_Subprogram (Id : E) return B is
3841 return Ekind (Id) in Subprogram_Kind;
3844 function Is_Subprogram_Or_Entry (Id : E) return B is
3846 return Ekind (Id) in Subprogram_Kind
3848 Ekind (Id) in Entry_Kind;
3849 end Is_Subprogram_Or_Entry;
3851 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3853 return Ekind (Id) in Subprogram_Kind
3855 Ekind (Id) in Generic_Subprogram_Kind;
3856 end Is_Subprogram_Or_Generic_Subprogram;
3858 function Is_Task_Type (Id : E) return B is
3860 return Ekind (Id) in Task_Kind;
3863 function Is_Type (Id : E) return B is
3865 return Ekind (Id) in Type_Kind;
3868 ------------------------------
3869 -- Attribute Set Procedures --
3870 ------------------------------
3872 -- Note: in many of these set procedures an "obvious" assertion is missing.
3873 -- The reason for this is that in many cases, a field is set before the
3874 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3875 -- it is possible to add assertions that specifically include the E_Void
3876 -- possibility, but in some cases, we just omit the assertions.
3878 procedure Set_Abstract_States (Id : E; V : L) is
3880 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3881 Set_Elist25 (Id, V);
3882 end Set_Abstract_States;
3884 procedure Set_Accept_Address (Id : E; V : L) is
3886 Set_Elist21 (Id, V);
3887 end Set_Accept_Address;
3889 procedure Set_Access_Disp_Table (Id : E; V : L) is
3891 pragma Assert (Ekind (Id) = E_Record_Type
3892 and then Id = Implementation_Base_Type (Id));
3893 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3894 Set_Elist16 (Id, V);
3895 end Set_Access_Disp_Table;
3897 procedure Set_Access_Disp_Table_Elab_Flag (Id : E; V : E) is
3899 pragma Assert (Ekind (Id) = E_Record_Type
3900 and then Id = Implementation_Base_Type (Id));
3901 pragma Assert (Is_Tagged_Type (Id));
3903 end Set_Access_Disp_Table_Elab_Flag;
3905 procedure Set_Anonymous_Designated_Type (Id : E; V : E) is
3907 pragma Assert (Ekind (Id) = E_Variable);
3909 end Set_Anonymous_Designated_Type;
3911 procedure Set_Anonymous_Masters (Id : E; V : L) is
3913 pragma Assert (Ekind_In (Id, E_Function,
3916 E_Subprogram_Body));
3917 Set_Elist29 (Id, V);
3918 end Set_Anonymous_Masters;
3920 procedure Set_Anonymous_Object (Id : E; V : E) is
3922 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
3924 end Set_Anonymous_Object;
3926 procedure Set_Associated_Entity (Id : E; V : E) is
3929 end Set_Associated_Entity;
3931 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3934 end Set_Associated_Formal_Package;
3936 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3939 end Set_Associated_Node_For_Itype;
3941 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3943 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3945 end Set_Associated_Storage_Pool;
3947 procedure Set_Activation_Record_Component (Id : E; V : E) is
3949 pragma Assert (Ekind_In (Id, E_Constant,
3956 end Set_Activation_Record_Component;
3958 procedure Set_Actual_Subtype (Id : E; V : E) is
3961 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3962 or else Is_Formal (Id));
3964 end Set_Actual_Subtype;
3966 procedure Set_Address_Taken (Id : E; V : B := True) is
3968 Set_Flag104 (Id, V);
3969 end Set_Address_Taken;
3971 procedure Set_Alias (Id : E; V : E) is
3974 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3978 procedure Set_Alignment (Id : E; V : U) is
3980 pragma Assert (Is_Type (Id)
3981 or else Is_Formal (Id)
3982 or else Ekind_In (Id, E_Loop_Parameter,
3989 procedure Set_Barrier_Function (Id : E; V : N) is
3991 pragma Assert (Is_Entry (Id));
3993 end Set_Barrier_Function;
3995 procedure Set_Block_Node (Id : E; V : N) is
3997 pragma Assert (Ekind (Id) = E_Block);
4001 procedure Set_Body_Entity (Id : E; V : E) is
4003 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
4005 end Set_Body_Entity;
4007 procedure Set_Body_Needed_For_Inlining (Id : E; V : B := True) is
4009 pragma Assert (Ekind (Id) = E_Package);
4010 Set_Flag299 (Id, V);
4011 end Set_Body_Needed_For_Inlining;
4013 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
4016 (Ekind (Id) = E_Package
4017 or else Is_Subprogram (Id)
4018 or else Is_Generic_Unit (Id));
4020 end Set_Body_Needed_For_SAL;
4022 procedure Set_Body_References (Id : E; V : L) is
4024 pragma Assert (Ekind (Id) = E_Abstract_State);
4025 Set_Elist16 (Id, V);
4026 end Set_Body_References;
4028 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
4030 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4032 end Set_BIP_Initialization_Call;
4034 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
4036 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4037 Set_Flag125 (Id, V);
4038 end Set_C_Pass_By_Copy;
4040 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
4043 end Set_Can_Never_Be_Null;
4045 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
4048 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
4049 Set_Flag229 (Id, V);
4050 end Set_Can_Use_Internal_Rep;
4052 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
4055 end Set_Checks_May_Be_Suppressed;
4057 procedure Set_Class_Wide_Clone (Id : E; V : E) is
4059 pragma Assert (Is_Subprogram (Id));
4061 end Set_Class_Wide_Clone;
4063 procedure Set_Class_Wide_Type (Id : E; V : E) is
4065 pragma Assert (Is_Type (Id));
4067 end Set_Class_Wide_Type;
4069 procedure Set_Cloned_Subtype (Id : E; V : E) is
4071 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
4073 end Set_Cloned_Subtype;
4075 procedure Set_Component_Bit_Offset (Id : E; V : U) is
4077 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4079 end Set_Component_Bit_Offset;
4081 procedure Set_Component_Clause (Id : E; V : N) is
4083 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4085 end Set_Component_Clause;
4087 procedure Set_Component_Size (Id : E; V : U) is
4089 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4091 end Set_Component_Size;
4093 procedure Set_Component_Type (Id : E; V : E) is
4095 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4097 end Set_Component_Type;
4099 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
4102 (Ekind_In (Id, E_Block,
4106 E_Generic_Procedure,
4110 E_Subprogram_Body));
4111 Set_Flag279 (Id, V);
4112 end Set_Contains_Ignored_Ghost_Code;
4114 procedure Set_Contract (Id : E; V : N) is
4117 (Ekind_In (Id, E_Protected_Type, -- concurrent types
4121 Ekind_In (Id, E_Constant, -- objects
4124 Ekind_In (Id, E_Entry, -- overloadable
4128 E_Generic_Procedure,
4133 Ekind_In (Id, E_Generic_Package, -- packages
4137 Ekind (Id) = E_Void); -- special purpose
4141 procedure Set_Contract_Wrapper (Id : E; V : E) is
4143 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4145 end Set_Contract_Wrapper;
4147 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
4150 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
4152 end Set_Corresponding_Concurrent_Type;
4154 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
4156 pragma Assert (Ekind (Id) = E_Discriminant);
4158 end Set_Corresponding_Discriminant;
4160 procedure Set_Corresponding_Equality (Id : E; V : E) is
4163 (Ekind (Id) = E_Function
4164 and then not Comes_From_Source (Id)
4165 and then Chars (Id) = Name_Op_Ne);
4167 end Set_Corresponding_Equality;
4169 procedure Set_Corresponding_Function (Id : E; V : E) is
4171 pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
4173 end Set_Corresponding_Function;
4175 procedure Set_Corresponding_Procedure (Id : E; V : E) is
4177 pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
4179 end Set_Corresponding_Procedure;
4181 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
4183 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
4185 end Set_Corresponding_Protected_Entry;
4187 procedure Set_Corresponding_Record_Component (Id : E; V : E) is
4189 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4191 end Set_Corresponding_Record_Component;
4193 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
4195 pragma Assert (Is_Concurrent_Type (Id));
4197 end Set_Corresponding_Record_Type;
4199 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
4202 end Set_Corresponding_Remote_Type;
4204 procedure Set_Current_Use_Clause (Id : E; V : E) is
4206 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
4208 end Set_Current_Use_Clause;
4210 procedure Set_Current_Value (Id : E; V : N) is
4212 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
4214 end Set_Current_Value;
4216 procedure Set_CR_Discriminant (Id : E; V : E) is
4219 end Set_CR_Discriminant;
4221 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
4223 Set_Flag166 (Id, V);
4224 end Set_Debug_Info_Off;
4226 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
4229 end Set_Debug_Renaming_Link;
4231 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
4233 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4235 end Set_Default_Aspect_Component_Value;
4237 procedure Set_Default_Aspect_Value (Id : E; V : E) is
4239 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
4241 end Set_Default_Aspect_Value;
4243 procedure Set_Default_Expr_Function (Id : E; V : E) is
4245 pragma Assert (Is_Formal (Id));
4247 end Set_Default_Expr_Function;
4249 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
4251 Set_Flag108 (Id, V);
4252 end Set_Default_Expressions_Processed;
4254 procedure Set_Default_Value (Id : E; V : N) is
4256 pragma Assert (Is_Formal (Id));
4258 end Set_Default_Value;
4260 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
4264 or else Is_Task_Type (Id)
4265 or else Ekind (Id) = E_Block);
4266 Set_Flag114 (Id, V);
4267 end Set_Delay_Cleanups;
4269 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
4272 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
4275 end Set_Delay_Subprogram_Descriptors;
4277 procedure Set_Delta_Value (Id : E; V : R) is
4279 pragma Assert (Is_Fixed_Point_Type (Id));
4280 Set_Ureal18 (Id, V);
4281 end Set_Delta_Value;
4283 procedure Set_Dependent_Instances (Id : E; V : L) is
4285 pragma Assert (Is_Generic_Instance (Id));
4287 end Set_Dependent_Instances;
4289 procedure Set_Depends_On_Private (Id : E; V : B := True) is
4291 pragma Assert (Nkind (Id) in N_Entity);
4293 end Set_Depends_On_Private;
4295 procedure Set_Derived_Type_Link (Id : E; V : E) is
4297 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4299 end Set_Derived_Type_Link;
4301 procedure Set_Digits_Value (Id : E; V : U) is
4304 (Is_Floating_Point_Type (Id)
4305 or else Is_Decimal_Fixed_Point_Type (Id));
4307 end Set_Digits_Value;
4309 procedure Set_Directly_Designated_Type (Id : E; V : E) is
4312 end Set_Directly_Designated_Type;
4314 procedure Set_Disable_Controlled (Id : E; V : B := True) is
4316 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4317 Set_Flag253 (Id, V);
4318 end Set_Disable_Controlled;
4320 procedure Set_Discard_Names (Id : E; V : B := True) is
4323 end Set_Discard_Names;
4325 procedure Set_Discriminal (Id : E; V : E) is
4327 pragma Assert (Ekind (Id) = E_Discriminant);
4329 end Set_Discriminal;
4331 procedure Set_Discriminal_Link (Id : E; V : E) is
4334 end Set_Discriminal_Link;
4336 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
4338 pragma Assert (Ekind (Id) = E_Component);
4340 end Set_Discriminant_Checking_Func;
4342 procedure Set_Discriminant_Constraint (Id : E; V : L) is
4344 pragma Assert (Nkind (Id) in N_Entity);
4345 Set_Elist21 (Id, V);
4346 end Set_Discriminant_Constraint;
4348 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
4351 end Set_Discriminant_Default_Value;
4353 procedure Set_Discriminant_Number (Id : E; V : U) is
4356 end Set_Discriminant_Number;
4358 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
4360 pragma Assert (Ekind (Id) = E_Record_Type
4361 and then Id = Implementation_Base_Type (Id));
4362 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
4363 Set_Elist26 (Id, V);
4364 end Set_Dispatch_Table_Wrappers;
4366 procedure Set_DT_Entry_Count (Id : E; V : U) is
4368 pragma Assert (Ekind (Id) = E_Component);
4370 end Set_DT_Entry_Count;
4372 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4374 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4376 end Set_DT_Offset_To_Top_Func;
4378 procedure Set_DT_Position (Id : E; V : U) is
4380 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4382 end Set_DT_Position;
4384 procedure Set_DTC_Entity (Id : E; V : E) is
4386 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4390 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4392 pragma Assert (Ekind (Id) = E_Package);
4393 Set_Flag210 (Id, V);
4394 end Set_Elaborate_Body_Desirable;
4396 procedure Set_Elaboration_Entity (Id : E; V : E) is
4401 Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
4403 Is_Generic_Unit (Id));
4405 end Set_Elaboration_Entity;
4407 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4412 Ekind_In (Id, E_Entry, E_Entry_Family, E_Package)
4414 Is_Generic_Unit (Id));
4415 Set_Flag174 (Id, V);
4416 end Set_Elaboration_Entity_Required;
4418 procedure Set_Encapsulating_State (Id : E; V : E) is
4420 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4422 end Set_Encapsulating_State;
4424 procedure Set_Enclosing_Scope (Id : E; V : E) is
4427 end Set_Enclosing_Scope;
4429 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4431 pragma Assert (Is_Entry (Id));
4432 Set_Flag152 (Id, V);
4433 end Set_Entry_Accepted;
4435 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4438 end Set_Entry_Bodies_Array;
4440 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4443 end Set_Entry_Cancel_Parameter;
4445 procedure Set_Entry_Component (Id : E; V : E) is
4448 end Set_Entry_Component;
4450 procedure Set_Entry_Formal (Id : E; V : E) is
4453 end Set_Entry_Formal;
4455 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4457 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4459 end Set_Entry_Index_Constant;
4461 procedure Set_Entry_Max_Queue_Lengths_Array (Id : E; V : E) is
4463 pragma Assert (Ekind (Id) = E_Protected_Type);
4465 end Set_Entry_Max_Queue_Lengths_Array;
4467 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4470 end Set_Entry_Parameters_Type;
4472 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4474 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4476 end Set_Enum_Pos_To_Rep;
4478 procedure Set_Enumeration_Pos (Id : E; V : U) is
4480 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4482 end Set_Enumeration_Pos;
4484 procedure Set_Enumeration_Rep (Id : E; V : U) is
4486 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4488 end Set_Enumeration_Rep;
4490 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4492 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4494 end Set_Enumeration_Rep_Expr;
4496 procedure Set_Equivalent_Type (Id : E; V : E) is
4499 (Ekind_In (Id, E_Class_Wide_Type,
4500 E_Class_Wide_Subtype,
4501 E_Access_Protected_Subprogram_Type,
4502 E_Anonymous_Access_Protected_Subprogram_Type,
4503 E_Access_Subprogram_Type,
4506 end Set_Equivalent_Type;
4508 procedure Set_Esize (Id : E; V : U) is
4513 procedure Set_Extra_Accessibility (Id : E; V : E) is
4516 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4518 end Set_Extra_Accessibility;
4520 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4522 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4524 end Set_Extra_Accessibility_Of_Result;
4526 procedure Set_Extra_Constrained (Id : E; V : E) is
4528 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4530 end Set_Extra_Constrained;
4532 procedure Set_Extra_Formal (Id : E; V : E) is
4535 end Set_Extra_Formal;
4537 procedure Set_Extra_Formals (Id : E; V : E) is
4540 (Is_Overloadable (Id)
4541 or else Ekind_In (Id, E_Entry_Family,
4543 E_Subprogram_Type));
4545 end Set_Extra_Formals;
4547 procedure Set_Finalization_Master (Id : E; V : E) is
4549 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4551 end Set_Finalization_Master;
4553 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4555 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4556 Set_Flag158 (Id, V);
4557 end Set_Finalize_Storage_Only;
4559 procedure Set_Finalizer (Id : E; V : E) is
4561 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4565 procedure Set_First_Entity (Id : E; V : E) is
4568 end Set_First_Entity;
4570 procedure Set_First_Exit_Statement (Id : E; V : N) is
4572 pragma Assert (Ekind (Id) = E_Loop);
4574 end Set_First_Exit_Statement;
4576 procedure Set_First_Index (Id : E; V : N) is
4578 pragma Assert (Is_Array_Type (Id));
4580 end Set_First_Index;
4582 procedure Set_First_Literal (Id : E; V : E) is
4584 pragma Assert (Is_Enumeration_Type (Id));
4586 end Set_First_Literal;
4588 procedure Set_First_Private_Entity (Id : E; V : E) is
4590 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4591 or else Ekind (Id) in Concurrent_Kind);
4593 end Set_First_Private_Entity;
4595 procedure Set_First_Rep_Item (Id : E; V : N) is
4598 end Set_First_Rep_Item;
4600 procedure Set_Float_Rep (Id : E; V : F) is
4601 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4603 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4606 procedure Set_Freeze_Node (Id : E; V : N) is
4609 end Set_Freeze_Node;
4611 procedure Set_From_Limited_With (Id : E; V : B := True) is
4614 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4615 Set_Flag159 (Id, V);
4616 end Set_From_Limited_With;
4618 procedure Set_Full_View (Id : E; V : E) is
4620 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4624 procedure Set_Generic_Homonym (Id : E; V : E) is
4627 end Set_Generic_Homonym;
4629 procedure Set_Generic_Renamings (Id : E; V : L) is
4631 Set_Elist23 (Id, V);
4632 end Set_Generic_Renamings;
4634 procedure Set_Handler_Records (Id : E; V : S) is
4637 end Set_Handler_Records;
4639 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4641 pragma Assert (Id = Base_Type (Id));
4642 Set_Flag135 (Id, V);
4643 end Set_Has_Aliased_Components;
4645 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4648 end Set_Has_Alignment_Clause;
4650 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4653 end Set_Has_All_Calls_Remote;
4655 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4657 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4659 end Set_Has_Atomic_Components;
4661 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4664 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4665 Set_Flag139 (Id, V);
4666 end Set_Has_Biased_Representation;
4668 procedure Set_Has_Completion (Id : E; V : B := True) is
4671 end Set_Has_Completion;
4673 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4675 pragma Assert (Is_Type (Id));
4677 end Set_Has_Completion_In_Body;
4679 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4681 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4682 Set_Flag140 (Id, V);
4683 end Set_Has_Complex_Representation;
4685 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4687 pragma Assert (Ekind (Id) = E_Array_Type);
4689 end Set_Has_Component_Size_Clause;
4691 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4693 pragma Assert (Is_Type (Id));
4694 Set_Flag187 (Id, V);
4695 end Set_Has_Constrained_Partial_View;
4697 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4699 Set_Flag181 (Id, V);
4700 end Set_Has_Contiguous_Rep;
4702 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4704 pragma Assert (Id = Base_Type (Id));
4706 end Set_Has_Controlled_Component;
4708 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4711 end Set_Has_Controlling_Result;
4713 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4715 Set_Flag119 (Id, V);
4716 end Set_Has_Convention_Pragma;
4718 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4721 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4722 and then Is_Base_Type (Id));
4724 end Set_Has_Default_Aspect;
4726 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4728 pragma Assert (Nkind (Id) in N_Entity);
4729 Set_Flag200 (Id, V);
4730 end Set_Has_Delayed_Aspects;
4732 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4734 pragma Assert (Nkind (Id) in N_Entity);
4736 end Set_Has_Delayed_Freeze;
4738 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4740 pragma Assert (Nkind (Id) in N_Entity);
4741 Set_Flag261 (Id, V);
4742 end Set_Has_Delayed_Rep_Aspects;
4744 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4746 pragma Assert (Is_Type (Id));
4748 end Set_Has_Discriminants;
4750 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4752 pragma Assert (Ekind (Id) = E_Record_Type
4753 and then Is_Tagged_Type (Id));
4754 Set_Flag220 (Id, V);
4755 end Set_Has_Dispatch_Table;
4757 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4759 pragma Assert (Is_Type (Id));
4760 Set_Flag258 (Id, V);
4761 end Set_Has_Dynamic_Predicate_Aspect;
4763 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4765 pragma Assert (Is_Enumeration_Type (Id));
4767 end Set_Has_Enumeration_Rep_Clause;
4769 procedure Set_Has_Exit (Id : E; V : B := True) is
4774 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4776 pragma Assert (Ekind_In (Id, E_Entry,
4780 Set_Flag240 (Id, V);
4781 end Set_Has_Expanded_Contract;
4783 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4785 Set_Flag175 (Id, V);
4786 end Set_Has_Forward_Instantiation;
4788 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4790 Set_Flag173 (Id, V);
4791 end Set_Has_Fully_Qualified_Name;
4793 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4796 end Set_Has_Gigi_Rep_Item;
4798 procedure Set_Has_Homonym (Id : E; V : B := True) is
4801 end Set_Has_Homonym;
4803 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4805 Set_Flag251 (Id, V);
4806 end Set_Has_Implicit_Dereference;
4808 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4810 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4812 end Set_Has_Independent_Components;
4814 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4816 pragma Assert (Is_Type (Id));
4817 Set_Flag248 (Base_Type (Id), V);
4818 end Set_Has_Inheritable_Invariants;
4820 procedure Set_Has_Inherited_DIC (Id : E; V : B := True) is
4822 pragma Assert (Is_Type (Id));
4823 Set_Flag133 (Base_Type (Id), V);
4824 end Set_Has_Inherited_DIC;
4826 procedure Set_Has_Inherited_Invariants (Id : E; V : B := True) is
4828 pragma Assert (Is_Type (Id));
4829 Set_Flag291 (Base_Type (Id), V);
4830 end Set_Has_Inherited_Invariants;
4832 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4834 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4835 Set_Flag219 (Id, V);
4836 end Set_Has_Initial_Value;
4838 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4840 pragma Assert (Ekind (Id) = E_Loop);
4841 Set_Flag260 (Id, V);
4842 end Set_Has_Loop_Entry_Attributes;
4844 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4846 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4848 end Set_Has_Machine_Radix_Clause;
4850 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4853 end Set_Has_Master_Entity;
4855 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4857 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4858 Set_Flag142 (Id, V);
4859 end Set_Has_Missing_Return;
4861 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4863 Set_Flag101 (Id, V);
4864 end Set_Has_Nested_Block_With_Handler;
4866 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4868 pragma Assert (Is_Subprogram (Id));
4869 Set_Flag282 (Id, V);
4870 end Set_Has_Nested_Subprogram;
4872 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4874 pragma Assert (Id = Base_Type (Id));
4876 end Set_Has_Non_Standard_Rep;
4878 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4880 pragma Assert (Is_Type (Id));
4881 Set_Flag172 (Id, V);
4882 end Set_Has_Object_Size_Clause;
4884 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4887 (Ekind_In (Id, E_Entry, E_Entry_Family)
4888 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4889 Set_Flag110 (Id, V);
4890 end Set_Has_Out_Or_In_Out_Parameter;
4892 procedure Set_Has_Own_DIC (Id : E; V : B := True) is
4894 pragma Assert (Is_Type (Id));
4895 Set_Flag3 (Base_Type (Id), V);
4896 end Set_Has_Own_DIC;
4898 procedure Set_Has_Own_Invariants (Id : E; V : B := True) is
4900 pragma Assert (Is_Type (Id));
4901 Set_Flag232 (Base_Type (Id), V);
4902 end Set_Has_Own_Invariants;
4904 procedure Set_Has_Partial_Visible_Refinement (Id : E; V : B := True) is
4906 pragma Assert (Ekind (Id) = E_Abstract_State);
4907 Set_Flag296 (Id, V);
4908 end Set_Has_Partial_Visible_Refinement;
4910 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4912 Set_Flag154 (Id, V);
4913 end Set_Has_Per_Object_Constraint;
4915 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4917 pragma Assert (Is_Access_Type (Id));
4918 Set_Flag27 (Base_Type (Id), V);
4919 end Set_Has_Pragma_Controlled;
4921 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4923 Set_Flag150 (Id, V);
4924 end Set_Has_Pragma_Elaborate_Body;
4926 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4928 Set_Flag157 (Id, V);
4929 end Set_Has_Pragma_Inline;
4931 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4933 Set_Flag230 (Id, V);
4934 end Set_Has_Pragma_Inline_Always;
4936 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4938 Set_Flag201 (Id, V);
4939 end Set_Has_Pragma_No_Inline;
4941 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4943 pragma Assert (Is_Enumeration_Type (Id));
4944 pragma Assert (Id = Base_Type (Id));
4945 Set_Flag198 (Id, V);
4946 end Set_Has_Pragma_Ordered;
4948 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4950 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4951 pragma Assert (Id = Base_Type (Id));
4952 Set_Flag121 (Id, V);
4953 end Set_Has_Pragma_Pack;
4955 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4957 Set_Flag221 (Id, V);
4958 end Set_Has_Pragma_Preelab_Init;
4960 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4962 Set_Flag203 (Id, V);
4963 end Set_Has_Pragma_Pure;
4965 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4967 Set_Flag179 (Id, V);
4968 end Set_Has_Pragma_Pure_Function;
4970 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4972 Set_Flag169 (Id, V);
4973 end Set_Has_Pragma_Thread_Local_Storage;
4975 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4977 Set_Flag233 (Id, V);
4978 end Set_Has_Pragma_Unmodified;
4980 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4982 Set_Flag180 (Id, V);
4983 end Set_Has_Pragma_Unreferenced;
4985 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4987 pragma Assert (Is_Type (Id));
4988 Set_Flag212 (Id, V);
4989 end Set_Has_Pragma_Unreferenced_Objects;
4991 procedure Set_Has_Pragma_Unused (Id : E; V : B := True) is
4993 Set_Flag294 (Id, V);
4994 end Set_Has_Pragma_Unused;
4996 procedure Set_Has_Predicates (Id : E; V : B := True) is
4998 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4999 Set_Flag250 (Id, V);
5000 end Set_Has_Predicates;
5002 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
5004 pragma Assert (Id = Base_Type (Id));
5005 Set_Flag120 (Id, V);
5006 end Set_Has_Primitive_Operations;
5008 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
5010 pragma Assert (Is_Type (Id));
5011 Set_Flag151 (Id, V);
5012 end Set_Has_Private_Ancestor;
5014 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
5016 Set_Flag155 (Id, V);
5017 end Set_Has_Private_Declaration;
5019 procedure Set_Has_Private_Extension (Id : E; V : B := True) is
5021 pragma Assert (Is_Tagged_Type (Id));
5022 Set_Flag300 (Id, V);
5023 end Set_Has_Private_Extension;
5025 procedure Set_Has_Protected (Id : E; V : B := True) is
5027 Set_Flag271 (Id, V);
5028 end Set_Has_Protected;
5030 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
5032 Set_Flag161 (Id, V);
5033 end Set_Has_Qualified_Name;
5035 procedure Set_Has_RACW (Id : E; V : B := True) is
5037 pragma Assert (Ekind (Id) = E_Package);
5038 Set_Flag214 (Id, V);
5041 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
5043 pragma Assert (Id = Base_Type (Id));
5045 end Set_Has_Record_Rep_Clause;
5047 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
5049 pragma Assert (Is_Subprogram (Id));
5050 Set_Flag143 (Id, V);
5051 end Set_Has_Recursive_Call;
5053 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
5055 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
5056 Set_Flag267 (Id, V);
5057 end Set_Has_Shift_Operator;
5059 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
5062 end Set_Has_Size_Clause;
5064 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
5066 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
5068 end Set_Has_Small_Clause;
5070 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
5072 pragma Assert (Id = Base_Type (Id));
5073 Set_Flag100 (Id, V);
5074 end Set_Has_Specified_Layout;
5076 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
5078 pragma Assert (Is_Type (Id));
5079 Set_Flag190 (Id, V);
5080 end Set_Has_Specified_Stream_Input;
5082 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
5084 pragma Assert (Is_Type (Id));
5085 Set_Flag191 (Id, V);
5086 end Set_Has_Specified_Stream_Output;
5088 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
5090 pragma Assert (Is_Type (Id));
5091 Set_Flag192 (Id, V);
5092 end Set_Has_Specified_Stream_Read;
5094 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
5096 pragma Assert (Is_Type (Id));
5097 Set_Flag193 (Id, V);
5098 end Set_Has_Specified_Stream_Write;
5100 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
5102 Set_Flag211 (Id, V);
5103 end Set_Has_Static_Discriminants;
5105 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
5107 pragma Assert (Is_Type (Id));
5108 Set_Flag269 (Id, V);
5109 end Set_Has_Static_Predicate;
5111 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
5113 pragma Assert (Is_Type (Id));
5114 Set_Flag259 (Id, V);
5115 end Set_Has_Static_Predicate_Aspect;
5117 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
5119 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5120 pragma Assert (Id = Base_Type (Id));
5122 end Set_Has_Storage_Size_Clause;
5124 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
5126 pragma Assert (Is_Elementary_Type (Id));
5127 Set_Flag184 (Id, V);
5128 end Set_Has_Stream_Size_Clause;
5130 procedure Set_Has_Task (Id : E; V : B := True) is
5132 pragma Assert (Id = Base_Type (Id));
5136 procedure Set_Has_Thunks (Id : E; V : B := True) is
5138 pragma Assert (Is_Tag (Id));
5139 Set_Flag228 (Id, V);
5142 procedure Set_Has_Timing_Event (Id : E; V : B := True) is
5144 pragma Assert (Id = Base_Type (Id));
5145 Set_Flag289 (Id, V);
5146 end Set_Has_Timing_Event;
5148 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
5150 pragma Assert (Id = Base_Type (Id));
5151 Set_Flag123 (Id, V);
5152 end Set_Has_Unchecked_Union;
5154 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
5156 pragma Assert (Is_Type (Id));
5158 end Set_Has_Unknown_Discriminants;
5160 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
5162 pragma Assert (Ekind (Id) = E_Abstract_State);
5163 Set_Flag263 (Id, V);
5164 end Set_Has_Visible_Refinement;
5166 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
5168 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
5170 end Set_Has_Volatile_Components;
5172 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
5174 Set_Flag182 (Id, V);
5175 end Set_Has_Xref_Entry;
5177 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
5179 pragma Assert (Ekind (Id) = E_Variable);
5181 end Set_Hiding_Loop_Variable;
5183 procedure Set_Hidden_In_Formal_Instance (Id : E; V : L) is
5185 pragma Assert (Ekind (Id) = E_Package);
5186 Set_Elist30 (Id, V);
5187 end Set_Hidden_In_Formal_Instance;
5189 procedure Set_Homonym (Id : E; V : E) is
5191 pragma Assert (Id /= V);
5195 procedure Set_Incomplete_Actuals (Id : E; V : L) is
5197 pragma Assert (Ekind (Id) = E_Package);
5198 Set_Elist24 (Id, V);
5199 end Set_Incomplete_Actuals;
5201 procedure Set_Ignore_SPARK_Mode_Pragmas (Id : E; V : B := True) is
5204 (Ekind_In (Id, E_Protected_Body, -- concurrent types
5209 Ekind_In (Id, E_Entry, -- overloadable
5213 E_Generic_Procedure,
5218 Ekind_In (Id, E_Generic_Package, -- packages
5221 Set_Flag301 (Id, V);
5222 end Set_Ignore_SPARK_Mode_Pragmas;
5224 procedure Set_Import_Pragma (Id : E; V : E) is
5226 pragma Assert (Is_Subprogram (Id));
5228 end Set_Import_Pragma;
5230 procedure Set_Interface_Alias (Id : E; V : E) is
5234 and then Is_Hidden (Id)
5235 and then (Ekind_In (Id, E_Procedure, E_Function)));
5237 end Set_Interface_Alias;
5239 procedure Set_Interfaces (Id : E; V : L) is
5241 pragma Assert (Is_Record_Type (Id));
5242 Set_Elist25 (Id, V);
5245 procedure Set_In_Package_Body (Id : E; V : B := True) is
5248 end Set_In_Package_Body;
5250 procedure Set_In_Private_Part (Id : E; V : B := True) is
5253 end Set_In_Private_Part;
5255 procedure Set_In_Use (Id : E; V : B := True) is
5257 pragma Assert (Nkind (Id) in N_Entity);
5261 procedure Set_Initialization_Statements (Id : E; V : N) is
5263 -- Tolerate an E_Void entity since this can be called while resolving
5264 -- an aggregate used as the initialization expression for an object
5265 -- declaration, and this occurs before the Ekind for the object is set.
5267 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
5269 end Set_Initialization_Statements;
5271 procedure Set_Inner_Instances (Id : E; V : L) is
5273 Set_Elist23 (Id, V);
5274 end Set_Inner_Instances;
5276 procedure Set_Interface_Name (Id : E; V : N) is
5279 end Set_Interface_Name;
5281 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
5283 pragma Assert (Is_Overloadable (Id));
5285 end Set_Is_Abstract_Subprogram;
5287 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
5289 pragma Assert (Is_Type (Id));
5290 Set_Flag146 (Id, V);
5291 end Set_Is_Abstract_Type;
5293 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
5295 pragma Assert (Is_Access_Type (Id));
5296 Set_Flag194 (Id, V);
5297 end Set_Is_Local_Anonymous_Access;
5299 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
5301 pragma Assert (Is_Access_Type (Id));
5303 end Set_Is_Access_Constant;
5305 procedure Set_Is_Activation_Record (Id : E; V : B := True) is
5307 pragma Assert (Ekind (Id) = E_In_Parameter);
5308 Set_Flag305 (Id, V);
5309 end Set_Is_Activation_Record;
5311 procedure Set_Is_Actual_Subtype (Id : E; V : B := True) is
5313 pragma Assert (Is_Type (Id));
5314 Set_Flag293 (Id, V);
5315 end Set_Is_Actual_Subtype;
5317 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
5319 Set_Flag185 (Id, V);
5320 end Set_Is_Ada_2005_Only;
5322 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
5324 Set_Flag199 (Id, V);
5325 end Set_Is_Ada_2012_Only;
5327 procedure Set_Is_Aliased (Id : E; V : B := True) is
5329 pragma Assert (Nkind (Id) in N_Entity);
5333 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
5336 (Ekind (Id) = E_Procedure or else Is_Type (Id));
5338 end Set_Is_Asynchronous;
5340 procedure Set_Is_Atomic (Id : E; V : B := True) is
5345 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
5347 pragma Assert ((not V)
5348 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
5349 Set_Flag122 (Id, V);
5350 end Set_Is_Bit_Packed_Array;
5352 procedure Set_Is_Called (Id : E; V : B := True) is
5354 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
5355 Set_Flag102 (Id, V);
5358 procedure Set_Is_Character_Type (Id : E; V : B := True) is
5361 end Set_Is_Character_Type;
5363 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
5365 -- Allow this attribute to appear on unanalyzed entities
5367 pragma Assert (Nkind (Id) in N_Entity
5368 or else Ekind (Id) = E_Void);
5369 Set_Flag277 (Id, V);
5370 end Set_Is_Checked_Ghost_Entity;
5372 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
5375 end Set_Is_Child_Unit;
5377 procedure Set_Is_Class_Wide_Clone (Id : E; V : B := True) is
5379 Set_Flag290 (Id, V);
5380 end Set_Is_Class_Wide_Clone;
5382 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
5385 end Set_Is_Class_Wide_Equivalent_Type;
5387 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
5389 Set_Flag149 (Id, V);
5390 end Set_Is_Compilation_Unit;
5392 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
5394 pragma Assert (Ekind (Id) = E_Discriminant);
5395 Set_Flag103 (Id, V);
5396 end Set_Is_Completely_Hidden;
5398 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
5401 end Set_Is_Concurrent_Record_Type;
5403 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
5406 end Set_Is_Constr_Subt_For_U_Nominal;
5408 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
5410 Set_Flag141 (Id, V);
5411 end Set_Is_Constr_Subt_For_UN_Aliased;
5413 procedure Set_Is_Constrained (Id : E; V : B := True) is
5415 pragma Assert (Nkind (Id) in N_Entity);
5417 end Set_Is_Constrained;
5419 procedure Set_Is_Constructor (Id : E; V : B := True) is
5422 end Set_Is_Constructor;
5424 procedure Set_Is_Controlled_Active (Id : E; V : B := True) is
5426 pragma Assert (Id = Base_Type (Id));
5428 end Set_Is_Controlled_Active;
5430 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5432 pragma Assert (Is_Formal (Id));
5434 end Set_Is_Controlling_Formal;
5436 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5439 end Set_Is_CPP_Class;
5441 procedure Set_Is_DIC_Procedure (Id : E; V : B := True) is
5443 pragma Assert (Ekind (Id) = E_Procedure);
5444 Set_Flag132 (Id, V);
5445 end Set_Is_DIC_Procedure;
5447 procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
5449 pragma Assert (Is_Type (Id));
5450 Set_Flag223 (Id, V);
5451 end Set_Is_Descendant_Of_Address;
5453 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5455 Set_Flag176 (Id, V);
5456 end Set_Is_Discrim_SO_Function;
5458 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5460 Set_Flag264 (Id, V);
5461 end Set_Is_Discriminant_Check_Function;
5463 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5465 Set_Flag234 (Id, V);
5466 end Set_Is_Dispatch_Table_Entity;
5468 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5473 Is_Overloadable (Id)
5475 Ekind (Id) = E_Subprogram_Type);
5478 end Set_Is_Dispatching_Operation;
5480 procedure Set_Is_Elaboration_Checks_OK_Id (Id : E; V : B := True) is
5482 pragma Assert (Is_Elaboration_Target (Id));
5483 Set_Flag148 (Id, V);
5484 end Set_Is_Elaboration_Checks_OK_Id;
5486 procedure Set_Is_Elaboration_Warnings_OK_Id (Id : E; V : B := True) is
5488 pragma Assert (Is_Elaboration_Target (Id));
5489 Set_Flag304 (Id, V);
5490 end Set_Is_Elaboration_Warnings_OK_Id;
5492 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5494 Set_Flag124 (Id, V);
5495 end Set_Is_Eliminated;
5497 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5500 end Set_Is_Entry_Formal;
5502 procedure Set_Is_Entry_Wrapper (Id : E; V : B := True) is
5504 Set_Flag297 (Id, V);
5505 end Set_Is_Entry_Wrapper;
5507 procedure Set_Is_Exception_Handler (Id : E; V : B := True) is
5509 pragma Assert (Ekind (Id) = E_Block);
5510 Set_Flag286 (Id, V);
5511 end Set_Is_Exception_Handler;
5513 procedure Set_Is_Exported (Id : E; V : B := True) is
5516 end Set_Is_Exported;
5518 procedure Set_Is_Finalized_Transient (Id : E; V : B := True) is
5520 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5521 Set_Flag252 (Id, V);
5522 end Set_Is_Finalized_Transient;
5524 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5527 end Set_Is_First_Subtype;
5529 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5531 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5532 Set_Flag118 (Id, V);
5533 end Set_Is_For_Access_Subtype;
5535 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5537 Set_Flag111 (Id, V);
5538 end Set_Is_Formal_Subprogram;
5540 procedure Set_Is_Frozen (Id : E; V : B := True) is
5542 pragma Assert (Nkind (Id) in N_Entity);
5546 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5548 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5549 Set_Flag274 (Id, V);
5550 end Set_Is_Generic_Actual_Subprogram;
5552 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5554 pragma Assert (Is_Type (Id));
5556 end Set_Is_Generic_Actual_Type;
5558 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5560 Set_Flag130 (Id, V);
5561 end Set_Is_Generic_Instance;
5563 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5565 pragma Assert (Nkind (Id) in N_Entity);
5567 end Set_Is_Generic_Type;
5569 procedure Set_Is_Hidden (Id : E; V : B := True) is
5574 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5576 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5578 end Set_Is_Hidden_Non_Overridden_Subpgm;
5580 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5582 Set_Flag171 (Id, V);
5583 end Set_Is_Hidden_Open_Scope;
5585 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5587 -- Allow this attribute to appear on unanalyzed entities
5589 pragma Assert (Nkind (Id) in N_Entity
5590 or else Ekind (Id) = E_Void);
5591 Set_Flag278 (Id, V);
5592 end Set_Is_Ignored_Ghost_Entity;
5594 procedure Set_Is_Ignored_Transient (Id : E; V : B := True) is
5596 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5597 Set_Flag295 (Id, V);
5598 end Set_Is_Ignored_Transient;
5600 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5602 pragma Assert (Nkind (Id) in N_Entity);
5604 end Set_Is_Immediately_Visible;
5606 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5608 Set_Flag254 (Id, V);
5609 end Set_Is_Implementation_Defined;
5611 procedure Set_Is_Imported (Id : E; V : B := True) is
5614 end Set_Is_Imported;
5616 procedure Set_Is_Independent (Id : E; V : B := True) is
5618 Set_Flag268 (Id, V);
5619 end Set_Is_Independent;
5621 procedure Set_Is_Initial_Condition_Procedure (Id : E; V : B := True) is
5623 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5624 Set_Flag302 (Id, V);
5625 end Set_Is_Initial_Condition_Procedure;
5627 procedure Set_Is_Inlined (Id : E; V : B := True) is
5632 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5634 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5636 end Set_Is_Inlined_Always;
5638 procedure Set_Is_Interface (Id : E; V : B := True) is
5640 pragma Assert (Is_Record_Type (Id));
5641 Set_Flag186 (Id, V);
5642 end Set_Is_Interface;
5644 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5646 Set_Flag126 (Id, V);
5647 end Set_Is_Instantiated;
5649 procedure Set_Is_Internal (Id : E; V : B := True) is
5651 pragma Assert (Nkind (Id) in N_Entity);
5653 end Set_Is_Internal;
5655 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5657 pragma Assert (Nkind (Id) in N_Entity);
5659 end Set_Is_Interrupt_Handler;
5661 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5664 end Set_Is_Intrinsic_Subprogram;
5666 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5668 pragma Assert (Ekind (Id) = E_Procedure);
5669 Set_Flag257 (Id, V);
5670 end Set_Is_Invariant_Procedure;
5672 procedure Set_Is_Itype (Id : E; V : B := True) is
5677 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5680 end Set_Is_Known_Non_Null;
5682 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5684 Set_Flag204 (Id, V);
5685 end Set_Is_Known_Null;
5687 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5689 Set_Flag170 (Id, V);
5690 end Set_Is_Known_Valid;
5692 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5694 pragma Assert (Is_Type (Id));
5695 Set_Flag106 (Id, V);
5696 end Set_Is_Limited_Composite;
5698 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5700 pragma Assert (Is_Interface (Id));
5701 Set_Flag197 (Id, V);
5702 end Set_Is_Limited_Interface;
5704 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5707 end Set_Is_Limited_Record;
5709 procedure Set_Is_Loop_Parameter (Id : E; V : B := True) is
5711 Set_Flag307 (Id, V);
5712 end Set_Is_Loop_Parameter;
5714 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5716 pragma Assert (Is_Subprogram (Id));
5717 Set_Flag137 (Id, V);
5718 end Set_Is_Machine_Code_Subprogram;
5720 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5722 pragma Assert (Is_Type (Id));
5723 Set_Flag109 (Id, V);
5724 end Set_Is_Non_Static_Subtype;
5726 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5728 pragma Assert (Ekind (Id) = E_Procedure);
5729 Set_Flag178 (Id, V);
5730 end Set_Is_Null_Init_Proc;
5732 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5734 Set_Flag153 (Id, V);
5735 end Set_Is_Obsolescent;
5737 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5739 pragma Assert (Ekind (Id) = E_Out_Parameter);
5740 Set_Flag226 (Id, V);
5741 end Set_Is_Only_Out_Parameter;
5743 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5745 Set_Flag160 (Id, V);
5746 end Set_Is_Package_Body_Entity;
5748 procedure Set_Is_Packed (Id : E; V : B := True) is
5750 pragma Assert (Id = Base_Type (Id));
5754 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5756 Set_Flag138 (Id, V);
5757 end Set_Is_Packed_Array_Impl_Type;
5759 procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
5761 pragma Assert (Ekind_In (Id, E_Void, E_General_Access_Type));
5762 Set_Flag215 (Id, V);
5763 end Set_Is_Param_Block_Component_Type;
5765 procedure Set_Is_Partial_Invariant_Procedure (Id : E; V : B := True) is
5767 pragma Assert (Ekind (Id) = E_Procedure);
5768 Set_Flag292 (Id, V);
5769 end Set_Is_Partial_Invariant_Procedure;
5771 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5773 pragma Assert (Nkind (Id) in N_Entity);
5775 end Set_Is_Potentially_Use_Visible;
5777 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5779 pragma Assert (Ekind (Id) = E_Function);
5780 Set_Flag255 (Id, V);
5781 end Set_Is_Predicate_Function;
5783 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5785 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5786 Set_Flag256 (Id, V);
5787 end Set_Is_Predicate_Function_M;
5789 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5792 end Set_Is_Preelaborated;
5794 procedure Set_Is_Primitive (Id : E; V : B := True) is
5797 (Is_Overloadable (Id)
5798 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5799 Set_Flag218 (Id, V);
5800 end Set_Is_Primitive;
5802 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5804 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5805 Set_Flag195 (Id, V);
5806 end Set_Is_Primitive_Wrapper;
5808 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5810 pragma Assert (Is_Type (Id));
5811 Set_Flag107 (Id, V);
5812 end Set_Is_Private_Composite;
5814 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5817 end Set_Is_Private_Descendant;
5819 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5821 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5822 Set_Flag245 (Id, V);
5823 end Set_Is_Private_Primitive;
5825 procedure Set_Is_Public (Id : E; V : B := True) is
5827 pragma Assert (Nkind (Id) in N_Entity);
5831 procedure Set_Is_Pure (Id : E; V : B := True) is
5836 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5838 pragma Assert (Is_Access_Type (Id));
5839 Set_Flag189 (Id, V);
5840 end Set_Is_Pure_Unit_Access_Type;
5842 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5844 pragma Assert (Is_Type (Id));
5845 Set_Flag244 (Id, V);
5846 end Set_Is_RACW_Stub_Type;
5848 procedure Set_Is_Raised (Id : E; V : B := True) is
5850 pragma Assert (Ekind (Id) = E_Exception);
5851 Set_Flag224 (Id, V);
5854 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5857 end Set_Is_Remote_Call_Interface;
5859 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5862 end Set_Is_Remote_Types;
5864 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5866 Set_Flag112 (Id, V);
5867 end Set_Is_Renaming_Of_Object;
5869 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5871 Set_Flag209 (Id, V);
5872 end Set_Is_Return_Object;
5874 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5876 pragma Assert (Ekind (Id) = E_Variable);
5877 Set_Flag249 (Id, V);
5878 end Set_Is_Safe_To_Reevaluate;
5880 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5883 end Set_Is_Shared_Passive;
5885 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5887 pragma Assert (Is_Type (Id));
5888 Set_Flag281 (Id, V);
5889 end Set_Is_Static_Type;
5891 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5895 or else Ekind_In (Id, E_Exception,
5900 end Set_Is_Statically_Allocated;
5902 procedure Set_Is_Tag (Id : E; V : B := True) is
5904 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5908 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5911 end Set_Is_Tagged_Type;
5913 procedure Set_Is_Thunk (Id : E; V : B := True) is
5915 pragma Assert (Is_Subprogram (Id));
5916 Set_Flag225 (Id, V);
5919 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5921 Set_Flag235 (Id, V);
5922 end Set_Is_Trivial_Subprogram;
5924 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5926 Set_Flag163 (Id, V);
5927 end Set_Is_True_Constant;
5929 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5931 pragma Assert (Id = Base_Type (Id));
5932 Set_Flag117 (Id, V);
5933 end Set_Is_Unchecked_Union;
5935 procedure Set_Is_Underlying_Full_View (Id : E; V : B := True) is
5937 pragma Assert (Is_Type (Id));
5938 Set_Flag298 (Id, V);
5939 end Set_Is_Underlying_Full_View;
5941 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5943 pragma Assert (Ekind (Id) = E_Record_Type);
5944 Set_Flag246 (Id, V);
5945 end Set_Is_Underlying_Record_View;
5947 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5949 Set_Flag284 (Id, V);
5950 end Set_Is_Unimplemented;
5952 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5954 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5955 Set_Flag144 (Id, V);
5956 end Set_Is_Unsigned_Type;
5958 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5961 (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable)
5962 or else Is_Formal (Id)
5963 or else Is_Type (Id));
5964 Set_Flag283 (Id, V);
5965 end Set_Is_Uplevel_Referenced_Entity;
5967 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5969 pragma Assert (Ekind (Id) = E_Procedure);
5970 Set_Flag127 (Id, V);
5971 end Set_Is_Valued_Procedure;
5973 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5975 Set_Flag206 (Id, V);
5976 end Set_Is_Visible_Formal;
5978 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5980 Set_Flag116 (Id, V);
5981 end Set_Is_Visible_Lib_Unit;
5983 procedure Set_Is_Volatile (Id : E; V : B := True) is
5985 pragma Assert (Nkind (Id) in N_Entity);
5987 end Set_Is_Volatile;
5989 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
5991 Set_Flag285 (Id, V);
5992 end Set_Is_Volatile_Full_Access;
5994 procedure Set_Itype_Printed (Id : E; V : B := True) is
5996 pragma Assert (Is_Itype (Id));
5997 Set_Flag202 (Id, V);
5998 end Set_Itype_Printed;
6000 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
6003 end Set_Kill_Elaboration_Checks;
6005 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
6008 end Set_Kill_Range_Checks;
6010 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
6012 pragma Assert (Is_Type (Id));
6013 Set_Flag207 (Id, V);
6014 end Set_Known_To_Have_Preelab_Init;
6016 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
6018 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6020 end Set_Last_Aggregate_Assignment;
6022 procedure Set_Last_Assignment (Id : E; V : N) is
6024 pragma Assert (Is_Assignable (Id));
6026 end Set_Last_Assignment;
6028 procedure Set_Last_Entity (Id : E; V : E) is
6031 end Set_Last_Entity;
6033 procedure Set_Limited_View (Id : E; V : E) is
6035 pragma Assert (Ekind (Id) = E_Package);
6037 end Set_Limited_View;
6039 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
6042 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
6044 end Set_Linker_Section_Pragma;
6046 procedure Set_Lit_Indexes (Id : E; V : E) is
6048 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6050 end Set_Lit_Indexes;
6052 procedure Set_Lit_Strings (Id : E; V : E) is
6054 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6056 end Set_Lit_Strings;
6058 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
6060 pragma Assert (Is_Formal (Id));
6061 Set_Flag205 (Id, V);
6062 end Set_Low_Bound_Tested;
6064 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
6066 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
6068 end Set_Machine_Radix_10;
6070 procedure Set_Master_Id (Id : E; V : E) is
6072 pragma Assert (Is_Access_Type (Id));
6076 procedure Set_Materialize_Entity (Id : E; V : B := True) is
6078 Set_Flag168 (Id, V);
6079 end Set_Materialize_Entity;
6081 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
6083 Set_Flag262 (Id, V);
6084 end Set_May_Inherit_Delayed_Rep_Aspects;
6086 procedure Set_Mechanism (Id : E; V : M) is
6088 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
6089 Set_Uint8 (Id, UI_From_Int (V));
6092 procedure Set_Modulus (Id : E; V : U) is
6094 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
6098 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
6100 pragma Assert (Is_Type (Id));
6101 Set_Flag183 (Id, V);
6102 end Set_Must_Be_On_Byte_Boundary;
6104 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
6106 pragma Assert (Is_Type (Id));
6107 Set_Flag208 (Id, V);
6108 end Set_Must_Have_Preelab_Init;
6110 procedure Set_Needs_Activation_Record (Id : E; V : B := True) is
6112 Set_Flag306 (Id, V);
6113 end Set_Needs_Activation_Record;
6115 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
6117 Set_Flag147 (Id, V);
6118 end Set_Needs_Debug_Info;
6120 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
6123 (Is_Overloadable (Id)
6124 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
6126 end Set_Needs_No_Actuals;
6128 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
6130 Set_Flag115 (Id, V);
6131 end Set_Never_Set_In_Source;
6133 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
6136 end Set_Next_Inlined_Subprogram;
6138 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
6140 pragma Assert (Is_Discrete_Type (Id));
6141 Set_Flag276 (Id, V);
6142 end Set_No_Dynamic_Predicate_On_Actual;
6144 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
6146 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6147 Set_Flag131 (Id, V);
6148 end Set_No_Pool_Assigned;
6150 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
6152 pragma Assert (Is_Discrete_Type (Id));
6153 Set_Flag275 (Id, V);
6154 end Set_No_Predicate_On_Actual;
6156 procedure Set_No_Reordering (Id : E; V : B := True) is
6158 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
6159 Set_Flag239 (Id, V);
6160 end Set_No_Reordering;
6162 procedure Set_No_Return (Id : E; V : B := True) is
6165 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
6166 Set_Flag113 (Id, V);
6169 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
6171 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6172 Set_Flag136 (Id, V);
6173 end Set_No_Strict_Aliasing;
6175 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
6177 pragma Assert (Is_Tagged_Type (Id));
6179 end Set_No_Tagged_Streams_Pragma;
6181 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
6183 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6185 end Set_Non_Binary_Modulus;
6187 procedure Set_Non_Limited_View (Id : E; V : E) is
6190 (Ekind (Id) in Incomplete_Kind
6191 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
6193 end Set_Non_Limited_View;
6195 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
6198 (Root_Type (Id) = Standard_Boolean
6199 and then Ekind (Id) = E_Enumeration_Type);
6200 Set_Flag162 (Id, V);
6201 end Set_Nonzero_Is_True;
6203 procedure Set_Normalized_First_Bit (Id : E; V : U) is
6205 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6207 end Set_Normalized_First_Bit;
6209 procedure Set_Normalized_Position (Id : E; V : U) is
6211 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6213 end Set_Normalized_Position;
6215 procedure Set_Normalized_Position_Max (Id : E; V : U) is
6217 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
6219 end Set_Normalized_Position_Max;
6221 procedure Set_OK_To_Rename (Id : E; V : B := True) is
6223 pragma Assert (Ekind (Id) = E_Variable);
6224 Set_Flag247 (Id, V);
6225 end Set_OK_To_Rename;
6227 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
6230 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
6231 Set_Flag241 (Id, V);
6232 end Set_Optimize_Alignment_Space;
6234 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
6237 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
6238 Set_Flag242 (Id, V);
6239 end Set_Optimize_Alignment_Time;
6241 procedure Set_Original_Access_Type (Id : E; V : E) is
6243 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
6245 end Set_Original_Access_Type;
6247 procedure Set_Original_Array_Type (Id : E; V : E) is
6249 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
6251 end Set_Original_Array_Type;
6253 procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
6255 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6257 end Set_Original_Protected_Subprogram;
6259 procedure Set_Original_Record_Component (Id : E; V : E) is
6261 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
6263 end Set_Original_Record_Component;
6265 procedure Set_Overlays_Constant (Id : E; V : B := True) is
6267 Set_Flag243 (Id, V);
6268 end Set_Overlays_Constant;
6270 procedure Set_Overridden_Operation (Id : E; V : E) is
6272 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
6274 end Set_Overridden_Operation;
6276 procedure Set_Package_Instantiation (Id : E; V : N) is
6278 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
6280 end Set_Package_Instantiation;
6282 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
6284 pragma Assert (Is_Array_Type (Id));
6286 end Set_Packed_Array_Impl_Type;
6288 procedure Set_Parent_Subtype (Id : E; V : E) is
6290 pragma Assert (Ekind (Id) = E_Record_Type);
6292 end Set_Parent_Subtype;
6294 procedure Set_Part_Of_Constituents (Id : E; V : L) is
6296 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
6297 Set_Elist10 (Id, V);
6298 end Set_Part_Of_Constituents;
6300 procedure Set_Part_Of_References (Id : E; V : L) is
6302 pragma Assert (Ekind (Id) = E_Variable);
6303 Set_Elist11 (Id, V);
6304 end Set_Part_Of_References;
6306 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
6308 pragma Assert (Is_Type (Id));
6309 Set_Flag280 (Id, V);
6310 end Set_Partial_View_Has_Unknown_Discr;
6312 procedure Set_Pending_Access_Types (Id : E; V : L) is
6314 pragma Assert (Is_Type (Id));
6315 Set_Elist15 (Id, V);
6316 end Set_Pending_Access_Types;
6318 procedure Set_Postconditions_Proc (Id : E; V : E) is
6320 pragma Assert (Ekind_In (Id, E_Entry,
6325 end Set_Postconditions_Proc;
6327 procedure Set_Predicated_Parent (Id : E; V : E) is
6329 pragma Assert (Ekind_In (Id, E_Array_Subtype,
6331 E_Record_Subtype_With_Private));
6333 end Set_Predicated_Parent;
6335 procedure Set_Predicates_Ignored (Id : E; V : B) is
6337 pragma Assert (Is_Type (Id));
6338 Set_Flag288 (Id, V);
6339 end Set_Predicates_Ignored;
6341 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
6343 pragma Assert (Is_Tagged_Type (Id));
6344 Set_Elist10 (Id, V);
6345 end Set_Direct_Primitive_Operations;
6347 procedure Set_Prival (Id : E; V : E) is
6349 pragma Assert (Is_Protected_Component (Id));
6353 procedure Set_Prival_Link (Id : E; V : E) is
6355 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6357 end Set_Prival_Link;
6359 procedure Set_Private_Dependents (Id : E; V : L) is
6361 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
6362 Set_Elist18 (Id, V);
6363 end Set_Private_Dependents;
6365 procedure Set_Prev_Entity (Id : E; V : E) is
6368 end Set_Prev_Entity;
6370 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
6372 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
6374 end Set_Protected_Body_Subprogram;
6376 procedure Set_Protected_Formal (Id : E; V : E) is
6378 pragma Assert (Is_Formal (Id));
6380 end Set_Protected_Formal;
6382 procedure Set_Protected_Subprogram (Id : E; V : E) is
6384 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6386 end Set_Protected_Subprogram;
6388 procedure Set_Protection_Object (Id : E; V : E) is
6390 pragma Assert (Ekind_In (Id, E_Entry,
6395 end Set_Protection_Object;
6397 procedure Set_Reachable (Id : E; V : B := True) is
6402 procedure Set_Receiving_Entry (Id : E; V : E) is
6404 pragma Assert (Ekind (Id) = E_Procedure);
6406 end Set_Receiving_Entry;
6408 procedure Set_Referenced (Id : E; V : B := True) is
6410 Set_Flag156 (Id, V);
6413 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
6416 end Set_Referenced_As_LHS;
6418 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
6420 Set_Flag227 (Id, V);
6421 end Set_Referenced_As_Out_Parameter;
6423 procedure Set_Refinement_Constituents (Id : E; V : L) is
6425 pragma Assert (Ekind (Id) = E_Abstract_State);
6427 end Set_Refinement_Constituents;
6429 procedure Set_Register_Exception_Call (Id : E; V : N) is
6431 pragma Assert (Ekind (Id) = E_Exception);
6433 end Set_Register_Exception_Call;
6435 procedure Set_Related_Array_Object (Id : E; V : E) is
6437 pragma Assert (Is_Array_Type (Id));
6439 end Set_Related_Array_Object;
6441 procedure Set_Related_Expression (Id : E; V : N) is
6443 pragma Assert (Ekind (Id) in Type_Kind
6444 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
6446 end Set_Related_Expression;
6448 procedure Set_Related_Instance (Id : E; V : E) is
6450 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
6452 end Set_Related_Instance;
6454 procedure Set_Related_Type (Id : E; V : E) is
6456 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
6458 end Set_Related_Type;
6460 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
6462 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
6464 end Set_Relative_Deadline_Variable;
6466 procedure Set_Renamed_Entity (Id : E; V : N) is
6469 end Set_Renamed_Entity;
6471 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
6473 pragma Assert (Ekind (Id) = E_Package);
6474 Set_Flag231 (Id, V);
6475 end Set_Renamed_In_Spec;
6477 procedure Set_Renamed_Object (Id : E; V : N) is
6480 end Set_Renamed_Object;
6482 procedure Set_Renaming_Map (Id : E; V : U) is
6485 end Set_Renaming_Map;
6487 procedure Set_Requires_Overriding (Id : E; V : B := True) is
6489 pragma Assert (Is_Overloadable (Id));
6490 Set_Flag213 (Id, V);
6491 end Set_Requires_Overriding;
6493 procedure Set_Return_Present (Id : E; V : B := True) is
6496 end Set_Return_Present;
6498 procedure Set_Return_Applies_To (Id : E; V : N) is
6501 end Set_Return_Applies_To;
6503 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
6506 end Set_Returns_By_Ref;
6508 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6511 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6512 Set_Flag164 (Id, V);
6513 end Set_Reverse_Bit_Order;
6515 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6519 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6521 end Set_Reverse_Storage_Order;
6523 procedure Set_Rewritten_For_C (Id : E; V : B := True) is
6525 pragma Assert (Ekind (Id) = E_Function);
6526 Set_Flag287 (Id, V);
6527 end Set_Rewritten_For_C;
6529 procedure Set_RM_Size (Id : E; V : U) is
6531 pragma Assert (Is_Type (Id));
6535 procedure Set_Scalar_Range (Id : E; V : N) is
6538 end Set_Scalar_Range;
6540 procedure Set_Scale_Value (Id : E; V : U) is
6543 end Set_Scale_Value;
6545 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6547 pragma Assert (not Is_Record_Type (Id));
6549 end Set_Scope_Depth_Value;
6551 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6553 Set_Flag167 (Id, V);
6554 end Set_Sec_Stack_Needed_For_Return;
6556 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6558 pragma Assert (Ekind (Id) = E_Variable);
6560 end Set_Shared_Var_Procs_Instance;
6562 procedure Set_Size_Check_Code (Id : E; V : N) is
6564 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6566 end Set_Size_Check_Code;
6568 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6570 Set_Flag177 (Id, V);
6571 end Set_Size_Depends_On_Discriminant;
6573 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6576 end Set_Size_Known_At_Compile_Time;
6578 procedure Set_Small_Value (Id : E; V : R) is
6580 pragma Assert (Is_Fixed_Point_Type (Id));
6581 Set_Ureal21 (Id, V);
6582 end Set_Small_Value;
6584 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6587 (Ekind_In (Id, E_Protected_Type, -- concurrent types
6590 Ekind_In (Id, E_Generic_Package, -- packages
6594 end Set_SPARK_Aux_Pragma;
6596 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6599 (Ekind_In (Id, E_Protected_Type, -- concurrent types
6602 Ekind_In (Id, E_Generic_Package, -- packages
6605 Set_Flag266 (Id, V);
6606 end Set_SPARK_Aux_Pragma_Inherited;
6608 procedure Set_SPARK_Pragma (Id : E; V : N) is
6611 (Ekind_In (Id, E_Constant, -- objects
6614 Ekind_In (Id, E_Abstract_State, -- overloadable
6619 E_Generic_Procedure,
6624 Ekind_In (Id, E_Generic_Package, -- packages
6628 Ekind (Id) = E_Void -- special purpose
6630 Ekind_In (Id, E_Protected_Body, -- types
6635 end Set_SPARK_Pragma;
6637 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6640 (Ekind_In (Id, E_Constant, -- objects
6643 Ekind_In (Id, E_Abstract_State, -- overloadable
6648 E_Generic_Procedure,
6653 Ekind_In (Id, E_Generic_Package, -- packages
6657 Ekind (Id) = E_Void -- special purpose
6659 Ekind_In (Id, E_Protected_Body, -- types
6663 Set_Flag265 (Id, V);
6664 end Set_SPARK_Pragma_Inherited;
6666 procedure Set_Spec_Entity (Id : E; V : E) is
6668 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6670 end Set_Spec_Entity;
6672 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6676 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6677 Set_Flag273 (Id, V);
6678 end Set_SSO_Set_High_By_Default;
6680 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6684 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6685 Set_Flag272 (Id, V);
6686 end Set_SSO_Set_Low_By_Default;
6688 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6690 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6692 end Set_Static_Discrete_Predicate;
6694 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6696 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6697 and then Has_Predicates (Id));
6699 end Set_Static_Real_Or_String_Predicate;
6701 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6703 pragma Assert (Ekind_In (Id, E_Constant,
6707 end Set_Status_Flag_Or_Transient_Decl;
6709 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6711 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6712 pragma Assert (Id = Base_Type (Id));
6714 end Set_Storage_Size_Variable;
6716 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6718 pragma Assert (Ekind (Id) = E_Package);
6720 end Set_Static_Elaboration_Desired;
6722 procedure Set_Static_Initialization (Id : E; V : N) is
6725 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6727 end Set_Static_Initialization;
6729 procedure Set_Stored_Constraint (Id : E; V : L) is
6731 pragma Assert (Nkind (Id) in N_Entity);
6732 Set_Elist23 (Id, V);
6733 end Set_Stored_Constraint;
6735 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6737 pragma Assert (Ekind (Id) = E_Constant);
6738 Set_Flag270 (Id, V);
6739 end Set_Stores_Attribute_Old_Prefix;
6741 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6743 pragma Assert (Id = Base_Type (Id));
6744 Set_Flag145 (Id, V);
6745 end Set_Strict_Alignment;
6747 procedure Set_String_Literal_Length (Id : E; V : U) is
6749 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6751 end Set_String_Literal_Length;
6753 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6755 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6757 end Set_String_Literal_Low_Bound;
6759 procedure Set_Subprograms_For_Type (Id : E; V : L) is
6761 pragma Assert (Is_Type (Id));
6762 Set_Elist29 (Id, V);
6763 end Set_Subprograms_For_Type;
6765 procedure Set_Subps_Index (Id : E; V : U) is
6767 pragma Assert (Is_Subprogram (Id));
6769 end Set_Subps_Index;
6771 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6773 Set_Flag303 (Id, V);
6774 end Set_Suppress_Elaboration_Warnings;
6776 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6778 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6779 Set_Flag105 (Id, V);
6780 end Set_Suppress_Initialization;
6782 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6784 Set_Flag165 (Id, V);
6785 end Set_Suppress_Style_Checks;
6787 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6789 Set_Flag217 (Id, V);
6790 end Set_Suppress_Value_Tracking_On_Call;
6792 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6794 pragma Assert (Ekind (Id) in Task_Kind);
6796 end Set_Task_Body_Procedure;
6798 procedure Set_Thunk_Entity (Id : E; V : E) is
6800 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6801 and then Is_Thunk (Id));
6803 end Set_Thunk_Entity;
6805 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6808 end Set_Treat_As_Volatile;
6810 procedure Set_Underlying_Full_View (Id : E; V : E) is
6812 pragma Assert (Ekind (Id) in Private_Kind);
6814 end Set_Underlying_Full_View;
6816 procedure Set_Underlying_Record_View (Id : E; V : E) is
6818 pragma Assert (Ekind (Id) = E_Record_Type);
6820 end Set_Underlying_Record_View;
6822 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6824 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6825 Set_Flag216 (Id, V);
6826 end Set_Universal_Aliasing;
6828 procedure Set_Unset_Reference (Id : E; V : N) is
6831 end Set_Unset_Reference;
6833 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6835 Set_Flag222 (Id, V);
6836 end Set_Used_As_Generic_Actual;
6838 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6840 pragma Assert (Ekind (Id) = E_Protected_Type);
6841 Set_Flag188 (Id, V);
6842 end Set_Uses_Lock_Free;
6844 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6847 end Set_Uses_Sec_Stack;
6849 procedure Set_Validated_Object (Id : E; V : N) is
6851 pragma Assert (Ekind (Id) = E_Variable);
6853 end Set_Validated_Object;
6855 procedure Set_Warnings_Off (Id : E; V : B := True) is
6858 end Set_Warnings_Off;
6860 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6862 Set_Flag236 (Id, V);
6863 end Set_Warnings_Off_Used;
6865 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6867 Set_Flag237 (Id, V);
6868 end Set_Warnings_Off_Used_Unmodified;
6870 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6872 Set_Flag238 (Id, V);
6873 end Set_Warnings_Off_Used_Unreferenced;
6875 procedure Set_Was_Hidden (Id : E; V : B := True) is
6877 Set_Flag196 (Id, V);
6880 procedure Set_Wrapped_Entity (Id : E; V : E) is
6882 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6883 and then Is_Primitive_Wrapper (Id));
6885 end Set_Wrapped_Entity;
6887 -----------------------------------
6888 -- Field Initialization Routines --
6889 -----------------------------------
6891 procedure Init_Alignment (Id : E) is
6893 Set_Uint14 (Id, Uint_0);
6896 procedure Init_Alignment (Id : E; V : Int) is
6898 Set_Uint14 (Id, UI_From_Int (V));
6901 procedure Init_Component_Bit_Offset (Id : E) is
6903 Set_Uint11 (Id, No_Uint);
6904 end Init_Component_Bit_Offset;
6906 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6908 Set_Uint11 (Id, UI_From_Int (V));
6909 end Init_Component_Bit_Offset;
6911 procedure Init_Component_Size (Id : E) is
6913 Set_Uint22 (Id, Uint_0);
6914 end Init_Component_Size;
6916 procedure Init_Component_Size (Id : E; V : Int) is
6918 Set_Uint22 (Id, UI_From_Int (V));
6919 end Init_Component_Size;
6921 procedure Init_Digits_Value (Id : E) is
6923 Set_Uint17 (Id, Uint_0);
6924 end Init_Digits_Value;
6926 procedure Init_Digits_Value (Id : E; V : Int) is
6928 Set_Uint17 (Id, UI_From_Int (V));
6929 end Init_Digits_Value;
6931 procedure Init_Esize (Id : E) is
6933 Set_Uint12 (Id, Uint_0);
6936 procedure Init_Esize (Id : E; V : Int) is
6938 Set_Uint12 (Id, UI_From_Int (V));
6941 procedure Init_Normalized_First_Bit (Id : E) is
6943 Set_Uint8 (Id, No_Uint);
6944 end Init_Normalized_First_Bit;
6946 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6948 Set_Uint8 (Id, UI_From_Int (V));
6949 end Init_Normalized_First_Bit;
6951 procedure Init_Normalized_Position (Id : E) is
6953 Set_Uint14 (Id, No_Uint);
6954 end Init_Normalized_Position;
6956 procedure Init_Normalized_Position (Id : E; V : Int) is
6958 Set_Uint14 (Id, UI_From_Int (V));
6959 end Init_Normalized_Position;
6961 procedure Init_Normalized_Position_Max (Id : E) is
6963 Set_Uint10 (Id, No_Uint);
6964 end Init_Normalized_Position_Max;
6966 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6968 Set_Uint10 (Id, UI_From_Int (V));
6969 end Init_Normalized_Position_Max;
6971 procedure Init_RM_Size (Id : E) is
6973 Set_Uint13 (Id, Uint_0);
6976 procedure Init_RM_Size (Id : E; V : Int) is
6978 Set_Uint13 (Id, UI_From_Int (V));
6981 -----------------------------
6982 -- Init_Component_Location --
6983 -----------------------------
6985 procedure Init_Component_Location (Id : E) is
6987 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6988 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6989 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6990 Set_Uint12 (Id, Uint_0); -- Esize
6991 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6992 end Init_Component_Location;
6994 ----------------------------
6995 -- Init_Object_Size_Align --
6996 ----------------------------
6998 procedure Init_Object_Size_Align (Id : E) is
7000 Set_Uint12 (Id, Uint_0); -- Esize
7001 Set_Uint14 (Id, Uint_0); -- Alignment
7002 end Init_Object_Size_Align;
7008 procedure Init_Size (Id : E; V : Int) is
7010 pragma Assert (not Is_Object (Id));
7011 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
7012 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
7015 ---------------------
7016 -- Init_Size_Align --
7017 ---------------------
7019 procedure Init_Size_Align (Id : E) is
7021 pragma Assert (not Is_Object (Id));
7022 Set_Uint12 (Id, Uint_0); -- Esize
7023 Set_Uint13 (Id, Uint_0); -- RM_Size
7024 Set_Uint14 (Id, Uint_0); -- Alignment
7025 end Init_Size_Align;
7027 ----------------------------------------------
7028 -- Type Representation Attribute Predicates --
7029 ----------------------------------------------
7031 function Known_Alignment (E : Entity_Id) return B is
7033 return Uint14 (E) /= Uint_0
7034 and then Uint14 (E) /= No_Uint;
7035 end Known_Alignment;
7037 function Known_Component_Bit_Offset (E : Entity_Id) return B is
7039 return Uint11 (E) /= No_Uint;
7040 end Known_Component_Bit_Offset;
7042 function Known_Component_Size (E : Entity_Id) return B is
7044 return Uint22 (Base_Type (E)) /= Uint_0
7045 and then Uint22 (Base_Type (E)) /= No_Uint;
7046 end Known_Component_Size;
7048 function Known_Esize (E : Entity_Id) return B is
7050 return Uint12 (E) /= Uint_0
7051 and then Uint12 (E) /= No_Uint;
7054 function Known_Normalized_First_Bit (E : Entity_Id) return B is
7056 return Uint8 (E) /= No_Uint;
7057 end Known_Normalized_First_Bit;
7059 function Known_Normalized_Position (E : Entity_Id) return B is
7061 return Uint14 (E) /= No_Uint;
7062 end Known_Normalized_Position;
7064 function Known_Normalized_Position_Max (E : Entity_Id) return B is
7066 return Uint10 (E) /= No_Uint;
7067 end Known_Normalized_Position_Max;
7069 function Known_RM_Size (E : Entity_Id) return B is
7071 return Uint13 (E) /= No_Uint
7072 and then (Uint13 (E) /= Uint_0
7073 or else Is_Discrete_Type (E)
7074 or else Is_Fixed_Point_Type (E));
7077 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
7079 return Uint11 (E) /= No_Uint
7080 and then Uint11 (E) >= Uint_0;
7081 end Known_Static_Component_Bit_Offset;
7083 function Known_Static_Component_Size (E : Entity_Id) return B is
7085 return Uint22 (Base_Type (E)) > Uint_0;
7086 end Known_Static_Component_Size;
7088 function Known_Static_Esize (E : Entity_Id) return B is
7090 return Uint12 (E) > Uint_0
7091 and then not Is_Generic_Type (E);
7092 end Known_Static_Esize;
7094 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
7096 return Uint8 (E) /= No_Uint
7097 and then Uint8 (E) >= Uint_0;
7098 end Known_Static_Normalized_First_Bit;
7100 function Known_Static_Normalized_Position (E : Entity_Id) return B is
7102 return Uint14 (E) /= No_Uint
7103 and then Uint14 (E) >= Uint_0;
7104 end Known_Static_Normalized_Position;
7106 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
7108 return Uint10 (E) /= No_Uint
7109 and then Uint10 (E) >= Uint_0;
7110 end Known_Static_Normalized_Position_Max;
7112 function Known_Static_RM_Size (E : Entity_Id) return B is
7114 return (Uint13 (E) > Uint_0
7115 or else Is_Discrete_Type (E)
7116 or else Is_Fixed_Point_Type (E))
7117 and then not Is_Generic_Type (E);
7118 end Known_Static_RM_Size;
7120 function Unknown_Alignment (E : Entity_Id) return B is
7122 return Uint14 (E) = Uint_0
7123 or else Uint14 (E) = No_Uint;
7124 end Unknown_Alignment;
7126 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
7128 return Uint11 (E) = No_Uint;
7129 end Unknown_Component_Bit_Offset;
7131 function Unknown_Component_Size (E : Entity_Id) return B is
7133 return Uint22 (Base_Type (E)) = Uint_0
7135 Uint22 (Base_Type (E)) = No_Uint;
7136 end Unknown_Component_Size;
7138 function Unknown_Esize (E : Entity_Id) return B is
7140 return Uint12 (E) = No_Uint
7142 Uint12 (E) = Uint_0;
7145 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
7147 return Uint8 (E) = No_Uint;
7148 end Unknown_Normalized_First_Bit;
7150 function Unknown_Normalized_Position (E : Entity_Id) return B is
7152 return Uint14 (E) = No_Uint;
7153 end Unknown_Normalized_Position;
7155 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
7157 return Uint10 (E) = No_Uint;
7158 end Unknown_Normalized_Position_Max;
7160 function Unknown_RM_Size (E : Entity_Id) return B is
7162 return (Uint13 (E) = Uint_0
7163 and then not Is_Discrete_Type (E)
7164 and then not Is_Fixed_Point_Type (E))
7165 or else Uint13 (E) = No_Uint;
7166 end Unknown_RM_Size;
7168 --------------------
7169 -- Address_Clause --
7170 --------------------
7172 function Address_Clause (Id : E) return N is
7174 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
7181 function Aft_Value (Id : E) return U is
7183 Delta_Val : Ureal := Delta_Value (Id);
7185 while Delta_Val < Ureal_Tenth loop
7186 Delta_Val := Delta_Val * Ureal_10;
7187 Result := Result + 1;
7190 return UI_From_Int (Result);
7193 ----------------------
7194 -- Alignment_Clause --
7195 ----------------------
7197 function Alignment_Clause (Id : E) return N is
7199 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
7200 end Alignment_Clause;
7206 procedure Append_Entity (Id : Entity_Id; Scop : Entity_Id) is
7207 Last : constant Entity_Id := Last_Entity (Scop);
7210 Set_Scope (Id, Scop);
7211 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
7213 -- The entity chain is empty
7216 Set_First_Entity (Scop, Id);
7218 -- Otherwise the entity chain has at least one element
7221 Link_Entities (Last, Id); -- Last <-- Id, Last --> Id
7224 -- NOTE: The setting of the Next_Entity attribute of Id must happen
7225 -- here as opposed to at the beginning of the routine because doing
7226 -- so causes the binder to hang. It is not clear why ???
7228 Set_Next_Entity (Id, Empty); -- Id --> Empty
7230 Set_Last_Entity (Scop, Id);
7237 function Base_Type (Id : E) return E is
7239 if Is_Base_Type (Id) then
7242 pragma Assert (Is_Type (Id));
7247 -------------------------
7248 -- Component_Alignment --
7249 -------------------------
7251 -- Component Alignment is encoded using two flags, Flag128/129 as
7252 -- follows. Note that both flags False = Align_Default, so that the
7253 -- default initialization of flags to False initializes component
7254 -- alignment to the default value as required.
7256 -- Flag128 Flag129 Value
7257 -- ------- ------- -----
7258 -- False False Calign_Default
7259 -- False True Calign_Component_Size
7260 -- True False Calign_Component_Size_4
7261 -- True True Calign_Storage_Unit
7263 function Component_Alignment (Id : E) return C is
7264 BT : constant Node_Id := Base_Type (Id);
7267 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
7269 if Flag128 (BT) then
7270 if Flag129 (BT) then
7271 return Calign_Storage_Unit;
7273 return Calign_Component_Size_4;
7277 if Flag129 (BT) then
7278 return Calign_Component_Size;
7280 return Calign_Default;
7283 end Component_Alignment;
7285 ----------------------
7286 -- Declaration_Node --
7287 ----------------------
7289 function Declaration_Node (Id : E) return N is
7293 if Ekind (Id) = E_Incomplete_Type
7294 and then Present (Full_View (Id))
7296 P := Parent (Full_View (Id));
7302 if Nkind_In (P, N_Selected_Component, N_Expanded_Name)
7303 or else (Nkind (P) = N_Defining_Program_Unit_Name
7304 and then Is_Child_Unit (Id))
7311 end Declaration_Node;
7313 ---------------------
7314 -- Designated_Type --
7315 ---------------------
7317 function Designated_Type (Id : E) return E is
7321 Desig_Type := Directly_Designated_Type (Id);
7323 if Is_Incomplete_Type (Desig_Type)
7324 and then Present (Full_View (Desig_Type))
7326 return Full_View (Desig_Type);
7328 elsif Is_Class_Wide_Type (Desig_Type)
7329 and then Is_Incomplete_Type (Etype (Desig_Type))
7330 and then Present (Full_View (Etype (Desig_Type)))
7331 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
7333 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
7338 end Designated_Type;
7344 function DIC_Procedure (Id : E) return E is
7345 Subp_Elmt : Elmt_Id;
7346 Subp_Id : Entity_Id;
7350 pragma Assert (Is_Type (Id));
7352 Subps := Subprograms_For_Type (Base_Type (Id));
7354 if Present (Subps) then
7355 Subp_Elmt := First_Elmt (Subps);
7356 while Present (Subp_Elmt) loop
7357 Subp_Id := Node (Subp_Elmt);
7359 if Is_DIC_Procedure (Subp_Id) then
7363 Next_Elmt (Subp_Elmt);
7370 ----------------------
7371 -- Entry_Index_Type --
7372 ----------------------
7374 function Entry_Index_Type (Id : E) return N is
7376 pragma Assert (Ekind (Id) = E_Entry_Family);
7377 return Etype (Discrete_Subtype_Definition (Parent (Id)));
7378 end Entry_Index_Type;
7380 ---------------------
7381 -- First_Component --
7382 ---------------------
7384 function First_Component (Id : E) return E is
7389 (Is_Concurrent_Type (Id)
7390 or else Is_Incomplete_Or_Private_Type (Id)
7391 or else Is_Record_Type (Id));
7393 Comp_Id := First_Entity (Id);
7394 while Present (Comp_Id) loop
7395 exit when Ekind (Comp_Id) = E_Component;
7396 Comp_Id := Next_Entity (Comp_Id);
7400 end First_Component;
7402 -------------------------------------
7403 -- First_Component_Or_Discriminant --
7404 -------------------------------------
7406 function First_Component_Or_Discriminant (Id : E) return E is
7411 (Is_Concurrent_Type (Id)
7412 or else Is_Incomplete_Or_Private_Type (Id)
7413 or else Is_Record_Type (Id)
7414 or else Has_Discriminants (Id));
7416 Comp_Id := First_Entity (Id);
7417 while Present (Comp_Id) loop
7418 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7419 Comp_Id := Next_Entity (Comp_Id);
7423 end First_Component_Or_Discriminant;
7429 function First_Formal (Id : E) return E is
7434 (Is_Generic_Subprogram (Id)
7435 or else Is_Overloadable (Id)
7436 or else Ekind_In (Id, E_Entry_Family,
7438 E_Subprogram_Type));
7440 if Ekind (Id) = E_Enumeration_Literal then
7444 Formal := First_Entity (Id);
7446 -- Deal with the common, non-generic case first
7448 if No (Formal) or else Is_Formal (Formal) then
7452 -- The first/next entity chain of a generic subprogram contains all
7453 -- generic formal parameters, followed by the formal parameters.
7455 if Is_Generic_Subprogram (Id) then
7456 while Present (Formal) and then not Is_Formal (Formal) loop
7457 Next_Entity (Formal);
7466 ------------------------------
7467 -- First_Formal_With_Extras --
7468 ------------------------------
7470 function First_Formal_With_Extras (Id : E) return E is
7475 (Is_Generic_Subprogram (Id)
7476 or else Is_Overloadable (Id)
7477 or else Ekind_In (Id, E_Entry_Family,
7479 E_Subprogram_Type));
7481 if Ekind (Id) = E_Enumeration_Literal then
7485 Formal := First_Entity (Id);
7487 -- The first/next entity chain of a generic subprogram contains all
7488 -- generic formal parameters, followed by the formal parameters. Go
7489 -- directly to the parameters by skipping the formal part.
7491 if Is_Generic_Subprogram (Id) then
7492 while Present (Formal) and then not Is_Formal (Formal) loop
7493 Next_Entity (Formal);
7497 if Present (Formal) and then Is_Formal (Formal) then
7500 return Extra_Formals (Id); -- Empty if no extra formals
7503 end First_Formal_With_Extras;
7505 -------------------------------------
7506 -- Get_Attribute_Definition_Clause --
7507 -------------------------------------
7509 function Get_Attribute_Definition_Clause
7511 Id : Attribute_Id) return Node_Id
7516 N := First_Rep_Item (E);
7517 while Present (N) loop
7518 if Nkind (N) = N_Attribute_Definition_Clause
7519 and then Get_Attribute_Id (Chars (N)) = Id
7528 end Get_Attribute_Definition_Clause;
7530 ---------------------------
7531 -- Get_Class_Wide_Pragma --
7532 ---------------------------
7534 function Get_Class_Wide_Pragma
7536 Id : Pragma_Id) return Node_Id
7542 Items := Contract (E);
7548 Item := Pre_Post_Conditions (Items);
7549 while Present (Item) loop
7550 if Nkind (Item) = N_Pragma
7551 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7552 and then Class_Present (Item)
7557 Item := Next_Pragma (Item);
7561 end Get_Class_Wide_Pragma;
7567 function Get_Full_View (T : Entity_Id) return Entity_Id is
7569 if Is_Incomplete_Type (T) and then Present (Full_View (T)) then
7570 return Full_View (T);
7572 elsif Is_Class_Wide_Type (T)
7573 and then Is_Incomplete_Type (Root_Type (T))
7574 and then Present (Full_View (Root_Type (T)))
7576 return Class_Wide_Type (Full_View (Root_Type (T)));
7587 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
7589 -- Classification pragmas
7591 Is_CLS : constant Boolean :=
7592 Id = Pragma_Abstract_State or else
7593 Id = Pragma_Attach_Handler or else
7594 Id = Pragma_Async_Readers or else
7595 Id = Pragma_Async_Writers or else
7596 Id = Pragma_Constant_After_Elaboration or else
7597 Id = Pragma_Depends or else
7598 Id = Pragma_Effective_Reads or else
7599 Id = Pragma_Effective_Writes or else
7600 Id = Pragma_Extensions_Visible or else
7601 Id = Pragma_Global or else
7602 Id = Pragma_Initial_Condition or else
7603 Id = Pragma_Initializes or else
7604 Id = Pragma_Interrupt_Handler or else
7605 Id = Pragma_Part_Of or else
7606 Id = Pragma_Refined_Depends or else
7607 Id = Pragma_Refined_Global or else
7608 Id = Pragma_Refined_State or else
7609 Id = Pragma_Volatile_Function;
7611 -- Contract / test case pragmas
7613 Is_CTC : constant Boolean :=
7614 Id = Pragma_Contract_Cases or else
7615 Id = Pragma_Test_Case;
7617 -- Pre / postcondition pragmas
7619 Is_PPC : constant Boolean :=
7620 Id = Pragma_Precondition or else
7621 Id = Pragma_Postcondition or else
7622 Id = Pragma_Refined_Post;
7624 In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC;
7630 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7631 -- extracted from their specialized list.
7634 Items := Contract (E);
7640 Item := Classifications (Items);
7643 Item := Contract_Test_Cases (Items);
7646 Item := Pre_Post_Conditions (Items);
7652 Item := First_Rep_Item (E);
7655 while Present (Item) loop
7656 if Nkind (Item) = N_Pragma
7657 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7661 -- All nodes in N_Contract are chained using Next_Pragma
7663 elsif In_Contract then
7664 Item := Next_Pragma (Item);
7669 Next_Rep_Item (Item);
7676 --------------------------------------
7677 -- Get_Record_Representation_Clause --
7678 --------------------------------------
7680 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7684 N := First_Rep_Item (E);
7685 while Present (N) loop
7686 if Nkind (N) = N_Record_Representation_Clause then
7694 end Get_Record_Representation_Clause;
7696 ------------------------
7697 -- Has_Attach_Handler --
7698 ------------------------
7700 function Has_Attach_Handler (Id : E) return B is
7704 pragma Assert (Is_Protected_Type (Id));
7706 Ritem := First_Rep_Item (Id);
7707 while Present (Ritem) loop
7708 if Nkind (Ritem) = N_Pragma
7709 and then Pragma_Name (Ritem) = Name_Attach_Handler
7713 Next_Rep_Item (Ritem);
7718 end Has_Attach_Handler;
7724 function Has_DIC (Id : E) return B is
7726 return Has_Own_DIC (Id) or else Has_Inherited_DIC (Id);
7733 function Has_Entries (Id : E) return B is
7737 pragma Assert (Is_Concurrent_Type (Id));
7739 Ent := First_Entity (Id);
7740 while Present (Ent) loop
7741 if Is_Entry (Ent) then
7745 Ent := Next_Entity (Ent);
7751 ----------------------------
7752 -- Has_Foreign_Convention --
7753 ----------------------------
7755 function Has_Foreign_Convention (Id : E) return B is
7757 -- While regular Intrinsics such as the Standard operators fit in the
7758 -- "Ada" convention, those with an Interface_Name materialize GCC
7759 -- builtin imports for which Ada special treatments shouldn't apply.
7761 return Convention (Id) in Foreign_Convention
7762 or else (Convention (Id) = Convention_Intrinsic
7763 and then Present (Interface_Name (Id)));
7764 end Has_Foreign_Convention;
7766 ---------------------------
7767 -- Has_Interrupt_Handler --
7768 ---------------------------
7770 function Has_Interrupt_Handler (Id : E) return B is
7774 pragma Assert (Is_Protected_Type (Id));
7776 Ritem := First_Rep_Item (Id);
7777 while Present (Ritem) loop
7778 if Nkind (Ritem) = N_Pragma
7779 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7783 Next_Rep_Item (Ritem);
7788 end Has_Interrupt_Handler;
7790 --------------------
7791 -- Has_Invariants --
7792 --------------------
7794 function Has_Invariants (Id : E) return B is
7796 return Has_Own_Invariants (Id) or else Has_Inherited_Invariants (Id);
7799 --------------------------
7800 -- Has_Non_Limited_View --
7801 --------------------------
7803 function Has_Non_Limited_View (Id : E) return B is
7805 return (Ekind (Id) in Incomplete_Kind
7806 or else Ekind (Id) in Class_Wide_Kind
7807 or else Ekind (Id) = E_Abstract_State)
7808 and then Present (Non_Limited_View (Id));
7809 end Has_Non_Limited_View;
7811 ---------------------------------
7812 -- Has_Non_Null_Abstract_State --
7813 ---------------------------------
7815 function Has_Non_Null_Abstract_State (Id : E) return B is
7817 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7820 Present (Abstract_States (Id))
7822 not Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7823 end Has_Non_Null_Abstract_State;
7825 -------------------------------------
7826 -- Has_Non_Null_Visible_Refinement --
7827 -------------------------------------
7829 function Has_Non_Null_Visible_Refinement (Id : E) return B is
7830 Constits : Elist_Id;
7833 -- "Refinement" is a concept applicable only to abstract states
7835 pragma Assert (Ekind (Id) = E_Abstract_State);
7836 Constits := Refinement_Constituents (Id);
7838 -- A partial refinement is always non-null. For a full refinement to be
7839 -- non-null, the first constituent must be anything other than null.
7842 Has_Partial_Visible_Refinement (Id)
7843 or else (Has_Visible_Refinement (Id)
7844 and then Present (Constits)
7845 and then Nkind (Node (First_Elmt (Constits))) /= N_Null);
7846 end Has_Non_Null_Visible_Refinement;
7848 -----------------------------
7849 -- Has_Null_Abstract_State --
7850 -----------------------------
7852 function Has_Null_Abstract_State (Id : E) return B is
7853 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7855 States : constant Elist_Id := Abstract_States (Id);
7858 -- Check first available state of related package. A null abstract
7859 -- state always appears as the sole element of the state list.
7863 and then Is_Null_State (Node (First_Elmt (States)));
7864 end Has_Null_Abstract_State;
7866 ---------------------------------
7867 -- Has_Null_Visible_Refinement --
7868 ---------------------------------
7870 function Has_Null_Visible_Refinement (Id : E) return B is
7871 Constits : Elist_Id;
7874 -- "Refinement" is a concept applicable only to abstract states
7876 pragma Assert (Ekind (Id) = E_Abstract_State);
7877 Constits := Refinement_Constituents (Id);
7879 -- For a refinement to be null, the state's sole constituent must be a
7883 Has_Visible_Refinement (Id)
7884 and then Present (Constits)
7885 and then Nkind (Node (First_Elmt (Constits))) = N_Null;
7886 end Has_Null_Visible_Refinement;
7888 --------------------
7889 -- Has_Unmodified --
7890 --------------------
7892 function Has_Unmodified (E : Entity_Id) return Boolean is
7894 if Has_Pragma_Unmodified (E) then
7896 elsif Warnings_Off (E) then
7897 Set_Warnings_Off_Used_Unmodified (E);
7904 ---------------------
7905 -- Has_Unreferenced --
7906 ---------------------
7908 function Has_Unreferenced (E : Entity_Id) return Boolean is
7910 if Has_Pragma_Unreferenced (E) then
7912 elsif Warnings_Off (E) then
7913 Set_Warnings_Off_Used_Unreferenced (E);
7918 end Has_Unreferenced;
7920 ----------------------
7921 -- Has_Warnings_Off --
7922 ----------------------
7924 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7926 if Warnings_Off (E) then
7927 Set_Warnings_Off_Used (E);
7932 end Has_Warnings_Off;
7934 ------------------------------
7935 -- Implementation_Base_Type --
7936 ------------------------------
7938 function Implementation_Base_Type (Id : E) return E is
7943 Bastyp := Base_Type (Id);
7945 if Is_Incomplete_Or_Private_Type (Bastyp) then
7946 Imptyp := Underlying_Type (Bastyp);
7948 -- If we have an implementation type, then just return it,
7949 -- otherwise we return the Base_Type anyway. This can only
7950 -- happen in error situations and should avoid some error bombs.
7952 if Present (Imptyp) then
7953 return Base_Type (Imptyp);
7961 end Implementation_Base_Type;
7963 -------------------------
7964 -- Invariant_Procedure --
7965 -------------------------
7967 function Invariant_Procedure (Id : E) return E is
7968 Subp_Elmt : Elmt_Id;
7969 Subp_Id : Entity_Id;
7973 pragma Assert (Is_Type (Id));
7975 Subps := Subprograms_For_Type (Base_Type (Id));
7977 if Present (Subps) then
7978 Subp_Elmt := First_Elmt (Subps);
7979 while Present (Subp_Elmt) loop
7980 Subp_Id := Node (Subp_Elmt);
7982 if Is_Invariant_Procedure (Subp_Id) then
7986 Next_Elmt (Subp_Elmt);
7991 end Invariant_Procedure;
7993 ----------------------
7994 -- Is_Atomic_Or_VFA --
7995 ----------------------
7997 function Is_Atomic_Or_VFA (Id : E) return B is
7999 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
8000 end Is_Atomic_Or_VFA;
8006 -- Global flag table allowing rapid computation of this function
8008 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
8009 (E_Enumeration_Subtype |
8010 E_Incomplete_Subtype |
8011 E_Signed_Integer_Subtype |
8012 E_Modular_Integer_Subtype |
8013 E_Floating_Point_Subtype |
8014 E_Ordinary_Fixed_Point_Subtype |
8015 E_Decimal_Fixed_Point_Subtype |
8019 E_Record_Subtype_With_Private |
8020 E_Limited_Private_Subtype |
8022 E_Protected_Subtype |
8024 E_String_Literal_Subtype |
8025 E_Class_Wide_Subtype => False,
8028 function Is_Base_Type (Id : E) return Boolean is
8030 return Entity_Is_Base_Type (Ekind (Id));
8033 ---------------------
8034 -- Is_Boolean_Type --
8035 ---------------------
8037 function Is_Boolean_Type (Id : E) return B is
8039 return Root_Type (Id) = Standard_Boolean;
8040 end Is_Boolean_Type;
8042 ------------------------
8043 -- Is_Constant_Object --
8044 ------------------------
8046 function Is_Constant_Object (Id : E) return B is
8047 K : constant Entity_Kind := Ekind (Id);
8050 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
8051 end Is_Constant_Object;
8057 function Is_Controlled (Id : E) return B is
8059 return Is_Controlled_Active (Id) and then not Disable_Controlled (Id);
8062 --------------------
8063 -- Is_Discriminal --
8064 --------------------
8066 function Is_Discriminal (Id : E) return B is
8068 return (Ekind_In (Id, E_Constant, E_In_Parameter)
8069 and then Present (Discriminal_Link (Id)));
8072 ----------------------
8073 -- Is_Dynamic_Scope --
8074 ----------------------
8076 function Is_Dynamic_Scope (Id : E) return B is
8079 Ekind (Id) = E_Block
8081 Ekind (Id) = E_Function
8083 Ekind (Id) = E_Procedure
8085 Ekind (Id) = E_Subprogram_Body
8087 Ekind (Id) = E_Task_Type
8089 (Ekind (Id) = E_Limited_Private_Type
8090 and then Present (Full_View (Id))
8091 and then Ekind (Full_View (Id)) = E_Task_Type)
8093 Ekind (Id) = E_Entry
8095 Ekind (Id) = E_Entry_Family
8097 Ekind (Id) = E_Return_Statement;
8098 end Is_Dynamic_Scope;
8100 --------------------
8101 -- Is_Entity_Name --
8102 --------------------
8104 function Is_Entity_Name (N : Node_Id) return Boolean is
8105 Kind : constant Node_Kind := Nkind (N);
8108 -- Identifiers, operator symbols, expanded names are entity names
8110 return Kind = N_Identifier
8111 or else Kind = N_Operator_Symbol
8112 or else Kind = N_Expanded_Name
8114 -- Attribute references are entity names if they refer to an entity.
8115 -- Note that we don't do this by testing for the presence of the
8116 -- Entity field in the N_Attribute_Reference node, since it may not
8117 -- have been set yet.
8119 or else (Kind = N_Attribute_Reference
8120 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
8123 ---------------------------
8124 -- Is_Elaboration_Target --
8125 ---------------------------
8127 function Is_Elaboration_Target (Id : Entity_Id) return Boolean is
8130 Ekind_In (Id, E_Constant, E_Variable)
8131 or else Is_Entry (Id)
8132 or else Is_Generic_Unit (Id)
8133 or else Is_Subprogram (Id)
8134 or else Is_Task_Type (Id);
8135 end Is_Elaboration_Target;
8137 -----------------------
8138 -- Is_External_State --
8139 -----------------------
8141 function Is_External_State (Id : E) return B is
8143 -- To qualify, the abstract state must appear with option "external" or
8144 -- "synchronous" (SPARK RM 7.1.4(8) and (10)).
8147 Ekind (Id) = E_Abstract_State
8148 and then (Has_Option (Id, Name_External)
8150 Has_Option (Id, Name_Synchronous));
8151 end Is_External_State;
8157 function Is_Finalizer (Id : E) return B is
8159 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
8166 function Is_Null_State (Id : E) return B is
8169 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
8172 ---------------------
8173 -- Is_Packed_Array --
8174 ---------------------
8176 function Is_Packed_Array (Id : E) return B is
8178 return Is_Array_Type (Id) and then Is_Packed (Id);
8179 end Is_Packed_Array;
8181 -----------------------------------
8182 -- Is_Package_Or_Generic_Package --
8183 -----------------------------------
8185 function Is_Package_Or_Generic_Package (Id : E) return B is
8187 return Ekind_In (Id, E_Generic_Package, E_Package);
8188 end Is_Package_Or_Generic_Package;
8194 function Is_Prival (Id : E) return B is
8196 return (Ekind_In (Id, E_Constant, E_Variable)
8197 and then Present (Prival_Link (Id)));
8200 ----------------------------
8201 -- Is_Protected_Component --
8202 ----------------------------
8204 function Is_Protected_Component (Id : E) return B is
8206 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
8207 end Is_Protected_Component;
8209 ----------------------------
8210 -- Is_Protected_Interface --
8211 ----------------------------
8213 function Is_Protected_Interface (Id : E) return B is
8214 Typ : constant Entity_Id := Base_Type (Id);
8216 if not Is_Interface (Typ) then
8218 elsif Is_Class_Wide_Type (Typ) then
8219 return Is_Protected_Interface (Etype (Typ));
8221 return Protected_Present (Type_Definition (Parent (Typ)));
8223 end Is_Protected_Interface;
8225 ------------------------------
8226 -- Is_Protected_Record_Type --
8227 ------------------------------
8229 function Is_Protected_Record_Type (Id : E) return B is
8232 Is_Concurrent_Record_Type (Id)
8233 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
8234 end Is_Protected_Record_Type;
8236 --------------------------------
8237 -- Is_Standard_Character_Type --
8238 --------------------------------
8240 function Is_Standard_Character_Type (Id : E) return B is
8242 if Is_Type (Id) then
8244 R : constant Entity_Id := Root_Type (Id);
8247 R = Standard_Character
8249 R = Standard_Wide_Character
8251 R = Standard_Wide_Wide_Character;
8257 end Is_Standard_Character_Type;
8259 -----------------------------
8260 -- Is_Standard_String_Type --
8261 -----------------------------
8263 function Is_Standard_String_Type (Id : E) return B is
8265 if Is_Type (Id) then
8267 R : constant Entity_Id := Root_Type (Id);
8272 R = Standard_Wide_String
8274 R = Standard_Wide_Wide_String;
8280 end Is_Standard_String_Type;
8282 --------------------
8283 -- Is_String_Type --
8284 --------------------
8286 function Is_String_Type (Id : E) return B is
8288 return Is_Array_Type (Id)
8289 and then Id /= Any_Composite
8290 and then Number_Dimensions (Id) = 1
8291 and then Is_Character_Type (Component_Type (Id));
8294 -------------------------------
8295 -- Is_Synchronized_Interface --
8296 -------------------------------
8298 function Is_Synchronized_Interface (Id : E) return B is
8299 Typ : constant Entity_Id := Base_Type (Id);
8302 if not Is_Interface (Typ) then
8305 elsif Is_Class_Wide_Type (Typ) then
8306 return Is_Synchronized_Interface (Etype (Typ));
8309 return Protected_Present (Type_Definition (Parent (Typ)))
8310 or else Synchronized_Present (Type_Definition (Parent (Typ)))
8311 or else Task_Present (Type_Definition (Parent (Typ)));
8313 end Is_Synchronized_Interface;
8315 ---------------------------
8316 -- Is_Synchronized_State --
8317 ---------------------------
8319 function Is_Synchronized_State (Id : E) return B is
8321 -- To qualify, the abstract state must appear with simple option
8322 -- "synchronous" (SPARK RM 7.1.4(10)).
8325 Ekind (Id) = E_Abstract_State
8326 and then Has_Option (Id, Name_Synchronous);
8327 end Is_Synchronized_State;
8329 -----------------------
8330 -- Is_Task_Interface --
8331 -----------------------
8333 function Is_Task_Interface (Id : E) return B is
8334 Typ : constant Entity_Id := Base_Type (Id);
8336 if not Is_Interface (Typ) then
8338 elsif Is_Class_Wide_Type (Typ) then
8339 return Is_Task_Interface (Etype (Typ));
8341 return Task_Present (Type_Definition (Parent (Typ)));
8343 end Is_Task_Interface;
8345 -------------------------
8346 -- Is_Task_Record_Type --
8347 -------------------------
8349 function Is_Task_Record_Type (Id : E) return B is
8352 Is_Concurrent_Record_Type (Id)
8353 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
8354 end Is_Task_Record_Type;
8356 ------------------------
8357 -- Is_Wrapper_Package --
8358 ------------------------
8360 function Is_Wrapper_Package (Id : E) return B is
8362 return Ekind (Id) = E_Package and then Present (Related_Instance (Id));
8363 end Is_Wrapper_Package;
8369 function Last_Formal (Id : E) return E is
8374 (Is_Overloadable (Id)
8375 or else Ekind_In (Id, E_Entry_Family,
8377 E_Subprogram_Type));
8379 if Ekind (Id) = E_Enumeration_Literal then
8383 Formal := First_Formal (Id);
8385 if Present (Formal) then
8386 while Present (Next_Formal (Formal)) loop
8387 Formal := Next_Formal (Formal);
8399 procedure Link_Entities (First : Entity_Id; Second : Node_Id) is
8401 if Present (Second) then
8402 Set_Prev_Entity (Second, First); -- First <-- Second
8405 Set_Next_Entity (First, Second); -- First --> Second
8408 ----------------------
8409 -- Model_Emin_Value --
8410 ----------------------
8412 function Model_Emin_Value (Id : E) return Uint is
8414 return Machine_Emin_Value (Id);
8415 end Model_Emin_Value;
8417 -------------------------
8418 -- Model_Epsilon_Value --
8419 -------------------------
8421 function Model_Epsilon_Value (Id : E) return Ureal is
8422 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8424 return Radix ** (1 - Model_Mantissa_Value (Id));
8425 end Model_Epsilon_Value;
8427 --------------------------
8428 -- Model_Mantissa_Value --
8429 --------------------------
8431 function Model_Mantissa_Value (Id : E) return Uint is
8433 return Machine_Mantissa_Value (Id);
8434 end Model_Mantissa_Value;
8436 -----------------------
8437 -- Model_Small_Value --
8438 -----------------------
8440 function Model_Small_Value (Id : E) return Ureal is
8441 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8443 return Radix ** (Model_Emin_Value (Id) - 1);
8444 end Model_Small_Value;
8446 ------------------------
8447 -- Machine_Emax_Value --
8448 ------------------------
8450 function Machine_Emax_Value (Id : E) return Uint is
8451 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8454 case Float_Rep (Id) is
8457 when 1 .. 6 => return Uint_128;
8458 when 7 .. 15 => return 2**10;
8459 when 16 .. 33 => return 2**14;
8460 when others => return No_Uint;
8464 return Uint_2 ** Uint_7 - Uint_1;
8466 end Machine_Emax_Value;
8468 ------------------------
8469 -- Machine_Emin_Value --
8470 ------------------------
8472 function Machine_Emin_Value (Id : E) return Uint is
8474 case Float_Rep (Id) is
8475 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
8476 when AAMP => return -Machine_Emax_Value (Id);
8478 end Machine_Emin_Value;
8480 ----------------------------
8481 -- Machine_Mantissa_Value --
8482 ----------------------------
8484 function Machine_Mantissa_Value (Id : E) return Uint is
8485 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8488 case Float_Rep (Id) is
8491 when 1 .. 6 => return Uint_24;
8492 when 7 .. 15 => return UI_From_Int (53);
8493 when 16 .. 18 => return Uint_64;
8494 when 19 .. 33 => return UI_From_Int (113);
8495 when others => return No_Uint;
8500 when 1 .. 6 => return Uint_24;
8501 when 7 .. 9 => return UI_From_Int (40);
8502 when others => return No_Uint;
8505 end Machine_Mantissa_Value;
8507 -------------------------
8508 -- Machine_Radix_Value --
8509 -------------------------
8511 function Machine_Radix_Value (Id : E) return U is
8513 case Float_Rep (Id) is
8519 end Machine_Radix_Value;
8521 --------------------
8522 -- Next_Component --
8523 --------------------
8525 function Next_Component (Id : E) return E is
8529 Comp_Id := Next_Entity (Id);
8530 while Present (Comp_Id) loop
8531 exit when Ekind (Comp_Id) = E_Component;
8532 Comp_Id := Next_Entity (Comp_Id);
8538 ------------------------------------
8539 -- Next_Component_Or_Discriminant --
8540 ------------------------------------
8542 function Next_Component_Or_Discriminant (Id : E) return E is
8546 Comp_Id := Next_Entity (Id);
8547 while Present (Comp_Id) loop
8548 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
8549 Comp_Id := Next_Entity (Comp_Id);
8553 end Next_Component_Or_Discriminant;
8555 -----------------------
8556 -- Next_Discriminant --
8557 -----------------------
8559 -- This function actually implements both Next_Discriminant and
8560 -- Next_Stored_Discriminant by making sure that the Discriminant
8561 -- returned is of the same variety as Id.
8563 function Next_Discriminant (Id : E) return E is
8565 -- Derived Tagged types with private extensions look like this...
8567 -- E_Discriminant d1
8568 -- E_Discriminant d2
8570 -- E_Discriminant d1
8571 -- E_Discriminant d2
8574 -- so it is critical not to go past the leading discriminants
8579 pragma Assert (Ekind (Id) = E_Discriminant);
8582 D := Next_Entity (D);
8584 or else (Ekind (D) /= E_Discriminant
8585 and then not Is_Itype (D))
8590 exit when Ekind (D) = E_Discriminant
8591 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
8595 end Next_Discriminant;
8601 function Next_Formal (Id : E) return E is
8605 -- Follow the chain of declared entities as long as the kind of the
8606 -- entity corresponds to a formal parameter. Skip internal entities
8607 -- that may have been created for implicit subtypes, in the process
8608 -- of analyzing default expressions.
8614 if No (P) or else Is_Formal (P) then
8616 elsif not Is_Internal (P) then
8622 -----------------------------
8623 -- Next_Formal_With_Extras --
8624 -----------------------------
8626 function Next_Formal_With_Extras (Id : E) return E is
8628 if Present (Extra_Formal (Id)) then
8629 return Extra_Formal (Id);
8631 return Next_Formal (Id);
8633 end Next_Formal_With_Extras;
8639 function Next_Index (Id : Node_Id) return Node_Id is
8648 function Next_Literal (Id : E) return E is
8650 pragma Assert (Nkind (Id) in N_Entity);
8654 ------------------------------
8655 -- Next_Stored_Discriminant --
8656 ------------------------------
8658 function Next_Stored_Discriminant (Id : E) return E is
8660 -- See comment in Next_Discriminant
8662 return Next_Discriminant (Id);
8663 end Next_Stored_Discriminant;
8665 -----------------------
8666 -- Number_Dimensions --
8667 -----------------------
8669 function Number_Dimensions (Id : E) return Pos is
8674 if Ekind (Id) = E_String_Literal_Subtype then
8679 T := First_Index (Id);
8680 while Present (T) loop
8687 end Number_Dimensions;
8689 --------------------
8690 -- Number_Entries --
8691 --------------------
8693 function Number_Entries (Id : E) return Nat is
8698 pragma Assert (Is_Concurrent_Type (Id));
8701 Ent := First_Entity (Id);
8702 while Present (Ent) loop
8703 if Is_Entry (Ent) then
8707 Ent := Next_Entity (Ent);
8713 --------------------
8714 -- Number_Formals --
8715 --------------------
8717 function Number_Formals (Id : E) return Pos is
8723 Formal := First_Formal (Id);
8724 while Present (Formal) loop
8726 Formal := Next_Formal (Formal);
8732 ------------------------
8733 -- Object_Size_Clause --
8734 ------------------------
8736 function Object_Size_Clause (Id : E) return N is
8738 return Get_Attribute_Definition_Clause (Id, Attribute_Object_Size);
8739 end Object_Size_Clause;
8741 --------------------
8742 -- Parameter_Mode --
8743 --------------------
8745 function Parameter_Mode (Id : E) return Formal_Kind is
8750 ---------------------------------
8751 -- Partial_Invariant_Procedure --
8752 ---------------------------------
8754 function Partial_Invariant_Procedure (Id : E) return E is
8755 Subp_Elmt : Elmt_Id;
8756 Subp_Id : Entity_Id;
8760 pragma Assert (Is_Type (Id));
8762 Subps := Subprograms_For_Type (Base_Type (Id));
8764 if Present (Subps) then
8765 Subp_Elmt := First_Elmt (Subps);
8766 while Present (Subp_Elmt) loop
8767 Subp_Id := Node (Subp_Elmt);
8769 if Is_Partial_Invariant_Procedure (Subp_Id) then
8773 Next_Elmt (Subp_Elmt);
8778 end Partial_Invariant_Procedure;
8780 -------------------------------------
8781 -- Partial_Refinement_Constituents --
8782 -------------------------------------
8784 function Partial_Refinement_Constituents (Id : E) return L is
8785 Constits : Elist_Id := No_Elist;
8787 procedure Add_Usable_Constituents (Item : E);
8788 -- Add global item Item and/or its constituents to list Constits when
8789 -- they can be used in a global refinement within the current scope. The
8791 -- 1) If Item is an abstract state with full refinement visible, add
8792 -- its constituents.
8793 -- 2) If Item is an abstract state with only partial refinement
8794 -- visible, add both Item and its constituents.
8795 -- 3) If Item is an abstract state without a visible refinement, add
8797 -- 4) If Id is not an abstract state, add it.
8799 procedure Add_Usable_Constituents (List : Elist_Id);
8800 -- Apply Add_Usable_Constituents to every constituent in List
8802 -----------------------------
8803 -- Add_Usable_Constituents --
8804 -----------------------------
8806 procedure Add_Usable_Constituents (Item : E) is
8808 if Ekind (Item) = E_Abstract_State then
8809 if Has_Visible_Refinement (Item) then
8810 Add_Usable_Constituents (Refinement_Constituents (Item));
8812 elsif Has_Partial_Visible_Refinement (Item) then
8813 Append_New_Elmt (Item, Constits);
8814 Add_Usable_Constituents (Part_Of_Constituents (Item));
8817 Append_New_Elmt (Item, Constits);
8821 Append_New_Elmt (Item, Constits);
8823 end Add_Usable_Constituents;
8825 procedure Add_Usable_Constituents (List : Elist_Id) is
8826 Constit_Elmt : Elmt_Id;
8828 if Present (List) then
8829 Constit_Elmt := First_Elmt (List);
8830 while Present (Constit_Elmt) loop
8831 Add_Usable_Constituents (Node (Constit_Elmt));
8832 Next_Elmt (Constit_Elmt);
8835 end Add_Usable_Constituents;
8837 -- Start of processing for Partial_Refinement_Constituents
8840 -- "Refinement" is a concept applicable only to abstract states
8842 pragma Assert (Ekind (Id) = E_Abstract_State);
8844 if Has_Visible_Refinement (Id) then
8845 Constits := Refinement_Constituents (Id);
8847 -- A refinement may be partially visible when objects declared in the
8848 -- private part of a package are subject to a Part_Of indicator.
8850 elsif Has_Partial_Visible_Refinement (Id) then
8851 Add_Usable_Constituents (Part_Of_Constituents (Id));
8853 -- Function should only be called when full or partial refinement is
8857 raise Program_Error;
8861 end Partial_Refinement_Constituents;
8863 ------------------------
8864 -- Predicate_Function --
8865 ------------------------
8867 function Predicate_Function (Id : E) return E is
8868 Subp_Elmt : Elmt_Id;
8869 Subp_Id : Entity_Id;
8874 pragma Assert (Is_Type (Id));
8876 -- If type is private and has a completion, predicate may be defined on
8879 if Is_Private_Type (Id)
8881 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8882 and then Present (Full_View (Id))
8884 Typ := Full_View (Id);
8886 elsif Ekind_In (Id, E_Array_Subtype,
8888 E_Record_Subtype_With_Private)
8889 and then Present (Predicated_Parent (Id))
8891 Typ := Predicated_Parent (Id);
8897 Subps := Subprograms_For_Type (Typ);
8899 if Present (Subps) then
8900 Subp_Elmt := First_Elmt (Subps);
8901 while Present (Subp_Elmt) loop
8902 Subp_Id := Node (Subp_Elmt);
8904 if Ekind (Subp_Id) = E_Function
8905 and then Is_Predicate_Function (Subp_Id)
8910 Next_Elmt (Subp_Elmt);
8915 end Predicate_Function;
8917 --------------------------
8918 -- Predicate_Function_M --
8919 --------------------------
8921 function Predicate_Function_M (Id : E) return E is
8922 Subp_Elmt : Elmt_Id;
8923 Subp_Id : Entity_Id;
8928 pragma Assert (Is_Type (Id));
8930 -- If type is private and has a completion, predicate may be defined on
8933 if Is_Private_Type (Id)
8935 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8936 and then Present (Full_View (Id))
8938 Typ := Full_View (Id);
8944 Subps := Subprograms_For_Type (Typ);
8946 if Present (Subps) then
8947 Subp_Elmt := First_Elmt (Subps);
8948 while Present (Subp_Elmt) loop
8949 Subp_Id := Node (Subp_Elmt);
8951 if Ekind (Subp_Id) = E_Function
8952 and then Is_Predicate_Function_M (Subp_Id)
8957 Next_Elmt (Subp_Elmt);
8962 end Predicate_Function_M;
8964 -------------------------
8965 -- Present_In_Rep_Item --
8966 -------------------------
8968 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8972 Ritem := First_Rep_Item (E);
8974 while Present (Ritem) loop
8979 Next_Rep_Item (Ritem);
8983 end Present_In_Rep_Item;
8985 --------------------------
8986 -- Primitive_Operations --
8987 --------------------------
8989 function Primitive_Operations (Id : E) return L is
8991 if Is_Concurrent_Type (Id) then
8992 if Present (Corresponding_Record_Type (Id)) then
8993 return Direct_Primitive_Operations
8994 (Corresponding_Record_Type (Id));
8996 -- If expansion is disabled the corresponding record type is absent,
8997 -- but if the type has ancestors it may have primitive operations.
8999 elsif Is_Tagged_Type (Id) then
9000 return Direct_Primitive_Operations (Id);
9006 return Direct_Primitive_Operations (Id);
9008 end Primitive_Operations;
9010 ---------------------
9011 -- Record_Rep_Item --
9012 ---------------------
9014 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
9016 Set_Next_Rep_Item (N, First_Rep_Item (E));
9017 Set_First_Rep_Item (E, N);
9018 end Record_Rep_Item;
9024 procedure Remove_Entity (Id : Entity_Id) is
9025 Next : constant Entity_Id := Next_Entity (Id);
9026 Prev : constant Entity_Id := Prev_Entity (Id);
9027 Scop : constant Entity_Id := Scope (Id);
9028 First : constant Entity_Id := First_Entity (Scop);
9029 Last : constant Entity_Id := Last_Entity (Scop);
9032 -- Eliminate any existing linkages from the entity
9034 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
9035 Set_Next_Entity (Id, Empty); -- Id --> Empty
9037 -- The eliminated entity was the only element in the entity chain
9039 if Id = First and then Id = Last then
9040 Set_First_Entity (Scop, Empty);
9041 Set_Last_Entity (Scop, Empty);
9043 -- The eliminated entity was the head of the entity chain
9045 elsif Id = First then
9046 Set_First_Entity (Scop, Next);
9048 -- The eliminated entity was the tail of the entity chain
9050 elsif Id = Last then
9051 Set_Last_Entity (Scop, Prev);
9053 -- Otherwise the eliminated entity comes from the middle of the entity
9057 Link_Entities (Prev, Next); -- Prev <-- Next, Prev --> Next
9065 function Root_Type (Id : E) return E is
9069 pragma Assert (Nkind (Id) in N_Entity);
9071 T := Base_Type (Id);
9073 if Ekind (T) = E_Class_Wide_Type then
9085 -- Following test catches some error cases resulting from
9088 elsif No (Etyp) then
9089 Check_Error_Detected;
9092 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
9095 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
9101 -- Return if there is a circularity in the inheritance chain. This
9102 -- happens in some error situations and we do not want to get
9103 -- stuck in this loop.
9105 if T = Base_Type (Id) then
9112 ---------------------
9113 -- Safe_Emax_Value --
9114 ---------------------
9116 function Safe_Emax_Value (Id : E) return Uint is
9118 return Machine_Emax_Value (Id);
9119 end Safe_Emax_Value;
9121 ----------------------
9122 -- Safe_First_Value --
9123 ----------------------
9125 function Safe_First_Value (Id : E) return Ureal is
9127 return -Safe_Last_Value (Id);
9128 end Safe_First_Value;
9130 ---------------------
9131 -- Safe_Last_Value --
9132 ---------------------
9134 function Safe_Last_Value (Id : E) return Ureal is
9135 Radix : constant Uint := Machine_Radix_Value (Id);
9136 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
9137 Emax : constant Uint := Safe_Emax_Value (Id);
9138 Significand : constant Uint := Radix ** Mantissa - 1;
9139 Exponent : constant Uint := Emax - Mantissa;
9145 (Num => Significand * 2 ** (Exponent mod 4),
9146 Den => -Exponent / 4,
9151 (Num => Significand,
9155 end Safe_Last_Value;
9161 function Scope_Depth (Id : E) return Uint is
9166 while Is_Record_Type (Scop) loop
9167 Scop := Scope (Scop);
9170 return Scope_Depth_Value (Scop);
9173 ---------------------
9174 -- Scope_Depth_Set --
9175 ---------------------
9177 function Scope_Depth_Set (Id : E) return B is
9179 return not Is_Record_Type (Id)
9180 and then Field22 (Id) /= Union_Id (Empty);
9181 end Scope_Depth_Set;
9183 -----------------------------
9184 -- Set_Component_Alignment --
9185 -----------------------------
9187 -- Component Alignment is encoded using two flags, Flag128/129 as
9188 -- follows. Note that both flags False = Align_Default, so that the
9189 -- default initialization of flags to False initializes component
9190 -- alignment to the default value as required.
9192 -- Flag128 Flag129 Value
9193 -- ------- ------- -----
9194 -- False False Calign_Default
9195 -- False True Calign_Component_Size
9196 -- True False Calign_Component_Size_4
9197 -- True True Calign_Storage_Unit
9199 procedure Set_Component_Alignment (Id : E; V : C) is
9201 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
9202 and then Is_Base_Type (Id));
9205 when Calign_Default =>
9206 Set_Flag128 (Id, False);
9207 Set_Flag129 (Id, False);
9209 when Calign_Component_Size =>
9210 Set_Flag128 (Id, False);
9211 Set_Flag129 (Id, True);
9213 when Calign_Component_Size_4 =>
9214 Set_Flag128 (Id, True);
9215 Set_Flag129 (Id, False);
9217 when Calign_Storage_Unit =>
9218 Set_Flag128 (Id, True);
9219 Set_Flag129 (Id, True);
9221 end Set_Component_Alignment;
9223 -----------------------
9224 -- Set_DIC_Procedure --
9225 -----------------------
9227 procedure Set_DIC_Procedure (Id : E; V : E) is
9228 Base_Typ : Entity_Id;
9229 Subp_Elmt : Elmt_Id;
9230 Subp_Id : Entity_Id;
9234 pragma Assert (Is_Type (Id));
9236 Base_Typ := Base_Type (Id);
9237 Subps := Subprograms_For_Type (Base_Typ);
9240 Subps := New_Elmt_List;
9241 Set_Subprograms_For_Type (Base_Typ, Subps);
9244 Subp_Elmt := First_Elmt (Subps);
9245 Prepend_Elmt (V, Subps);
9247 -- Check for a duplicate default initial condition procedure
9249 while Present (Subp_Elmt) loop
9250 Subp_Id := Node (Subp_Elmt);
9252 if Is_DIC_Procedure (Subp_Id) then
9253 raise Program_Error;
9256 Next_Elmt (Subp_Elmt);
9258 end Set_DIC_Procedure;
9260 -----------------------------
9261 -- Set_Invariant_Procedure --
9262 -----------------------------
9264 procedure Set_Invariant_Procedure (Id : E; V : E) is
9265 Base_Typ : Entity_Id;
9266 Subp_Elmt : Elmt_Id;
9267 Subp_Id : Entity_Id;
9271 pragma Assert (Is_Type (Id));
9273 Base_Typ := Base_Type (Id);
9274 Subps := Subprograms_For_Type (Base_Typ);
9277 Subps := New_Elmt_List;
9278 Set_Subprograms_For_Type (Base_Typ, Subps);
9281 Subp_Elmt := First_Elmt (Subps);
9282 Prepend_Elmt (V, Subps);
9284 -- Check for a duplicate invariant procedure
9286 while Present (Subp_Elmt) loop
9287 Subp_Id := Node (Subp_Elmt);
9289 if Is_Invariant_Procedure (Subp_Id) then
9290 raise Program_Error;
9293 Next_Elmt (Subp_Elmt);
9295 end Set_Invariant_Procedure;
9297 -------------------------------------
9298 -- Set_Partial_Invariant_Procedure --
9299 -------------------------------------
9301 procedure Set_Partial_Invariant_Procedure (Id : E; V : E) is
9302 Base_Typ : Entity_Id;
9303 Subp_Elmt : Elmt_Id;
9304 Subp_Id : Entity_Id;
9308 pragma Assert (Is_Type (Id));
9310 Base_Typ := Base_Type (Id);
9311 Subps := Subprograms_For_Type (Base_Typ);
9314 Subps := New_Elmt_List;
9315 Set_Subprograms_For_Type (Base_Typ, Subps);
9318 Subp_Elmt := First_Elmt (Subps);
9319 Prepend_Elmt (V, Subps);
9321 -- Check for a duplicate partial invariant procedure
9323 while Present (Subp_Elmt) loop
9324 Subp_Id := Node (Subp_Elmt);
9326 if Is_Partial_Invariant_Procedure (Subp_Id) then
9327 raise Program_Error;
9330 Next_Elmt (Subp_Elmt);
9332 end Set_Partial_Invariant_Procedure;
9334 ----------------------------
9335 -- Set_Predicate_Function --
9336 ----------------------------
9338 procedure Set_Predicate_Function (Id : E; V : E) is
9339 Subp_Elmt : Elmt_Id;
9340 Subp_Id : Entity_Id;
9344 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9346 Subps := Subprograms_For_Type (Id);
9349 Subps := New_Elmt_List;
9350 Set_Subprograms_For_Type (Id, Subps);
9353 Subp_Elmt := First_Elmt (Subps);
9354 Prepend_Elmt (V, Subps);
9356 -- Check for a duplicate predication function
9358 while Present (Subp_Elmt) loop
9359 Subp_Id := Node (Subp_Elmt);
9361 if Ekind (Subp_Id) = E_Function
9362 and then Is_Predicate_Function (Subp_Id)
9364 raise Program_Error;
9367 Next_Elmt (Subp_Elmt);
9369 end Set_Predicate_Function;
9371 ------------------------------
9372 -- Set_Predicate_Function_M --
9373 ------------------------------
9375 procedure Set_Predicate_Function_M (Id : E; V : E) is
9376 Subp_Elmt : Elmt_Id;
9377 Subp_Id : Entity_Id;
9381 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9383 Subps := Subprograms_For_Type (Id);
9386 Subps := New_Elmt_List;
9387 Set_Subprograms_For_Type (Id, Subps);
9390 Subp_Elmt := First_Elmt (Subps);
9391 Prepend_Elmt (V, Subps);
9393 -- Check for a duplicate predication function
9395 while Present (Subp_Elmt) loop
9396 Subp_Id := Node (Subp_Elmt);
9398 if Ekind (Subp_Id) = E_Function
9399 and then Is_Predicate_Function_M (Subp_Id)
9401 raise Program_Error;
9404 Next_Elmt (Subp_Elmt);
9406 end Set_Predicate_Function_M;
9412 function Size_Clause (Id : E) return N is
9414 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
9417 ------------------------
9418 -- Stream_Size_Clause --
9419 ------------------------
9421 function Stream_Size_Clause (Id : E) return N is
9423 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
9424 end Stream_Size_Clause;
9430 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
9436 Kind := E_Access_Subtype;
9438 when E_Array_Subtype
9441 Kind := E_Array_Subtype;
9443 when E_Class_Wide_Subtype
9446 Kind := E_Class_Wide_Subtype;
9448 when E_Decimal_Fixed_Point_Subtype
9449 | E_Decimal_Fixed_Point_Type
9451 Kind := E_Decimal_Fixed_Point_Subtype;
9453 when E_Ordinary_Fixed_Point_Subtype
9454 | E_Ordinary_Fixed_Point_Type
9456 Kind := E_Ordinary_Fixed_Point_Subtype;
9458 when E_Private_Subtype
9461 Kind := E_Private_Subtype;
9463 when E_Limited_Private_Subtype
9464 | E_Limited_Private_Type
9466 Kind := E_Limited_Private_Subtype;
9468 when E_Record_Subtype_With_Private
9469 | E_Record_Type_With_Private
9471 Kind := E_Record_Subtype_With_Private;
9473 when E_Record_Subtype
9476 Kind := E_Record_Subtype;
9478 when Enumeration_Kind =>
9479 Kind := E_Enumeration_Subtype;
9481 when E_Incomplete_Type =>
9482 Kind := E_Incomplete_Subtype;
9485 Kind := E_Floating_Point_Subtype;
9487 when Signed_Integer_Kind =>
9488 Kind := E_Signed_Integer_Subtype;
9490 when Modular_Integer_Kind =>
9491 Kind := E_Modular_Integer_Subtype;
9493 when Protected_Kind =>
9494 Kind := E_Protected_Subtype;
9497 Kind := E_Task_Subtype;
9501 raise Program_Error;
9507 ---------------------
9508 -- Type_High_Bound --
9509 ---------------------
9511 function Type_High_Bound (Id : E) return Node_Id is
9512 Rng : constant Node_Id := Scalar_Range (Id);
9514 if Nkind (Rng) = N_Subtype_Indication then
9515 return High_Bound (Range_Expression (Constraint (Rng)));
9517 return High_Bound (Rng);
9519 end Type_High_Bound;
9521 --------------------
9522 -- Type_Low_Bound --
9523 --------------------
9525 function Type_Low_Bound (Id : E) return Node_Id is
9526 Rng : constant Node_Id := Scalar_Range (Id);
9528 if Nkind (Rng) = N_Subtype_Indication then
9529 return Low_Bound (Range_Expression (Constraint (Rng)));
9531 return Low_Bound (Rng);
9535 ---------------------
9536 -- Underlying_Type --
9537 ---------------------
9539 function Underlying_Type (Id : E) return E is
9541 -- For record_with_private the underlying type is always the direct full
9542 -- view. Never try to take the full view of the parent it does not make
9545 if Ekind (Id) = E_Record_Type_With_Private then
9546 return Full_View (Id);
9548 -- If we have a class-wide type that comes from the limited view then we
9549 -- return the Underlying_Type of its nonlimited view.
9551 elsif Ekind (Id) = E_Class_Wide_Type
9552 and then From_Limited_With (Id)
9553 and then Present (Non_Limited_View (Id))
9555 return Underlying_Type (Non_Limited_View (Id));
9557 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
9559 -- If we have an incomplete or private type with a full view, then we
9560 -- return the Underlying_Type of this full view.
9562 if Present (Full_View (Id)) then
9563 if Id = Full_View (Id) then
9565 -- Previous error in declaration
9570 return Underlying_Type (Full_View (Id));
9573 -- If we have a private type with an underlying full view, then we
9574 -- return the Underlying_Type of this underlying full view.
9576 elsif Ekind (Id) in Private_Kind
9577 and then Present (Underlying_Full_View (Id))
9579 return Underlying_Type (Underlying_Full_View (Id));
9581 -- If we have an incomplete entity that comes from the limited view
9582 -- then we return the Underlying_Type of its nonlimited view.
9584 elsif From_Limited_With (Id)
9585 and then Present (Non_Limited_View (Id))
9587 return Underlying_Type (Non_Limited_View (Id));
9589 -- Otherwise check for the case where we have a derived type or
9590 -- subtype, and if so get the Underlying_Type of the parent type.
9592 elsif Etype (Id) /= Id then
9593 return Underlying_Type (Etype (Id));
9595 -- Otherwise we have an incomplete or private type that has no full
9596 -- view, which means that we have not encountered the completion, so
9597 -- return Empty to indicate the underlying type is not yet known.
9603 -- For non-incomplete, non-private types, return the type itself Also
9604 -- for entities that are not types at all return the entity itself.
9609 end Underlying_Type;
9611 ------------------------
9612 -- Unlink_Next_Entity --
9613 ------------------------
9615 procedure Unlink_Next_Entity (Id : Entity_Id) is
9616 Next : constant Entity_Id := Next_Entity (Id);
9619 if Present (Next) then
9620 Set_Prev_Entity (Next, Empty); -- Empty <-- Next
9623 Set_Next_Entity (Id, Empty); -- Id --> Empty
9624 end Unlink_Next_Entity;
9626 ------------------------
9627 -- Write_Entity_Flags --
9628 ------------------------
9630 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
9632 procedure W (Flag_Name : String; Flag : Boolean);
9633 -- Write out given flag if it is set
9639 procedure W (Flag_Name : String; Flag : Boolean) is
9643 Write_Str (Flag_Name);
9644 Write_Str (" = True");
9649 -- Start of processing for Write_Entity_Flags
9652 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
9653 and then Is_Base_Type (Id)
9656 Write_Str ("Component_Alignment = ");
9658 case Component_Alignment (Id) is
9659 when Calign_Default =>
9660 Write_Str ("Calign_Default");
9662 when Calign_Component_Size =>
9663 Write_Str ("Calign_Component_Size");
9665 when Calign_Component_Size_4 =>
9666 Write_Str ("Calign_Component_Size_4");
9668 when Calign_Storage_Unit =>
9669 Write_Str ("Calign_Storage_Unit");
9675 W ("Address_Taken", Flag104 (Id));
9676 W ("Body_Needed_For_Inlining", Flag299 (Id));
9677 W ("Body_Needed_For_SAL", Flag40 (Id));
9678 W ("C_Pass_By_Copy", Flag125 (Id));
9679 W ("Can_Never_Be_Null", Flag38 (Id));
9680 W ("Checks_May_Be_Suppressed", Flag31 (Id));
9681 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
9682 W ("Debug_Info_Off", Flag166 (Id));
9683 W ("Default_Expressions_Processed", Flag108 (Id));
9684 W ("Delay_Cleanups", Flag114 (Id));
9685 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
9686 W ("Depends_On_Private", Flag14 (Id));
9687 W ("Discard_Names", Flag88 (Id));
9688 W ("Elaboration_Entity_Required", Flag174 (Id));
9689 W ("Elaborate_Body_Desirable", Flag210 (Id));
9690 W ("Entry_Accepted", Flag152 (Id));
9691 W ("Can_Use_Internal_Rep", Flag229 (Id));
9692 W ("Finalize_Storage_Only", Flag158 (Id));
9693 W ("From_Limited_With", Flag159 (Id));
9694 W ("Has_Aliased_Components", Flag135 (Id));
9695 W ("Has_Alignment_Clause", Flag46 (Id));
9696 W ("Has_All_Calls_Remote", Flag79 (Id));
9697 W ("Has_Atomic_Components", Flag86 (Id));
9698 W ("Has_Biased_Representation", Flag139 (Id));
9699 W ("Has_Completion", Flag26 (Id));
9700 W ("Has_Completion_In_Body", Flag71 (Id));
9701 W ("Has_Complex_Representation", Flag140 (Id));
9702 W ("Has_Component_Size_Clause", Flag68 (Id));
9703 W ("Has_Contiguous_Rep", Flag181 (Id));
9704 W ("Has_Controlled_Component", Flag43 (Id));
9705 W ("Has_Controlling_Result", Flag98 (Id));
9706 W ("Has_Convention_Pragma", Flag119 (Id));
9707 W ("Has_Default_Aspect", Flag39 (Id));
9708 W ("Has_Delayed_Aspects", Flag200 (Id));
9709 W ("Has_Delayed_Freeze", Flag18 (Id));
9710 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
9711 W ("Has_Discriminants", Flag5 (Id));
9712 W ("Has_Dispatch_Table", Flag220 (Id));
9713 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
9714 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
9715 W ("Has_Exit", Flag47 (Id));
9716 W ("Has_Expanded_Contract", Flag240 (Id));
9717 W ("Has_Forward_Instantiation", Flag175 (Id));
9718 W ("Has_Fully_Qualified_Name", Flag173 (Id));
9719 W ("Has_Gigi_Rep_Item", Flag82 (Id));
9720 W ("Has_Homonym", Flag56 (Id));
9721 W ("Has_Implicit_Dereference", Flag251 (Id));
9722 W ("Has_Independent_Components", Flag34 (Id));
9723 W ("Has_Inheritable_Invariants", Flag248 (Id));
9724 W ("Has_Inherited_DIC", Flag133 (Id));
9725 W ("Has_Inherited_Invariants", Flag291 (Id));
9726 W ("Has_Initial_Value", Flag219 (Id));
9727 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
9728 W ("Has_Machine_Radix_Clause", Flag83 (Id));
9729 W ("Has_Master_Entity", Flag21 (Id));
9730 W ("Has_Missing_Return", Flag142 (Id));
9731 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
9732 W ("Has_Nested_Subprogram", Flag282 (Id));
9733 W ("Has_Non_Standard_Rep", Flag75 (Id));
9734 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
9735 W ("Has_Object_Size_Clause", Flag172 (Id));
9736 W ("Has_Own_DIC", Flag3 (Id));
9737 W ("Has_Own_Invariants", Flag232 (Id));
9738 W ("Has_Per_Object_Constraint", Flag154 (Id));
9739 W ("Has_Pragma_Controlled", Flag27 (Id));
9740 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
9741 W ("Has_Pragma_Inline", Flag157 (Id));
9742 W ("Has_Pragma_Inline_Always", Flag230 (Id));
9743 W ("Has_Pragma_No_Inline", Flag201 (Id));
9744 W ("Has_Pragma_Ordered", Flag198 (Id));
9745 W ("Has_Pragma_Pack", Flag121 (Id));
9746 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
9747 W ("Has_Pragma_Pure", Flag203 (Id));
9748 W ("Has_Pragma_Pure_Function", Flag179 (Id));
9749 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
9750 W ("Has_Pragma_Unmodified", Flag233 (Id));
9751 W ("Has_Pragma_Unreferenced", Flag180 (Id));
9752 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
9753 W ("Has_Pragma_Unused", Flag294 (Id));
9754 W ("Has_Predicates", Flag250 (Id));
9755 W ("Has_Primitive_Operations", Flag120 (Id));
9756 W ("Has_Private_Ancestor", Flag151 (Id));
9757 W ("Has_Private_Declaration", Flag155 (Id));
9758 W ("Has_Private_Extension", Flag300 (Id));
9759 W ("Has_Protected", Flag271 (Id));
9760 W ("Has_Qualified_Name", Flag161 (Id));
9761 W ("Has_RACW", Flag214 (Id));
9762 W ("Has_Record_Rep_Clause", Flag65 (Id));
9763 W ("Has_Recursive_Call", Flag143 (Id));
9764 W ("Has_Shift_Operator", Flag267 (Id));
9765 W ("Has_Size_Clause", Flag29 (Id));
9766 W ("Has_Small_Clause", Flag67 (Id));
9767 W ("Has_Specified_Layout", Flag100 (Id));
9768 W ("Has_Specified_Stream_Input", Flag190 (Id));
9769 W ("Has_Specified_Stream_Output", Flag191 (Id));
9770 W ("Has_Specified_Stream_Read", Flag192 (Id));
9771 W ("Has_Specified_Stream_Write", Flag193 (Id));
9772 W ("Has_Static_Discriminants", Flag211 (Id));
9773 W ("Has_Static_Predicate", Flag269 (Id));
9774 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
9775 W ("Has_Storage_Size_Clause", Flag23 (Id));
9776 W ("Has_Stream_Size_Clause", Flag184 (Id));
9777 W ("Has_Task", Flag30 (Id));
9778 W ("Has_Timing_Event", Flag289 (Id));
9779 W ("Has_Thunks", Flag228 (Id));
9780 W ("Has_Unchecked_Union", Flag123 (Id));
9781 W ("Has_Unknown_Discriminants", Flag72 (Id));
9782 W ("Has_Visible_Refinement", Flag263 (Id));
9783 W ("Has_Volatile_Components", Flag87 (Id));
9784 W ("Has_Xref_Entry", Flag182 (Id));
9785 W ("Ignore_SPARK_Mode_Pragmas", Flag301 (Id));
9786 W ("In_Package_Body", Flag48 (Id));
9787 W ("In_Private_Part", Flag45 (Id));
9788 W ("In_Use", Flag8 (Id));
9789 W ("Is_Abstract_Subprogram", Flag19 (Id));
9790 W ("Is_Abstract_Type", Flag146 (Id));
9791 W ("Is_Access_Constant", Flag69 (Id));
9792 W ("Is_Activation_Record", Flag305 (Id));
9793 W ("Is_Actual_Subtype", Flag293 (Id));
9794 W ("Is_Ada_2005_Only", Flag185 (Id));
9795 W ("Is_Ada_2012_Only", Flag199 (Id));
9796 W ("Is_Aliased", Flag15 (Id));
9797 W ("Is_Asynchronous", Flag81 (Id));
9798 W ("Is_Atomic", Flag85 (Id));
9799 W ("Is_Bit_Packed_Array", Flag122 (Id));
9800 W ("Is_CPP_Class", Flag74 (Id));
9801 W ("Is_Called", Flag102 (Id));
9802 W ("Is_Character_Type", Flag63 (Id));
9803 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
9804 W ("Is_Child_Unit", Flag73 (Id));
9805 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
9806 W ("Is_Compilation_Unit", Flag149 (Id));
9807 W ("Is_Completely_Hidden", Flag103 (Id));
9808 W ("Is_Concurrent_Record_Type", Flag20 (Id));
9809 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
9810 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
9811 W ("Is_Constrained", Flag12 (Id));
9812 W ("Is_Constructor", Flag76 (Id));
9813 W ("Is_Controlled_Active", Flag42 (Id));
9814 W ("Is_Controlling_Formal", Flag97 (Id));
9815 W ("Is_Descendant_Of_Address", Flag223 (Id));
9816 W ("Is_DIC_Procedure", Flag132 (Id));
9817 W ("Is_Discrim_SO_Function", Flag176 (Id));
9818 W ("Is_Discriminant_Check_Function", Flag264 (Id));
9819 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
9820 W ("Is_Dispatching_Operation", Flag6 (Id));
9821 W ("Is_Elaboration_Checks_OK_Id", Flag148 (Id));
9822 W ("Is_Elaboration_Warnings_OK_Id", Flag304 (Id));
9823 W ("Is_Eliminated", Flag124 (Id));
9824 W ("Is_Entry_Formal", Flag52 (Id));
9825 W ("Is_Exception_Handler", Flag286 (Id));
9826 W ("Is_Exported", Flag99 (Id));
9827 W ("Is_Finalized_Transient", Flag252 (Id));
9828 W ("Is_First_Subtype", Flag70 (Id));
9829 W ("Is_For_Access_Subtype", Flag118 (Id));
9830 W ("Is_Formal_Subprogram", Flag111 (Id));
9831 W ("Is_Frozen", Flag4 (Id));
9832 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
9833 W ("Is_Generic_Actual_Type", Flag94 (Id));
9834 W ("Is_Generic_Instance", Flag130 (Id));
9835 W ("Is_Generic_Type", Flag13 (Id));
9836 W ("Is_Hidden", Flag57 (Id));
9837 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
9838 W ("Is_Hidden_Open_Scope", Flag171 (Id));
9839 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
9840 W ("Is_Ignored_Transient", Flag295 (Id));
9841 W ("Is_Immediately_Visible", Flag7 (Id));
9842 W ("Is_Implementation_Defined", Flag254 (Id));
9843 W ("Is_Imported", Flag24 (Id));
9844 W ("Is_Independent", Flag268 (Id));
9845 W ("Is_Initial_Condition_Procedure", Flag302 (Id));
9846 W ("Is_Inlined", Flag11 (Id));
9847 W ("Is_Inlined_Always", Flag1 (Id));
9848 W ("Is_Instantiated", Flag126 (Id));
9849 W ("Is_Interface", Flag186 (Id));
9850 W ("Is_Internal", Flag17 (Id));
9851 W ("Is_Interrupt_Handler", Flag89 (Id));
9852 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
9853 W ("Is_Invariant_Procedure", Flag257 (Id));
9854 W ("Is_Itype", Flag91 (Id));
9855 W ("Is_Known_Non_Null", Flag37 (Id));
9856 W ("Is_Known_Null", Flag204 (Id));
9857 W ("Is_Known_Valid", Flag170 (Id));
9858 W ("Is_Limited_Composite", Flag106 (Id));
9859 W ("Is_Limited_Interface", Flag197 (Id));
9860 W ("Is_Limited_Record", Flag25 (Id));
9861 W ("Is_Local_Anonymous_Access", Flag194 (Id));
9862 W ("Is_Loop_Parameter", Flag307 (Id));
9863 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
9864 W ("Is_Non_Static_Subtype", Flag109 (Id));
9865 W ("Is_Null_Init_Proc", Flag178 (Id));
9866 W ("Is_Obsolescent", Flag153 (Id));
9867 W ("Is_Only_Out_Parameter", Flag226 (Id));
9868 W ("Is_Package_Body_Entity", Flag160 (Id));
9869 W ("Is_Packed", Flag51 (Id));
9870 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
9871 W ("Is_Param_Block_Component_Type", Flag215 (Id));
9872 W ("Is_Partial_Invariant_Procedure", Flag292 (Id));
9873 W ("Is_Potentially_Use_Visible", Flag9 (Id));
9874 W ("Is_Predicate_Function", Flag255 (Id));
9875 W ("Is_Predicate_Function_M", Flag256 (Id));
9876 W ("Is_Preelaborated", Flag59 (Id));
9877 W ("Is_Primitive", Flag218 (Id));
9878 W ("Is_Primitive_Wrapper", Flag195 (Id));
9879 W ("Is_Private_Composite", Flag107 (Id));
9880 W ("Is_Private_Descendant", Flag53 (Id));
9881 W ("Is_Private_Primitive", Flag245 (Id));
9882 W ("Is_Public", Flag10 (Id));
9883 W ("Is_Pure", Flag44 (Id));
9884 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
9885 W ("Is_RACW_Stub_Type", Flag244 (Id));
9886 W ("Is_Raised", Flag224 (Id));
9887 W ("Is_Remote_Call_Interface", Flag62 (Id));
9888 W ("Is_Remote_Types", Flag61 (Id));
9889 W ("Is_Renaming_Of_Object", Flag112 (Id));
9890 W ("Is_Return_Object", Flag209 (Id));
9891 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
9892 W ("Is_Shared_Passive", Flag60 (Id));
9893 W ("Is_Static_Type", Flag281 (Id));
9894 W ("Is_Statically_Allocated", Flag28 (Id));
9895 W ("Is_Tag", Flag78 (Id));
9896 W ("Is_Tagged_Type", Flag55 (Id));
9897 W ("Is_Thunk", Flag225 (Id));
9898 W ("Is_Trivial_Subprogram", Flag235 (Id));
9899 W ("Is_True_Constant", Flag163 (Id));
9900 W ("Is_Unchecked_Union", Flag117 (Id));
9901 W ("Is_Underlying_Full_View", Flag298 (Id));
9902 W ("Is_Underlying_Record_View", Flag246 (Id));
9903 W ("Is_Unimplemented", Flag284 (Id));
9904 W ("Is_Unsigned_Type", Flag144 (Id));
9905 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
9906 W ("Is_Valued_Procedure", Flag127 (Id));
9907 W ("Is_Visible_Formal", Flag206 (Id));
9908 W ("Is_Visible_Lib_Unit", Flag116 (Id));
9909 W ("Is_Volatile", Flag16 (Id));
9910 W ("Is_Volatile_Full_Access", Flag285 (Id));
9911 W ("Itype_Printed", Flag202 (Id));
9912 W ("Kill_Elaboration_Checks", Flag32 (Id));
9913 W ("Kill_Range_Checks", Flag33 (Id));
9914 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
9915 W ("Low_Bound_Tested", Flag205 (Id));
9916 W ("Machine_Radix_10", Flag84 (Id));
9917 W ("Materialize_Entity", Flag168 (Id));
9918 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
9919 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
9920 W ("Must_Have_Preelab_Init", Flag208 (Id));
9921 W ("Needs_Activation_Record", Flag306 (Id));
9922 W ("Needs_Debug_Info", Flag147 (Id));
9923 W ("Needs_No_Actuals", Flag22 (Id));
9924 W ("Never_Set_In_Source", Flag115 (Id));
9925 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
9926 W ("No_Pool_Assigned", Flag131 (Id));
9927 W ("No_Predicate_On_actual", Flag275 (Id));
9928 W ("No_Reordering", Flag239 (Id));
9929 W ("No_Return", Flag113 (Id));
9930 W ("No_Strict_Aliasing", Flag136 (Id));
9931 W ("Non_Binary_Modulus", Flag58 (Id));
9932 W ("Nonzero_Is_True", Flag162 (Id));
9933 W ("OK_To_Rename", Flag247 (Id));
9934 W ("Optimize_Alignment_Space", Flag241 (Id));
9935 W ("Optimize_Alignment_Time", Flag242 (Id));
9936 W ("Overlays_Constant", Flag243 (Id));
9937 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
9938 W ("Reachable", Flag49 (Id));
9939 W ("Referenced", Flag156 (Id));
9940 W ("Referenced_As_LHS", Flag36 (Id));
9941 W ("Referenced_As_Out_Parameter", Flag227 (Id));
9942 W ("Renamed_In_Spec", Flag231 (Id));
9943 W ("Requires_Overriding", Flag213 (Id));
9944 W ("Return_Present", Flag54 (Id));
9945 W ("Returns_By_Ref", Flag90 (Id));
9946 W ("Reverse_Bit_Order", Flag164 (Id));
9947 W ("Reverse_Storage_Order", Flag93 (Id));
9948 W ("Rewritten_For_C", Flag287 (Id));
9949 W ("Predicates_Ignored", Flag288 (Id));
9950 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
9951 W ("Size_Depends_On_Discriminant", Flag177 (Id));
9952 W ("Size_Known_At_Compile_Time", Flag92 (Id));
9953 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
9954 W ("SPARK_Pragma_Inherited", Flag265 (Id));
9955 W ("SSO_Set_High_By_Default", Flag273 (Id));
9956 W ("SSO_Set_Low_By_Default", Flag272 (Id));
9957 W ("Static_Elaboration_Desired", Flag77 (Id));
9958 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
9959 W ("Strict_Alignment", Flag145 (Id));
9960 W ("Suppress_Elaboration_Warnings", Flag303 (Id));
9961 W ("Suppress_Initialization", Flag105 (Id));
9962 W ("Suppress_Style_Checks", Flag165 (Id));
9963 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
9964 W ("Treat_As_Volatile", Flag41 (Id));
9965 W ("Universal_Aliasing", Flag216 (Id));
9966 W ("Used_As_Generic_Actual", Flag222 (Id));
9967 W ("Uses_Sec_Stack", Flag95 (Id));
9968 W ("Warnings_Off", Flag96 (Id));
9969 W ("Warnings_Off_Used", Flag236 (Id));
9970 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
9971 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
9972 W ("Was_Hidden", Flag196 (Id));
9973 end Write_Entity_Flags;
9975 -----------------------
9976 -- Write_Entity_Info --
9977 -----------------------
9979 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
9981 procedure Write_Attribute (Which : String; Nam : E);
9982 -- Write attribute value with given string name
9984 procedure Write_Kind (Id : Entity_Id);
9985 -- Write Ekind field of entity
9987 ---------------------
9988 -- Write_Attribute --
9989 ---------------------
9991 procedure Write_Attribute (Which : String; Nam : E) is
9995 Write_Int (Int (Nam));
9997 Write_Name (Chars (Nam));
9999 end Write_Attribute;
10005 procedure Write_Kind (Id : Entity_Id) is
10006 K : constant String := Entity_Kind'Image (Ekind (Id));
10009 Write_Str (Prefix);
10010 Write_Str (" Kind ");
10012 if Is_Type (Id) and then Is_Tagged_Type (Id) then
10013 Write_Str ("TAGGED ");
10016 Write_Str (K (3 .. K'Length));
10019 if Is_Type (Id) and then Depends_On_Private (Id) then
10020 Write_Str ("Depends_On_Private ");
10024 -- Start of processing for Write_Entity_Info
10028 Write_Attribute ("Name ", Id);
10029 Write_Int (Int (Id));
10033 Write_Attribute (" Type ", Etype (Id));
10035 if Id /= Standard_Standard then
10036 Write_Attribute (" Scope ", Scope (Id));
10041 when Discrete_Kind =>
10042 Write_Str ("Bounds: Id = ");
10044 if Present (Scalar_Range (Id)) then
10045 Write_Int (Int (Type_Low_Bound (Id)));
10046 Write_Str (" .. Id = ");
10047 Write_Int (Int (Type_High_Bound (Id)));
10049 Write_Str ("Empty");
10060 (" Component Type ", Component_Type (Id));
10062 Write_Str (Prefix);
10063 Write_Str (" Indexes ");
10065 Index := First_Index (Id);
10066 while Present (Index) loop
10067 Write_Attribute (" ", Etype (Index));
10068 Index := Next_Index (Index);
10074 when Access_Kind =>
10076 (" Directly Designated Type ",
10077 Directly_Designated_Type (Id));
10080 when Overloadable_Kind =>
10081 if Present (Homonym (Id)) then
10082 Write_Str (" Homonym ");
10083 Write_Name (Chars (Homonym (Id)));
10085 Write_Int (Int (Homonym (Id)));
10091 when E_Component =>
10092 if Ekind (Scope (Id)) in Record_Kind then
10094 " Original_Record_Component ",
10095 Original_Record_Component (Id));
10096 Write_Int (Int (Original_Record_Component (Id)));
10103 end Write_Entity_Info;
10105 -----------------------
10106 -- Write_Field6_Name --
10107 -----------------------
10109 procedure Write_Field6_Name (Id : Entity_Id) is
10110 pragma Unreferenced (Id);
10112 Write_Str ("First_Rep_Item");
10113 end Write_Field6_Name;
10115 -----------------------
10116 -- Write_Field7_Name --
10117 -----------------------
10119 procedure Write_Field7_Name (Id : Entity_Id) is
10120 pragma Unreferenced (Id);
10122 Write_Str ("Freeze_Node");
10123 end Write_Field7_Name;
10125 -----------------------
10126 -- Write_Field8_Name --
10127 -----------------------
10129 procedure Write_Field8_Name (Id : Entity_Id) is
10133 Write_Str ("Associated_Node_For_Itype");
10136 Write_Str ("Dependent_Instances");
10139 Write_Str ("First_Exit_Statement");
10142 Write_Str ("Hiding_Loop_Variable");
10146 | E_Subprogram_Body
10148 Write_Str ("Mechanism");
10153 Write_Str ("Normalized_First_Bit");
10155 when E_Abstract_State =>
10156 Write_Str ("Refinement_Constituents");
10158 when E_Return_Statement =>
10159 Write_Str ("Return_Applies_To");
10162 Write_Str ("Field8??");
10164 end Write_Field8_Name;
10166 -----------------------
10167 -- Write_Field9_Name --
10168 -----------------------
10170 procedure Write_Field9_Name (Id : Entity_Id) is
10174 Write_Str ("Class_Wide_Type");
10176 when Object_Kind =>
10177 Write_Str ("Current_Value");
10180 | E_Generic_Function
10181 | E_Generic_Package
10182 | E_Generic_Procedure
10186 Write_Str ("Renaming_Map");
10189 Write_Str ("Field9??");
10191 end Write_Field9_Name;
10193 ------------------------
10194 -- Write_Field10_Name --
10195 ------------------------
10197 procedure Write_Field10_Name (Id : Entity_Id) is
10200 when Class_Wide_Kind
10207 Write_Str ("Direct_Primitive_Operations");
10212 Write_Str ("Discriminal_Link");
10215 Write_Str ("Float_Rep");
10222 Write_Str ("Handler_Records");
10227 Write_Str ("Normalized_Position_Max");
10229 when E_Abstract_State
10232 Write_Str ("Part_Of_Constituents");
10235 Write_Str ("Field10??");
10237 end Write_Field10_Name;
10239 ------------------------
10240 -- Write_Field11_Name --
10241 ------------------------
10243 procedure Write_Field11_Name (Id : Entity_Id) is
10247 Write_Str ("Block_Node");
10252 Write_Str ("Component_Bit_Offset");
10254 when Formal_Kind =>
10255 Write_Str ("Entry_Component");
10257 when E_Enumeration_Literal =>
10258 Write_Str ("Enumeration_Pos");
10263 Write_Str ("Full_View");
10265 when E_Generic_Package =>
10266 Write_Str ("Generic_Homonym");
10269 Write_Str ("Part_Of_References");
10276 Write_Str ("Protected_Body_Subprogram");
10279 Write_Str ("Field11??");
10281 end Write_Field11_Name;
10283 ------------------------
10284 -- Write_Field12_Name --
10285 ------------------------
10287 procedure Write_Field12_Name (Id : Entity_Id) is
10291 Write_Str ("Associated_Formal_Package");
10294 Write_Str ("Barrier_Function");
10296 when E_Enumeration_Literal =>
10297 Write_Str ("Enumeration_Rep");
10305 | E_In_Out_Parameter
10310 Write_Str ("Esize");
10315 Write_Str ("Next_Inlined_Subprogram");
10318 Write_Str ("Field12??");
10320 end Write_Field12_Name;
10322 ------------------------
10323 -- Write_Field13_Name --
10324 ------------------------
10326 procedure Write_Field13_Name (Id : Entity_Id) is
10332 Write_Str ("Component_Clause");
10339 | Generic_Unit_Kind
10341 Write_Str ("Elaboration_Entity");
10346 Write_Str ("Extra_Accessibility");
10349 Write_Str ("RM_Size");
10352 Write_Str ("Field13??");
10354 end Write_Field13_Name;
10356 -----------------------
10357 -- Write_Field14_Name --
10358 -----------------------
10360 procedure Write_Field14_Name (Id : Entity_Id) is
10370 Write_Str ("Alignment");
10375 Write_Str ("Normalized_Position");
10382 Write_Str ("Postconditions_Proc");
10385 Write_Str ("Field14??");
10387 end Write_Field14_Name;
10389 ------------------------
10390 -- Write_Field15_Name --
10391 ------------------------
10393 procedure Write_Field15_Name (Id : Entity_Id) is
10396 when E_Discriminant =>
10397 Write_Str ("Discriminant_Number");
10399 when E_Component =>
10400 Write_Str ("DT_Entry_Count");
10405 Write_Str ("DT_Position");
10408 Write_Str ("Entry_Parameters_Type");
10410 when Formal_Kind =>
10411 Write_Str ("Extra_Formal");
10414 Write_Str ("Pending_Access_Types");
10419 Write_Str ("Related_Instance");
10425 Write_Str ("Status_Flag_Or_Transient_Decl");
10428 Write_Str ("Field15??");
10430 end Write_Field15_Name;
10432 ------------------------
10433 -- Write_Field16_Name --
10434 ------------------------
10436 procedure Write_Field16_Name (Id : Entity_Id) is
10440 | E_Record_Type_With_Private
10442 Write_Str ("Access_Disp_Table");
10444 when E_Abstract_State =>
10445 Write_Str ("Body_References");
10447 when E_Class_Wide_Subtype
10450 Write_Str ("Cloned_Subtype");
10455 Write_Str ("DTC_Entity");
10457 when E_Component =>
10458 Write_Str ("Entry_Formal");
10460 when Concurrent_Kind
10461 | E_Generic_Package
10464 Write_Str ("First_Private_Entity");
10466 when Enumeration_Kind =>
10467 Write_Str ("Lit_Strings");
10469 when Decimal_Fixed_Point_Kind =>
10470 Write_Str ("Scale_Value");
10472 when E_String_Literal_Subtype =>
10473 Write_Str ("String_Literal_Length");
10475 when E_Out_Parameter
10478 Write_Str ("Unset_Reference");
10481 Write_Str ("Field16??");
10483 end Write_Field16_Name;
10485 ------------------------
10486 -- Write_Field17_Name --
10487 ------------------------
10489 procedure Write_Field17_Name (Id : Entity_Id) is
10494 | E_Generic_In_Out_Parameter
10497 Write_Str ("Actual_Subtype");
10499 when Digits_Kind =>
10500 Write_Str ("Digits_Value");
10502 when E_Discriminant =>
10503 Write_Str ("Discriminal");
10505 when Class_Wide_Kind
10512 | E_Generic_Function
10513 | E_Generic_Package
10514 | E_Generic_Procedure
10522 | E_Return_Statement
10523 | E_Subprogram_Body
10524 | E_Subprogram_Type
10526 Write_Str ("First_Entity");
10529 Write_Str ("First_Index");
10531 when Enumeration_Kind =>
10532 Write_Str ("First_Literal");
10534 when Access_Kind =>
10535 Write_Str ("Master_Id");
10537 when Modular_Integer_Kind =>
10538 Write_Str ("Modulus");
10540 when E_Component =>
10541 Write_Str ("Prival");
10544 Write_Str ("Field17??");
10546 end Write_Field17_Name;
10548 ------------------------
10549 -- Write_Field18_Name --
10550 ------------------------
10552 procedure Write_Field18_Name (Id : Entity_Id) is
10555 when E_Enumeration_Literal
10560 Write_Str ("Alias");
10562 when E_Record_Type =>
10563 Write_Str ("Corresponding_Concurrent_Type");
10565 when E_Subprogram_Body =>
10566 Write_Str ("Corresponding_Protected_Entry");
10568 when Concurrent_Kind =>
10569 Write_Str ("Corresponding_Record_Type");
10575 Write_Str ("Enclosing_Scope");
10577 when E_Entry_Index_Parameter =>
10578 Write_Str ("Entry_Index_Constant");
10580 when E_Access_Protected_Subprogram_Type
10581 | E_Access_Subprogram_Type
10582 | E_Anonymous_Access_Protected_Subprogram_Type
10584 | E_Class_Wide_Subtype
10586 Write_Str ("Equivalent_Type");
10588 when Fixed_Point_Kind =>
10589 Write_Str ("Delta_Value");
10591 when Enumeration_Kind =>
10592 Write_Str ("Lit_Indexes");
10594 when Incomplete_Or_Private_Kind
10597 Write_Str ("Private_Dependents");
10600 | E_Generic_Function
10601 | E_Generic_Package
10602 | E_Generic_Procedure
10605 Write_Str ("Renamed_Entity");
10607 when Object_Kind =>
10608 Write_Str ("Renamed_Object");
10610 when E_String_Literal_Subtype =>
10611 Write_Str ("String_Literal_Low_Bound");
10614 Write_Str ("Field18??");
10616 end Write_Field18_Name;
10618 -----------------------
10619 -- Write_Field19_Name --
10620 -----------------------
10622 procedure Write_Field19_Name (Id : Entity_Id) is
10625 when E_Generic_Package
10628 Write_Str ("Body_Entity");
10630 when E_Discriminant =>
10631 Write_Str ("Corresponding_Discriminant");
10633 when Scalar_Kind =>
10634 Write_Str ("Default_Aspect_Value");
10636 when E_Array_Type =>
10637 Write_Str ("Default_Component_Value");
10639 when E_Protected_Type =>
10640 Write_Str ("Entry_Bodies_Array");
10644 | E_Subprogram_Type
10646 Write_Str ("Extra_Accessibility_Of_Result");
10648 when E_Abstract_State
10649 | E_Class_Wide_Type
10650 | E_Incomplete_Type
10652 Write_Str ("Non_Limited_View");
10654 when E_Incomplete_Subtype =>
10655 if From_Limited_With (Id) then
10656 Write_Str ("Non_Limited_View");
10659 when E_Record_Type =>
10660 Write_Str ("Parent_Subtype");
10662 when E_Procedure =>
10663 Write_Str ("Receiving_Entry");
10668 Write_Str ("Size_Check_Code");
10673 Write_Str ("Spec_Entity");
10675 when Private_Kind =>
10676 Write_Str ("Underlying_Full_View");
10679 Write_Str ("Field19??");
10681 end Write_Field19_Name;
10683 -----------------------
10684 -- Write_Field20_Name --
10685 -----------------------
10687 procedure Write_Field20_Name (Id : Entity_Id) is
10691 Write_Str ("Component_Type");
10693 when E_Generic_In_Parameter
10696 Write_Str ("Default_Value");
10698 when Access_Kind =>
10699 Write_Str ("Directly_Designated_Type");
10701 when E_Component =>
10702 Write_Str ("Discriminant_Checking_Func");
10704 when E_Discriminant =>
10705 Write_Str ("Discriminant_Default_Value");
10707 when Class_Wide_Kind
10714 | E_Generic_Function
10715 | E_Generic_Package
10716 | E_Generic_Procedure
10724 | E_Return_Statement
10725 | E_Subprogram_Body
10726 | E_Subprogram_Type
10728 Write_Str ("Last_Entity");
10733 Write_Str ("Prival_Link");
10735 when E_Exception =>
10736 Write_Str ("Register_Exception_Call");
10738 when Scalar_Kind =>
10739 Write_Str ("Scalar_Range");
10742 Write_Str ("Field20??");
10744 end Write_Field20_Name;
10746 -----------------------
10747 -- Write_Field21_Name --
10748 -----------------------
10750 procedure Write_Field21_Name (Id : Entity_Id) is
10754 Write_Str ("Accept_Address");
10759 Write_Str ("Corresponding_Record_Component");
10761 when E_In_Parameter =>
10762 Write_Str ("Default_Expr_Function");
10764 when Concurrent_Kind
10765 | Incomplete_Or_Private_Kind
10770 Write_Str ("Discriminant_Constraint");
10775 | E_Generic_Function
10776 | E_Generic_Procedure
10780 Write_Str ("Interface_Name");
10783 | Modular_Integer_Kind
10785 Write_Str ("Original_Array_Type");
10787 when Fixed_Point_Kind =>
10788 Write_Str ("Small_Value");
10791 Write_Str ("Field21??");
10793 end Write_Field21_Name;
10795 -----------------------
10796 -- Write_Field22_Name --
10797 -----------------------
10799 procedure Write_Field22_Name (Id : Entity_Id) is
10802 when Access_Kind =>
10803 Write_Str ("Associated_Storage_Pool");
10806 Write_Str ("Component_Size");
10808 when E_Record_Type =>
10809 Write_Str ("Corresponding_Remote_Type");
10814 Write_Str ("Original_Record_Component");
10816 when E_Enumeration_Literal =>
10817 Write_Str ("Enumeration_Rep_Expr");
10819 when Formal_Kind =>
10820 Write_Str ("Protected_Formal");
10826 | E_Generic_Function
10827 | E_Generic_Package
10828 | E_Generic_Procedure
10834 | E_Return_Statement
10835 | E_Subprogram_Body
10838 Write_Str ("Scope_Depth_Value");
10841 Write_Str ("Shared_Var_Procs_Instance");
10844 Write_Str ("Field22??");
10846 end Write_Field22_Name;
10848 ------------------------
10849 -- Write_Field23_Name --
10850 ------------------------
10852 procedure Write_Field23_Name (Id : Entity_Id) is
10855 when E_Discriminant =>
10856 Write_Str ("CR_Discriminant");
10859 Write_Str ("Entry_Cancel_Parameter");
10861 when E_Enumeration_Type =>
10862 Write_Str ("Enum_Pos_To_Rep");
10867 Write_Str ("Extra_Constrained");
10869 when Access_Kind =>
10870 Write_Str ("Finalization_Master");
10872 when E_Generic_Function
10873 | E_Generic_Package
10874 | E_Generic_Procedure
10876 Write_Str ("Inner_Instances");
10879 Write_Str ("Packed_Array_Impl_Type");
10882 Write_Str ("Protection_Object");
10884 when Class_Wide_Kind
10886 | Incomplete_Or_Private_Kind
10890 Write_Str ("Stored_Constraint");
10895 if Present (Scope (Id))
10896 and then Is_Protected_Type (Scope (Id))
10898 Write_Str ("Protection_Object");
10900 Write_Str ("Generic_Renamings");
10904 if Is_Generic_Instance (Id) then
10905 Write_Str ("Generic_Renamings");
10907 Write_Str ("Limited_View");
10911 Write_Str ("Field23??");
10913 end Write_Field23_Name;
10915 ------------------------
10916 -- Write_Field24_Name --
10917 ------------------------
10919 procedure Write_Field24_Name (Id : Entity_Id) is
10923 Write_Str ("Incomplete_Actuals");
10929 Write_Str ("Related_Expression");
10935 Write_Str ("Subps_Index");
10938 Write_Str ("Field24???");
10940 end Write_Field24_Name;
10942 ------------------------
10943 -- Write_Field25_Name --
10944 ------------------------
10946 procedure Write_Field25_Name (Id : Entity_Id) is
10949 when E_Generic_Package
10952 Write_Str ("Abstract_States");
10957 Write_Str ("Contract_Wrapper");
10960 Write_Str ("Debug_Renaming_Link");
10962 when E_Component =>
10963 Write_Str ("DT_Offset_To_Top_Func");
10968 Write_Str ("Interface_Alias");
10970 when E_Record_Subtype
10971 | E_Record_Subtype_With_Private
10973 | E_Record_Type_With_Private
10975 Write_Str ("Interfaces");
10977 when E_Array_Subtype
10980 Write_Str ("Related_Array_Object");
10982 when Discrete_Kind =>
10983 Write_Str ("Static_Discrete_Predicate");
10986 Write_Str ("Static_Real_Or_String_Predicate");
10989 Write_Str ("Task_Body_Procedure");
10992 Write_Str ("Field25??");
10994 end Write_Field25_Name;
10996 ------------------------
10997 -- Write_Field26_Name --
10998 ------------------------
11000 procedure Write_Field26_Name (Id : Entity_Id) is
11004 | E_Record_Type_With_Private
11006 Write_Str ("Dispatch_Table_Wrappers");
11008 when E_In_Out_Parameter
11012 Write_Str ("Last_Assignment");
11017 Write_Str ("Overridden_Operation");
11019 when E_Generic_Package
11022 Write_Str ("Package_Instantiation");
11027 Write_Str ("Related_Type");
11032 Write_Str ("Storage_Size_Variable");
11035 Write_Str ("Field26??");
11037 end Write_Field26_Name;
11039 ------------------------
11040 -- Write_Field27_Name --
11041 ------------------------
11043 procedure Write_Field27_Name (Id : Entity_Id) is
11049 Write_Str ("Current_Use_Clause");
11055 Write_Str ("Related_Type");
11060 Write_Str ("Wrapped_Entity");
11063 Write_Str ("Field27??");
11065 end Write_Field27_Name;
11067 ------------------------
11068 -- Write_Field28_Name --
11069 ------------------------
11071 procedure Write_Field28_Name (Id : Entity_Id) is
11078 | E_Subprogram_Body
11079 | E_Subprogram_Type
11081 Write_Str ("Extra_Formals");
11086 Write_Str ("Finalizer");
11091 Write_Str ("Initialization_Statements");
11093 when E_Access_Subprogram_Type =>
11094 Write_Str ("Original_Access_Type");
11097 Write_Str ("Relative_Deadline_Variable");
11099 when E_Record_Type =>
11100 Write_Str ("Underlying_Record_View");
11103 Write_Str ("Field28??");
11105 end Write_Field28_Name;
11107 ------------------------
11108 -- Write_Field29_Name --
11109 ------------------------
11111 procedure Write_Field29_Name (Id : Entity_Id) is
11117 | E_Subprogram_Body
11119 Write_Str ("Anonymous_Masters");
11124 Write_Str ("BIP_Initialization_Call");
11127 Write_Str ("Subprograms_For_Type");
11130 Write_Str ("Field29??");
11132 end Write_Field29_Name;
11134 ------------------------
11135 -- Write_Field30_Name --
11136 ------------------------
11138 procedure Write_Field30_Name (Id : Entity_Id) is
11142 | E_Record_Type_With_Private
11144 Write_Str ("Access_Disp_Table_Elab_Flag");
11146 when E_Protected_Type
11149 Write_Str ("Anonymous_Object");
11152 Write_Str ("Corresponding_Equality");
11157 Write_Str ("Last_Aggregate_Assignment");
11159 when E_Procedure =>
11160 Write_Str ("Static_Initialization");
11163 Write_Str ("Field30??");
11165 end Write_Field30_Name;
11167 ------------------------
11168 -- Write_Field31_Name --
11169 ------------------------
11171 procedure Write_Field31_Name (Id : Entity_Id) is
11176 | E_In_Out_Parameter
11181 Write_Str ("Activation_Record_Component");
11184 Write_Str ("Derived_Type_Link");
11189 Write_Str ("Thunk_Entity");
11192 Write_Str ("Field31??");
11194 end Write_Field31_Name;
11196 ------------------------
11197 -- Write_Field32_Name --
11198 ------------------------
11200 procedure Write_Field32_Name (Id : Entity_Id) is
11203 when E_Procedure =>
11204 Write_Str ("Corresponding_Function");
11207 Write_Str ("Corresponding_Procedure");
11209 when E_Abstract_State
11213 Write_Str ("Encapsulating_State");
11216 Write_Str ("No_Tagged_Streams_Pragma");
11219 Write_Str ("Field32??");
11221 end Write_Field32_Name;
11223 ------------------------
11224 -- Write_Field33_Name --
11225 ------------------------
11227 procedure Write_Field33_Name (Id : Entity_Id) is
11230 when Subprogram_Kind
11235 Write_Str ("Linker_Section_Pragma");
11238 Write_Str ("Field33??");
11240 end Write_Field33_Name;
11242 ------------------------
11243 -- Write_Field34_Name --
11244 ------------------------
11246 procedure Write_Field34_Name (Id : Entity_Id) is
11253 | E_Generic_Function
11254 | E_Generic_Package
11255 | E_Generic_Procedure
11261 | E_Subprogram_Body
11267 Write_Str ("Contract");
11270 Write_Str ("Field34??");
11272 end Write_Field34_Name;
11274 ------------------------
11275 -- Write_Field35_Name --
11276 ------------------------
11278 procedure Write_Field35_Name (Id : Entity_Id) is
11282 Write_Str ("Anonymous_Designated_Type");
11287 Write_Str ("Entry_Max_Queue_Lenghts_Array");
11289 when Subprogram_Kind =>
11290 Write_Str ("Import_Pragma");
11293 Write_Str ("Field35??");
11295 end Write_Field35_Name;
11297 ------------------------
11298 -- Write_Field36_Name --
11299 ------------------------
11301 procedure Write_Field36_Name (Id : Entity_Id) is
11302 pragma Unreferenced (Id);
11304 Write_Str ("Prev_Entity");
11305 end Write_Field36_Name;
11307 ------------------------
11308 -- Write_Field37_Name --
11309 ------------------------
11311 procedure Write_Field37_Name (Id : Entity_Id) is
11312 pragma Unreferenced (Id);
11314 Write_Str ("Associated_Entity");
11315 end Write_Field37_Name;
11317 ------------------------
11318 -- Write_Field38_Name --
11319 ------------------------
11321 procedure Write_Field38_Name (Id : Entity_Id) is
11327 Write_Str ("Class_Wide_Clone");
11329 when E_Array_Subtype
11331 | E_Record_Subtype_With_Private
11333 Write_Str ("Predicated_Parent");
11336 Write_Str ("Validated_Object");
11339 Write_Str ("Field38??");
11341 end Write_Field38_Name;
11343 ------------------------
11344 -- Write_Field39_Name --
11345 ------------------------
11347 procedure Write_Field39_Name (Id : Entity_Id) is
11353 Write_Str ("Protected_Subprogram");
11356 Write_Str ("Field39??");
11358 end Write_Field39_Name;
11360 ------------------------
11361 -- Write_Field40_Name --
11362 ------------------------
11364 procedure Write_Field40_Name (Id : Entity_Id) is
11367 when E_Abstract_State
11372 | E_Generic_Function
11373 | E_Generic_Package
11374 | E_Generic_Procedure
11380 | E_Subprogram_Body
11386 Write_Str ("SPARK_Pragma");
11389 Write_Str ("Field40??");
11391 end Write_Field40_Name;
11393 ------------------------
11394 -- Write_Field41_Name --
11395 ------------------------
11397 procedure Write_Field41_Name (Id : Entity_Id) is
11403 Write_Str ("Original_Protected_Subprogram");
11405 when E_Generic_Package
11411 Write_Str ("SPARK_Aux_Pragma");
11414 Write_Str ("Field41??");
11416 end Write_Field41_Name;
11418 -------------------------
11419 -- Iterator Procedures --
11420 -------------------------
11422 procedure Proc_Next_Component (N : in out Node_Id) is
11424 N := Next_Component (N);
11425 end Proc_Next_Component;
11427 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
11429 N := Next_Entity (N);
11430 while Present (N) loop
11431 exit when Ekind_In (N, E_Component, E_Discriminant);
11432 N := Next_Entity (N);
11434 end Proc_Next_Component_Or_Discriminant;
11436 procedure Proc_Next_Discriminant (N : in out Node_Id) is
11438 N := Next_Discriminant (N);
11439 end Proc_Next_Discriminant;
11441 procedure Proc_Next_Formal (N : in out Node_Id) is
11443 N := Next_Formal (N);
11444 end Proc_Next_Formal;
11446 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
11448 N := Next_Formal_With_Extras (N);
11449 end Proc_Next_Formal_With_Extras;
11451 procedure Proc_Next_Index (N : in out Node_Id) is
11453 N := Next_Index (N);
11454 end Proc_Next_Index;
11456 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
11458 N := Next_Inlined_Subprogram (N);
11459 end Proc_Next_Inlined_Subprogram;
11461 procedure Proc_Next_Literal (N : in out Node_Id) is
11463 N := Next_Literal (N);
11464 end Proc_Next_Literal;
11466 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
11468 N := Next_Stored_Discriminant (N);
11469 end Proc_Next_Stored_Discriminant;