1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2021, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 with Atree; use Atree;
27 with Elists; use Elists;
28 with Namet; use Namet;
29 with Nlists; use Nlists;
30 with Output; use Output;
31 with Sinfo; use Sinfo;
32 with Stand; use Stand;
36 use Atree.Unchecked_Access;
37 -- This is one of the packages that is allowed direct untyped access to
38 -- the fields in a node, since it provides the next level abstraction
39 -- which incorporates appropriate checks.
41 ----------------------------------------------
42 -- Usage of Fields in Defining Entity Nodes --
43 ----------------------------------------------
45 -- Four of these fields are defined in Sinfo, since they in are the base
46 -- part of the node. The access routines for these four fields and the
47 -- corresponding set procedures are defined in Sinfo. These fields are
48 -- present in all entities. Note that Homonym is also in the base part of
49 -- the node, but has access routines that are more properly part of Einfo,
50 -- which is why they are defined here.
57 -- Remaining fields are present only in extended nodes (i.e. entities).
59 -- The following fields are present in all entities
62 -- First_Rep_Item Node6
65 -- Associated_Entity Node37
67 -- The usage of other fields (and the entity kinds to which it applies)
68 -- depends on the particular field (see Einfo spec for details).
70 -- Associated_Node_For_Itype Node8
71 -- Dependent_Instances Elist8
72 -- Hiding_Loop_Variable Node8
73 -- Mechanism Uint8 (but returns Mechanism_Type)
74 -- Normalized_First_Bit Uint8
75 -- Refinement_Constituents Elist8
76 -- Return_Applies_To Node8
77 -- First_Exit_Statement Node8
79 -- Class_Wide_Type Node9
80 -- Current_Value Node9
83 -- Direct_Primitive_Operations Elist10
84 -- Discriminal_Link Node10
85 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
86 -- Handler_Records List10
87 -- Normalized_Position_Max Uint10
88 -- Part_Of_Constituents Elist10
91 -- Component_Bit_Offset Uint11
93 -- Entry_Component Node11
94 -- Enumeration_Pos Uint11
95 -- Generic_Homonym Node11
96 -- Part_Of_References Elist11
97 -- Protected_Body_Subprogram Node11
99 -- Barrier_Function Node12
100 -- Enumeration_Rep Uint12
102 -- Next_Inlined_Subprogram Node12
104 -- Component_Clause Node13
105 -- Elaboration_Entity Node13
106 -- Extra_Accessibility Node13
110 -- Normalized_Position Uint14
111 -- Postconditions_Proc Node14
113 -- Discriminant_Number Uint15
114 -- DT_Position Uint15
115 -- DT_Entry_Count Uint15
116 -- Entry_Parameters_Type Node15
117 -- Extra_Formal Node15
118 -- Pending_Access_Types Elist15
119 -- Related_Instance Node15
120 -- Status_Flag_Or_Transient_Decl Node15
122 -- Access_Disp_Table Elist16
123 -- Body_References Elist16
124 -- Cloned_Subtype Node16
126 -- Entry_Formal Node16
127 -- First_Private_Entity Node16
128 -- Lit_Strings Node16
129 -- Scale_Value Uint16
130 -- String_Literal_Length Uint16
131 -- Unset_Reference Node16
133 -- Actual_Subtype Node17
134 -- Digits_Value Uint17
135 -- Discriminal Node17
136 -- First_Entity Node17
137 -- First_Index Node17
138 -- First_Literal Node17
144 -- Corresponding_Concurrent_Type Node18
145 -- Corresponding_Protected_Entry Node18
146 -- Corresponding_Record_Type Node18
147 -- Delta_Value Ureal18
148 -- Enclosing_Scope Node18
149 -- Equivalent_Type Node18
150 -- Lit_Indexes Node18
151 -- Private_Dependents Elist18
152 -- Renamed_Entity Node18
153 -- Renamed_Object Node18
154 -- String_Literal_Low_Bound Node18
156 -- Body_Entity Node19
157 -- Corresponding_Discriminant Node19
158 -- Default_Aspect_Component_Value Node19
159 -- Default_Aspect_Value Node19
160 -- Entry_Bodies_Array Node19
161 -- Extra_Accessibility_Of_Result Node19
162 -- Non_Limited_View Node19
163 -- Parent_Subtype Node19
164 -- Receiving_Entry Node19
165 -- Size_Check_Code Node19
166 -- Spec_Entity Node19
167 -- Underlying_Full_View Node19
169 -- Component_Type Node20
170 -- Default_Value Node20
171 -- Directly_Designated_Type Node20
172 -- Discriminant_Checking_Func Node20
173 -- Discriminant_Default_Value Node20
174 -- Last_Entity Node20
175 -- Prival_Link Node20
176 -- Register_Exception_Call Node20
177 -- Scalar_Range Node20
179 -- Accept_Address Elist21
180 -- Corresponding_Record_Component Node21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
184 -- Interface_Name Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Original_Record_Component Node22
193 -- Protected_Formal Node22
194 -- Scope_Depth_Value Uint22
195 -- Shared_Var_Procs_Instance Node22
197 -- CR_Discriminant Node23
198 -- Entry_Cancel_Parameter Node23
199 -- Enum_Pos_To_Rep Node23
200 -- Extra_Constrained Node23
201 -- Finalization_Master Node23
202 -- Generic_Renamings Elist23
203 -- Inner_Instances Elist23
204 -- Limited_View Node23
205 -- Packed_Array_Impl_Type Node23
206 -- Protection_Object Node23
207 -- Stored_Constraint Elist23
209 -- Incomplete_Actuals Elist24
210 -- Minimum_Accessibility Node24
211 -- Related_Expression Node24
212 -- Subps_Index Uint24
214 -- Contract_Wrapper Node25
215 -- Debug_Renaming_Link Node25
216 -- DT_Offset_To_Top_Func Node25
217 -- Interface_Alias Node25
218 -- Interfaces Elist25
219 -- Related_Array_Object Node25
220 -- Static_Discrete_Predicate List25
221 -- Static_Real_Or_String_Predicate Node25
222 -- Task_Body_Procedure Node25
224 -- Dispatch_Table_Wrappers Elist26
225 -- Last_Assignment Node26
226 -- Overridden_Operation Node26
227 -- Package_Instantiation Node26
228 -- Storage_Size_Variable Node26
230 -- Current_Use_Clause Node27
231 -- Related_Type Node27
232 -- Wrapped_Entity Node27
234 -- Extra_Formals Node28
236 -- Initialization_Statements Node28
237 -- Original_Access_Type Node28
238 -- Relative_Deadline_Variable Node28
239 -- Underlying_Record_View Node28
241 -- Anonymous_Masters Elist29
242 -- BIP_Initialization_Call Node29
243 -- Subprograms_For_Type Elist29
245 -- Access_Disp_Table_Elab_Flag Node30
246 -- Anonymous_Object Node30
247 -- Corresponding_Equality Node30
248 -- Hidden_In_Formal_Instance Elist30
249 -- Last_Aggregate_Assignment Node30
250 -- Static_Initialization Node30
252 -- Activation_Record_Component Node31
253 -- Derived_Type_Link Node31
254 -- Thunk_Entity Node31
256 -- Corresponding_Function Node32
257 -- Corresponding_Procedure Node32
258 -- Encapsulating_State Node32
259 -- No_Tagged_Streams_Pragma Node32
261 -- Linker_Section_Pragma Node33
265 -- Anonymous_Designated_Type Node35
266 -- Entry_Max_Queue_Lengths_Array Node35
267 -- Import_Pragma Node35
269 -- Validated_Object Node38
270 -- Predicated_Parent Node38
271 -- Class_Wide_Clone Node38
273 -- Protected_Subprogram Node39
275 -- SPARK_Pragma Node40
277 -- Access_Subprogram_Wrapper Node41
278 -- Original_Protected_Subprogram Node41
279 -- SPARK_Aux_Pragma Node41
281 ---------------------------------------------
282 -- Usage of Flags in Defining Entity Nodes --
283 ---------------------------------------------
285 -- All flags are unique, there is no overlaying, so each flag is physically
286 -- present in every entity. However, for many of the flags, it only makes
287 -- sense for them to be set true for certain subsets of entity kinds. See
288 -- the spec of Einfo for further details.
290 -- Is_Inlined_Always Flag1
291 -- Is_Hidden_Non_Overridden_Subpgm Flag2
294 -- Has_Discriminants Flag5
295 -- Is_Dispatching_Operation Flag6
296 -- Is_Immediately_Visible Flag7
298 -- Is_Potentially_Use_Visible Flag9
302 -- Is_Constrained Flag12
303 -- Is_Generic_Type Flag13
304 -- Depends_On_Private Flag14
306 -- Is_Volatile Flag16
307 -- Is_Internal Flag17
308 -- Has_Delayed_Freeze Flag18
309 -- Is_Abstract_Subprogram Flag19
310 -- Is_Concurrent_Record_Type Flag20
312 -- Has_Master_Entity Flag21
313 -- Needs_No_Actuals Flag22
314 -- Has_Storage_Size_Clause Flag23
315 -- Is_Imported Flag24
316 -- Is_Limited_Record Flag25
317 -- Has_Completion Flag26
318 -- Has_Pragma_Controlled Flag27
319 -- Is_Statically_Allocated Flag28
320 -- Has_Size_Clause Flag29
323 -- Checks_May_Be_Suppressed Flag31
324 -- Kill_Elaboration_Checks Flag32
325 -- Kill_Range_Checks Flag33
326 -- Has_Independent_Components Flag34
327 -- Is_Class_Wide_Equivalent_Type Flag35
328 -- Referenced_As_LHS Flag36
329 -- Is_Known_Non_Null Flag37
330 -- Can_Never_Be_Null Flag38
331 -- Has_Default_Aspect Flag39
332 -- Body_Needed_For_SAL Flag40
334 -- Treat_As_Volatile Flag41
335 -- Is_Controlled_Active Flag42
336 -- Has_Controlled_Component Flag43
338 -- In_Private_Part Flag45
339 -- Has_Alignment_Clause Flag46
341 -- In_Package_Body Flag48
343 -- Delay_Subprogram_Descriptors Flag50
346 -- Is_Entry_Formal Flag52
347 -- Is_Private_Descendant Flag53
348 -- Return_Present Flag54
349 -- Is_Tagged_Type Flag55
350 -- Has_Homonym Flag56
352 -- Non_Binary_Modulus Flag58
353 -- Is_Preelaborated Flag59
354 -- Is_Shared_Passive Flag60
356 -- Is_Remote_Types Flag61
357 -- Is_Remote_Call_Interface Flag62
358 -- Is_Character_Type Flag63
359 -- Is_Intrinsic_Subprogram Flag64
360 -- Has_Record_Rep_Clause Flag65
361 -- Has_Enumeration_Rep_Clause Flag66
362 -- Has_Small_Clause Flag67
363 -- Has_Component_Size_Clause Flag68
364 -- Is_Access_Constant Flag69
365 -- Is_First_Subtype Flag70
367 -- Has_Completion_In_Body Flag71
368 -- Has_Unknown_Discriminants Flag72
369 -- Is_Child_Unit Flag73
370 -- Is_CPP_Class Flag74
371 -- Has_Non_Standard_Rep Flag75
372 -- Is_Constructor Flag76
373 -- Static_Elaboration_Desired Flag77
375 -- Has_All_Calls_Remote Flag79
376 -- Is_Constr_Subt_For_U_Nominal Flag80
378 -- Is_Asynchronous Flag81
379 -- Has_Gigi_Rep_Item Flag82
380 -- Has_Machine_Radix_Clause Flag83
381 -- Machine_Radix_10 Flag84
383 -- Has_Atomic_Components Flag86
384 -- Has_Volatile_Components Flag87
385 -- Discard_Names Flag88
386 -- Is_Interrupt_Handler Flag89
387 -- Returns_By_Ref Flag90
390 -- Size_Known_At_Compile_Time Flag92
391 -- Reverse_Storage_Order Flag93
392 -- Is_Generic_Actual_Type Flag94
393 -- Uses_Sec_Stack Flag95
394 -- Warnings_Off Flag96
395 -- Is_Controlling_Formal Flag97
396 -- Has_Controlling_Result Flag98
397 -- Is_Exported Flag99
398 -- Has_Specified_Layout Flag100
400 -- Has_Nested_Block_With_Handler Flag101
402 -- Is_Completely_Hidden Flag103
403 -- Address_Taken Flag104
404 -- Suppress_Initialization Flag105
405 -- Is_Limited_Composite Flag106
406 -- Is_Private_Composite Flag107
407 -- Default_Expressions_Processed Flag108
408 -- Is_Non_Static_Subtype Flag109
409 -- Has_Out_Or_In_Out_Parameter Flag110
411 -- Is_Formal_Subprogram Flag111
412 -- Is_Renaming_Of_Object Flag112
414 -- Delay_Cleanups Flag114
415 -- Never_Set_In_Source Flag115
416 -- Is_Visible_Lib_Unit Flag116
417 -- Is_Unchecked_Union Flag117
418 -- Is_CUDA_Kernel Flag118
419 -- Has_Convention_Pragma Flag119
420 -- Has_Primitive_Operations Flag120
422 -- Has_Pragma_Pack Flag121
423 -- Is_Bit_Packed_Array Flag122
424 -- Has_Unchecked_Union Flag123
425 -- Is_Eliminated Flag124
426 -- C_Pass_By_Copy Flag125
427 -- Is_Instantiated Flag126
428 -- Is_Valued_Procedure Flag127
429 -- (used for Component_Alignment) Flag128
430 -- (used for Component_Alignment) Flag129
431 -- Is_Generic_Instance Flag130
433 -- No_Pool_Assigned Flag131
434 -- Is_DIC_Procedure Flag132
435 -- Has_Inherited_DIC Flag133
436 -- Has_Aliased_Components Flag135
437 -- No_Strict_Aliasing Flag136
438 -- Is_Machine_Code_Subprogram Flag137
439 -- Is_Packed_Array_Impl_Type Flag138
440 -- Has_Biased_Representation Flag139
441 -- Has_Complex_Representation Flag140
443 -- Is_Constr_Subt_For_UN_Aliased Flag141
444 -- Has_Missing_Return Flag142
445 -- Has_Recursive_Call Flag143
446 -- Is_Unsigned_Type Flag144
447 -- Strict_Alignment Flag145
448 -- Is_Abstract_Type Flag146
449 -- Needs_Debug_Info Flag147
450 -- Is_Elaboration_Checks_OK_Id Flag148
451 -- Is_Compilation_Unit Flag149
452 -- Has_Pragma_Elaborate_Body Flag150
454 -- Has_Private_Ancestor Flag151
455 -- Entry_Accepted Flag152
456 -- Is_Obsolescent Flag153
457 -- Has_Per_Object_Constraint Flag154
458 -- Has_Private_Declaration Flag155
459 -- Referenced Flag156
460 -- Has_Pragma_Inline Flag157
461 -- Finalize_Storage_Only Flag158
462 -- From_Limited_With Flag159
463 -- Is_Package_Body_Entity Flag160
465 -- Has_Qualified_Name Flag161
466 -- Nonzero_Is_True Flag162
467 -- Is_True_Constant Flag163
468 -- Reverse_Bit_Order Flag164
469 -- Suppress_Style_Checks Flag165
470 -- Debug_Info_Off Flag166
471 -- Sec_Stack_Needed_For_Return Flag167
472 -- Materialize_Entity Flag168
473 -- Has_Pragma_Thread_Local_Storage Flag169
474 -- Is_Known_Valid Flag170
476 -- Is_Hidden_Open_Scope Flag171
477 -- Has_Object_Size_Clause Flag172
478 -- Has_Fully_Qualified_Name Flag173
479 -- Elaboration_Entity_Required Flag174
480 -- Has_Forward_Instantiation Flag175
481 -- Is_Discrim_SO_Function Flag176
482 -- Size_Depends_On_Discriminant Flag177
483 -- Is_Null_Init_Proc Flag178
484 -- Has_Pragma_Pure_Function Flag179
485 -- Has_Pragma_Unreferenced Flag180
487 -- Has_Contiguous_Rep Flag181
488 -- Has_Xref_Entry Flag182
489 -- Must_Be_On_Byte_Boundary Flag183
490 -- Has_Stream_Size_Clause Flag184
491 -- Is_Ada_2005_Only Flag185
492 -- Is_Interface Flag186
493 -- Has_Constrained_Partial_View Flag187
494 -- Uses_Lock_Free Flag188
495 -- Is_Pure_Unit_Access_Type Flag189
496 -- Has_Specified_Stream_Input Flag190
498 -- Has_Specified_Stream_Output Flag191
499 -- Has_Specified_Stream_Read Flag192
500 -- Has_Specified_Stream_Write Flag193
501 -- Is_Local_Anonymous_Access Flag194
502 -- Is_Primitive_Wrapper Flag195
503 -- Was_Hidden Flag196
504 -- Is_Limited_Interface Flag197
505 -- Has_Pragma_Ordered Flag198
506 -- Is_Ada_2012_Only Flag199
508 -- Has_Delayed_Aspects Flag200
509 -- Has_Pragma_No_Inline Flag201
510 -- Itype_Printed Flag202
511 -- Has_Pragma_Pure Flag203
512 -- Is_Known_Null Flag204
513 -- Low_Bound_Tested Flag205
514 -- Is_Visible_Formal Flag206
515 -- Known_To_Have_Preelab_Init Flag207
516 -- Must_Have_Preelab_Init Flag208
517 -- Is_Return_Object Flag209
519 -- Elaborate_Body_Desirable Flag210
520 -- Has_Static_Discriminants Flag211
521 -- Has_Pragma_Unreferenced_Objects Flag212
522 -- Requires_Overriding Flag213
524 -- Is_Param_Block_Component_Type Flag215
525 -- Universal_Aliasing Flag216
526 -- Suppress_Value_Tracking_On_Call Flag217
527 -- Is_Primitive Flag218
528 -- Has_Initial_Value Flag219
530 -- Has_Dispatch_Table Flag220
531 -- Has_Pragma_Preelab_Init Flag221
532 -- Used_As_Generic_Actual Flag222
533 -- Is_Descendant_Of_Address Flag223
536 -- Is_Only_Out_Parameter Flag226
537 -- Referenced_As_Out_Parameter Flag227
538 -- Has_Thunks Flag228
539 -- Can_Use_Internal_Rep Flag229
541 -- Has_Pragma_Inline_Always Flag230
542 -- Renamed_In_Spec Flag231
543 -- Has_Own_Invariants Flag232
544 -- Has_Pragma_Unmodified Flag233
545 -- Is_Dispatch_Table_Entity Flag234
546 -- Is_Trivial_Subprogram Flag235
547 -- Warnings_Off_Used Flag236
548 -- Warnings_Off_Used_Unmodified Flag237
549 -- Warnings_Off_Used_Unreferenced Flag238
550 -- No_Reordering Flag239
552 -- Has_Expanded_Contract Flag240
553 -- Optimize_Alignment_Space Flag241
554 -- Optimize_Alignment_Time Flag242
555 -- Overlays_Constant Flag243
556 -- Is_RACW_Stub_Type Flag244
557 -- Is_Private_Primitive Flag245
558 -- Is_Underlying_Record_View Flag246
559 -- OK_To_Rename Flag247
560 -- Has_Inheritable_Invariants Flag248
561 -- Is_Safe_To_Reevaluate Flag249
563 -- Has_Predicates Flag250
564 -- Has_Implicit_Dereference Flag251
565 -- Is_Finalized_Transient Flag252
566 -- Disable_Controlled Flag253
567 -- Is_Implementation_Defined Flag254
568 -- Is_Predicate_Function Flag255
569 -- Is_Predicate_Function_M Flag256
570 -- Is_Invariant_Procedure Flag257
571 -- Has_Dynamic_Predicate_Aspect Flag258
572 -- Has_Static_Predicate_Aspect Flag259
574 -- Has_Loop_Entry_Attributes Flag260
575 -- Has_Delayed_Rep_Aspects Flag261
576 -- May_Inherit_Delayed_Rep_Aspects Flag262
577 -- Has_Visible_Refinement Flag263
578 -- Is_Discriminant_Check_Function Flag264
579 -- SPARK_Pragma_Inherited Flag265
580 -- SPARK_Aux_Pragma_Inherited Flag266
581 -- Has_Shift_Operator Flag267
582 -- Is_Independent Flag268
583 -- Has_Static_Predicate Flag269
585 -- Stores_Attribute_Old_Prefix Flag270
586 -- Has_Protected Flag271
587 -- SSO_Set_Low_By_Default Flag272
588 -- SSO_Set_High_By_Default Flag273
589 -- Is_Generic_Actual_Subprogram Flag274
590 -- No_Predicate_On_Actual Flag275
591 -- No_Dynamic_Predicate_On_Actual Flag276
592 -- Is_Checked_Ghost_Entity Flag277
593 -- Is_Ignored_Ghost_Entity Flag278
594 -- Contains_Ignored_Ghost_Code Flag279
596 -- Partial_View_Has_Unknown_Discr Flag280
597 -- Is_Static_Type Flag281
598 -- Has_Nested_Subprogram Flag282
599 -- Is_Uplevel_Referenced_Entity Flag283
600 -- Is_Unimplemented Flag284
601 -- Is_Volatile_Full_Access Flag285
602 -- Is_Exception_Handler Flag286
603 -- Rewritten_For_C Flag287
604 -- Predicates_Ignored Flag288
605 -- Has_Timing_Event Flag289
607 -- Is_Class_Wide_Clone Flag290
608 -- Has_Inherited_Invariants Flag291
609 -- Is_Partial_Invariant_Procedure Flag292
610 -- Is_Actual_Subtype Flag293
611 -- Has_Pragma_Unused Flag294
612 -- Is_Ignored_Transient Flag295
613 -- Has_Partial_Visible_Refinement Flag296
614 -- Is_Entry_Wrapper Flag297
615 -- Is_Underlying_Full_View Flag298
616 -- Body_Needed_For_Inlining Flag299
618 -- Has_Private_Extension Flag300
619 -- Ignore_SPARK_Mode_Pragmas Flag301
620 -- Is_Initial_Condition_Procedure Flag302
621 -- Suppress_Elaboration_Warnings Flag303
622 -- Is_Elaboration_Warnings_OK_Id Flag304
623 -- Is_Activation_Record Flag305
624 -- Needs_Activation_Record Flag306
625 -- Is_Loop_Parameter Flag307
626 -- Has_Yield_Aspect Flag308
630 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
632 -----------------------
633 -- Local subprograms --
634 -----------------------
637 (State_Id : Entity_Id;
638 Option_Nam : Name_Id) return Boolean;
639 -- Determine whether abstract state State_Id has particular option denoted
640 -- by the name Option_Nam.
646 function Float_Rep (Id : E) return F is
647 pragma Assert (Is_Floating_Point_Type (Id));
649 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
657 (State_Id : Entity_Id;
658 Option_Nam : Name_Id) return Boolean
660 Decl : constant Node_Id := Parent (State_Id);
665 pragma Assert (Ekind (State_Id) = E_Abstract_State);
667 -- The declaration of abstract states with options appear as an
668 -- extension aggregate. If this is not the case, the option is not
671 if Nkind (Decl) /= N_Extension_Aggregate then
677 Opt := First (Expressions (Decl));
678 while Present (Opt) loop
679 if Nkind (Opt) = N_Identifier and then Chars (Opt) = Option_Nam then
686 -- Complex options with various specifiers
688 Opt := First (Component_Associations (Decl));
689 while Present (Opt) loop
690 Opt_Nam := First (Choices (Opt));
692 if Nkind (Opt_Nam) = N_Identifier
693 and then Chars (Opt_Nam) = Option_Nam
704 --------------------------------
705 -- Attribute Access Functions --
706 --------------------------------
708 function Abstract_States (Id : E) return L is
710 pragma Assert (Is_Package_Or_Generic_Package (Id));
714 function Accept_Address (Id : E) return L is
719 function Access_Disp_Table (Id : E) return L is
721 pragma Assert (Ekind (Id) in E_Record_Subtype
723 | E_Record_Type_With_Private);
724 return Elist16 (Implementation_Base_Type (Id));
725 end Access_Disp_Table;
727 function Access_Disp_Table_Elab_Flag (Id : E) return E is
729 pragma Assert (Ekind (Id) in E_Record_Subtype
731 | E_Record_Type_With_Private);
732 return Node30 (Implementation_Base_Type (Id));
733 end Access_Disp_Table_Elab_Flag;
735 function Access_Subprogram_Wrapper (Id : E) return E is
737 pragma Assert (Ekind (Id) = E_Subprogram_Type);
739 end Access_Subprogram_Wrapper;
741 function Activation_Record_Component (Id : E) return E is
743 pragma Assert (Ekind (Id) in E_Constant
750 end Activation_Record_Component;
752 function Actual_Subtype (Id : E) return E is
755 (Ekind (Id) in 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 (Id) in 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 (Id) in E_Function
794 | E_Subprogram_Body);
796 end Anonymous_Masters;
798 function Anonymous_Object (Id : E) return E is
800 pragma Assert (Ekind (Id) in E_Protected_Type | E_Task_Type);
802 end Anonymous_Object;
804 function Associated_Entity (Id : E) return E is
807 end Associated_Entity;
809 function Associated_Formal_Package (Id : E) return E is
811 pragma Assert (Ekind (Id) = E_Package);
813 end Associated_Formal_Package;
815 function Associated_Node_For_Itype (Id : E) return N is
818 end Associated_Node_For_Itype;
820 function Associated_Storage_Pool (Id : E) return E is
822 pragma Assert (Is_Access_Type (Id));
823 return Node22 (Root_Type (Id));
824 end Associated_Storage_Pool;
826 function Barrier_Function (Id : E) return N is
828 pragma Assert (Is_Entry (Id));
830 end Barrier_Function;
832 function Block_Node (Id : E) return N is
834 pragma Assert (Ekind (Id) = E_Block);
838 function Body_Entity (Id : E) return E is
840 pragma Assert (Is_Package_Or_Generic_Package (Id));
844 function Body_Needed_For_Inlining (Id : E) return B is
846 pragma Assert (Ekind (Id) = E_Package);
848 end Body_Needed_For_Inlining;
850 function Body_Needed_For_SAL (Id : E) return B is
853 (Ekind (Id) = E_Package
854 or else Is_Subprogram (Id)
855 or else Is_Generic_Unit (Id));
857 end Body_Needed_For_SAL;
859 function Body_References (Id : E) return L is
861 pragma Assert (Ekind (Id) = E_Abstract_State);
865 function BIP_Initialization_Call (Id : E) return N is
867 pragma Assert (Ekind (Id) in 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 (Id) in E_Record_Subtype | E_Class_Wide_Subtype);
905 function Component_Bit_Offset (Id : E) return U is
907 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
909 end Component_Bit_Offset;
911 function Component_Clause (Id : E) return N is
913 pragma Assert (Ekind (Id) in 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 (Id) in 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 (Is_Object (Id));
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
1125 (Is_Composite_Type (Id)
1126 and then (Has_Discriminants (Id) or else Is_Constrained (Id)));
1127 return Elist21 (Id);
1128 end Discriminant_Constraint;
1130 function Discriminant_Default_Value (Id : E) return N is
1132 pragma Assert (Ekind (Id) = E_Discriminant);
1134 end Discriminant_Default_Value;
1136 function Discriminant_Number (Id : E) return U is
1138 pragma Assert (Ekind (Id) = E_Discriminant);
1140 end Discriminant_Number;
1142 function Dispatch_Table_Wrappers (Id : E) return L is
1144 pragma Assert (Ekind (Id) in E_Record_Type | E_Record_Subtype);
1145 return Elist26 (Implementation_Base_Type (Id));
1146 end Dispatch_Table_Wrappers;
1148 function DT_Entry_Count (Id : E) return U is
1150 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1154 function DT_Offset_To_Top_Func (Id : E) return E is
1156 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1158 end DT_Offset_To_Top_Func;
1160 function DT_Position (Id : E) return U is
1162 pragma Assert (Ekind (Id) in E_Function | E_Procedure
1163 and then Present (DTC_Entity (Id)));
1167 function DTC_Entity (Id : E) return E is
1169 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
1173 function Elaborate_Body_Desirable (Id : E) return B is
1175 pragma Assert (Ekind (Id) = E_Package);
1176 return Flag210 (Id);
1177 end Elaborate_Body_Desirable;
1179 function Elaboration_Entity (Id : E) return E is
1184 Ekind (Id) in E_Entry | E_Entry_Family | E_Package
1186 Is_Generic_Unit (Id));
1188 end Elaboration_Entity;
1190 function Elaboration_Entity_Required (Id : E) return B is
1195 Ekind (Id) in E_Entry | E_Entry_Family | E_Package
1197 Is_Generic_Unit (Id));
1198 return Flag174 (Id);
1199 end Elaboration_Entity_Required;
1201 function Encapsulating_State (Id : E) return N is
1203 pragma Assert (Ekind (Id) in E_Abstract_State | E_Constant | E_Variable);
1205 end Encapsulating_State;
1207 function Enclosing_Scope (Id : E) return E is
1210 end Enclosing_Scope;
1212 function Entry_Accepted (Id : E) return B is
1214 pragma Assert (Is_Entry (Id));
1215 return Flag152 (Id);
1218 function Entry_Bodies_Array (Id : E) return E is
1221 end Entry_Bodies_Array;
1223 function Entry_Cancel_Parameter (Id : E) return E is
1226 end Entry_Cancel_Parameter;
1228 function Entry_Component (Id : E) return E is
1231 end Entry_Component;
1233 function Entry_Formal (Id : E) return E is
1238 function Entry_Index_Constant (Id : E) return N is
1240 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1242 end Entry_Index_Constant;
1244 function Entry_Max_Queue_Lengths_Array (Id : E) return N is
1246 pragma Assert (Ekind (Id) = E_Protected_Type);
1248 end Entry_Max_Queue_Lengths_Array;
1250 function Contains_Ignored_Ghost_Code (Id : E) return B is
1253 (Ekind (Id) in E_Block
1255 | E_Generic_Function
1257 | E_Generic_Procedure
1261 | E_Subprogram_Body);
1262 return Flag279 (Id);
1263 end Contains_Ignored_Ghost_Code;
1265 function Contract (Id : E) return N is
1268 (Ekind (Id) in E_Protected_Type -- concurrent types
1272 Ekind (Id) in E_Constant -- objects
1275 Ekind (Id) in E_Entry -- overloadable
1278 | E_Generic_Function
1279 | E_Generic_Procedure
1284 Ekind (Id) in E_Generic_Package -- packages
1288 Is_Type (Id) -- types
1290 Ekind (Id) = E_Void); -- special purpose
1294 function Contract_Wrapper (Id : E) return E is
1296 pragma Assert (Is_Entry (Id));
1298 end Contract_Wrapper;
1300 function Entry_Parameters_Type (Id : E) return E is
1303 end Entry_Parameters_Type;
1305 function Enum_Pos_To_Rep (Id : E) return E is
1307 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1309 end Enum_Pos_To_Rep;
1311 function Enumeration_Pos (Id : E) return Uint is
1313 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1315 end Enumeration_Pos;
1317 function Enumeration_Rep (Id : E) return U is
1319 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1321 end Enumeration_Rep;
1323 function Enumeration_Rep_Expr (Id : E) return N is
1325 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1327 end Enumeration_Rep_Expr;
1329 function Equivalent_Type (Id : E) return E is
1332 (Ekind (Id) in E_Class_Wide_Type
1333 | E_Class_Wide_Subtype
1334 | E_Access_Subprogram_Type
1335 | E_Access_Protected_Subprogram_Type
1336 | E_Anonymous_Access_Protected_Subprogram_Type
1337 | E_Exception_Type);
1339 end Equivalent_Type;
1341 function Esize (Id : E) return Uint is
1346 function Extra_Accessibility (Id : E) return E is
1349 (Is_Formal (Id) or else Ekind (Id) in E_Variable | E_Constant);
1351 end Extra_Accessibility;
1353 function Extra_Accessibility_Of_Result (Id : E) return E is
1356 (Ekind (Id) in E_Function | E_Operator | E_Subprogram_Type);
1358 end Extra_Accessibility_Of_Result;
1360 function Extra_Constrained (Id : E) return E is
1362 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1364 end Extra_Constrained;
1366 function Extra_Formal (Id : E) return E is
1371 function Extra_Formals (Id : E) return E is
1374 (Is_Overloadable (Id)
1375 or else Ekind (Id) in E_Entry_Family
1377 | E_Subprogram_Type);
1381 function Can_Use_Internal_Rep (Id : E) return B is
1383 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1384 return Flag229 (Base_Type (Id));
1385 end Can_Use_Internal_Rep;
1387 function Finalization_Master (Id : E) return E is
1389 pragma Assert (Is_Access_Type (Id));
1390 return Node23 (Root_Type (Id));
1391 end Finalization_Master;
1393 function Finalize_Storage_Only (Id : E) return B is
1395 pragma Assert (Is_Type (Id));
1396 return Flag158 (Base_Type (Id));
1397 end Finalize_Storage_Only;
1399 function Finalizer (Id : E) return E is
1401 pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
1405 function First_Entity (Id : E) return E is
1410 function First_Exit_Statement (Id : E) return N is
1412 pragma Assert (Ekind (Id) = E_Loop);
1414 end First_Exit_Statement;
1416 function First_Index (Id : E) return N is
1418 pragma Assert (Is_Array_Type (Id));
1422 function First_Literal (Id : E) return E is
1424 pragma Assert (Is_Enumeration_Type (Id));
1428 function First_Private_Entity (Id : E) return E is
1430 pragma Assert (Is_Package_Or_Generic_Package (Id)
1431 or else Is_Concurrent_Type (Id));
1433 end First_Private_Entity;
1435 function First_Rep_Item (Id : E) return E is
1440 function Freeze_Node (Id : E) return N is
1445 function From_Limited_With (Id : E) return B is
1447 return Flag159 (Id);
1448 end From_Limited_With;
1450 function Full_View (Id : E) return E is
1452 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1456 function Generic_Homonym (Id : E) return E is
1458 pragma Assert (Ekind (Id) = E_Generic_Package);
1460 end Generic_Homonym;
1462 function Generic_Renamings (Id : E) return L is
1464 return Elist23 (Id);
1465 end Generic_Renamings;
1467 function Handler_Records (Id : E) return S is
1470 end Handler_Records;
1472 function Has_Aliased_Components (Id : E) return B is
1474 return Flag135 (Implementation_Base_Type (Id));
1475 end Has_Aliased_Components;
1477 function Has_Alignment_Clause (Id : E) return B is
1480 end Has_Alignment_Clause;
1482 function Has_All_Calls_Remote (Id : E) return B is
1485 end Has_All_Calls_Remote;
1487 function Has_Atomic_Components (Id : E) return B is
1489 return Flag86 (Implementation_Base_Type (Id));
1490 end Has_Atomic_Components;
1492 function Has_Biased_Representation (Id : E) return B is
1494 return Flag139 (Id);
1495 end Has_Biased_Representation;
1497 function Has_Completion (Id : E) return B is
1502 function Has_Completion_In_Body (Id : E) return B is
1504 pragma Assert (Is_Type (Id));
1506 end Has_Completion_In_Body;
1508 function Has_Complex_Representation (Id : E) return B is
1510 pragma Assert (Is_Record_Type (Id));
1511 return Flag140 (Implementation_Base_Type (Id));
1512 end Has_Complex_Representation;
1514 function Has_Component_Size_Clause (Id : E) return B is
1516 pragma Assert (Is_Array_Type (Id));
1517 return Flag68 (Implementation_Base_Type (Id));
1518 end Has_Component_Size_Clause;
1520 function Has_Constrained_Partial_View (Id : E) return B is
1522 pragma Assert (Is_Type (Id));
1523 return Flag187 (Base_Type (Id));
1524 end Has_Constrained_Partial_View;
1526 function Has_Controlled_Component (Id : E) return B is
1528 return Flag43 (Base_Type (Id));
1529 end Has_Controlled_Component;
1531 function Has_Contiguous_Rep (Id : E) return B is
1533 return Flag181 (Id);
1534 end Has_Contiguous_Rep;
1536 function Has_Controlling_Result (Id : E) return B is
1539 end Has_Controlling_Result;
1541 function Has_Convention_Pragma (Id : E) return B is
1543 return Flag119 (Id);
1544 end Has_Convention_Pragma;
1546 function Has_Default_Aspect (Id : E) return B is
1548 return Flag39 (Base_Type (Id));
1549 end Has_Default_Aspect;
1551 function Has_Delayed_Aspects (Id : E) return B is
1553 pragma Assert (Nkind (Id) in N_Entity);
1554 return Flag200 (Id);
1555 end Has_Delayed_Aspects;
1557 function Has_Delayed_Freeze (Id : E) return B is
1559 pragma Assert (Nkind (Id) in N_Entity);
1561 end Has_Delayed_Freeze;
1563 function Has_Delayed_Rep_Aspects (Id : E) return B is
1565 pragma Assert (Nkind (Id) in N_Entity);
1566 return Flag261 (Id);
1567 end Has_Delayed_Rep_Aspects;
1569 function Has_Discriminants (Id : E) return B is
1571 pragma Assert (Is_Type (Id));
1573 end Has_Discriminants;
1575 function Has_Dispatch_Table (Id : E) return B is
1577 pragma Assert (Is_Tagged_Type (Id));
1578 return Flag220 (Id);
1579 end Has_Dispatch_Table;
1581 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1583 pragma Assert (Is_Type (Id));
1584 return Flag258 (Id);
1585 end Has_Dynamic_Predicate_Aspect;
1587 function Has_Enumeration_Rep_Clause (Id : E) return B is
1589 pragma Assert (Is_Enumeration_Type (Id));
1591 end Has_Enumeration_Rep_Clause;
1593 function Has_Exit (Id : E) return B is
1598 function Has_Expanded_Contract (Id : E) return B is
1600 pragma Assert (Is_Subprogram (Id));
1601 return Flag240 (Id);
1602 end Has_Expanded_Contract;
1604 function Has_Forward_Instantiation (Id : E) return B is
1606 return Flag175 (Id);
1607 end Has_Forward_Instantiation;
1609 function Has_Fully_Qualified_Name (Id : E) return B is
1611 return Flag173 (Id);
1612 end Has_Fully_Qualified_Name;
1614 function Has_Gigi_Rep_Item (Id : E) return B is
1617 end Has_Gigi_Rep_Item;
1619 function Has_Homonym (Id : E) return B is
1624 function Has_Implicit_Dereference (Id : E) return B is
1626 return Flag251 (Id);
1627 end Has_Implicit_Dereference;
1629 function Has_Independent_Components (Id : E) return B is
1631 return Flag34 (Implementation_Base_Type (Id));
1632 end Has_Independent_Components;
1634 function Has_Inheritable_Invariants (Id : E) return B is
1636 pragma Assert (Is_Type (Id));
1637 return Flag248 (Base_Type (Id));
1638 end Has_Inheritable_Invariants;
1640 function Has_Inherited_DIC (Id : E) return B is
1642 pragma Assert (Is_Type (Id));
1643 return Flag133 (Base_Type (Id));
1644 end Has_Inherited_DIC;
1646 function Has_Inherited_Invariants (Id : E) return B is
1648 pragma Assert (Is_Type (Id));
1649 return Flag291 (Base_Type (Id));
1650 end Has_Inherited_Invariants;
1652 function Has_Initial_Value (Id : E) return B is
1654 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1655 return Flag219 (Id);
1656 end Has_Initial_Value;
1658 function Has_Loop_Entry_Attributes (Id : E) return B is
1660 pragma Assert (Ekind (Id) = E_Loop);
1661 return Flag260 (Id);
1662 end Has_Loop_Entry_Attributes;
1664 function Has_Machine_Radix_Clause (Id : E) return B is
1666 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1668 end Has_Machine_Radix_Clause;
1670 function Has_Master_Entity (Id : E) return B is
1673 end Has_Master_Entity;
1675 function Has_Missing_Return (Id : E) return B is
1677 pragma Assert (Ekind (Id) in E_Function | E_Generic_Function);
1678 return Flag142 (Id);
1679 end Has_Missing_Return;
1681 function Has_Nested_Block_With_Handler (Id : E) return B is
1683 return Flag101 (Id);
1684 end Has_Nested_Block_With_Handler;
1686 function Has_Nested_Subprogram (Id : E) return B is
1688 pragma Assert (Is_Subprogram (Id));
1689 return Flag282 (Id);
1690 end Has_Nested_Subprogram;
1692 function Has_Non_Standard_Rep (Id : E) return B is
1694 return Flag75 (Implementation_Base_Type (Id));
1695 end Has_Non_Standard_Rep;
1697 function Has_Object_Size_Clause (Id : E) return B is
1699 pragma Assert (Is_Type (Id));
1700 return Flag172 (Id);
1701 end Has_Object_Size_Clause;
1703 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1706 (Is_Entry (Id) or else Is_Subprogram_Or_Generic_Subprogram (Id));
1707 return Flag110 (Id);
1708 end Has_Out_Or_In_Out_Parameter;
1710 function Has_Own_DIC (Id : E) return B is
1712 pragma Assert (Is_Type (Id));
1713 return Flag3 (Base_Type (Id));
1716 function Has_Own_Invariants (Id : E) return B is
1718 pragma Assert (Is_Type (Id));
1719 return Flag232 (Base_Type (Id));
1720 end Has_Own_Invariants;
1722 function Has_Partial_Visible_Refinement (Id : E) return B is
1724 pragma Assert (Ekind (Id) = E_Abstract_State);
1725 return Flag296 (Id);
1726 end Has_Partial_Visible_Refinement;
1728 function Has_Per_Object_Constraint (Id : E) return B is
1730 return Flag154 (Id);
1731 end Has_Per_Object_Constraint;
1733 function Has_Pragma_Controlled (Id : E) return B is
1735 pragma Assert (Is_Access_Type (Id));
1736 return Flag27 (Implementation_Base_Type (Id));
1737 end Has_Pragma_Controlled;
1739 function Has_Pragma_Elaborate_Body (Id : E) return B is
1741 return Flag150 (Id);
1742 end Has_Pragma_Elaborate_Body;
1744 function Has_Pragma_Inline (Id : E) return B is
1746 return Flag157 (Id);
1747 end Has_Pragma_Inline;
1749 function Has_Pragma_Inline_Always (Id : E) return B is
1751 return Flag230 (Id);
1752 end Has_Pragma_Inline_Always;
1754 function Has_Pragma_No_Inline (Id : E) return B is
1756 return Flag201 (Id);
1757 end Has_Pragma_No_Inline;
1759 function Has_Pragma_Ordered (Id : E) return B is
1761 pragma Assert (Is_Enumeration_Type (Id));
1762 return Flag198 (Implementation_Base_Type (Id));
1763 end Has_Pragma_Ordered;
1765 function Has_Pragma_Pack (Id : E) return B is
1767 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1768 return Flag121 (Implementation_Base_Type (Id));
1769 end Has_Pragma_Pack;
1771 function Has_Pragma_Preelab_Init (Id : E) return B is
1773 return Flag221 (Id);
1774 end Has_Pragma_Preelab_Init;
1776 function Has_Pragma_Pure (Id : E) return B is
1778 return Flag203 (Id);
1779 end Has_Pragma_Pure;
1781 function Has_Pragma_Pure_Function (Id : E) return B is
1783 return Flag179 (Id);
1784 end Has_Pragma_Pure_Function;
1786 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1788 return Flag169 (Id);
1789 end Has_Pragma_Thread_Local_Storage;
1791 function Has_Pragma_Unmodified (Id : E) return B is
1793 return Flag233 (Id);
1794 end Has_Pragma_Unmodified;
1796 function Has_Pragma_Unreferenced (Id : E) return B is
1798 return Flag180 (Id);
1799 end Has_Pragma_Unreferenced;
1801 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1803 pragma Assert (Is_Type (Id));
1804 return Flag212 (Id);
1805 end Has_Pragma_Unreferenced_Objects;
1807 function Has_Pragma_Unused (Id : E) return B is
1809 return Flag294 (Id);
1810 end Has_Pragma_Unused;
1812 function Has_Predicates (Id : E) return B is
1814 pragma Assert (Is_Type (Id));
1815 return Flag250 (Id);
1818 function Has_Primitive_Operations (Id : E) return B is
1820 pragma Assert (Is_Type (Id));
1821 return Flag120 (Base_Type (Id));
1822 end Has_Primitive_Operations;
1824 function Has_Private_Ancestor (Id : E) return B is
1826 return Flag151 (Id);
1827 end Has_Private_Ancestor;
1829 function Has_Private_Declaration (Id : E) return B is
1831 return Flag155 (Id);
1832 end Has_Private_Declaration;
1834 function Has_Private_Extension (Id : E) return B is
1836 pragma Assert (Is_Tagged_Type (Id));
1837 return Flag300 (Id);
1838 end Has_Private_Extension;
1840 function Has_Protected (Id : E) return B is
1842 return Flag271 (Base_Type (Id));
1845 function Has_Qualified_Name (Id : E) return B is
1847 return Flag161 (Id);
1848 end Has_Qualified_Name;
1850 function Has_RACW (Id : E) return B is
1852 pragma Assert (Ekind (Id) = E_Package);
1853 return Flag214 (Id);
1856 function Has_Record_Rep_Clause (Id : E) return B is
1858 pragma Assert (Is_Record_Type (Id));
1859 return Flag65 (Implementation_Base_Type (Id));
1860 end Has_Record_Rep_Clause;
1862 function Has_Recursive_Call (Id : E) return B is
1864 pragma Assert (Is_Subprogram (Id));
1865 return Flag143 (Id);
1866 end Has_Recursive_Call;
1868 function Has_Shift_Operator (Id : E) return B is
1870 pragma Assert (Is_Integer_Type (Id));
1871 return Flag267 (Base_Type (Id));
1872 end Has_Shift_Operator;
1874 function Has_Size_Clause (Id : E) return B is
1877 end Has_Size_Clause;
1879 function Has_Small_Clause (Id : E) return B is
1881 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
1883 end Has_Small_Clause;
1885 function Has_Specified_Layout (Id : E) return B is
1887 pragma Assert (Is_Type (Id));
1888 return Flag100 (Implementation_Base_Type (Id));
1889 end Has_Specified_Layout;
1891 function Has_Specified_Stream_Input (Id : E) return B is
1893 pragma Assert (Is_Type (Id));
1894 return Flag190 (Id);
1895 end Has_Specified_Stream_Input;
1897 function Has_Specified_Stream_Output (Id : E) return B is
1899 pragma Assert (Is_Type (Id));
1900 return Flag191 (Id);
1901 end Has_Specified_Stream_Output;
1903 function Has_Specified_Stream_Read (Id : E) return B is
1905 pragma Assert (Is_Type (Id));
1906 return Flag192 (Id);
1907 end Has_Specified_Stream_Read;
1909 function Has_Specified_Stream_Write (Id : E) return B is
1911 pragma Assert (Is_Type (Id));
1912 return Flag193 (Id);
1913 end Has_Specified_Stream_Write;
1915 function Has_Static_Discriminants (Id : E) return B is
1917 pragma Assert (Is_Type (Id));
1918 return Flag211 (Id);
1919 end Has_Static_Discriminants;
1921 function Has_Static_Predicate (Id : E) return B is
1923 pragma Assert (Is_Type (Id));
1924 return Flag269 (Id);
1925 end Has_Static_Predicate;
1927 function Has_Static_Predicate_Aspect (Id : E) return B is
1929 pragma Assert (Is_Type (Id));
1930 return Flag259 (Id);
1931 end Has_Static_Predicate_Aspect;
1933 function Has_Storage_Size_Clause (Id : E) return B is
1935 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1936 return Flag23 (Implementation_Base_Type (Id));
1937 end Has_Storage_Size_Clause;
1939 function Has_Stream_Size_Clause (Id : E) return B is
1941 return Flag184 (Id);
1942 end Has_Stream_Size_Clause;
1944 function Has_Task (Id : E) return B is
1946 return Flag30 (Base_Type (Id));
1949 function Has_Thunks (Id : E) return B is
1951 return Flag228 (Id);
1954 function Has_Timing_Event (Id : E) return B is
1956 return Flag289 (Base_Type (Id));
1957 end Has_Timing_Event;
1959 function Has_Unchecked_Union (Id : E) return B is
1961 return Flag123 (Base_Type (Id));
1962 end Has_Unchecked_Union;
1964 function Has_Unknown_Discriminants (Id : E) return B is
1966 pragma Assert (Is_Type (Id));
1968 end Has_Unknown_Discriminants;
1970 function Has_Visible_Refinement (Id : E) return B is
1972 pragma Assert (Ekind (Id) = E_Abstract_State);
1973 return Flag263 (Id);
1974 end Has_Visible_Refinement;
1976 function Has_Volatile_Components (Id : E) return B is
1978 return Flag87 (Implementation_Base_Type (Id));
1979 end Has_Volatile_Components;
1981 function Has_Xref_Entry (Id : E) return B is
1983 return Flag182 (Id);
1986 function Has_Yield_Aspect (Id : E) return B is
1988 return Flag308 (Id);
1989 end Has_Yield_Aspect;
1991 function Hiding_Loop_Variable (Id : E) return E is
1993 pragma Assert (Ekind (Id) = E_Variable);
1995 end Hiding_Loop_Variable;
1997 function Hidden_In_Formal_Instance (Id : E) return L is
1999 pragma Assert (Ekind (Id) = E_Package);
2000 return Elist30 (Id);
2001 end Hidden_In_Formal_Instance;
2003 function Homonym (Id : E) return E is
2008 function Ignore_SPARK_Mode_Pragmas (Id : E) return B is
2011 (Ekind (Id) in E_Protected_Body -- concurrent types
2016 Ekind (Id) in E_Entry -- overloadable
2019 | E_Generic_Function
2020 | E_Generic_Procedure
2025 Ekind (Id) in E_Generic_Package -- packages
2028 return Flag301 (Id);
2029 end Ignore_SPARK_Mode_Pragmas;
2031 function Import_Pragma (Id : E) return E is
2033 pragma Assert (Is_Subprogram (Id));
2037 function Incomplete_Actuals (Id : E) return L is
2039 pragma Assert (Ekind (Id) = E_Package);
2040 return Elist24 (Id);
2041 end Incomplete_Actuals;
2043 function Interface_Alias (Id : E) return E is
2045 pragma Assert (Is_Subprogram (Id));
2047 end Interface_Alias;
2049 function Interfaces (Id : E) return L is
2051 pragma Assert (Is_Record_Type (Id));
2052 return Elist25 (Id);
2055 function In_Package_Body (Id : E) return B is
2058 end In_Package_Body;
2060 function In_Private_Part (Id : E) return B is
2063 end In_Private_Part;
2065 function In_Use (Id : E) return B is
2067 pragma Assert (Nkind (Id) in N_Entity);
2071 function Initialization_Statements (Id : E) return N is
2073 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
2075 end Initialization_Statements;
2077 function Inner_Instances (Id : E) return L is
2079 return Elist23 (Id);
2080 end Inner_Instances;
2082 function Interface_Name (Id : E) return N is
2087 function Is_Abstract_Subprogram (Id : E) return B is
2089 pragma Assert (Is_Overloadable (Id));
2091 end Is_Abstract_Subprogram;
2093 function Is_Abstract_Type (Id : E) return B is
2095 pragma Assert (Is_Type (Id));
2096 return Flag146 (Id);
2097 end Is_Abstract_Type;
2099 function Is_Access_Constant (Id : E) return B is
2101 pragma Assert (Is_Access_Type (Id));
2103 end Is_Access_Constant;
2105 function Is_Activation_Record (Id : E) return B is
2107 pragma Assert (Ekind (Id) = E_In_Parameter);
2108 return Flag305 (Id);
2109 end Is_Activation_Record;
2111 function Is_Actual_Subtype (Id : E) return B is
2113 pragma Assert (Is_Type (Id));
2114 return Flag293 (Id);
2115 end Is_Actual_Subtype;
2117 function Is_Ada_2005_Only (Id : E) return B is
2119 return Flag185 (Id);
2120 end Is_Ada_2005_Only;
2122 function Is_Ada_2012_Only (Id : E) return B is
2124 return Flag199 (Id);
2125 end Is_Ada_2012_Only;
2127 function Is_Aliased (Id : E) return B is
2129 pragma Assert (Nkind (Id) in N_Entity);
2133 function Is_Asynchronous (Id : E) return B is
2135 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
2137 end Is_Asynchronous;
2139 function Is_Atomic (Id : E) return B is
2144 function Is_Bit_Packed_Array (Id : E) return B is
2146 return Flag122 (Implementation_Base_Type (Id));
2147 end Is_Bit_Packed_Array;
2149 function Is_Called (Id : E) return B is
2151 pragma Assert (Ekind (Id) in E_Procedure | E_Function | E_Package);
2152 return Flag102 (Id);
2155 function Is_Character_Type (Id : E) return B is
2158 end Is_Character_Type;
2160 function Is_Checked_Ghost_Entity (Id : E) return B is
2162 -- Allow this attribute to appear on unanalyzed entities
2164 pragma Assert (Nkind (Id) in N_Entity
2165 or else Ekind (Id) = E_Void);
2166 return Flag277 (Id);
2167 end Is_Checked_Ghost_Entity;
2169 function Is_Child_Unit (Id : E) return B is
2174 function Is_Class_Wide_Clone (Id : E) return B is
2176 return Flag290 (Id);
2177 end Is_Class_Wide_Clone;
2179 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2182 end Is_Class_Wide_Equivalent_Type;
2184 function Is_Compilation_Unit (Id : E) return B is
2186 return Flag149 (Id);
2187 end Is_Compilation_Unit;
2189 function Is_Completely_Hidden (Id : E) return B is
2191 pragma Assert (Ekind (Id) = E_Discriminant);
2192 return Flag103 (Id);
2193 end Is_Completely_Hidden;
2195 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2198 end Is_Constr_Subt_For_U_Nominal;
2200 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2202 return Flag141 (Id);
2203 end Is_Constr_Subt_For_UN_Aliased;
2205 function Is_Constrained (Id : E) return B is
2207 pragma Assert (Nkind (Id) in N_Entity);
2211 function Is_Constructor (Id : E) return B is
2216 function Is_Controlled_Active (Id : E) return B is
2218 return Flag42 (Base_Type (Id));
2219 end Is_Controlled_Active;
2221 function Is_Controlling_Formal (Id : E) return B is
2223 pragma Assert (Is_Formal (Id));
2225 end Is_Controlling_Formal;
2227 function Is_CPP_Class (Id : E) return B is
2232 function Is_CUDA_Kernel (Id : E) return B is
2234 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2235 return Flag118 (Id);
2238 function Is_DIC_Procedure (Id : E) return B is
2240 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2241 return Flag132 (Id);
2242 end Is_DIC_Procedure;
2244 function Is_Descendant_Of_Address (Id : E) return B is
2246 return Flag223 (Id);
2247 end Is_Descendant_Of_Address;
2249 function Is_Discrim_SO_Function (Id : E) return B is
2251 return Flag176 (Id);
2252 end Is_Discrim_SO_Function;
2254 function Is_Discriminant_Check_Function (Id : E) return B is
2256 return Flag264 (Id);
2257 end Is_Discriminant_Check_Function;
2259 function Is_Dispatch_Table_Entity (Id : E) return B is
2261 return Flag234 (Id);
2262 end Is_Dispatch_Table_Entity;
2264 function Is_Dispatching_Operation (Id : E) return B is
2266 pragma Assert (Nkind (Id) in N_Entity);
2268 end Is_Dispatching_Operation;
2270 function Is_Elaboration_Checks_OK_Id (Id : E) return B is
2272 pragma Assert (Is_Elaboration_Target (Id));
2273 return Flag148 (Id);
2274 end Is_Elaboration_Checks_OK_Id;
2276 function Is_Elaboration_Warnings_OK_Id (Id : E) return B is
2278 pragma Assert (Is_Elaboration_Target (Id) or else Ekind (Id) = E_Void);
2279 return Flag304 (Id);
2280 end Is_Elaboration_Warnings_OK_Id;
2282 function Is_Eliminated (Id : E) return B is
2284 return Flag124 (Id);
2287 function Is_Entry_Formal (Id : E) return B is
2290 end Is_Entry_Formal;
2292 function Is_Entry_Wrapper (Id : E) return B is
2294 return Flag297 (Id);
2295 end Is_Entry_Wrapper;
2297 function Is_Exception_Handler (Id : E) return B is
2299 pragma Assert (Ekind (Id) = E_Block);
2300 return Flag286 (Id);
2301 end Is_Exception_Handler;
2303 function Is_Exported (Id : E) return B is
2308 function Is_Finalized_Transient (Id : E) return B is
2310 pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
2311 return Flag252 (Id);
2312 end Is_Finalized_Transient;
2314 function Is_First_Subtype (Id : E) return B is
2317 end Is_First_Subtype;
2319 function Is_Formal_Subprogram (Id : E) return B is
2321 return Flag111 (Id);
2322 end Is_Formal_Subprogram;
2324 function Is_Frozen (Id : E) return B is
2329 function Is_Generic_Actual_Subprogram (Id : E) return B is
2331 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2332 return Flag274 (Id);
2333 end Is_Generic_Actual_Subprogram;
2335 function Is_Generic_Actual_Type (Id : E) return B is
2337 pragma Assert (Is_Type (Id));
2339 end Is_Generic_Actual_Type;
2341 function Is_Generic_Instance (Id : E) return B is
2343 return Flag130 (Id);
2344 end Is_Generic_Instance;
2346 function Is_Generic_Type (Id : E) return B is
2348 pragma Assert (Nkind (Id) in N_Entity);
2350 end Is_Generic_Type;
2352 function Is_Hidden (Id : E) return B is
2357 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2360 end Is_Hidden_Non_Overridden_Subpgm;
2362 function Is_Hidden_Open_Scope (Id : E) return B is
2364 return Flag171 (Id);
2365 end Is_Hidden_Open_Scope;
2367 function Is_Ignored_Ghost_Entity (Id : E) return B is
2369 -- Allow this attribute to appear on unanalyzed entities
2371 pragma Assert (Nkind (Id) in N_Entity
2372 or else Ekind (Id) = E_Void);
2373 return Flag278 (Id);
2374 end Is_Ignored_Ghost_Entity;
2376 function Is_Ignored_Transient (Id : E) return B is
2378 pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
2379 return Flag295 (Id);
2380 end Is_Ignored_Transient;
2382 function Is_Immediately_Visible (Id : E) return B is
2384 pragma Assert (Nkind (Id) in N_Entity);
2386 end Is_Immediately_Visible;
2388 function Is_Implementation_Defined (Id : E) return B is
2390 return Flag254 (Id);
2391 end Is_Implementation_Defined;
2393 function Is_Imported (Id : E) return B is
2398 function Is_Independent (Id : E) return B is
2400 return Flag268 (Id);
2403 function Is_Initial_Condition_Procedure (Id : E) return B is
2405 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2406 return Flag302 (Id);
2407 end Is_Initial_Condition_Procedure;
2409 function Is_Inlined (Id : E) return B is
2414 function Is_Inlined_Always (Id : E) return B is
2416 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2418 end Is_Inlined_Always;
2420 function Is_Interface (Id : E) return B is
2422 return Flag186 (Id);
2425 function Is_Instantiated (Id : E) return B is
2427 return Flag126 (Id);
2428 end Is_Instantiated;
2430 function Is_Internal (Id : E) return B is
2432 pragma Assert (Nkind (Id) in N_Entity);
2436 function Is_Interrupt_Handler (Id : E) return B is
2438 pragma Assert (Nkind (Id) in N_Entity);
2440 end Is_Interrupt_Handler;
2442 function Is_Intrinsic_Subprogram (Id : E) return B is
2445 end Is_Intrinsic_Subprogram;
2447 function Is_Invariant_Procedure (Id : E) return B is
2449 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2450 return Flag257 (Id);
2451 end Is_Invariant_Procedure;
2453 function Is_Itype (Id : E) return B is
2458 function Is_Known_Non_Null (Id : E) return B is
2461 end Is_Known_Non_Null;
2463 function Is_Known_Null (Id : E) return B is
2465 return Flag204 (Id);
2468 function Is_Known_Valid (Id : E) return B is
2470 return Flag170 (Id);
2473 function Is_Limited_Composite (Id : E) return B is
2475 return Flag106 (Id);
2476 end Is_Limited_Composite;
2478 function Is_Limited_Interface (Id : E) return B is
2480 return Flag197 (Id);
2481 end Is_Limited_Interface;
2483 function Is_Limited_Record (Id : E) return B is
2486 end Is_Limited_Record;
2488 function Is_Local_Anonymous_Access (Id : E) return B is
2490 pragma Assert (Is_Access_Type (Id));
2491 return Flag194 (Id);
2492 end Is_Local_Anonymous_Access;
2494 function Is_Loop_Parameter (Id : E) return B is
2496 return Flag307 (Id);
2497 end Is_Loop_Parameter;
2499 function Is_Machine_Code_Subprogram (Id : E) return B is
2501 pragma Assert (Is_Subprogram (Id));
2502 return Flag137 (Id);
2503 end Is_Machine_Code_Subprogram;
2505 function Is_Non_Static_Subtype (Id : E) return B is
2507 pragma Assert (Is_Type (Id));
2508 return Flag109 (Id);
2509 end Is_Non_Static_Subtype;
2511 function Is_Null_Init_Proc (Id : E) return B is
2513 pragma Assert (Ekind (Id) = E_Procedure);
2514 return Flag178 (Id);
2515 end Is_Null_Init_Proc;
2517 function Is_Obsolescent (Id : E) return B is
2519 return Flag153 (Id);
2522 function Is_Only_Out_Parameter (Id : E) return B is
2524 pragma Assert (Is_Formal (Id));
2525 return Flag226 (Id);
2526 end Is_Only_Out_Parameter;
2528 function Is_Package_Body_Entity (Id : E) return B is
2530 return Flag160 (Id);
2531 end Is_Package_Body_Entity;
2533 function Is_Packed (Id : E) return B is
2535 return Flag51 (Implementation_Base_Type (Id));
2538 function Is_Packed_Array_Impl_Type (Id : E) return B is
2540 return Flag138 (Id);
2541 end Is_Packed_Array_Impl_Type;
2543 function Is_Param_Block_Component_Type (Id : E) return B is
2545 pragma Assert (Is_Access_Type (Id));
2546 return Flag215 (Base_Type (Id));
2547 end Is_Param_Block_Component_Type;
2549 function Is_Partial_DIC_Procedure (Id : E) return B is
2550 Partial_DIC_Suffix : constant String := "Partial_DIC";
2551 DIC_Nam : constant String := Get_Name_String (Chars (Id));
2554 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2556 -- Instead of adding a new Entity_Id flag (which are in short supply),
2557 -- we test the form of the subprogram name. When the node field and flag
2558 -- situation is eased, this should be replaced with a flag. ???
2560 if DIC_Nam'Length > Partial_DIC_Suffix'Length
2563 (DIC_Nam'Last - Partial_DIC_Suffix'Length + 1 .. DIC_Nam'Last) =
2570 end Is_Partial_DIC_Procedure;
2572 function Is_Partial_Invariant_Procedure (Id : E) return B is
2574 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2575 return Flag292 (Id);
2576 end Is_Partial_Invariant_Procedure;
2578 function Is_Potentially_Use_Visible (Id : E) return B is
2580 pragma Assert (Nkind (Id) in N_Entity);
2582 end Is_Potentially_Use_Visible;
2584 function Is_Predicate_Function (Id : E) return B is
2586 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2587 return Flag255 (Id);
2588 end Is_Predicate_Function;
2590 function Is_Predicate_Function_M (Id : E) return B is
2592 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2593 return Flag256 (Id);
2594 end Is_Predicate_Function_M;
2596 function Is_Preelaborated (Id : E) return B is
2599 end Is_Preelaborated;
2601 function Is_Primitive (Id : E) return B is
2603 pragma Assert (Is_Overloadable (Id) or else Is_Generic_Subprogram (Id));
2604 return Flag218 (Id);
2607 function Is_Primitive_Wrapper (Id : E) return B is
2609 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2610 return Flag195 (Id);
2611 end Is_Primitive_Wrapper;
2613 function Is_Private_Composite (Id : E) return B is
2615 pragma Assert (Is_Type (Id));
2616 return Flag107 (Id);
2617 end Is_Private_Composite;
2619 function Is_Private_Descendant (Id : E) return B is
2622 end Is_Private_Descendant;
2624 function Is_Private_Primitive (Id : E) return B is
2626 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
2627 return Flag245 (Id);
2628 end Is_Private_Primitive;
2630 function Is_Public (Id : E) return B is
2632 pragma Assert (Nkind (Id) in N_Entity);
2636 function Is_Pure (Id : E) return B is
2641 function Is_Pure_Unit_Access_Type (Id : E) return B is
2643 pragma Assert (Is_Access_Type (Id));
2644 return Flag189 (Id);
2645 end Is_Pure_Unit_Access_Type;
2647 function Is_RACW_Stub_Type (Id : E) return B is
2649 pragma Assert (Is_Type (Id));
2650 return Flag244 (Id);
2651 end Is_RACW_Stub_Type;
2653 function Is_Raised (Id : E) return B is
2655 pragma Assert (Ekind (Id) = E_Exception);
2656 return Flag224 (Id);
2659 function Is_Remote_Call_Interface (Id : E) return B is
2662 end Is_Remote_Call_Interface;
2664 function Is_Remote_Types (Id : E) return B is
2667 end Is_Remote_Types;
2669 function Is_Renaming_Of_Object (Id : E) return B is
2671 return Flag112 (Id);
2672 end Is_Renaming_Of_Object;
2674 function Is_Return_Object (Id : E) return B is
2676 return Flag209 (Id);
2677 end Is_Return_Object;
2679 function Is_Safe_To_Reevaluate (Id : E) return B is
2681 return Flag249 (Id);
2682 end Is_Safe_To_Reevaluate;
2684 function Is_Shared_Passive (Id : E) return B is
2687 end Is_Shared_Passive;
2689 function Is_Static_Type (Id : E) return B is
2691 return Flag281 (Id);
2694 function Is_Statically_Allocated (Id : E) return B is
2697 end Is_Statically_Allocated;
2699 function Is_Tag (Id : E) return B is
2701 pragma Assert (Nkind (Id) in N_Entity);
2705 function Is_Tagged_Type (Id : E) return B is
2710 function Is_Thunk (Id : E) return B is
2712 return Flag225 (Id);
2715 function Is_Trivial_Subprogram (Id : E) return B is
2717 return Flag235 (Id);
2718 end Is_Trivial_Subprogram;
2720 function Is_True_Constant (Id : E) return B is
2722 return Flag163 (Id);
2723 end Is_True_Constant;
2725 function Is_Unchecked_Union (Id : E) return B is
2727 return Flag117 (Implementation_Base_Type (Id));
2728 end Is_Unchecked_Union;
2730 function Is_Underlying_Full_View (Id : E) return B is
2732 return Flag298 (Id);
2733 end Is_Underlying_Full_View;
2735 function Is_Underlying_Record_View (Id : E) return B is
2737 return Flag246 (Id);
2738 end Is_Underlying_Record_View;
2740 function Is_Unimplemented (Id : E) return B is
2742 return Flag284 (Id);
2743 end Is_Unimplemented;
2745 function Is_Unsigned_Type (Id : E) return B is
2747 pragma Assert (Is_Type (Id));
2748 return Flag144 (Id);
2749 end Is_Unsigned_Type;
2751 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2753 return Flag283 (Id);
2754 end Is_Uplevel_Referenced_Entity;
2756 function Is_Valued_Procedure (Id : E) return B is
2758 pragma Assert (Ekind (Id) = E_Procedure);
2759 return Flag127 (Id);
2760 end Is_Valued_Procedure;
2762 function Is_Visible_Formal (Id : E) return B is
2764 return Flag206 (Id);
2765 end Is_Visible_Formal;
2767 function Is_Visible_Lib_Unit (Id : E) return B is
2769 return Flag116 (Id);
2770 end Is_Visible_Lib_Unit;
2772 function Is_Volatile (Id : E) return B is
2774 pragma Assert (Nkind (Id) in N_Entity);
2776 if Is_Type (Id) then
2777 return Flag16 (Base_Type (Id));
2783 function Is_Volatile_Full_Access (Id : E) return B is
2785 return Flag285 (Id);
2786 end Is_Volatile_Full_Access;
2788 function Itype_Printed (Id : E) return B is
2790 pragma Assert (Is_Itype (Id));
2791 return Flag202 (Id);
2794 function Kill_Elaboration_Checks (Id : E) return B is
2797 end Kill_Elaboration_Checks;
2799 function Kill_Range_Checks (Id : E) return B is
2802 end Kill_Range_Checks;
2804 function Known_To_Have_Preelab_Init (Id : E) return B is
2806 pragma Assert (Is_Type (Id));
2807 return Flag207 (Id);
2808 end Known_To_Have_Preelab_Init;
2810 function Last_Aggregate_Assignment (Id : E) return N is
2812 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
2814 end Last_Aggregate_Assignment;
2816 function Last_Assignment (Id : E) return N is
2818 pragma Assert (Is_Assignable (Id));
2820 end Last_Assignment;
2822 function Last_Entity (Id : E) return E is
2827 function Limited_View (Id : E) return E is
2829 pragma Assert (Ekind (Id) = E_Package);
2833 function Linker_Section_Pragma (Id : E) return N is
2836 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
2838 end Linker_Section_Pragma;
2840 function Lit_Hash (Id : E) return E is
2842 pragma Assert (Is_Enumeration_Type (Id));
2846 function Lit_Indexes (Id : E) return E is
2848 pragma Assert (Is_Enumeration_Type (Id));
2852 function Lit_Strings (Id : E) return E is
2854 pragma Assert (Is_Enumeration_Type (Id));
2858 function Low_Bound_Tested (Id : E) return B is
2860 return Flag205 (Id);
2861 end Low_Bound_Tested;
2863 function Machine_Radix_10 (Id : E) return B is
2865 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2867 end Machine_Radix_10;
2869 function Master_Id (Id : E) return E is
2871 pragma Assert (Is_Access_Type (Id));
2875 function Materialize_Entity (Id : E) return B is
2877 return Flag168 (Id);
2878 end Materialize_Entity;
2880 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2882 return Flag262 (Id);
2883 end May_Inherit_Delayed_Rep_Aspects;
2885 function Mechanism (Id : E) return M is
2887 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2888 return UI_To_Int (Uint8 (Id));
2891 function Minimum_Accessibility (Id : E) return E is
2893 pragma Assert (Is_Formal (Id));
2895 end Minimum_Accessibility;
2897 function Modulus (Id : E) return Uint is
2899 pragma Assert (Is_Modular_Integer_Type (Id));
2900 return Uint17 (Base_Type (Id));
2903 function Must_Be_On_Byte_Boundary (Id : E) return B is
2905 pragma Assert (Is_Type (Id));
2906 return Flag183 (Id);
2907 end Must_Be_On_Byte_Boundary;
2909 function Must_Have_Preelab_Init (Id : E) return B is
2911 pragma Assert (Is_Type (Id));
2912 return Flag208 (Id);
2913 end Must_Have_Preelab_Init;
2915 function Needs_Activation_Record (Id : E) return B is
2917 return Flag306 (Id);
2918 end Needs_Activation_Record;
2920 function Needs_Debug_Info (Id : E) return B is
2922 return Flag147 (Id);
2923 end Needs_Debug_Info;
2925 function Needs_No_Actuals (Id : E) return B is
2928 (Is_Overloadable (Id)
2929 or else Ekind (Id) in E_Subprogram_Type | E_Entry_Family);
2931 end Needs_No_Actuals;
2933 function Never_Set_In_Source (Id : E) return B is
2935 return Flag115 (Id);
2936 end Never_Set_In_Source;
2938 function Next_Inlined_Subprogram (Id : E) return E is
2941 end Next_Inlined_Subprogram;
2943 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2945 pragma Assert (Is_Discrete_Type (Id));
2946 return Flag276 (Id);
2947 end No_Dynamic_Predicate_On_Actual;
2949 function No_Pool_Assigned (Id : E) return B is
2951 pragma Assert (Is_Access_Type (Id));
2952 return Flag131 (Root_Type (Id));
2953 end No_Pool_Assigned;
2955 function No_Predicate_On_Actual (Id : E) return Boolean is
2957 pragma Assert (Is_Discrete_Type (Id));
2958 return Flag275 (Id);
2959 end No_Predicate_On_Actual;
2961 function No_Reordering (Id : E) return B is
2963 pragma Assert (Is_Record_Type (Id));
2964 return Flag239 (Implementation_Base_Type (Id));
2967 function No_Return (Id : E) return B is
2969 return Flag113 (Id);
2972 function No_Strict_Aliasing (Id : E) return B is
2974 pragma Assert (Is_Access_Type (Id));
2975 return Flag136 (Base_Type (Id));
2976 end No_Strict_Aliasing;
2978 function No_Tagged_Streams_Pragma (Id : E) return N is
2980 pragma Assert (Is_Tagged_Type (Id));
2982 end No_Tagged_Streams_Pragma;
2984 function Non_Binary_Modulus (Id : E) return B is
2986 pragma Assert (Is_Type (Id));
2987 return Flag58 (Base_Type (Id));
2988 end Non_Binary_Modulus;
2990 function Non_Limited_View (Id : E) return E is
2993 (Ekind (Id) in Incomplete_Kind
2995 Ekind (Id) in Class_Wide_Kind
2997 Ekind (Id) = E_Abstract_State);
2999 end Non_Limited_View;
3001 function Nonzero_Is_True (Id : E) return B is
3003 pragma Assert (Root_Type (Id) = Standard_Boolean);
3004 return Flag162 (Base_Type (Id));
3005 end Nonzero_Is_True;
3007 function Normalized_First_Bit (Id : E) return U is
3009 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
3011 end Normalized_First_Bit;
3013 function Normalized_Position (Id : E) return U is
3015 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
3017 end Normalized_Position;
3019 function Normalized_Position_Max (Id : E) return U is
3021 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
3023 end Normalized_Position_Max;
3025 function OK_To_Rename (Id : E) return B is
3027 pragma Assert (Ekind (Id) = E_Variable);
3028 return Flag247 (Id);
3031 function Optimize_Alignment_Space (Id : E) return B is
3034 (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
3035 return Flag241 (Id);
3036 end Optimize_Alignment_Space;
3038 function Optimize_Alignment_Time (Id : E) return B is
3041 (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
3042 return Flag242 (Id);
3043 end Optimize_Alignment_Time;
3045 function Original_Access_Type (Id : E) return E is
3047 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
3049 end Original_Access_Type;
3051 function Original_Array_Type (Id : E) return E is
3053 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
3055 end Original_Array_Type;
3057 function Original_Protected_Subprogram (Id : E) return N is
3060 end Original_Protected_Subprogram;
3062 function Original_Record_Component (Id : E) return E is
3064 pragma Assert (Ekind (Id) in E_Void | E_Component | E_Discriminant);
3066 end Original_Record_Component;
3068 function Overlays_Constant (Id : E) return B is
3070 return Flag243 (Id);
3071 end Overlays_Constant;
3073 function Overridden_Operation (Id : E) return E is
3075 pragma Assert (Is_Subprogram_Or_Generic_Subprogram (Id));
3077 end Overridden_Operation;
3079 function Package_Instantiation (Id : E) return N is
3081 pragma Assert (Is_Package_Or_Generic_Package (Id));
3083 end Package_Instantiation;
3085 function Packed_Array_Impl_Type (Id : E) return E is
3087 pragma Assert (Is_Array_Type (Id));
3089 end Packed_Array_Impl_Type;
3091 function Parent_Subtype (Id : E) return E is
3093 pragma Assert (Is_Record_Type (Id));
3094 return Node19 (Base_Type (Id));
3097 function Part_Of_Constituents (Id : E) return L is
3099 pragma Assert (Ekind (Id) in E_Abstract_State | E_Variable);
3100 return Elist10 (Id);
3101 end Part_Of_Constituents;
3103 function Part_Of_References (Id : E) return L is
3105 pragma Assert (Ekind (Id) = E_Variable);
3106 return Elist11 (Id);
3107 end Part_Of_References;
3109 function Partial_View_Has_Unknown_Discr (Id : E) return B is
3111 pragma Assert (Is_Type (Id));
3112 return Flag280 (Id);
3113 end Partial_View_Has_Unknown_Discr;
3115 function Pending_Access_Types (Id : E) return L is
3117 pragma Assert (Is_Type (Id));
3118 return Elist15 (Id);
3119 end Pending_Access_Types;
3121 function Postconditions_Proc (Id : E) return E is
3124 (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
3126 end Postconditions_Proc;
3128 function Predicated_Parent (Id : E) return E is
3131 (Ekind (Id) in E_Array_Subtype |
3133 E_Record_Subtype_With_Private);
3135 end Predicated_Parent;
3137 function Predicates_Ignored (Id : E) return B is
3139 pragma Assert (Is_Type (Id));
3140 return Flag288 (Id);
3141 end Predicates_Ignored;
3143 function Prev_Entity (Id : E) return E is
3148 function Prival (Id : E) return E is
3150 pragma Assert (Is_Protected_Component (Id));
3154 function Prival_Link (Id : E) return E is
3156 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
3160 function Private_Dependents (Id : E) return L is
3162 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
3163 return Elist18 (Id);
3164 end Private_Dependents;
3166 function Protected_Body_Subprogram (Id : E) return E is
3168 pragma Assert (Is_Subprogram_Or_Entry (Id));
3170 end Protected_Body_Subprogram;
3172 function Protected_Formal (Id : E) return E is
3174 pragma Assert (Is_Formal (Id));
3176 end Protected_Formal;
3178 function Protected_Subprogram (Id : E) return N is
3180 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
3182 end Protected_Subprogram;
3184 function Protection_Object (Id : E) return E is
3187 (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
3189 end Protection_Object;
3191 function Reachable (Id : E) return B is
3196 function Receiving_Entry (Id : E) return E is
3198 pragma Assert (Ekind (Id) = E_Procedure);
3200 end Receiving_Entry;
3202 function Referenced (Id : E) return B is
3204 return Flag156 (Id);
3207 function Referenced_As_LHS (Id : E) return B is
3210 end Referenced_As_LHS;
3212 function Referenced_As_Out_Parameter (Id : E) return B is
3214 return Flag227 (Id);
3215 end Referenced_As_Out_Parameter;
3217 function Refinement_Constituents (Id : E) return L is
3219 pragma Assert (Ekind (Id) = E_Abstract_State);
3221 end Refinement_Constituents;
3223 function Register_Exception_Call (Id : E) return N is
3225 pragma Assert (Ekind (Id) = E_Exception);
3227 end Register_Exception_Call;
3229 function Related_Array_Object (Id : E) return E is
3231 pragma Assert (Is_Array_Type (Id));
3233 end Related_Array_Object;
3235 function Related_Expression (Id : E) return N is
3238 (Ekind (Id) in Type_Kind | E_Constant | E_Variable | E_Function);
3240 end Related_Expression;
3242 function Related_Instance (Id : E) return E is
3244 pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
3246 end Related_Instance;
3248 function Related_Type (Id : E) return E is
3250 pragma Assert (Ekind (Id) in E_Component | E_Constant | E_Variable);
3254 function Relative_Deadline_Variable (Id : E) return E is
3256 pragma Assert (Is_Task_Type (Id));
3257 return Node28 (Implementation_Base_Type (Id));
3258 end Relative_Deadline_Variable;
3260 function Renamed_Entity (Id : E) return N is
3265 function Renamed_In_Spec (Id : E) return B is
3267 pragma Assert (Ekind (Id) = E_Package);
3268 return Flag231 (Id);
3269 end Renamed_In_Spec;
3271 function Renamed_Object (Id : E) return N is
3276 function Renaming_Map (Id : E) return U is
3281 function Requires_Overriding (Id : E) return B is
3283 pragma Assert (Is_Overloadable (Id));
3284 return Flag213 (Id);
3285 end Requires_Overriding;
3287 function Return_Present (Id : E) return B is
3292 function Return_Applies_To (Id : E) return N is
3295 end Return_Applies_To;
3297 function Returns_By_Ref (Id : E) return B is
3302 function Reverse_Bit_Order (Id : E) return B is
3304 pragma Assert (Is_Record_Type (Id));
3305 return Flag164 (Base_Type (Id));
3306 end Reverse_Bit_Order;
3308 function Reverse_Storage_Order (Id : E) return B is
3310 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3311 return Flag93 (Base_Type (Id));
3312 end Reverse_Storage_Order;
3314 function Rewritten_For_C (Id : E) return B is
3316 pragma Assert (Ekind (Id) = E_Function);
3317 return Flag287 (Id);
3318 end Rewritten_For_C;
3320 function RM_Size (Id : E) return U is
3322 pragma Assert (Is_Type (Id));
3326 function Scalar_Range (Id : E) return N is
3331 function Scale_Value (Id : E) return U is
3336 function Scope_Depth_Value (Id : E) return U is
3340 Concurrent_Kind | Entry_Kind | Generic_Unit_Kind |
3341 E_Package | E_Package_Body | Subprogram_Kind |
3342 E_Block | E_Subprogram_Body |
3343 E_Private_Type .. E_Limited_Private_Subtype |
3344 E_Void | E_Loop | E_Return_Statement);
3346 end Scope_Depth_Value;
3348 function Sec_Stack_Needed_For_Return (Id : E) return B is
3350 return Flag167 (Id);
3351 end Sec_Stack_Needed_For_Return;
3353 function Shared_Var_Procs_Instance (Id : E) return E is
3355 pragma Assert (Ekind (Id) = E_Variable);
3357 end Shared_Var_Procs_Instance;
3359 function Size_Check_Code (Id : E) return N is
3361 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
3363 end Size_Check_Code;
3365 function Size_Depends_On_Discriminant (Id : E) return B is
3367 return Flag177 (Id);
3368 end Size_Depends_On_Discriminant;
3370 function Size_Known_At_Compile_Time (Id : E) return B is
3373 end Size_Known_At_Compile_Time;
3375 function Small_Value (Id : E) return R is
3377 pragma Assert (Is_Fixed_Point_Type (Id));
3378 return Ureal21 (Id);
3381 function SPARK_Aux_Pragma (Id : E) return N is
3384 (Ekind (Id) in E_Protected_Type -- concurrent types
3387 Ekind (Id) in E_Generic_Package -- packages
3391 end SPARK_Aux_Pragma;
3393 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3396 (Ekind (Id) in E_Protected_Type -- concurrent types
3399 Ekind (Id) in E_Generic_Package -- packages
3402 return Flag266 (Id);
3403 end SPARK_Aux_Pragma_Inherited;
3405 function SPARK_Pragma (Id : E) return N is
3408 (Ekind (Id) in E_Constant -- objects
3411 Ekind (Id) in E_Abstract_State -- overloadable
3415 | E_Generic_Function
3416 | E_Generic_Procedure
3421 Ekind (Id) in E_Generic_Package -- packages
3425 Ekind (Id) = E_Void -- special purpose
3427 Ekind (Id) in E_Protected_Body -- types
3434 function SPARK_Pragma_Inherited (Id : E) return B is
3437 (Ekind (Id) in E_Constant -- objects
3440 Ekind (Id) in E_Abstract_State -- overloadable
3444 | E_Generic_Function
3445 | E_Generic_Procedure
3450 Ekind (Id) in E_Generic_Package -- packages
3454 Ekind (Id) = E_Void -- special purpose
3456 Ekind (Id) in E_Protected_Body -- types
3460 return Flag265 (Id);
3461 end SPARK_Pragma_Inherited;
3463 function Spec_Entity (Id : E) return E is
3465 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3469 function SSO_Set_High_By_Default (Id : E) return B is
3471 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3472 return Flag273 (Base_Type (Id));
3473 end SSO_Set_High_By_Default;
3475 function SSO_Set_Low_By_Default (Id : E) return B is
3477 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3478 return Flag272 (Base_Type (Id));
3479 end SSO_Set_Low_By_Default;
3481 function Static_Discrete_Predicate (Id : E) return S is
3483 pragma Assert (Is_Discrete_Type (Id));
3485 end Static_Discrete_Predicate;
3487 function Static_Real_Or_String_Predicate (Id : E) return N is
3489 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3491 end Static_Real_Or_String_Predicate;
3493 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3496 (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
3498 end Status_Flag_Or_Transient_Decl;
3500 function Storage_Size_Variable (Id : E) return E is
3502 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3503 return Node26 (Implementation_Base_Type (Id));
3504 end Storage_Size_Variable;
3506 function Static_Elaboration_Desired (Id : E) return B is
3508 pragma Assert (Ekind (Id) = E_Package);
3510 end Static_Elaboration_Desired;
3512 function Static_Initialization (Id : E) return N is
3515 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3517 end Static_Initialization;
3519 function Stored_Constraint (Id : E) return L is
3522 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3523 return Elist23 (Id);
3524 end Stored_Constraint;
3526 function Stores_Attribute_Old_Prefix (Id : E) return B is
3528 return Flag270 (Id);
3529 end Stores_Attribute_Old_Prefix;
3531 function Strict_Alignment (Id : E) return B is
3533 return Flag145 (Implementation_Base_Type (Id));
3534 end Strict_Alignment;
3536 function String_Literal_Length (Id : E) return U is
3539 end String_Literal_Length;
3541 function String_Literal_Low_Bound (Id : E) return N is
3544 end String_Literal_Low_Bound;
3546 function Subprograms_For_Type (Id : E) return L is
3548 pragma Assert (Is_Type (Id));
3549 return Elist29 (Id);
3550 end Subprograms_For_Type;
3552 function Subps_Index (Id : E) return U is
3554 pragma Assert (Is_Subprogram (Id));
3558 function Suppress_Elaboration_Warnings (Id : E) return B is
3560 return Flag303 (Id);
3561 end Suppress_Elaboration_Warnings;
3563 function Suppress_Initialization (Id : E) return B is
3565 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3566 return Flag105 (Id);
3567 end Suppress_Initialization;
3569 function Suppress_Style_Checks (Id : E) return B is
3571 return Flag165 (Id);
3572 end Suppress_Style_Checks;
3574 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3576 return Flag217 (Id);
3577 end Suppress_Value_Tracking_On_Call;
3579 function Task_Body_Procedure (Id : E) return N is
3581 pragma Assert (Ekind (Id) in Task_Kind);
3583 end Task_Body_Procedure;
3585 function Thunk_Entity (Id : E) return E is
3587 pragma Assert (Ekind (Id) in E_Function | E_Procedure
3588 and then Is_Thunk (Id));
3592 function Treat_As_Volatile (Id : E) return B is
3595 end Treat_As_Volatile;
3597 function Underlying_Full_View (Id : E) return E is
3599 pragma Assert (Ekind (Id) in Private_Kind);
3601 end Underlying_Full_View;
3603 function Underlying_Record_View (Id : E) return E is
3606 end Underlying_Record_View;
3608 function Universal_Aliasing (Id : E) return B is
3610 pragma Assert (Is_Type (Id));
3611 return Flag216 (Implementation_Base_Type (Id));
3612 end Universal_Aliasing;
3614 function Unset_Reference (Id : E) return N is
3617 end Unset_Reference;
3619 function Used_As_Generic_Actual (Id : E) return B is
3621 return Flag222 (Id);
3622 end Used_As_Generic_Actual;
3624 function Uses_Lock_Free (Id : E) return B is
3626 pragma Assert (Is_Protected_Type (Id));
3627 return Flag188 (Id);
3630 function Uses_Sec_Stack (Id : E) return B is
3635 function Validated_Object (Id : E) return N is
3637 pragma Assert (Ekind (Id) = E_Variable);
3639 end Validated_Object;
3641 function Warnings_Off (Id : E) return B is
3646 function Warnings_Off_Used (Id : E) return B is
3648 return Flag236 (Id);
3649 end Warnings_Off_Used;
3651 function Warnings_Off_Used_Unmodified (Id : E) return B is
3653 return Flag237 (Id);
3654 end Warnings_Off_Used_Unmodified;
3656 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3658 return Flag238 (Id);
3659 end Warnings_Off_Used_Unreferenced;
3661 function Was_Hidden (Id : E) return B is
3663 return Flag196 (Id);
3666 function Wrapped_Entity (Id : E) return E is
3668 pragma Assert (Ekind (Id) in E_Function | E_Procedure
3669 and then Is_Primitive_Wrapper (Id));
3673 ------------------------------
3674 -- Classification Functions --
3675 ------------------------------
3677 function Is_Access_Object_Type (Id : E) return B is
3679 return Is_Access_Type (Id) and then not Is_Access_Subprogram_Type (Id);
3680 end Is_Access_Object_Type;
3682 function Is_Access_Type (Id : E) return B is
3684 return Ekind (Id) in Access_Kind;
3687 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3689 return Ekind (Id) in Access_Protected_Kind;
3690 end Is_Access_Protected_Subprogram_Type;
3692 function Is_Access_Subprogram_Type (Id : E) return B is
3694 return Ekind (Id) in Access_Subprogram_Kind;
3695 end Is_Access_Subprogram_Type;
3697 function Is_Aggregate_Type (Id : E) return B is
3699 return Ekind (Id) in Aggregate_Kind;
3700 end Is_Aggregate_Type;
3702 function Is_Anonymous_Access_Type (Id : E) return B is
3704 return Ekind (Id) in Anonymous_Access_Kind;
3705 end Is_Anonymous_Access_Type;
3707 function Is_Array_Type (Id : E) return B is
3709 return Ekind (Id) in Array_Kind;
3712 function Is_Assignable (Id : E) return B is
3714 return Ekind (Id) in Assignable_Kind;
3717 function Is_Class_Wide_Type (Id : E) return B is
3719 return Ekind (Id) in Class_Wide_Kind;
3720 end Is_Class_Wide_Type;
3722 function Is_Composite_Type (Id : E) return B is
3724 return Ekind (Id) in Composite_Kind;
3725 end Is_Composite_Type;
3727 function Is_Concurrent_Body (Id : E) return B is
3729 return Ekind (Id) in Concurrent_Body_Kind;
3730 end Is_Concurrent_Body;
3732 function Is_Concurrent_Record_Type (Id : E) return B is
3735 end Is_Concurrent_Record_Type;
3737 function Is_Concurrent_Type (Id : E) return B is
3739 return Ekind (Id) in Concurrent_Kind;
3740 end Is_Concurrent_Type;
3742 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3744 return Ekind (Id) in Decimal_Fixed_Point_Kind;
3745 end Is_Decimal_Fixed_Point_Type;
3747 function Is_Digits_Type (Id : E) return B is
3749 return Ekind (Id) in Digits_Kind;
3752 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3754 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3755 end Is_Discrete_Or_Fixed_Point_Type;
3757 function Is_Discrete_Type (Id : E) return B is
3759 return Ekind (Id) in Discrete_Kind;
3760 end Is_Discrete_Type;
3762 function Is_Elementary_Type (Id : E) return B is
3764 return Ekind (Id) in Elementary_Kind;
3765 end Is_Elementary_Type;
3767 function Is_Entry (Id : E) return B is
3769 return Ekind (Id) in Entry_Kind;
3772 function Is_Enumeration_Type (Id : E) return B is
3774 return Ekind (Id) in Enumeration_Kind;
3775 end Is_Enumeration_Type;
3777 function Is_Fixed_Point_Type (Id : E) return B is
3779 return Ekind (Id) in Fixed_Point_Kind;
3780 end Is_Fixed_Point_Type;
3782 function Is_Floating_Point_Type (Id : E) return B is
3784 return Ekind (Id) in Float_Kind;
3785 end Is_Floating_Point_Type;
3787 function Is_Formal (Id : E) return B is
3789 return Ekind (Id) in Formal_Kind;
3792 function Is_Formal_Object (Id : E) return B is
3794 return Ekind (Id) in Formal_Object_Kind;
3795 end Is_Formal_Object;
3797 function Is_Generic_Subprogram (Id : E) return B is
3799 return Ekind (Id) in Generic_Subprogram_Kind;
3800 end Is_Generic_Subprogram;
3802 function Is_Generic_Unit (Id : E) return B is
3804 return Ekind (Id) in Generic_Unit_Kind;
3805 end Is_Generic_Unit;
3807 function Is_Ghost_Entity (Id : Entity_Id) return Boolean is
3809 return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id);
3810 end Is_Ghost_Entity;
3812 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3814 return Ekind (Id) in Incomplete_Or_Private_Kind;
3815 end Is_Incomplete_Or_Private_Type;
3817 function Is_Incomplete_Type (Id : E) return B is
3819 return Ekind (Id) in Incomplete_Kind;
3820 end Is_Incomplete_Type;
3822 function Is_Integer_Type (Id : E) return B is
3824 return Ekind (Id) in Integer_Kind;
3825 end Is_Integer_Type;
3827 function Is_Modular_Integer_Type (Id : E) return B is
3829 return Ekind (Id) in Modular_Integer_Kind;
3830 end Is_Modular_Integer_Type;
3832 function Is_Named_Access_Type (Id : E) return B is
3834 return Ekind (Id) in E_Access_Type ..
3835 E_Access_Protected_Subprogram_Type;
3836 end Is_Named_Access_Type;
3838 function Is_Named_Number (Id : E) return B is
3840 return Ekind (Id) in Named_Kind;
3841 end Is_Named_Number;
3843 function Is_Numeric_Type (Id : E) return B is
3845 return Ekind (Id) in Numeric_Kind;
3846 end Is_Numeric_Type;
3848 function Is_Object (Id : E) return B is
3850 return Ekind (Id) in Object_Kind;
3853 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3855 return Ekind (Id) in Ordinary_Fixed_Point_Kind;
3856 end Is_Ordinary_Fixed_Point_Type;
3858 function Is_Overloadable (Id : E) return B is
3860 return Ekind (Id) in Overloadable_Kind;
3861 end Is_Overloadable;
3863 function Is_Private_Type (Id : E) return B is
3865 return Ekind (Id) in Private_Kind;
3866 end Is_Private_Type;
3868 function Is_Protected_Type (Id : E) return B is
3870 return Ekind (Id) in Protected_Kind;
3871 end Is_Protected_Type;
3873 function Is_Real_Type (Id : E) return B is
3875 return Ekind (Id) in Real_Kind;
3878 function Is_Record_Type (Id : E) return B is
3880 return Ekind (Id) in Record_Kind;
3883 function Is_Scalar_Type (Id : E) return B is
3885 return Ekind (Id) in Scalar_Kind;
3888 function Is_Signed_Integer_Type (Id : E) return B is
3890 return Ekind (Id) in Signed_Integer_Kind;
3891 end Is_Signed_Integer_Type;
3893 function Is_Subprogram (Id : E) return B is
3895 return Ekind (Id) in Subprogram_Kind;
3898 function Is_Subprogram_Or_Entry (Id : E) return B is
3900 return Ekind (Id) in Subprogram_Kind
3902 Ekind (Id) in Entry_Kind;
3903 end Is_Subprogram_Or_Entry;
3905 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3907 return Ekind (Id) in Subprogram_Kind
3909 Ekind (Id) in Generic_Subprogram_Kind;
3910 end Is_Subprogram_Or_Generic_Subprogram;
3912 function Is_Task_Type (Id : E) return B is
3914 return Ekind (Id) in Task_Kind;
3917 function Is_Type (Id : E) return B is
3919 return Ekind (Id) in Type_Kind;
3922 ------------------------------
3923 -- Attribute Set Procedures --
3924 ------------------------------
3926 -- Note: in many of these set procedures an "obvious" assertion is missing.
3927 -- The reason for this is that in many cases, a field is set before the
3928 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3929 -- it is possible to add assertions that specifically include the E_Void
3930 -- possibility, but in some cases, we just omit the assertions.
3932 procedure Set_Abstract_States (Id : E; V : L) is
3934 pragma Assert (Is_Package_Or_Generic_Package (Id));
3935 Set_Elist25 (Id, V);
3936 end Set_Abstract_States;
3938 procedure Set_Accept_Address (Id : E; V : L) is
3940 Set_Elist21 (Id, V);
3941 end Set_Accept_Address;
3943 procedure Set_Access_Disp_Table (Id : E; V : L) is
3945 pragma Assert (Ekind (Id) = E_Record_Type
3946 and then Id = Implementation_Base_Type (Id));
3947 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3948 Set_Elist16 (Id, V);
3949 end Set_Access_Disp_Table;
3951 procedure Set_Access_Disp_Table_Elab_Flag (Id : E; V : E) is
3953 pragma Assert (Ekind (Id) = E_Record_Type
3954 and then Id = Implementation_Base_Type (Id));
3955 pragma Assert (Is_Tagged_Type (Id));
3957 end Set_Access_Disp_Table_Elab_Flag;
3959 procedure Set_Access_Subprogram_Wrapper (Id : E; V : E) is
3961 pragma Assert (Ekind (Id) = E_Subprogram_Type);
3963 end Set_Access_Subprogram_Wrapper;
3965 procedure Set_Anonymous_Designated_Type (Id : E; V : E) is
3967 pragma Assert (Ekind (Id) = E_Variable);
3969 end Set_Anonymous_Designated_Type;
3971 procedure Set_Anonymous_Masters (Id : E; V : L) is
3975 in E_Function | E_Package | E_Procedure | E_Subprogram_Body);
3976 Set_Elist29 (Id, V);
3977 end Set_Anonymous_Masters;
3979 procedure Set_Anonymous_Object (Id : E; V : E) is
3981 pragma Assert (Ekind (Id) in E_Protected_Type | E_Task_Type);
3983 end Set_Anonymous_Object;
3985 procedure Set_Associated_Entity (Id : E; V : E) is
3988 end Set_Associated_Entity;
3990 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3993 end Set_Associated_Formal_Package;
3995 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3998 end Set_Associated_Node_For_Itype;
4000 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
4002 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4004 end Set_Associated_Storage_Pool;
4006 procedure Set_Activation_Record_Component (Id : E; V : E) is
4009 (Ekind (Id) in E_Constant
4011 | E_In_Out_Parameter
4016 end Set_Activation_Record_Component;
4018 procedure Set_Actual_Subtype (Id : E; V : E) is
4021 (Ekind (Id) in E_Constant | E_Variable | E_Generic_In_Out_Parameter
4022 or else Is_Formal (Id));
4024 end Set_Actual_Subtype;
4026 procedure Set_Address_Taken (Id : E; V : B := True) is
4028 Set_Flag104 (Id, V);
4029 end Set_Address_Taken;
4031 procedure Set_Alias (Id : E; V : E) is
4034 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
4038 procedure Set_Alignment (Id : E; V : U) is
4040 pragma Assert (Is_Type (Id)
4041 or else Is_Formal (Id)
4042 or else Ekind (Id) in E_Loop_Parameter
4049 procedure Set_Barrier_Function (Id : E; V : N) is
4051 pragma Assert (Is_Entry (Id));
4053 end Set_Barrier_Function;
4055 procedure Set_Block_Node (Id : E; V : N) is
4057 pragma Assert (Ekind (Id) = E_Block);
4061 procedure Set_Body_Entity (Id : E; V : E) is
4063 pragma Assert (Is_Package_Or_Generic_Package (Id));
4065 end Set_Body_Entity;
4067 procedure Set_Body_Needed_For_Inlining (Id : E; V : B := True) is
4069 pragma Assert (Ekind (Id) = E_Package);
4070 Set_Flag299 (Id, V);
4071 end Set_Body_Needed_For_Inlining;
4073 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
4076 (Ekind (Id) = E_Package
4077 or else Is_Subprogram (Id)
4078 or else Is_Generic_Unit (Id));
4080 end Set_Body_Needed_For_SAL;
4082 procedure Set_Body_References (Id : E; V : L) is
4084 pragma Assert (Ekind (Id) = E_Abstract_State);
4085 Set_Elist16 (Id, V);
4086 end Set_Body_References;
4088 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
4090 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
4092 end Set_BIP_Initialization_Call;
4094 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
4096 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4097 Set_Flag125 (Id, V);
4098 end Set_C_Pass_By_Copy;
4100 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
4103 end Set_Can_Never_Be_Null;
4105 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
4108 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
4109 Set_Flag229 (Id, V);
4110 end Set_Can_Use_Internal_Rep;
4112 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
4115 end Set_Checks_May_Be_Suppressed;
4117 procedure Set_Class_Wide_Clone (Id : E; V : E) is
4119 pragma Assert (Is_Subprogram (Id));
4121 end Set_Class_Wide_Clone;
4123 procedure Set_Class_Wide_Type (Id : E; V : E) is
4125 pragma Assert (Is_Type (Id));
4127 end Set_Class_Wide_Type;
4129 procedure Set_Cloned_Subtype (Id : E; V : E) is
4131 pragma Assert (Ekind (Id) in E_Record_Subtype | E_Class_Wide_Subtype);
4133 end Set_Cloned_Subtype;
4135 procedure Set_Component_Bit_Offset (Id : E; V : U) is
4137 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
4139 end Set_Component_Bit_Offset;
4141 procedure Set_Component_Clause (Id : E; V : N) is
4143 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
4145 end Set_Component_Clause;
4147 procedure Set_Component_Size (Id : E; V : U) is
4149 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4151 end Set_Component_Size;
4153 procedure Set_Component_Type (Id : E; V : E) is
4155 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4157 end Set_Component_Type;
4159 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
4162 (Ekind (Id) in E_Block
4164 | E_Generic_Function
4166 | E_Generic_Procedure
4170 | E_Subprogram_Body);
4171 Set_Flag279 (Id, V);
4172 end Set_Contains_Ignored_Ghost_Code;
4174 procedure Set_Contract (Id : E; V : N) is
4177 (Ekind (Id) in E_Protected_Type -- concurrent types
4181 Ekind (Id) in E_Constant -- objects
4184 Ekind (Id) in E_Entry -- overloadable
4187 | E_Generic_Function
4188 | E_Generic_Procedure
4193 Ekind (Id) in E_Generic_Package -- packages
4198 Is_Type (Id) -- types
4201 Ekind (Id) = E_Void); -- special purpose
4205 procedure Set_Contract_Wrapper (Id : E; V : E) is
4207 pragma Assert (Is_Entry (Id));
4209 end Set_Contract_Wrapper;
4211 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
4214 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
4216 end Set_Corresponding_Concurrent_Type;
4218 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
4220 pragma Assert (Ekind (Id) = E_Discriminant);
4222 end Set_Corresponding_Discriminant;
4224 procedure Set_Corresponding_Equality (Id : E; V : E) is
4227 (Ekind (Id) = E_Function
4228 and then not Comes_From_Source (Id)
4229 and then Chars (Id) = Name_Op_Ne);
4231 end Set_Corresponding_Equality;
4233 procedure Set_Corresponding_Function (Id : E; V : E) is
4235 pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
4237 end Set_Corresponding_Function;
4239 procedure Set_Corresponding_Procedure (Id : E; V : E) is
4241 pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
4243 end Set_Corresponding_Procedure;
4245 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
4247 pragma Assert (Ekind (Id) in E_Void | E_Subprogram_Body);
4249 end Set_Corresponding_Protected_Entry;
4251 procedure Set_Corresponding_Record_Component (Id : E; V : E) is
4253 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
4255 end Set_Corresponding_Record_Component;
4257 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
4259 pragma Assert (Is_Concurrent_Type (Id));
4261 end Set_Corresponding_Record_Type;
4263 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
4266 end Set_Corresponding_Remote_Type;
4268 procedure Set_Current_Use_Clause (Id : E; V : E) is
4270 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
4272 end Set_Current_Use_Clause;
4274 procedure Set_Current_Value (Id : E; V : N) is
4276 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
4278 end Set_Current_Value;
4280 procedure Set_CR_Discriminant (Id : E; V : E) is
4283 end Set_CR_Discriminant;
4285 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
4287 Set_Flag166 (Id, V);
4288 end Set_Debug_Info_Off;
4290 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
4293 end Set_Debug_Renaming_Link;
4295 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
4297 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4299 end Set_Default_Aspect_Component_Value;
4301 procedure Set_Default_Aspect_Value (Id : E; V : E) is
4303 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
4305 end Set_Default_Aspect_Value;
4307 procedure Set_Default_Expr_Function (Id : E; V : E) is
4309 pragma Assert (Is_Formal (Id));
4311 end Set_Default_Expr_Function;
4313 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
4315 Set_Flag108 (Id, V);
4316 end Set_Default_Expressions_Processed;
4318 procedure Set_Default_Value (Id : E; V : N) is
4320 pragma Assert (Is_Formal (Id));
4322 end Set_Default_Value;
4324 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
4328 or else Is_Task_Type (Id)
4329 or else Ekind (Id) = E_Block);
4330 Set_Flag114 (Id, V);
4331 end Set_Delay_Cleanups;
4333 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
4336 (Is_Subprogram (Id) or else Ekind (Id) in E_Package | E_Package_Body);
4339 end Set_Delay_Subprogram_Descriptors;
4341 procedure Set_Delta_Value (Id : E; V : R) is
4343 pragma Assert (Is_Fixed_Point_Type (Id));
4344 Set_Ureal18 (Id, V);
4345 end Set_Delta_Value;
4347 procedure Set_Dependent_Instances (Id : E; V : L) is
4349 pragma Assert (Is_Generic_Instance (Id));
4351 end Set_Dependent_Instances;
4353 procedure Set_Depends_On_Private (Id : E; V : B := True) is
4355 pragma Assert (Nkind (Id) in N_Entity);
4357 end Set_Depends_On_Private;
4359 procedure Set_Derived_Type_Link (Id : E; V : E) is
4361 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4363 end Set_Derived_Type_Link;
4365 procedure Set_Digits_Value (Id : E; V : U) is
4368 (Is_Floating_Point_Type (Id)
4369 or else Is_Decimal_Fixed_Point_Type (Id));
4371 end Set_Digits_Value;
4373 procedure Set_Directly_Designated_Type (Id : E; V : E) is
4376 end Set_Directly_Designated_Type;
4378 procedure Set_Disable_Controlled (Id : E; V : B := True) is
4380 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4381 Set_Flag253 (Id, V);
4382 end Set_Disable_Controlled;
4384 procedure Set_Discard_Names (Id : E; V : B := True) is
4387 end Set_Discard_Names;
4389 procedure Set_Discriminal (Id : E; V : E) is
4391 pragma Assert (Ekind (Id) = E_Discriminant);
4393 end Set_Discriminal;
4395 procedure Set_Discriminal_Link (Id : E; V : E) is
4398 end Set_Discriminal_Link;
4400 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
4402 pragma Assert (Ekind (Id) = E_Component);
4404 end Set_Discriminant_Checking_Func;
4406 procedure Set_Discriminant_Constraint (Id : E; V : L) is
4408 pragma Assert (Nkind (Id) in N_Entity);
4409 Set_Elist21 (Id, V);
4410 end Set_Discriminant_Constraint;
4412 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
4415 end Set_Discriminant_Default_Value;
4417 procedure Set_Discriminant_Number (Id : E; V : U) is
4420 end Set_Discriminant_Number;
4422 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
4424 pragma Assert (Ekind (Id) = E_Record_Type
4425 and then Id = Implementation_Base_Type (Id));
4426 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
4427 Set_Elist26 (Id, V);
4428 end Set_Dispatch_Table_Wrappers;
4430 procedure Set_DT_Entry_Count (Id : E; V : U) is
4432 pragma Assert (Ekind (Id) = E_Component);
4434 end Set_DT_Entry_Count;
4436 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4438 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4440 end Set_DT_Offset_To_Top_Func;
4442 procedure Set_DT_Position (Id : E; V : U) is
4444 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
4446 end Set_DT_Position;
4448 procedure Set_DTC_Entity (Id : E; V : E) is
4450 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
4454 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4456 pragma Assert (Ekind (Id) = E_Package);
4457 Set_Flag210 (Id, V);
4458 end Set_Elaborate_Body_Desirable;
4460 procedure Set_Elaboration_Entity (Id : E; V : E) is
4465 Ekind (Id) in E_Entry | E_Entry_Family | E_Package
4467 Is_Generic_Unit (Id));
4469 end Set_Elaboration_Entity;
4471 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4476 Ekind (Id) in E_Entry | E_Entry_Family | E_Package
4478 Is_Generic_Unit (Id));
4479 Set_Flag174 (Id, V);
4480 end Set_Elaboration_Entity_Required;
4482 procedure Set_Encapsulating_State (Id : E; V : E) is
4484 pragma Assert (Ekind (Id) in E_Abstract_State | E_Constant | E_Variable);
4486 end Set_Encapsulating_State;
4488 procedure Set_Enclosing_Scope (Id : E; V : E) is
4491 end Set_Enclosing_Scope;
4493 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4495 pragma Assert (Is_Entry (Id));
4496 Set_Flag152 (Id, V);
4497 end Set_Entry_Accepted;
4499 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4502 end Set_Entry_Bodies_Array;
4504 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4507 end Set_Entry_Cancel_Parameter;
4509 procedure Set_Entry_Component (Id : E; V : E) is
4512 end Set_Entry_Component;
4514 procedure Set_Entry_Formal (Id : E; V : E) is
4517 end Set_Entry_Formal;
4519 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4521 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4523 end Set_Entry_Index_Constant;
4525 procedure Set_Entry_Max_Queue_Lengths_Array (Id : E; V : E) is
4527 pragma Assert (Ekind (Id) = E_Protected_Type);
4529 end Set_Entry_Max_Queue_Lengths_Array;
4531 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4534 end Set_Entry_Parameters_Type;
4536 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4538 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4540 end Set_Enum_Pos_To_Rep;
4542 procedure Set_Enumeration_Pos (Id : E; V : U) is
4544 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4546 end Set_Enumeration_Pos;
4548 procedure Set_Enumeration_Rep (Id : E; V : U) is
4550 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4552 end Set_Enumeration_Rep;
4554 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4556 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4558 end Set_Enumeration_Rep_Expr;
4560 procedure Set_Equivalent_Type (Id : E; V : E) is
4563 (Ekind (Id) in E_Class_Wide_Type
4564 | E_Class_Wide_Subtype
4565 | E_Access_Protected_Subprogram_Type
4566 | E_Anonymous_Access_Protected_Subprogram_Type
4567 | E_Access_Subprogram_Type
4568 | E_Exception_Type);
4570 end Set_Equivalent_Type;
4572 procedure Set_Esize (Id : E; V : U) is
4577 procedure Set_Extra_Accessibility (Id : E; V : E) is
4580 (Is_Formal (Id) or else Ekind (Id) in E_Variable | E_Constant);
4582 end Set_Extra_Accessibility;
4584 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4587 (Ekind (Id) in E_Function | E_Operator | E_Subprogram_Type);
4589 end Set_Extra_Accessibility_Of_Result;
4591 procedure Set_Extra_Constrained (Id : E; V : E) is
4593 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4595 end Set_Extra_Constrained;
4597 procedure Set_Extra_Formal (Id : E; V : E) is
4600 end Set_Extra_Formal;
4602 procedure Set_Extra_Formals (Id : E; V : E) is
4605 (Is_Overloadable (Id)
4606 or else Ekind (Id) in E_Entry_Family
4608 | E_Subprogram_Type);
4610 end Set_Extra_Formals;
4612 procedure Set_Finalization_Master (Id : E; V : E) is
4614 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4616 end Set_Finalization_Master;
4618 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4620 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4621 Set_Flag158 (Id, V);
4622 end Set_Finalize_Storage_Only;
4624 procedure Set_Finalizer (Id : E; V : E) is
4626 pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
4630 procedure Set_First_Entity (Id : E; V : E) is
4633 end Set_First_Entity;
4635 procedure Set_First_Exit_Statement (Id : E; V : N) is
4637 pragma Assert (Ekind (Id) = E_Loop);
4639 end Set_First_Exit_Statement;
4641 procedure Set_First_Index (Id : E; V : N) is
4643 pragma Assert (Is_Array_Type (Id));
4645 end Set_First_Index;
4647 procedure Set_First_Literal (Id : E; V : E) is
4649 pragma Assert (Is_Enumeration_Type (Id));
4651 end Set_First_Literal;
4653 procedure Set_First_Private_Entity (Id : E; V : E) is
4655 pragma Assert (Is_Package_Or_Generic_Package (Id)
4656 or else Is_Concurrent_Type (Id));
4658 end Set_First_Private_Entity;
4660 procedure Set_First_Rep_Item (Id : E; V : N) is
4663 end Set_First_Rep_Item;
4665 procedure Set_Float_Rep (Id : E; V : F) is
4666 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4668 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4671 procedure Set_Freeze_Node (Id : E; V : N) is
4674 end Set_Freeze_Node;
4676 procedure Set_From_Limited_With (Id : E; V : B := True) is
4679 (Is_Type (Id) or else Ekind (Id) in E_Abstract_State | E_Package);
4680 Set_Flag159 (Id, V);
4681 end Set_From_Limited_With;
4683 procedure Set_Full_View (Id : E; V : E) is
4685 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4689 procedure Set_Generic_Homonym (Id : E; V : E) is
4692 end Set_Generic_Homonym;
4694 procedure Set_Generic_Renamings (Id : E; V : L) is
4696 Set_Elist23 (Id, V);
4697 end Set_Generic_Renamings;
4699 procedure Set_Handler_Records (Id : E; V : S) is
4702 end Set_Handler_Records;
4704 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4706 pragma Assert (Id = Base_Type (Id));
4707 Set_Flag135 (Id, V);
4708 end Set_Has_Aliased_Components;
4710 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4713 end Set_Has_Alignment_Clause;
4715 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4718 end Set_Has_All_Calls_Remote;
4720 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4722 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4724 end Set_Has_Atomic_Components;
4726 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4729 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4730 Set_Flag139 (Id, V);
4731 end Set_Has_Biased_Representation;
4733 procedure Set_Has_Completion (Id : E; V : B := True) is
4736 end Set_Has_Completion;
4738 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4740 pragma Assert (Is_Type (Id));
4742 end Set_Has_Completion_In_Body;
4744 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4746 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
4747 Set_Flag140 (Id, V);
4748 end Set_Has_Complex_Representation;
4750 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4752 pragma Assert (Ekind (Id) = E_Array_Type);
4754 end Set_Has_Component_Size_Clause;
4756 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4758 pragma Assert (Is_Type (Id));
4759 Set_Flag187 (Id, V);
4760 end Set_Has_Constrained_Partial_View;
4762 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4764 Set_Flag181 (Id, V);
4765 end Set_Has_Contiguous_Rep;
4767 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4769 pragma Assert (Id = Base_Type (Id));
4771 end Set_Has_Controlled_Component;
4773 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4776 end Set_Has_Controlling_Result;
4778 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4780 Set_Flag119 (Id, V);
4781 end Set_Has_Convention_Pragma;
4783 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4786 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4787 and then Is_Base_Type (Id));
4789 end Set_Has_Default_Aspect;
4791 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4793 pragma Assert (Nkind (Id) in N_Entity);
4794 Set_Flag200 (Id, V);
4795 end Set_Has_Delayed_Aspects;
4797 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4799 pragma Assert (Nkind (Id) in N_Entity);
4801 end Set_Has_Delayed_Freeze;
4803 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4805 pragma Assert (Nkind (Id) in N_Entity);
4806 Set_Flag261 (Id, V);
4807 end Set_Has_Delayed_Rep_Aspects;
4809 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4811 pragma Assert (Is_Type (Id));
4813 end Set_Has_Discriminants;
4815 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4817 pragma Assert (Ekind (Id) = E_Record_Type
4818 and then Is_Tagged_Type (Id));
4819 Set_Flag220 (Id, V);
4820 end Set_Has_Dispatch_Table;
4822 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4824 pragma Assert (Is_Type (Id));
4825 Set_Flag258 (Id, V);
4826 end Set_Has_Dynamic_Predicate_Aspect;
4828 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4830 pragma Assert (Is_Enumeration_Type (Id));
4832 end Set_Has_Enumeration_Rep_Clause;
4834 procedure Set_Has_Exit (Id : E; V : B := True) is
4839 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4842 (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
4843 Set_Flag240 (Id, V);
4844 end Set_Has_Expanded_Contract;
4846 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4848 Set_Flag175 (Id, V);
4849 end Set_Has_Forward_Instantiation;
4851 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4853 Set_Flag173 (Id, V);
4854 end Set_Has_Fully_Qualified_Name;
4856 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4859 end Set_Has_Gigi_Rep_Item;
4861 procedure Set_Has_Homonym (Id : E; V : B := True) is
4864 end Set_Has_Homonym;
4866 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4868 Set_Flag251 (Id, V);
4869 end Set_Has_Implicit_Dereference;
4871 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4873 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4875 end Set_Has_Independent_Components;
4877 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4879 pragma Assert (Is_Type (Id));
4880 Set_Flag248 (Base_Type (Id), V);
4881 end Set_Has_Inheritable_Invariants;
4883 procedure Set_Has_Inherited_DIC (Id : E; V : B := True) is
4885 pragma Assert (Is_Type (Id));
4886 Set_Flag133 (Base_Type (Id), V);
4887 end Set_Has_Inherited_DIC;
4889 procedure Set_Has_Inherited_Invariants (Id : E; V : B := True) is
4891 pragma Assert (Is_Type (Id));
4892 Set_Flag291 (Base_Type (Id), V);
4893 end Set_Has_Inherited_Invariants;
4895 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4897 pragma Assert (Ekind (Id) in E_Variable | E_Out_Parameter);
4898 Set_Flag219 (Id, V);
4899 end Set_Has_Initial_Value;
4901 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4903 pragma Assert (Ekind (Id) = E_Loop);
4904 Set_Flag260 (Id, V);
4905 end Set_Has_Loop_Entry_Attributes;
4907 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4909 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4911 end Set_Has_Machine_Radix_Clause;
4913 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4916 end Set_Has_Master_Entity;
4918 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4920 pragma Assert (Ekind (Id) in E_Function | E_Generic_Function);
4921 Set_Flag142 (Id, V);
4922 end Set_Has_Missing_Return;
4924 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4926 Set_Flag101 (Id, V);
4927 end Set_Has_Nested_Block_With_Handler;
4929 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4931 pragma Assert (Is_Subprogram (Id));
4932 Set_Flag282 (Id, V);
4933 end Set_Has_Nested_Subprogram;
4935 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4937 pragma Assert (Id = Base_Type (Id));
4939 end Set_Has_Non_Standard_Rep;
4941 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4943 pragma Assert (Is_Type (Id));
4944 Set_Flag172 (Id, V);
4945 end Set_Has_Object_Size_Clause;
4947 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4951 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4952 Set_Flag110 (Id, V);
4953 end Set_Has_Out_Or_In_Out_Parameter;
4955 procedure Set_Has_Own_DIC (Id : E; V : B := True) is
4957 pragma Assert (Is_Type (Id));
4958 Set_Flag3 (Base_Type (Id), V);
4959 end Set_Has_Own_DIC;
4961 procedure Set_Has_Own_Invariants (Id : E; V : B := True) is
4963 pragma Assert (Is_Type (Id));
4964 Set_Flag232 (Base_Type (Id), V);
4965 end Set_Has_Own_Invariants;
4967 procedure Set_Has_Partial_Visible_Refinement (Id : E; V : B := True) is
4969 pragma Assert (Ekind (Id) = E_Abstract_State);
4970 Set_Flag296 (Id, V);
4971 end Set_Has_Partial_Visible_Refinement;
4973 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4975 Set_Flag154 (Id, V);
4976 end Set_Has_Per_Object_Constraint;
4978 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4980 pragma Assert (Is_Access_Type (Id));
4981 Set_Flag27 (Base_Type (Id), V);
4982 end Set_Has_Pragma_Controlled;
4984 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4986 Set_Flag150 (Id, V);
4987 end Set_Has_Pragma_Elaborate_Body;
4989 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4991 Set_Flag157 (Id, V);
4992 end Set_Has_Pragma_Inline;
4994 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4996 Set_Flag230 (Id, V);
4997 end Set_Has_Pragma_Inline_Always;
4999 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
5001 Set_Flag201 (Id, V);
5002 end Set_Has_Pragma_No_Inline;
5004 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
5006 pragma Assert (Is_Enumeration_Type (Id));
5007 pragma Assert (Id = Base_Type (Id));
5008 Set_Flag198 (Id, V);
5009 end Set_Has_Pragma_Ordered;
5011 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
5013 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5014 pragma Assert (Id = Base_Type (Id));
5015 Set_Flag121 (Id, V);
5016 end Set_Has_Pragma_Pack;
5018 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
5020 Set_Flag221 (Id, V);
5021 end Set_Has_Pragma_Preelab_Init;
5023 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
5025 Set_Flag203 (Id, V);
5026 end Set_Has_Pragma_Pure;
5028 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
5030 Set_Flag179 (Id, V);
5031 end Set_Has_Pragma_Pure_Function;
5033 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
5035 Set_Flag169 (Id, V);
5036 end Set_Has_Pragma_Thread_Local_Storage;
5038 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
5040 Set_Flag233 (Id, V);
5041 end Set_Has_Pragma_Unmodified;
5043 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
5045 Set_Flag180 (Id, V);
5046 end Set_Has_Pragma_Unreferenced;
5048 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
5050 pragma Assert (Is_Type (Id));
5051 Set_Flag212 (Id, V);
5052 end Set_Has_Pragma_Unreferenced_Objects;
5054 procedure Set_Has_Pragma_Unused (Id : E; V : B := True) is
5056 Set_Flag294 (Id, V);
5057 end Set_Has_Pragma_Unused;
5059 procedure Set_Has_Predicates (Id : E; V : B := True) is
5061 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
5062 Set_Flag250 (Id, V);
5063 end Set_Has_Predicates;
5065 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
5067 pragma Assert (Id = Base_Type (Id));
5068 Set_Flag120 (Id, V);
5069 end Set_Has_Primitive_Operations;
5071 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
5073 pragma Assert (Is_Type (Id));
5074 Set_Flag151 (Id, V);
5075 end Set_Has_Private_Ancestor;
5077 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
5079 Set_Flag155 (Id, V);
5080 end Set_Has_Private_Declaration;
5082 procedure Set_Has_Private_Extension (Id : E; V : B := True) is
5084 pragma Assert (Is_Tagged_Type (Id));
5085 Set_Flag300 (Id, V);
5086 end Set_Has_Private_Extension;
5088 procedure Set_Has_Protected (Id : E; V : B := True) is
5090 Set_Flag271 (Id, V);
5091 end Set_Has_Protected;
5093 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
5095 Set_Flag161 (Id, V);
5096 end Set_Has_Qualified_Name;
5098 procedure Set_Has_RACW (Id : E; V : B := True) is
5100 pragma Assert (Ekind (Id) = E_Package);
5101 Set_Flag214 (Id, V);
5104 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
5106 pragma Assert (Id = Base_Type (Id));
5108 end Set_Has_Record_Rep_Clause;
5110 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
5112 pragma Assert (Is_Subprogram (Id));
5113 Set_Flag143 (Id, V);
5114 end Set_Has_Recursive_Call;
5116 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
5118 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
5119 Set_Flag267 (Id, V);
5120 end Set_Has_Shift_Operator;
5122 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
5125 end Set_Has_Size_Clause;
5127 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
5129 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
5131 end Set_Has_Small_Clause;
5133 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
5135 pragma Assert (Id = Base_Type (Id));
5136 Set_Flag100 (Id, V);
5137 end Set_Has_Specified_Layout;
5139 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
5141 pragma Assert (Is_Type (Id));
5142 Set_Flag190 (Id, V);
5143 end Set_Has_Specified_Stream_Input;
5145 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
5147 pragma Assert (Is_Type (Id));
5148 Set_Flag191 (Id, V);
5149 end Set_Has_Specified_Stream_Output;
5151 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
5153 pragma Assert (Is_Type (Id));
5154 Set_Flag192 (Id, V);
5155 end Set_Has_Specified_Stream_Read;
5157 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
5159 pragma Assert (Is_Type (Id));
5160 Set_Flag193 (Id, V);
5161 end Set_Has_Specified_Stream_Write;
5163 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
5165 Set_Flag211 (Id, V);
5166 end Set_Has_Static_Discriminants;
5168 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
5170 pragma Assert (Is_Type (Id));
5171 Set_Flag269 (Id, V);
5172 end Set_Has_Static_Predicate;
5174 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
5176 pragma Assert (Is_Type (Id));
5177 Set_Flag259 (Id, V);
5178 end Set_Has_Static_Predicate_Aspect;
5180 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
5182 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5183 pragma Assert (Id = Base_Type (Id));
5185 end Set_Has_Storage_Size_Clause;
5187 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
5189 pragma Assert (Is_Elementary_Type (Id));
5190 Set_Flag184 (Id, V);
5191 end Set_Has_Stream_Size_Clause;
5193 procedure Set_Has_Task (Id : E; V : B := True) is
5195 pragma Assert (Id = Base_Type (Id));
5199 procedure Set_Has_Thunks (Id : E; V : B := True) is
5201 pragma Assert (Is_Tag (Id));
5202 Set_Flag228 (Id, V);
5205 procedure Set_Has_Timing_Event (Id : E; V : B := True) is
5207 pragma Assert (Id = Base_Type (Id));
5208 Set_Flag289 (Id, V);
5209 end Set_Has_Timing_Event;
5211 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
5213 pragma Assert (Id = Base_Type (Id));
5214 Set_Flag123 (Id, V);
5215 end Set_Has_Unchecked_Union;
5217 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
5219 pragma Assert (Is_Type (Id));
5221 end Set_Has_Unknown_Discriminants;
5223 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
5225 pragma Assert (Ekind (Id) = E_Abstract_State);
5226 Set_Flag263 (Id, V);
5227 end Set_Has_Visible_Refinement;
5229 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
5231 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
5233 end Set_Has_Volatile_Components;
5235 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
5237 Set_Flag182 (Id, V);
5238 end Set_Has_Xref_Entry;
5240 procedure Set_Has_Yield_Aspect (Id : E; V : B := True) is
5243 (Is_Entry (Id) or else Is_Subprogram_Or_Generic_Subprogram (Id));
5244 Set_Flag308 (Id, V);
5245 end Set_Has_Yield_Aspect;
5247 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
5249 pragma Assert (Ekind (Id) = E_Variable);
5251 end Set_Hiding_Loop_Variable;
5253 procedure Set_Hidden_In_Formal_Instance (Id : E; V : L) is
5255 pragma Assert (Ekind (Id) = E_Package);
5256 Set_Elist30 (Id, V);
5257 end Set_Hidden_In_Formal_Instance;
5259 procedure Set_Homonym (Id : E; V : E) is
5261 pragma Assert (Id /= V);
5265 procedure Set_Incomplete_Actuals (Id : E; V : L) is
5267 pragma Assert (Ekind (Id) = E_Package);
5268 Set_Elist24 (Id, V);
5269 end Set_Incomplete_Actuals;
5271 procedure Set_Ignore_SPARK_Mode_Pragmas (Id : E; V : B := True) is
5274 (Ekind (Id) in E_Protected_Body -- concurrent types
5279 Ekind (Id) in E_Entry -- overloadable
5282 | E_Generic_Function
5283 | E_Generic_Procedure
5288 Ekind (Id) in E_Generic_Package -- packages
5291 Set_Flag301 (Id, V);
5292 end Set_Ignore_SPARK_Mode_Pragmas;
5294 procedure Set_Import_Pragma (Id : E; V : E) is
5296 pragma Assert (Is_Subprogram (Id));
5298 end Set_Import_Pragma;
5300 procedure Set_Interface_Alias (Id : E; V : E) is
5304 and then Is_Hidden (Id)
5305 and then (Ekind (Id) in E_Procedure | E_Function));
5307 end Set_Interface_Alias;
5309 procedure Set_Interfaces (Id : E; V : L) is
5311 pragma Assert (Is_Record_Type (Id));
5312 Set_Elist25 (Id, V);
5315 procedure Set_In_Package_Body (Id : E; V : B := True) is
5318 end Set_In_Package_Body;
5320 procedure Set_In_Private_Part (Id : E; V : B := True) is
5323 end Set_In_Private_Part;
5325 procedure Set_In_Use (Id : E; V : B := True) is
5327 pragma Assert (Nkind (Id) in N_Entity);
5331 procedure Set_Initialization_Statements (Id : E; V : N) is
5333 -- Tolerate an E_Void entity since this can be called while resolving
5334 -- an aggregate used as the initialization expression for an object
5335 -- declaration, and this occurs before the Ekind for the object is set.
5337 pragma Assert (Ekind (Id) in E_Void | E_Constant | E_Variable);
5339 end Set_Initialization_Statements;
5341 procedure Set_Inner_Instances (Id : E; V : L) is
5343 Set_Elist23 (Id, V);
5344 end Set_Inner_Instances;
5346 procedure Set_Interface_Name (Id : E; V : N) is
5349 end Set_Interface_Name;
5351 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
5353 pragma Assert (Is_Overloadable (Id));
5355 end Set_Is_Abstract_Subprogram;
5357 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
5359 pragma Assert (Is_Type (Id));
5360 Set_Flag146 (Id, V);
5361 end Set_Is_Abstract_Type;
5363 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
5365 pragma Assert (Is_Access_Type (Id));
5366 Set_Flag194 (Id, V);
5367 end Set_Is_Local_Anonymous_Access;
5369 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
5371 pragma Assert (Is_Access_Type (Id));
5373 end Set_Is_Access_Constant;
5375 procedure Set_Is_Activation_Record (Id : E; V : B := True) is
5377 pragma Assert (Ekind (Id) = E_In_Parameter);
5378 Set_Flag305 (Id, V);
5379 end Set_Is_Activation_Record;
5381 procedure Set_Is_Actual_Subtype (Id : E; V : B := True) is
5383 pragma Assert (Is_Type (Id));
5384 Set_Flag293 (Id, V);
5385 end Set_Is_Actual_Subtype;
5387 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
5389 Set_Flag185 (Id, V);
5390 end Set_Is_Ada_2005_Only;
5392 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
5394 Set_Flag199 (Id, V);
5395 end Set_Is_Ada_2012_Only;
5397 procedure Set_Is_Aliased (Id : E; V : B := True) is
5399 pragma Assert (Nkind (Id) in N_Entity);
5403 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
5406 (Ekind (Id) = E_Procedure or else Is_Type (Id));
5408 end Set_Is_Asynchronous;
5410 procedure Set_Is_Atomic (Id : E; V : B := True) is
5415 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
5417 pragma Assert ((not V)
5418 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
5419 Set_Flag122 (Id, V);
5420 end Set_Is_Bit_Packed_Array;
5422 procedure Set_Is_Called (Id : E; V : B := True) is
5424 pragma Assert (Ekind (Id) in E_Procedure | E_Function | E_Package);
5425 Set_Flag102 (Id, V);
5428 procedure Set_Is_Character_Type (Id : E; V : B := True) is
5431 end Set_Is_Character_Type;
5433 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
5435 -- Allow this attribute to appear on unanalyzed entities
5437 pragma Assert (Nkind (Id) in N_Entity
5438 or else Ekind (Id) = E_Void);
5439 Set_Flag277 (Id, V);
5440 end Set_Is_Checked_Ghost_Entity;
5442 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
5445 end Set_Is_Child_Unit;
5447 procedure Set_Is_Class_Wide_Clone (Id : E; V : B := True) is
5449 Set_Flag290 (Id, V);
5450 end Set_Is_Class_Wide_Clone;
5452 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
5455 end Set_Is_Class_Wide_Equivalent_Type;
5457 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
5459 Set_Flag149 (Id, V);
5460 end Set_Is_Compilation_Unit;
5462 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
5464 pragma Assert (Ekind (Id) = E_Discriminant);
5465 Set_Flag103 (Id, V);
5466 end Set_Is_Completely_Hidden;
5468 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
5471 end Set_Is_Concurrent_Record_Type;
5473 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
5476 end Set_Is_Constr_Subt_For_U_Nominal;
5478 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
5480 Set_Flag141 (Id, V);
5481 end Set_Is_Constr_Subt_For_UN_Aliased;
5483 procedure Set_Is_Constrained (Id : E; V : B := True) is
5485 pragma Assert (Nkind (Id) in N_Entity);
5487 end Set_Is_Constrained;
5489 procedure Set_Is_Constructor (Id : E; V : B := True) is
5492 end Set_Is_Constructor;
5494 procedure Set_Is_Controlled_Active (Id : E; V : B := True) is
5496 pragma Assert (Id = Base_Type (Id));
5498 end Set_Is_Controlled_Active;
5500 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5502 pragma Assert (Is_Formal (Id));
5504 end Set_Is_Controlling_Formal;
5506 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5509 end Set_Is_CPP_Class;
5511 procedure Set_Is_CUDA_Kernel (Id : E; V : B := True) is
5513 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5514 Set_Flag118 (Id, V);
5515 end Set_Is_CUDA_Kernel;
5517 procedure Set_Is_DIC_Procedure (Id : E; V : B := True) is
5519 pragma Assert (Ekind (Id) = E_Procedure);
5520 Set_Flag132 (Id, V);
5521 end Set_Is_DIC_Procedure;
5523 procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
5525 pragma Assert (Is_Type (Id));
5526 Set_Flag223 (Id, V);
5527 end Set_Is_Descendant_Of_Address;
5529 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5531 Set_Flag176 (Id, V);
5532 end Set_Is_Discrim_SO_Function;
5534 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5536 Set_Flag264 (Id, V);
5537 end Set_Is_Discriminant_Check_Function;
5539 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5541 Set_Flag234 (Id, V);
5542 end Set_Is_Dispatch_Table_Entity;
5544 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5549 Is_Overloadable (Id)
5551 Ekind (Id) = E_Subprogram_Type);
5554 end Set_Is_Dispatching_Operation;
5556 procedure Set_Is_Elaboration_Checks_OK_Id (Id : E; V : B := True) is
5558 pragma Assert (Is_Elaboration_Target (Id));
5559 Set_Flag148 (Id, V);
5560 end Set_Is_Elaboration_Checks_OK_Id;
5562 procedure Set_Is_Elaboration_Warnings_OK_Id (Id : E; V : B := True) is
5564 pragma Assert (Is_Elaboration_Target (Id));
5565 Set_Flag304 (Id, V);
5566 end Set_Is_Elaboration_Warnings_OK_Id;
5568 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5570 Set_Flag124 (Id, V);
5571 end Set_Is_Eliminated;
5573 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5576 end Set_Is_Entry_Formal;
5578 procedure Set_Is_Entry_Wrapper (Id : E; V : B := True) is
5580 Set_Flag297 (Id, V);
5581 end Set_Is_Entry_Wrapper;
5583 procedure Set_Is_Exception_Handler (Id : E; V : B := True) is
5585 pragma Assert (Ekind (Id) = E_Block);
5586 Set_Flag286 (Id, V);
5587 end Set_Is_Exception_Handler;
5589 procedure Set_Is_Exported (Id : E; V : B := True) is
5592 end Set_Is_Exported;
5594 procedure Set_Is_Finalized_Transient (Id : E; V : B := True) is
5596 pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
5597 Set_Flag252 (Id, V);
5598 end Set_Is_Finalized_Transient;
5600 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5603 end Set_Is_First_Subtype;
5605 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5607 Set_Flag111 (Id, V);
5608 end Set_Is_Formal_Subprogram;
5610 procedure Set_Is_Frozen (Id : E; V : B := True) is
5612 pragma Assert (Nkind (Id) in N_Entity);
5616 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5618 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5619 Set_Flag274 (Id, V);
5620 end Set_Is_Generic_Actual_Subprogram;
5622 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5624 pragma Assert (Is_Type (Id));
5626 end Set_Is_Generic_Actual_Type;
5628 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5630 Set_Flag130 (Id, V);
5631 end Set_Is_Generic_Instance;
5633 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5635 pragma Assert (Nkind (Id) in N_Entity);
5637 end Set_Is_Generic_Type;
5639 procedure Set_Is_Hidden (Id : E; V : B := True) is
5644 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5646 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5648 end Set_Is_Hidden_Non_Overridden_Subpgm;
5650 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5652 Set_Flag171 (Id, V);
5653 end Set_Is_Hidden_Open_Scope;
5655 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5657 -- Allow this attribute to appear on unanalyzed entities
5659 pragma Assert (Nkind (Id) in N_Entity
5660 or else Ekind (Id) = E_Void);
5661 Set_Flag278 (Id, V);
5662 end Set_Is_Ignored_Ghost_Entity;
5664 procedure Set_Is_Ignored_Transient (Id : E; V : B := True) is
5666 pragma Assert (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable);
5667 Set_Flag295 (Id, V);
5668 end Set_Is_Ignored_Transient;
5670 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5672 pragma Assert (Nkind (Id) in N_Entity);
5674 end Set_Is_Immediately_Visible;
5676 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5678 Set_Flag254 (Id, V);
5679 end Set_Is_Implementation_Defined;
5681 procedure Set_Is_Imported (Id : E; V : B := True) is
5684 end Set_Is_Imported;
5686 procedure Set_Is_Independent (Id : E; V : B := True) is
5688 Set_Flag268 (Id, V);
5689 end Set_Is_Independent;
5691 procedure Set_Is_Initial_Condition_Procedure (Id : E; V : B := True) is
5693 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5694 Set_Flag302 (Id, V);
5695 end Set_Is_Initial_Condition_Procedure;
5697 procedure Set_Is_Inlined (Id : E; V : B := True) is
5702 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5704 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5706 end Set_Is_Inlined_Always;
5708 procedure Set_Is_Interface (Id : E; V : B := True) is
5710 pragma Assert (Is_Record_Type (Id));
5711 Set_Flag186 (Id, V);
5712 end Set_Is_Interface;
5714 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5716 Set_Flag126 (Id, V);
5717 end Set_Is_Instantiated;
5719 procedure Set_Is_Internal (Id : E; V : B := True) is
5721 pragma Assert (Nkind (Id) in N_Entity);
5723 end Set_Is_Internal;
5725 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5727 pragma Assert (Nkind (Id) in N_Entity);
5729 end Set_Is_Interrupt_Handler;
5731 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5734 end Set_Is_Intrinsic_Subprogram;
5736 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5738 pragma Assert (Ekind (Id) = E_Procedure);
5739 Set_Flag257 (Id, V);
5740 end Set_Is_Invariant_Procedure;
5742 procedure Set_Is_Itype (Id : E; V : B := True) is
5747 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5750 end Set_Is_Known_Non_Null;
5752 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5754 Set_Flag204 (Id, V);
5755 end Set_Is_Known_Null;
5757 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5759 Set_Flag170 (Id, V);
5760 end Set_Is_Known_Valid;
5762 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5764 pragma Assert (Is_Type (Id));
5765 Set_Flag106 (Id, V);
5766 end Set_Is_Limited_Composite;
5768 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5770 pragma Assert (Is_Interface (Id));
5771 Set_Flag197 (Id, V);
5772 end Set_Is_Limited_Interface;
5774 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5777 end Set_Is_Limited_Record;
5779 procedure Set_Is_Loop_Parameter (Id : E; V : B := True) is
5781 Set_Flag307 (Id, V);
5782 end Set_Is_Loop_Parameter;
5784 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5786 pragma Assert (Is_Subprogram (Id));
5787 Set_Flag137 (Id, V);
5788 end Set_Is_Machine_Code_Subprogram;
5790 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5792 pragma Assert (Is_Type (Id));
5793 Set_Flag109 (Id, V);
5794 end Set_Is_Non_Static_Subtype;
5796 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5798 pragma Assert (Ekind (Id) = E_Procedure);
5799 Set_Flag178 (Id, V);
5800 end Set_Is_Null_Init_Proc;
5802 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5804 Set_Flag153 (Id, V);
5805 end Set_Is_Obsolescent;
5807 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5809 pragma Assert (Ekind (Id) = E_Out_Parameter);
5810 Set_Flag226 (Id, V);
5811 end Set_Is_Only_Out_Parameter;
5813 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5815 Set_Flag160 (Id, V);
5816 end Set_Is_Package_Body_Entity;
5818 procedure Set_Is_Packed (Id : E; V : B := True) is
5820 pragma Assert (Id = Base_Type (Id));
5824 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5826 Set_Flag138 (Id, V);
5827 end Set_Is_Packed_Array_Impl_Type;
5829 procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
5831 pragma Assert (Ekind (Id) in E_Void | E_General_Access_Type);
5832 Set_Flag215 (Id, V);
5833 end Set_Is_Param_Block_Component_Type;
5835 procedure Set_Is_Partial_Invariant_Procedure (Id : E; V : B := True) is
5837 pragma Assert (Ekind (Id) = E_Procedure);
5838 Set_Flag292 (Id, V);
5839 end Set_Is_Partial_Invariant_Procedure;
5841 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5843 pragma Assert (Nkind (Id) in N_Entity);
5845 end Set_Is_Potentially_Use_Visible;
5847 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5849 pragma Assert (Ekind (Id) = E_Function);
5850 Set_Flag255 (Id, V);
5851 end Set_Is_Predicate_Function;
5853 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5855 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5856 Set_Flag256 (Id, V);
5857 end Set_Is_Predicate_Function_M;
5859 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5862 end Set_Is_Preelaborated;
5864 procedure Set_Is_Primitive (Id : E; V : B := True) is
5866 pragma Assert (Is_Overloadable (Id) or else Is_Generic_Subprogram (Id));
5867 Set_Flag218 (Id, V);
5868 end Set_Is_Primitive;
5870 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5872 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5873 Set_Flag195 (Id, V);
5874 end Set_Is_Primitive_Wrapper;
5876 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5878 pragma Assert (Is_Type (Id));
5879 Set_Flag107 (Id, V);
5880 end Set_Is_Private_Composite;
5882 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5885 end Set_Is_Private_Descendant;
5887 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5889 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
5890 Set_Flag245 (Id, V);
5891 end Set_Is_Private_Primitive;
5893 procedure Set_Is_Public (Id : E; V : B := True) is
5895 pragma Assert (Nkind (Id) in N_Entity);
5899 procedure Set_Is_Pure (Id : E; V : B := True) is
5904 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5906 pragma Assert (Is_Access_Type (Id));
5907 Set_Flag189 (Id, V);
5908 end Set_Is_Pure_Unit_Access_Type;
5910 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5912 pragma Assert (Is_Type (Id));
5913 Set_Flag244 (Id, V);
5914 end Set_Is_RACW_Stub_Type;
5916 procedure Set_Is_Raised (Id : E; V : B := True) is
5918 pragma Assert (Ekind (Id) = E_Exception);
5919 Set_Flag224 (Id, V);
5922 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5925 end Set_Is_Remote_Call_Interface;
5927 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5930 end Set_Is_Remote_Types;
5932 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5934 Set_Flag112 (Id, V);
5935 end Set_Is_Renaming_Of_Object;
5937 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5939 Set_Flag209 (Id, V);
5940 end Set_Is_Return_Object;
5942 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5944 pragma Assert (Ekind (Id) = E_Variable);
5945 Set_Flag249 (Id, V);
5946 end Set_Is_Safe_To_Reevaluate;
5948 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5951 end Set_Is_Shared_Passive;
5953 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5955 pragma Assert (Is_Type (Id));
5956 Set_Flag281 (Id, V);
5957 end Set_Is_Static_Type;
5959 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5964 Ekind (Id) in E_Exception | E_Variable | E_Constant | E_Void);
5966 end Set_Is_Statically_Allocated;
5968 procedure Set_Is_Tag (Id : E; V : B := True) is
5970 pragma Assert (Ekind (Id) in E_Component | E_Constant | E_Variable);
5974 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5977 end Set_Is_Tagged_Type;
5979 procedure Set_Is_Thunk (Id : E; V : B := True) is
5981 pragma Assert (Is_Subprogram (Id));
5982 Set_Flag225 (Id, V);
5985 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5987 Set_Flag235 (Id, V);
5988 end Set_Is_Trivial_Subprogram;
5990 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5992 Set_Flag163 (Id, V);
5993 end Set_Is_True_Constant;
5995 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5997 pragma Assert (Id = Base_Type (Id));
5998 Set_Flag117 (Id, V);
5999 end Set_Is_Unchecked_Union;
6001 procedure Set_Is_Underlying_Full_View (Id : E; V : B := True) is
6003 pragma Assert (Is_Type (Id));
6004 Set_Flag298 (Id, V);
6005 end Set_Is_Underlying_Full_View;
6007 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
6009 pragma Assert (Ekind (Id) = E_Record_Type);
6010 Set_Flag246 (Id, V);
6011 end Set_Is_Underlying_Record_View;
6013 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
6015 Set_Flag284 (Id, V);
6016 end Set_Is_Unimplemented;
6018 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
6020 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
6021 Set_Flag144 (Id, V);
6022 end Set_Is_Unsigned_Type;
6024 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
6027 (Ekind (Id) in E_Constant | E_Loop_Parameter | E_Variable
6028 or else Is_Formal (Id)
6029 or else Is_Type (Id));
6030 Set_Flag283 (Id, V);
6031 end Set_Is_Uplevel_Referenced_Entity;
6033 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
6035 pragma Assert (Ekind (Id) = E_Procedure);
6036 Set_Flag127 (Id, V);
6037 end Set_Is_Valued_Procedure;
6039 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
6041 Set_Flag206 (Id, V);
6042 end Set_Is_Visible_Formal;
6044 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
6046 Set_Flag116 (Id, V);
6047 end Set_Is_Visible_Lib_Unit;
6049 procedure Set_Is_Volatile (Id : E; V : B := True) is
6051 pragma Assert (Nkind (Id) in N_Entity);
6053 end Set_Is_Volatile;
6055 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
6057 Set_Flag285 (Id, V);
6058 end Set_Is_Volatile_Full_Access;
6060 procedure Set_Itype_Printed (Id : E; V : B := True) is
6062 pragma Assert (Is_Itype (Id));
6063 Set_Flag202 (Id, V);
6064 end Set_Itype_Printed;
6066 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
6069 end Set_Kill_Elaboration_Checks;
6071 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
6074 end Set_Kill_Range_Checks;
6076 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
6078 pragma Assert (Is_Type (Id));
6079 Set_Flag207 (Id, V);
6080 end Set_Known_To_Have_Preelab_Init;
6082 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
6084 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
6086 end Set_Last_Aggregate_Assignment;
6088 procedure Set_Last_Assignment (Id : E; V : N) is
6090 pragma Assert (Is_Assignable (Id));
6092 end Set_Last_Assignment;
6094 procedure Set_Last_Entity (Id : E; V : E) is
6097 end Set_Last_Entity;
6099 procedure Set_Limited_View (Id : E; V : E) is
6101 pragma Assert (Ekind (Id) = E_Package
6102 and then not Is_Generic_Instance (Id));
6104 end Set_Limited_View;
6106 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
6109 (Is_Object (Id) or else Is_Subprogram (Id) or else Is_Type (Id));
6111 end Set_Linker_Section_Pragma;
6113 procedure Set_Lit_Hash (Id : E; V : E) is
6115 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6119 procedure Set_Lit_Indexes (Id : E; V : E) is
6121 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6123 end Set_Lit_Indexes;
6125 procedure Set_Lit_Strings (Id : E; V : E) is
6127 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
6129 end Set_Lit_Strings;
6131 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
6133 pragma Assert (Is_Formal (Id));
6134 Set_Flag205 (Id, V);
6135 end Set_Low_Bound_Tested;
6137 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
6139 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
6141 end Set_Machine_Radix_10;
6143 procedure Set_Master_Id (Id : E; V : E) is
6145 pragma Assert (Is_Access_Type (Id));
6149 procedure Set_Materialize_Entity (Id : E; V : B := True) is
6151 Set_Flag168 (Id, V);
6152 end Set_Materialize_Entity;
6154 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
6156 Set_Flag262 (Id, V);
6157 end Set_May_Inherit_Delayed_Rep_Aspects;
6159 procedure Set_Mechanism (Id : E; V : M) is
6161 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
6162 Set_Uint8 (Id, UI_From_Int (V));
6165 procedure Set_Minimum_Accessibility (Id : E; V : E) is
6167 pragma Assert (Is_Formal (Id));
6169 end Set_Minimum_Accessibility;
6171 procedure Set_Modulus (Id : E; V : U) is
6173 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
6177 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
6179 pragma Assert (Is_Type (Id));
6180 Set_Flag183 (Id, V);
6181 end Set_Must_Be_On_Byte_Boundary;
6183 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
6185 pragma Assert (Is_Type (Id));
6186 Set_Flag208 (Id, V);
6187 end Set_Must_Have_Preelab_Init;
6189 procedure Set_Needs_Activation_Record (Id : E; V : B := True) is
6191 Set_Flag306 (Id, V);
6192 end Set_Needs_Activation_Record;
6194 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
6196 Set_Flag147 (Id, V);
6197 end Set_Needs_Debug_Info;
6199 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
6202 (Is_Overloadable (Id)
6203 or else Ekind (Id) in E_Subprogram_Type | E_Entry_Family);
6205 end Set_Needs_No_Actuals;
6207 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
6209 Set_Flag115 (Id, V);
6210 end Set_Never_Set_In_Source;
6212 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
6215 end Set_Next_Inlined_Subprogram;
6217 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
6219 pragma Assert (Is_Discrete_Type (Id));
6220 Set_Flag276 (Id, V);
6221 end Set_No_Dynamic_Predicate_On_Actual;
6223 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
6225 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6226 Set_Flag131 (Id, V);
6227 end Set_No_Pool_Assigned;
6229 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
6231 pragma Assert (Is_Discrete_Type (Id));
6232 Set_Flag275 (Id, V);
6233 end Set_No_Predicate_On_Actual;
6235 procedure Set_No_Reordering (Id : E; V : B := True) is
6237 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
6238 Set_Flag239 (Id, V);
6239 end Set_No_Reordering;
6241 procedure Set_No_Return (Id : E; V : B := True) is
6243 pragma Assert (Is_Subprogram_Or_Generic_Subprogram (Id));
6244 Set_Flag113 (Id, V);
6247 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
6249 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
6250 Set_Flag136 (Id, V);
6251 end Set_No_Strict_Aliasing;
6253 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
6255 pragma Assert (Is_Tagged_Type (Id));
6257 end Set_No_Tagged_Streams_Pragma;
6259 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
6261 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6263 end Set_Non_Binary_Modulus;
6265 procedure Set_Non_Limited_View (Id : E; V : E) is
6268 (Ekind (Id) in Incomplete_Kind
6269 or else Ekind (Id) in E_Abstract_State | E_Class_Wide_Type);
6271 end Set_Non_Limited_View;
6273 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
6276 (Root_Type (Id) = Standard_Boolean
6277 and then Ekind (Id) = E_Enumeration_Type);
6278 Set_Flag162 (Id, V);
6279 end Set_Nonzero_Is_True;
6281 procedure Set_Normalized_First_Bit (Id : E; V : U) is
6283 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
6285 end Set_Normalized_First_Bit;
6287 procedure Set_Normalized_Position (Id : E; V : U) is
6289 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
6291 end Set_Normalized_Position;
6293 procedure Set_Normalized_Position_Max (Id : E; V : U) is
6295 pragma Assert (Ekind (Id) in E_Component | E_Discriminant);
6297 end Set_Normalized_Position_Max;
6299 procedure Set_OK_To_Rename (Id : E; V : B := True) is
6301 pragma Assert (Ekind (Id) = E_Variable);
6302 Set_Flag247 (Id, V);
6303 end Set_OK_To_Rename;
6305 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
6308 (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
6309 Set_Flag241 (Id, V);
6310 end Set_Optimize_Alignment_Space;
6312 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
6315 (Is_Type (Id) or else Ekind (Id) in E_Constant | E_Variable);
6316 Set_Flag242 (Id, V);
6317 end Set_Optimize_Alignment_Time;
6319 procedure Set_Original_Access_Type (Id : E; V : E) is
6321 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
6323 end Set_Original_Access_Type;
6325 procedure Set_Original_Array_Type (Id : E; V : E) is
6327 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
6329 end Set_Original_Array_Type;
6331 procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
6333 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
6335 end Set_Original_Protected_Subprogram;
6337 procedure Set_Original_Record_Component (Id : E; V : E) is
6339 pragma Assert (Ekind (Id) in E_Void | E_Component | E_Discriminant);
6341 end Set_Original_Record_Component;
6343 procedure Set_Overlays_Constant (Id : E; V : B := True) is
6345 Set_Flag243 (Id, V);
6346 end Set_Overlays_Constant;
6348 procedure Set_Overridden_Operation (Id : E; V : E) is
6350 pragma Assert (Is_Subprogram_Or_Generic_Subprogram (Id));
6352 end Set_Overridden_Operation;
6354 procedure Set_Package_Instantiation (Id : E; V : N) is
6356 pragma Assert (Ekind (Id) in E_Void | E_Generic_Package | E_Package);
6358 end Set_Package_Instantiation;
6360 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
6362 pragma Assert (Is_Array_Type (Id));
6364 end Set_Packed_Array_Impl_Type;
6366 procedure Set_Parent_Subtype (Id : E; V : E) is
6368 pragma Assert (Ekind (Id) = E_Record_Type);
6370 end Set_Parent_Subtype;
6372 procedure Set_Part_Of_Constituents (Id : E; V : L) is
6374 pragma Assert (Ekind (Id) in E_Abstract_State | E_Variable);
6375 Set_Elist10 (Id, V);
6376 end Set_Part_Of_Constituents;
6378 procedure Set_Part_Of_References (Id : E; V : L) is
6380 pragma Assert (Ekind (Id) = E_Variable);
6381 Set_Elist11 (Id, V);
6382 end Set_Part_Of_References;
6384 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
6386 pragma Assert (Is_Type (Id));
6387 Set_Flag280 (Id, V);
6388 end Set_Partial_View_Has_Unknown_Discr;
6390 procedure Set_Pending_Access_Types (Id : E; V : L) is
6392 pragma Assert (Is_Type (Id));
6393 Set_Elist15 (Id, V);
6394 end Set_Pending_Access_Types;
6396 procedure Set_Postconditions_Proc (Id : E; V : E) is
6399 (Ekind (Id) in E_Entry | E_Entry_Family | E_Function | E_Procedure);
6401 end Set_Postconditions_Proc;
6403 procedure Set_Predicated_Parent (Id : E; V : E) is
6405 pragma Assert (Ekind (Id) in E_Array_Subtype
6407 | E_Record_Subtype_With_Private);
6409 end Set_Predicated_Parent;
6411 procedure Set_Predicates_Ignored (Id : E; V : B) is
6413 pragma Assert (Is_Type (Id));
6414 Set_Flag288 (Id, V);
6415 end Set_Predicates_Ignored;
6417 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
6419 pragma Assert (Is_Tagged_Type (Id));
6420 Set_Elist10 (Id, V);
6421 end Set_Direct_Primitive_Operations;
6423 procedure Set_Prival (Id : E; V : E) is
6425 pragma Assert (Is_Protected_Component (Id));
6429 procedure Set_Prival_Link (Id : E; V : E) is
6431 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
6433 end Set_Prival_Link;
6435 procedure Set_Private_Dependents (Id : E; V : L) is
6437 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
6438 Set_Elist18 (Id, V);
6439 end Set_Private_Dependents;
6441 procedure Set_Prev_Entity (Id : E; V : E) is
6444 end Set_Prev_Entity;
6446 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
6448 pragma Assert (Is_Subprogram_Or_Entry (Id));
6450 end Set_Protected_Body_Subprogram;
6452 procedure Set_Protected_Formal (Id : E; V : E) is
6454 pragma Assert (Is_Formal (Id));
6456 end Set_Protected_Formal;
6458 procedure Set_Protected_Subprogram (Id : E; V : E) is
6460 pragma Assert (Ekind (Id) in E_Function | E_Procedure);
6462 end Set_Protected_Subprogram;
6464 procedure Set_Protection_Object (Id : E; V : E) is
6466 pragma Assert (Ekind (Id) in E_Entry
6471 end Set_Protection_Object;
6473 procedure Set_Reachable (Id : E; V : B := True) is
6478 procedure Set_Receiving_Entry (Id : E; V : E) is
6480 pragma Assert (Ekind (Id) = E_Procedure);
6482 end Set_Receiving_Entry;
6484 procedure Set_Referenced (Id : E; V : B := True) is
6486 Set_Flag156 (Id, V);
6489 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
6492 end Set_Referenced_As_LHS;
6494 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
6496 Set_Flag227 (Id, V);
6497 end Set_Referenced_As_Out_Parameter;
6499 procedure Set_Refinement_Constituents (Id : E; V : L) is
6501 pragma Assert (Ekind (Id) = E_Abstract_State);
6503 end Set_Refinement_Constituents;
6505 procedure Set_Register_Exception_Call (Id : E; V : N) is
6507 pragma Assert (Ekind (Id) = E_Exception);
6509 end Set_Register_Exception_Call;
6511 procedure Set_Related_Array_Object (Id : E; V : E) is
6513 pragma Assert (Is_Array_Type (Id));
6515 end Set_Related_Array_Object;
6517 procedure Set_Related_Expression (Id : E; V : N) is
6521 Type_Kind | E_Constant | E_Variable | E_Function | E_Void);
6523 end Set_Related_Expression;
6525 procedure Set_Related_Instance (Id : E; V : E) is
6527 pragma Assert (Ekind (Id) in E_Package | E_Package_Body);
6529 end Set_Related_Instance;
6531 procedure Set_Related_Type (Id : E; V : E) is
6533 pragma Assert (Ekind (Id) in E_Component | E_Constant | E_Variable);
6535 end Set_Related_Type;
6537 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
6539 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
6541 end Set_Relative_Deadline_Variable;
6543 procedure Set_Renamed_Entity (Id : E; V : N) is
6546 end Set_Renamed_Entity;
6548 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
6550 pragma Assert (Ekind (Id) = E_Package);
6551 Set_Flag231 (Id, V);
6552 end Set_Renamed_In_Spec;
6554 procedure Set_Renamed_Object (Id : E; V : N) is
6557 end Set_Renamed_Object;
6559 procedure Set_Renaming_Map (Id : E; V : U) is
6562 end Set_Renaming_Map;
6564 procedure Set_Requires_Overriding (Id : E; V : B := True) is
6566 pragma Assert (Is_Overloadable (Id));
6567 Set_Flag213 (Id, V);
6568 end Set_Requires_Overriding;
6570 procedure Set_Return_Present (Id : E; V : B := True) is
6573 end Set_Return_Present;
6575 procedure Set_Return_Applies_To (Id : E; V : N) is
6578 end Set_Return_Applies_To;
6580 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
6583 end Set_Returns_By_Ref;
6585 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6588 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6589 Set_Flag164 (Id, V);
6590 end Set_Reverse_Bit_Order;
6592 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6596 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6598 end Set_Reverse_Storage_Order;
6600 procedure Set_Rewritten_For_C (Id : E; V : B := True) is
6602 pragma Assert (Ekind (Id) = E_Function);
6603 Set_Flag287 (Id, V);
6604 end Set_Rewritten_For_C;
6606 procedure Set_RM_Size (Id : E; V : U) is
6608 pragma Assert (Is_Type (Id));
6612 procedure Set_Scalar_Range (Id : E; V : N) is
6615 end Set_Scalar_Range;
6617 procedure Set_Scale_Value (Id : E; V : U) is
6620 end Set_Scale_Value;
6622 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6626 Concurrent_Kind | Entry_Kind | Generic_Unit_Kind |
6627 E_Package | E_Package_Body | Subprogram_Kind |
6628 E_Block | E_Subprogram_Body |
6629 E_Private_Type .. E_Limited_Private_Subtype |
6630 E_Void | E_Loop | E_Return_Statement);
6632 end Set_Scope_Depth_Value;
6634 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6636 Set_Flag167 (Id, V);
6637 end Set_Sec_Stack_Needed_For_Return;
6639 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6641 pragma Assert (Ekind (Id) = E_Variable);
6643 end Set_Shared_Var_Procs_Instance;
6645 procedure Set_Size_Check_Code (Id : E; V : N) is
6647 pragma Assert (Ekind (Id) in E_Constant | E_Variable);
6649 end Set_Size_Check_Code;
6651 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6653 Set_Flag177 (Id, V);
6654 end Set_Size_Depends_On_Discriminant;
6656 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6659 end Set_Size_Known_At_Compile_Time;
6661 procedure Set_Small_Value (Id : E; V : R) is
6663 pragma Assert (Is_Fixed_Point_Type (Id));
6664 Set_Ureal21 (Id, V);
6665 end Set_Small_Value;
6667 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6670 (Ekind (Id) in E_Protected_Type -- concurrent types
6673 Ekind (Id) in E_Generic_Package -- packages
6677 end Set_SPARK_Aux_Pragma;
6679 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6682 (Ekind (Id) in E_Protected_Type -- concurrent types
6685 Ekind (Id) in E_Generic_Package -- packages
6688 Set_Flag266 (Id, V);
6689 end Set_SPARK_Aux_Pragma_Inherited;
6691 procedure Set_SPARK_Pragma (Id : E; V : N) is
6694 (Ekind (Id) in E_Constant -- objects
6697 Ekind (Id) in E_Abstract_State -- overloadable
6701 | E_Generic_Function
6702 | E_Generic_Procedure
6707 Ekind (Id) in E_Generic_Package -- packages
6711 Ekind (Id) = E_Void -- special purpose
6713 Ekind (Id) in E_Protected_Body -- types
6718 end Set_SPARK_Pragma;
6720 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6723 (Ekind (Id) in E_Constant -- objects
6726 Ekind (Id) in E_Abstract_State -- overloadable
6730 | E_Generic_Function
6731 | E_Generic_Procedure
6736 Ekind (Id) in E_Generic_Package -- packages
6740 Ekind (Id) = E_Void -- special purpose
6742 Ekind (Id) in E_Protected_Body -- types
6746 Set_Flag265 (Id, V);
6747 end Set_SPARK_Pragma_Inherited;
6749 procedure Set_Spec_Entity (Id : E; V : E) is
6751 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6753 end Set_Spec_Entity;
6755 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6759 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6760 Set_Flag273 (Id, V);
6761 end Set_SSO_Set_High_By_Default;
6763 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6767 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6768 Set_Flag272 (Id, V);
6769 end Set_SSO_Set_Low_By_Default;
6771 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6773 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6775 end Set_Static_Discrete_Predicate;
6777 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6779 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6780 and then Has_Predicates (Id));
6782 end Set_Static_Real_Or_String_Predicate;
6784 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6786 pragma Assert (Ekind (Id) in E_Constant
6790 end Set_Status_Flag_Or_Transient_Decl;
6792 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6794 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6795 pragma Assert (Id = Base_Type (Id));
6797 end Set_Storage_Size_Variable;
6799 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6801 pragma Assert (Ekind (Id) = E_Package);
6803 end Set_Static_Elaboration_Desired;
6805 procedure Set_Static_Initialization (Id : E; V : N) is
6808 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6810 end Set_Static_Initialization;
6812 procedure Set_Stored_Constraint (Id : E; V : L) is
6814 pragma Assert (Nkind (Id) in N_Entity);
6815 Set_Elist23 (Id, V);
6816 end Set_Stored_Constraint;
6818 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6820 pragma Assert (Is_Type (Id)
6821 or else (Ekind (Id) in E_Constant
6823 Set_Flag270 (Id, V);
6824 end Set_Stores_Attribute_Old_Prefix;
6826 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6828 pragma Assert (Id = Base_Type (Id));
6829 Set_Flag145 (Id, V);
6830 end Set_Strict_Alignment;
6832 procedure Set_String_Literal_Length (Id : E; V : U) is
6834 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6836 end Set_String_Literal_Length;
6838 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6840 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6842 end Set_String_Literal_Low_Bound;
6844 procedure Set_Subprograms_For_Type (Id : E; V : L) is
6846 pragma Assert (Is_Type (Id));
6847 Set_Elist29 (Id, V);
6848 end Set_Subprograms_For_Type;
6850 procedure Set_Subps_Index (Id : E; V : U) is
6852 pragma Assert (Is_Subprogram (Id));
6854 end Set_Subps_Index;
6856 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6858 Set_Flag303 (Id, V);
6859 end Set_Suppress_Elaboration_Warnings;
6861 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6863 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6864 Set_Flag105 (Id, V);
6865 end Set_Suppress_Initialization;
6867 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6869 Set_Flag165 (Id, V);
6870 end Set_Suppress_Style_Checks;
6872 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6874 Set_Flag217 (Id, V);
6875 end Set_Suppress_Value_Tracking_On_Call;
6877 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6879 pragma Assert (Ekind (Id) in Task_Kind);
6881 end Set_Task_Body_Procedure;
6883 procedure Set_Thunk_Entity (Id : E; V : E) is
6885 pragma Assert (Ekind (Id) in E_Function | E_Procedure
6886 and then Is_Thunk (Id));
6888 end Set_Thunk_Entity;
6890 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6893 end Set_Treat_As_Volatile;
6895 procedure Set_Underlying_Full_View (Id : E; V : E) is
6897 pragma Assert (Ekind (Id) in Private_Kind);
6899 end Set_Underlying_Full_View;
6901 procedure Set_Underlying_Record_View (Id : E; V : E) is
6903 pragma Assert (Ekind (Id) = E_Record_Type);
6905 end Set_Underlying_Record_View;
6907 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6909 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6910 Set_Flag216 (Id, V);
6911 end Set_Universal_Aliasing;
6913 procedure Set_Unset_Reference (Id : E; V : N) is
6916 end Set_Unset_Reference;
6918 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6920 Set_Flag222 (Id, V);
6921 end Set_Used_As_Generic_Actual;
6923 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6925 pragma Assert (Ekind (Id) = E_Protected_Type);
6926 Set_Flag188 (Id, V);
6927 end Set_Uses_Lock_Free;
6929 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6932 end Set_Uses_Sec_Stack;
6934 procedure Set_Validated_Object (Id : E; V : N) is
6936 pragma Assert (Ekind (Id) = E_Variable);
6938 end Set_Validated_Object;
6940 procedure Set_Warnings_Off (Id : E; V : B := True) is
6943 end Set_Warnings_Off;
6945 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6947 Set_Flag236 (Id, V);
6948 end Set_Warnings_Off_Used;
6950 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6952 Set_Flag237 (Id, V);
6953 end Set_Warnings_Off_Used_Unmodified;
6955 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6957 Set_Flag238 (Id, V);
6958 end Set_Warnings_Off_Used_Unreferenced;
6960 procedure Set_Was_Hidden (Id : E; V : B := True) is
6962 Set_Flag196 (Id, V);
6965 procedure Set_Wrapped_Entity (Id : E; V : E) is
6967 pragma Assert (Ekind (Id) in E_Function | E_Procedure
6968 and then Is_Primitive_Wrapper (Id));
6970 end Set_Wrapped_Entity;
6972 -----------------------------------
6973 -- Field Initialization Routines --
6974 -----------------------------------
6976 procedure Init_Alignment (Id : E) is
6978 Set_Uint14 (Id, Uint_0);
6981 procedure Init_Alignment (Id : E; V : Int) is
6983 Set_Uint14 (Id, UI_From_Int (V));
6986 procedure Init_Component_Bit_Offset (Id : E) is
6988 Set_Uint11 (Id, No_Uint);
6989 end Init_Component_Bit_Offset;
6991 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6993 Set_Uint11 (Id, UI_From_Int (V));
6994 end Init_Component_Bit_Offset;
6996 procedure Init_Component_Size (Id : E) is
6998 Set_Uint22 (Id, Uint_0);
6999 end Init_Component_Size;
7001 procedure Init_Component_Size (Id : E; V : Int) is
7003 Set_Uint22 (Id, UI_From_Int (V));
7004 end Init_Component_Size;
7006 procedure Init_Digits_Value (Id : E) is
7008 Set_Uint17 (Id, Uint_0);
7009 end Init_Digits_Value;
7011 procedure Init_Digits_Value (Id : E; V : Int) is
7013 Set_Uint17 (Id, UI_From_Int (V));
7014 end Init_Digits_Value;
7016 procedure Init_Esize (Id : E) is
7018 Set_Uint12 (Id, Uint_0);
7021 procedure Init_Esize (Id : E; V : Int) is
7023 Set_Uint12 (Id, UI_From_Int (V));
7026 procedure Init_Normalized_First_Bit (Id : E) is
7028 Set_Uint8 (Id, No_Uint);
7029 end Init_Normalized_First_Bit;
7031 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
7033 Set_Uint8 (Id, UI_From_Int (V));
7034 end Init_Normalized_First_Bit;
7036 procedure Init_Normalized_Position (Id : E) is
7038 Set_Uint14 (Id, No_Uint);
7039 end Init_Normalized_Position;
7041 procedure Init_Normalized_Position (Id : E; V : Int) is
7043 Set_Uint14 (Id, UI_From_Int (V));
7044 end Init_Normalized_Position;
7046 procedure Init_Normalized_Position_Max (Id : E) is
7048 Set_Uint10 (Id, No_Uint);
7049 end Init_Normalized_Position_Max;
7051 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
7053 Set_Uint10 (Id, UI_From_Int (V));
7054 end Init_Normalized_Position_Max;
7056 procedure Init_RM_Size (Id : E) is
7058 Set_Uint13 (Id, Uint_0);
7061 procedure Init_RM_Size (Id : E; V : Int) is
7063 Set_Uint13 (Id, UI_From_Int (V));
7066 -----------------------------
7067 -- Init_Component_Location --
7068 -----------------------------
7070 procedure Init_Component_Location (Id : E) is
7072 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
7073 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
7074 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
7075 Set_Uint12 (Id, Uint_0); -- Esize
7076 Set_Uint14 (Id, No_Uint); -- Normalized_Position
7077 end Init_Component_Location;
7079 ----------------------------
7080 -- Init_Object_Size_Align --
7081 ----------------------------
7083 procedure Init_Object_Size_Align (Id : E) is
7085 Set_Uint12 (Id, Uint_0); -- Esize
7086 Set_Uint14 (Id, Uint_0); -- Alignment
7087 end Init_Object_Size_Align;
7093 procedure Init_Size (Id : E; V : Int) is
7095 pragma Assert (not Is_Object (Id));
7096 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
7097 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
7100 ---------------------
7101 -- Init_Size_Align --
7102 ---------------------
7104 procedure Init_Size_Align (Id : E) is
7106 pragma Assert (not Is_Object (Id));
7107 Set_Uint12 (Id, Uint_0); -- Esize
7108 Set_Uint13 (Id, Uint_0); -- RM_Size
7109 Set_Uint14 (Id, Uint_0); -- Alignment
7110 end Init_Size_Align;
7112 ----------------------------------------------
7113 -- Type Representation Attribute Predicates --
7114 ----------------------------------------------
7116 function Known_Alignment (E : Entity_Id) return B is
7118 return Uint14 (E) /= Uint_0
7119 and then Uint14 (E) /= No_Uint;
7120 end Known_Alignment;
7122 function Known_Component_Bit_Offset (E : Entity_Id) return B is
7124 return Uint11 (E) /= No_Uint;
7125 end Known_Component_Bit_Offset;
7127 function Known_Component_Size (E : Entity_Id) return B is
7129 return Uint22 (Base_Type (E)) /= Uint_0
7130 and then Uint22 (Base_Type (E)) /= No_Uint;
7131 end Known_Component_Size;
7133 function Known_Esize (E : Entity_Id) return B is
7135 return Uint12 (E) /= Uint_0
7136 and then Uint12 (E) /= No_Uint;
7139 function Known_Normalized_First_Bit (E : Entity_Id) return B is
7141 return Uint8 (E) /= No_Uint;
7142 end Known_Normalized_First_Bit;
7144 function Known_Normalized_Position (E : Entity_Id) return B is
7146 return Uint14 (E) /= No_Uint;
7147 end Known_Normalized_Position;
7149 function Known_Normalized_Position_Max (E : Entity_Id) return B is
7151 return Uint10 (E) /= No_Uint;
7152 end Known_Normalized_Position_Max;
7154 function Known_RM_Size (E : Entity_Id) return B is
7156 return Uint13 (E) /= No_Uint
7157 and then (Uint13 (E) /= Uint_0
7158 or else Is_Discrete_Type (E)
7159 or else Is_Fixed_Point_Type (E));
7162 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
7164 return Uint11 (E) /= No_Uint
7165 and then Uint11 (E) >= Uint_0;
7166 end Known_Static_Component_Bit_Offset;
7168 function Known_Static_Component_Size (E : Entity_Id) return B is
7170 return Uint22 (Base_Type (E)) > Uint_0;
7171 end Known_Static_Component_Size;
7173 function Known_Static_Esize (E : Entity_Id) return B is
7175 return Uint12 (E) > Uint_0
7176 and then not Is_Generic_Type (E);
7177 end Known_Static_Esize;
7179 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
7181 return Uint8 (E) /= No_Uint
7182 and then Uint8 (E) >= Uint_0;
7183 end Known_Static_Normalized_First_Bit;
7185 function Known_Static_Normalized_Position (E : Entity_Id) return B is
7187 return Uint14 (E) /= No_Uint
7188 and then Uint14 (E) >= Uint_0;
7189 end Known_Static_Normalized_Position;
7191 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
7193 return Uint10 (E) /= No_Uint
7194 and then Uint10 (E) >= Uint_0;
7195 end Known_Static_Normalized_Position_Max;
7197 function Known_Static_RM_Size (E : Entity_Id) return B is
7199 return (Uint13 (E) > Uint_0
7200 or else Is_Discrete_Type (E)
7201 or else Is_Fixed_Point_Type (E))
7202 and then not Is_Generic_Type (E);
7203 end Known_Static_RM_Size;
7205 function Unknown_Alignment (E : Entity_Id) return B is
7207 return Uint14 (E) = Uint_0
7208 or else Uint14 (E) = No_Uint;
7209 end Unknown_Alignment;
7211 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
7213 return Uint11 (E) = No_Uint;
7214 end Unknown_Component_Bit_Offset;
7216 function Unknown_Component_Size (E : Entity_Id) return B is
7218 return Uint22 (Base_Type (E)) = Uint_0
7220 Uint22 (Base_Type (E)) = No_Uint;
7221 end Unknown_Component_Size;
7223 function Unknown_Esize (E : Entity_Id) return B is
7225 return Uint12 (E) = No_Uint
7227 Uint12 (E) = Uint_0;
7230 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
7232 return Uint8 (E) = No_Uint;
7233 end Unknown_Normalized_First_Bit;
7235 function Unknown_Normalized_Position (E : Entity_Id) return B is
7237 return Uint14 (E) = No_Uint;
7238 end Unknown_Normalized_Position;
7240 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
7242 return Uint10 (E) = No_Uint;
7243 end Unknown_Normalized_Position_Max;
7245 function Unknown_RM_Size (E : Entity_Id) return B is
7247 return (Uint13 (E) = Uint_0
7248 and then not Is_Discrete_Type (E)
7249 and then not Is_Fixed_Point_Type (E))
7250 or else Uint13 (E) = No_Uint;
7251 end Unknown_RM_Size;
7253 --------------------
7254 -- Address_Clause --
7255 --------------------
7257 function Address_Clause (Id : E) return N is
7259 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
7266 function Aft_Value (Id : E) return U is
7268 Delta_Val : Ureal := Delta_Value (Id);
7270 while Delta_Val < Ureal_Tenth loop
7271 Delta_Val := Delta_Val * Ureal_10;
7272 Result := Result + 1;
7275 return UI_From_Int (Result);
7278 ----------------------
7279 -- Alignment_Clause --
7280 ----------------------
7282 function Alignment_Clause (Id : E) return N is
7284 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
7285 end Alignment_Clause;
7291 procedure Append_Entity (Id : Entity_Id; Scop : Entity_Id) is
7292 Last : constant Entity_Id := Last_Entity (Scop);
7295 Set_Scope (Id, Scop);
7296 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
7298 -- The entity chain is empty
7301 Set_First_Entity (Scop, Id);
7303 -- Otherwise the entity chain has at least one element
7306 Link_Entities (Last, Id); -- Last <-- Id, Last --> Id
7309 -- NOTE: The setting of the Next_Entity attribute of Id must happen
7310 -- here as opposed to at the beginning of the routine because doing
7311 -- so causes the binder to hang. It is not clear why ???
7313 Set_Next_Entity (Id, Empty); -- Id --> Empty
7315 Set_Last_Entity (Scop, Id);
7322 function Base_Type (Id : E) return E is
7324 if Is_Base_Type (Id) then
7327 pragma Assert (Is_Type (Id));
7332 -------------------------
7333 -- Component_Alignment --
7334 -------------------------
7336 -- Component Alignment is encoded using two flags, Flag128/129 as
7337 -- follows. Note that both flags False = Align_Default, so that the
7338 -- default initialization of flags to False initializes component
7339 -- alignment to the default value as required.
7341 -- Flag128 Flag129 Value
7342 -- ------- ------- -----
7343 -- False False Calign_Default
7344 -- False True Calign_Component_Size
7345 -- True False Calign_Component_Size_4
7346 -- True True Calign_Storage_Unit
7348 function Component_Alignment (Id : E) return C is
7349 BT : constant Node_Id := Base_Type (Id);
7352 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
7354 if Flag128 (BT) then
7355 if Flag129 (BT) then
7356 return Calign_Storage_Unit;
7358 return Calign_Component_Size_4;
7362 if Flag129 (BT) then
7363 return Calign_Component_Size;
7365 return Calign_Default;
7368 end Component_Alignment;
7370 ----------------------
7371 -- Declaration_Node --
7372 ----------------------
7374 function Declaration_Node (Id : E) return N is
7378 if Ekind (Id) = E_Incomplete_Type
7379 and then Present (Full_View (Id))
7381 P := Parent (Full_View (Id));
7387 if Nkind (P) in N_Selected_Component | N_Expanded_Name
7388 or else (Nkind (P) = N_Defining_Program_Unit_Name
7389 and then Is_Child_Unit (Id))
7396 end Declaration_Node;
7398 ---------------------
7399 -- Designated_Type --
7400 ---------------------
7402 function Designated_Type (Id : E) return E is
7403 Desig_Type : Entity_Id;
7406 Desig_Type := Directly_Designated_Type (Id);
7408 if Is_Incomplete_Type (Desig_Type)
7409 and then Present (Full_View (Desig_Type))
7411 return Full_View (Desig_Type);
7413 elsif Is_Class_Wide_Type (Desig_Type)
7414 and then Is_Incomplete_Type (Etype (Desig_Type))
7415 and then Present (Full_View (Etype (Desig_Type)))
7416 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
7418 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
7423 end Designated_Type;
7429 function DIC_Procedure (Id : E) return E is
7430 Subp_Elmt : Elmt_Id;
7431 Subp_Id : Entity_Id;
7435 pragma Assert (Is_Type (Id));
7437 Subps := Subprograms_For_Type (Base_Type (Id));
7439 if Present (Subps) then
7440 Subp_Elmt := First_Elmt (Subps);
7441 while Present (Subp_Elmt) loop
7442 Subp_Id := Node (Subp_Elmt);
7444 -- Currently the flag Is_DIC_Procedure is set for both normal DIC
7445 -- check procedures as well as for partial DIC check procedures,
7446 -- and we don't have a flag for the partial procedures.
7448 if Is_DIC_Procedure (Subp_Id)
7449 and then not Is_Partial_DIC_Procedure (Subp_Id)
7454 Next_Elmt (Subp_Elmt);
7461 ----------------------
7462 -- Entry_Index_Type --
7463 ----------------------
7465 function Entry_Index_Type (Id : E) return N is
7467 pragma Assert (Ekind (Id) = E_Entry_Family);
7468 return Etype (Discrete_Subtype_Definition (Parent (Id)));
7469 end Entry_Index_Type;
7471 ---------------------
7472 -- First_Component --
7473 ---------------------
7475 function First_Component (Id : E) return E is
7476 Comp_Id : Entity_Id;
7480 (Is_Concurrent_Type (Id)
7481 or else Is_Incomplete_Or_Private_Type (Id)
7482 or else Is_Record_Type (Id));
7484 Comp_Id := First_Entity (Id);
7485 while Present (Comp_Id) loop
7486 exit when Ekind (Comp_Id) = E_Component;
7487 Next_Entity (Comp_Id);
7491 end First_Component;
7493 -------------------------------------
7494 -- First_Component_Or_Discriminant --
7495 -------------------------------------
7497 function First_Component_Or_Discriminant (Id : E) return E is
7498 Comp_Id : Entity_Id;
7502 (Is_Concurrent_Type (Id)
7503 or else Is_Incomplete_Or_Private_Type (Id)
7504 or else Is_Record_Type (Id)
7505 or else Has_Discriminants (Id));
7507 Comp_Id := First_Entity (Id);
7508 while Present (Comp_Id) loop
7509 exit when Ekind (Comp_Id) in E_Component | E_Discriminant;
7510 Next_Entity (Comp_Id);
7514 end First_Component_Or_Discriminant;
7520 function First_Formal (Id : E) return E is
7525 (Is_Generic_Subprogram (Id)
7526 or else Is_Overloadable (Id)
7527 or else Ekind (Id) in E_Entry_Family
7529 | E_Subprogram_Type);
7531 if Ekind (Id) = E_Enumeration_Literal then
7535 Formal := First_Entity (Id);
7537 -- Deal with the common, non-generic case first
7539 if No (Formal) or else Is_Formal (Formal) then
7543 -- The first/next entity chain of a generic subprogram contains all
7544 -- generic formal parameters, followed by the formal parameters.
7546 if Is_Generic_Subprogram (Id) then
7547 while Present (Formal) and then not Is_Formal (Formal) loop
7548 Next_Entity (Formal);
7557 ------------------------------
7558 -- First_Formal_With_Extras --
7559 ------------------------------
7561 function First_Formal_With_Extras (Id : E) return E is
7566 (Is_Generic_Subprogram (Id)
7567 or else Is_Overloadable (Id)
7568 or else Ekind (Id) in E_Entry_Family
7570 | E_Subprogram_Type);
7572 if Ekind (Id) = E_Enumeration_Literal then
7576 Formal := First_Entity (Id);
7578 -- The first/next entity chain of a generic subprogram contains all
7579 -- generic formal parameters, followed by the formal parameters. Go
7580 -- directly to the parameters by skipping the formal part.
7582 if Is_Generic_Subprogram (Id) then
7583 while Present (Formal) and then not Is_Formal (Formal) loop
7584 Next_Entity (Formal);
7588 if Present (Formal) and then Is_Formal (Formal) then
7591 return Extra_Formals (Id); -- Empty if no extra formals
7594 end First_Formal_With_Extras;
7596 -------------------------------------
7597 -- Get_Attribute_Definition_Clause --
7598 -------------------------------------
7600 function Get_Attribute_Definition_Clause
7602 Id : Attribute_Id) return Node_Id
7607 N := First_Rep_Item (E);
7608 while Present (N) loop
7609 if Nkind (N) = N_Attribute_Definition_Clause
7610 and then Get_Attribute_Id (Chars (N)) = Id
7619 end Get_Attribute_Definition_Clause;
7621 ---------------------------
7622 -- Get_Class_Wide_Pragma --
7623 ---------------------------
7625 function Get_Class_Wide_Pragma
7627 Id : Pragma_Id) return Node_Id
7633 Items := Contract (E);
7639 Item := Pre_Post_Conditions (Items);
7640 while Present (Item) loop
7641 if Nkind (Item) = N_Pragma
7642 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7643 and then Class_Present (Item)
7648 Item := Next_Pragma (Item);
7652 end Get_Class_Wide_Pragma;
7658 function Get_Full_View (T : Entity_Id) return Entity_Id is
7660 if Is_Incomplete_Type (T) and then Present (Full_View (T)) then
7661 return Full_View (T);
7663 elsif Is_Class_Wide_Type (T)
7664 and then Is_Incomplete_Type (Root_Type (T))
7665 and then Present (Full_View (Root_Type (T)))
7667 return Class_Wide_Type (Full_View (Root_Type (T)));
7678 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
7680 -- Classification pragmas
7682 Is_CLS : constant Boolean :=
7683 Id = Pragma_Abstract_State or else
7684 Id = Pragma_Attach_Handler or else
7685 Id = Pragma_Async_Readers or else
7686 Id = Pragma_Async_Writers or else
7687 Id = Pragma_Constant_After_Elaboration or else
7688 Id = Pragma_Depends or else
7689 Id = Pragma_Effective_Reads or else
7690 Id = Pragma_Effective_Writes or else
7691 Id = Pragma_Extensions_Visible or else
7692 Id = Pragma_Global or else
7693 Id = Pragma_Initial_Condition or else
7694 Id = Pragma_Initializes or else
7695 Id = Pragma_Interrupt_Handler or else
7696 Id = Pragma_No_Caching or else
7697 Id = Pragma_Part_Of or else
7698 Id = Pragma_Refined_Depends or else
7699 Id = Pragma_Refined_Global or else
7700 Id = Pragma_Refined_State or else
7701 Id = Pragma_Volatile_Function;
7703 -- Contract / subprogram variant / test case pragmas
7705 Is_CTC : constant Boolean :=
7706 Id = Pragma_Contract_Cases or else
7707 Id = Pragma_Subprogram_Variant or else
7708 Id = Pragma_Test_Case;
7710 -- Pre / postcondition pragmas
7712 Is_PPC : constant Boolean :=
7713 Id = Pragma_Precondition or else
7714 Id = Pragma_Postcondition or else
7715 Id = Pragma_Refined_Post;
7717 In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC;
7723 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7724 -- extracted from their specialized list.
7727 Items := Contract (E);
7733 Item := Classifications (Items);
7736 Item := Contract_Test_Cases (Items);
7739 Item := Pre_Post_Conditions (Items);
7745 Item := First_Rep_Item (E);
7748 while Present (Item) loop
7749 if Nkind (Item) = N_Pragma
7750 and then Get_Pragma_Id (Pragma_Name_Unmapped (Item)) = Id
7754 -- All nodes in N_Contract are chained using Next_Pragma
7756 elsif In_Contract then
7757 Item := Next_Pragma (Item);
7762 Next_Rep_Item (Item);
7769 --------------------------------------
7770 -- Get_Record_Representation_Clause --
7771 --------------------------------------
7773 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7777 N := First_Rep_Item (E);
7778 while Present (N) loop
7779 if Nkind (N) = N_Record_Representation_Clause then
7787 end Get_Record_Representation_Clause;
7789 ------------------------
7790 -- Has_Attach_Handler --
7791 ------------------------
7793 function Has_Attach_Handler (Id : E) return B is
7797 pragma Assert (Is_Protected_Type (Id));
7799 Ritem := First_Rep_Item (Id);
7800 while Present (Ritem) loop
7801 if Nkind (Ritem) = N_Pragma
7802 and then Pragma_Name (Ritem) = Name_Attach_Handler
7806 Next_Rep_Item (Ritem);
7811 end Has_Attach_Handler;
7817 function Has_DIC (Id : E) return B is
7819 return Has_Own_DIC (Id) or else Has_Inherited_DIC (Id);
7826 function Has_Entries (Id : E) return B is
7830 pragma Assert (Is_Concurrent_Type (Id));
7832 Ent := First_Entity (Id);
7833 while Present (Ent) loop
7834 if Is_Entry (Ent) then
7844 ----------------------------
7845 -- Has_Foreign_Convention --
7846 ----------------------------
7848 function Has_Foreign_Convention (Id : E) return B is
7850 -- While regular Intrinsics such as the Standard operators fit in the
7851 -- "Ada" convention, those with an Interface_Name materialize GCC
7852 -- builtin imports for which Ada special treatments shouldn't apply.
7854 return Convention (Id) in Foreign_Convention
7855 or else (Convention (Id) = Convention_Intrinsic
7856 and then Present (Interface_Name (Id)));
7857 end Has_Foreign_Convention;
7859 ---------------------------
7860 -- Has_Interrupt_Handler --
7861 ---------------------------
7863 function Has_Interrupt_Handler (Id : E) return B is
7867 pragma Assert (Is_Protected_Type (Id));
7869 Ritem := First_Rep_Item (Id);
7870 while Present (Ritem) loop
7871 if Nkind (Ritem) = N_Pragma
7872 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7876 Next_Rep_Item (Ritem);
7881 end Has_Interrupt_Handler;
7883 --------------------
7884 -- Has_Invariants --
7885 --------------------
7887 function Has_Invariants (Id : E) return B is
7889 return Has_Own_Invariants (Id) or else Has_Inherited_Invariants (Id);
7892 --------------------------
7893 -- Has_Limited_View --
7894 --------------------------
7896 function Has_Limited_View (Id : E) return B is
7898 return Ekind (Id) = E_Package
7899 and then not Is_Generic_Instance (Id)
7900 and then Present (Limited_View (Id));
7901 end Has_Limited_View;
7903 --------------------------
7904 -- Has_Non_Limited_View --
7905 --------------------------
7907 function Has_Non_Limited_View (Id : E) return B is
7909 return (Ekind (Id) in Incomplete_Kind
7910 or else Ekind (Id) in Class_Wide_Kind
7911 or else Ekind (Id) = E_Abstract_State)
7912 and then Present (Non_Limited_View (Id));
7913 end Has_Non_Limited_View;
7915 ---------------------------------
7916 -- Has_Non_Null_Abstract_State --
7917 ---------------------------------
7919 function Has_Non_Null_Abstract_State (Id : E) return B is
7921 pragma Assert (Is_Package_Or_Generic_Package (Id));
7924 Present (Abstract_States (Id))
7926 not Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7927 end Has_Non_Null_Abstract_State;
7929 -------------------------------------
7930 -- Has_Non_Null_Visible_Refinement --
7931 -------------------------------------
7933 function Has_Non_Null_Visible_Refinement (Id : E) return B is
7934 Constits : Elist_Id;
7937 -- "Refinement" is a concept applicable only to abstract states
7939 pragma Assert (Ekind (Id) = E_Abstract_State);
7940 Constits := Refinement_Constituents (Id);
7942 -- A partial refinement is always non-null. For a full refinement to be
7943 -- non-null, the first constituent must be anything other than null.
7946 Has_Partial_Visible_Refinement (Id)
7947 or else (Has_Visible_Refinement (Id)
7948 and then Present (Constits)
7949 and then Nkind (Node (First_Elmt (Constits))) /= N_Null);
7950 end Has_Non_Null_Visible_Refinement;
7952 -----------------------------
7953 -- Has_Null_Abstract_State --
7954 -----------------------------
7956 function Has_Null_Abstract_State (Id : E) return B is
7957 pragma Assert (Is_Package_Or_Generic_Package (Id));
7959 States : constant Elist_Id := Abstract_States (Id);
7962 -- Check first available state of related package. A null abstract
7963 -- state always appears as the sole element of the state list.
7967 and then Is_Null_State (Node (First_Elmt (States)));
7968 end Has_Null_Abstract_State;
7970 ---------------------------------
7971 -- Has_Null_Visible_Refinement --
7972 ---------------------------------
7974 function Has_Null_Visible_Refinement (Id : E) return B is
7975 Constits : Elist_Id;
7978 -- "Refinement" is a concept applicable only to abstract states
7980 pragma Assert (Ekind (Id) = E_Abstract_State);
7981 Constits := Refinement_Constituents (Id);
7983 -- For a refinement to be null, the state's sole constituent must be a
7987 Has_Visible_Refinement (Id)
7988 and then Present (Constits)
7989 and then Nkind (Node (First_Elmt (Constits))) = N_Null;
7990 end Has_Null_Visible_Refinement;
7992 --------------------
7993 -- Has_Unmodified --
7994 --------------------
7996 function Has_Unmodified (E : Entity_Id) return Boolean is
7998 if Has_Pragma_Unmodified (E) then
8000 elsif Warnings_Off (E) then
8001 Set_Warnings_Off_Used_Unmodified (E);
8008 ---------------------
8009 -- Has_Unreferenced --
8010 ---------------------
8012 function Has_Unreferenced (E : Entity_Id) return Boolean is
8014 if Has_Pragma_Unreferenced (E) then
8016 elsif Warnings_Off (E) then
8017 Set_Warnings_Off_Used_Unreferenced (E);
8022 end Has_Unreferenced;
8024 ----------------------
8025 -- Has_Warnings_Off --
8026 ----------------------
8028 function Has_Warnings_Off (E : Entity_Id) return Boolean is
8030 if Warnings_Off (E) then
8031 Set_Warnings_Off_Used (E);
8036 end Has_Warnings_Off;
8038 ------------------------------
8039 -- Implementation_Base_Type --
8040 ------------------------------
8042 function Implementation_Base_Type (Id : E) return E is
8047 Bastyp := Base_Type (Id);
8049 if Is_Incomplete_Or_Private_Type (Bastyp) then
8050 Imptyp := Underlying_Type (Bastyp);
8052 -- If we have an implementation type, then just return it,
8053 -- otherwise we return the Base_Type anyway. This can only
8054 -- happen in error situations and should avoid some error bombs.
8056 if Present (Imptyp) then
8057 return Base_Type (Imptyp);
8065 end Implementation_Base_Type;
8067 -------------------------
8068 -- Invariant_Procedure --
8069 -------------------------
8071 function Invariant_Procedure (Id : E) return E is
8072 Subp_Elmt : Elmt_Id;
8073 Subp_Id : Entity_Id;
8077 pragma Assert (Is_Type (Id));
8079 Subps := Subprograms_For_Type (Base_Type (Id));
8081 if Present (Subps) then
8082 Subp_Elmt := First_Elmt (Subps);
8083 while Present (Subp_Elmt) loop
8084 Subp_Id := Node (Subp_Elmt);
8086 if Is_Invariant_Procedure (Subp_Id) then
8090 Next_Elmt (Subp_Elmt);
8095 end Invariant_Procedure;
8101 -- Global flag table allowing rapid computation of this function
8103 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
8104 (E_Enumeration_Subtype |
8105 E_Incomplete_Subtype |
8106 E_Signed_Integer_Subtype |
8107 E_Modular_Integer_Subtype |
8108 E_Floating_Point_Subtype |
8109 E_Ordinary_Fixed_Point_Subtype |
8110 E_Decimal_Fixed_Point_Subtype |
8114 E_Record_Subtype_With_Private |
8115 E_Limited_Private_Subtype |
8117 E_Protected_Subtype |
8119 E_String_Literal_Subtype |
8120 E_Class_Wide_Subtype => False,
8123 function Is_Base_Type (Id : E) return Boolean is
8125 return Entity_Is_Base_Type (Ekind (Id));
8128 ---------------------
8129 -- Is_Boolean_Type --
8130 ---------------------
8132 function Is_Boolean_Type (Id : E) return B is
8134 return Root_Type (Id) = Standard_Boolean;
8135 end Is_Boolean_Type;
8137 ------------------------
8138 -- Is_Constant_Object --
8139 ------------------------
8141 function Is_Constant_Object (Id : E) return B is
8143 return Ekind (Id) in E_Constant | E_In_Parameter | E_Loop_Parameter;
8144 end Is_Constant_Object;
8150 function Is_Controlled (Id : E) return B is
8152 return Is_Controlled_Active (Id) and then not Disable_Controlled (Id);
8155 --------------------
8156 -- Is_Discriminal --
8157 --------------------
8159 function Is_Discriminal (Id : E) return B is
8161 return Ekind (Id) in E_Constant | E_In_Parameter
8162 and then Present (Discriminal_Link (Id));
8165 ----------------------
8166 -- Is_Dynamic_Scope --
8167 ----------------------
8169 function Is_Dynamic_Scope (Id : E) return B is
8172 Ekind (Id) = E_Block
8174 Ekind (Id) = E_Function
8176 Ekind (Id) = E_Procedure
8178 Ekind (Id) = E_Subprogram_Body
8180 Ekind (Id) = E_Task_Type
8182 (Ekind (Id) = E_Limited_Private_Type
8183 and then Present (Full_View (Id))
8184 and then Ekind (Full_View (Id)) = E_Task_Type)
8186 Ekind (Id) = E_Entry
8188 Ekind (Id) = E_Entry_Family
8190 Ekind (Id) = E_Return_Statement;
8191 end Is_Dynamic_Scope;
8193 --------------------
8194 -- Is_Entity_Name --
8195 --------------------
8197 function Is_Entity_Name (N : Node_Id) return Boolean is
8198 Kind : constant Node_Kind := Nkind (N);
8201 -- Identifiers, operator symbols, expanded names are entity names
8203 return Kind in N_Identifier | N_Operator_Symbol | N_Expanded_Name
8205 -- Attribute references are entity names if they refer to an entity.
8206 -- Note that we don't do this by testing for the presence of the
8207 -- Entity field in the N_Attribute_Reference node, since it may not
8208 -- have been set yet.
8210 or else (Kind = N_Attribute_Reference
8211 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
8214 ---------------------------
8215 -- Is_Elaboration_Target --
8216 ---------------------------
8218 function Is_Elaboration_Target (Id : Entity_Id) return Boolean is
8221 Ekind (Id) in E_Constant | E_Package | E_Variable
8222 or else Is_Generic_Unit (Id)
8223 or else Is_Subprogram_Or_Entry (Id)
8224 or else Is_Task_Type (Id);
8225 end Is_Elaboration_Target;
8227 -----------------------
8228 -- Is_External_State --
8229 -----------------------
8231 function Is_External_State (Id : E) return B is
8233 -- To qualify, the abstract state must appear with option "external" or
8234 -- "synchronous" (SPARK RM 7.1.4(7) and (9)).
8237 Ekind (Id) = E_Abstract_State
8238 and then (Has_Option (Id, Name_External)
8240 Has_Option (Id, Name_Synchronous));
8241 end Is_External_State;
8247 function Is_Finalizer (Id : E) return B is
8249 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
8252 ----------------------
8253 -- Is_Full_Access --
8254 ----------------------
8256 function Is_Full_Access (Id : E) return B is
8258 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
8265 function Is_Null_State (Id : E) return B is
8268 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
8271 -----------------------------------
8272 -- Is_Package_Or_Generic_Package --
8273 -----------------------------------
8275 function Is_Package_Or_Generic_Package (Id : E) return B is
8277 return Ekind (Id) in E_Generic_Package | E_Package;
8278 end Is_Package_Or_Generic_Package;
8280 ---------------------
8281 -- Is_Packed_Array --
8282 ---------------------
8284 function Is_Packed_Array (Id : E) return B is
8286 return Is_Array_Type (Id) and then Is_Packed (Id);
8287 end Is_Packed_Array;
8293 function Is_Prival (Id : E) return B is
8295 return Ekind (Id) in E_Constant | E_Variable
8296 and then Present (Prival_Link (Id));
8299 ----------------------------
8300 -- Is_Protected_Component --
8301 ----------------------------
8303 function Is_Protected_Component (Id : E) return B is
8305 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
8306 end Is_Protected_Component;
8308 ----------------------------
8309 -- Is_Protected_Interface --
8310 ----------------------------
8312 function Is_Protected_Interface (Id : E) return B is
8313 Typ : constant Entity_Id := Base_Type (Id);
8315 if not Is_Interface (Typ) then
8317 elsif Is_Class_Wide_Type (Typ) then
8318 return Is_Protected_Interface (Etype (Typ));
8320 return Protected_Present (Type_Definition (Parent (Typ)));
8322 end Is_Protected_Interface;
8324 ------------------------------
8325 -- Is_Protected_Record_Type --
8326 ------------------------------
8328 function Is_Protected_Record_Type (Id : E) return B is
8331 Is_Concurrent_Record_Type (Id)
8332 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
8333 end Is_Protected_Record_Type;
8335 -------------------------------------
8336 -- Is_Relaxed_Initialization_State --
8337 -------------------------------------
8339 function Is_Relaxed_Initialization_State (Id : E) return B is
8341 -- To qualify, the abstract state must appear with simple option
8342 -- "Relaxed_Initialization" (SPARK RM 6.10).
8345 Ekind (Id) = E_Abstract_State
8346 and then Has_Option (Id, Name_Relaxed_Initialization);
8347 end Is_Relaxed_Initialization_State;
8349 --------------------------------
8350 -- Is_Standard_Character_Type --
8351 --------------------------------
8353 function Is_Standard_Character_Type (Id : E) return B is
8356 and then Root_Type (Id) in Standard_Character
8357 | Standard_Wide_Character
8358 | Standard_Wide_Wide_Character;
8359 end Is_Standard_Character_Type;
8361 -----------------------------
8362 -- Is_Standard_String_Type --
8363 -----------------------------
8365 function Is_Standard_String_Type (Id : E) return B is
8368 and then Root_Type (Id) in Standard_String
8369 | Standard_Wide_String
8370 | Standard_Wide_Wide_String;
8371 end Is_Standard_String_Type;
8373 --------------------
8374 -- Is_String_Type --
8375 --------------------
8377 function Is_String_Type (Id : E) return B is
8379 return Is_Array_Type (Id)
8380 and then Id /= Any_Composite
8381 and then Number_Dimensions (Id) = 1
8382 and then Is_Character_Type (Component_Type (Id));
8385 -------------------------------
8386 -- Is_Synchronized_Interface --
8387 -------------------------------
8389 function Is_Synchronized_Interface (Id : E) return B is
8390 Typ : constant Entity_Id := Base_Type (Id);
8393 if not Is_Interface (Typ) then
8396 elsif Is_Class_Wide_Type (Typ) then
8397 return Is_Synchronized_Interface (Etype (Typ));
8400 return Protected_Present (Type_Definition (Parent (Typ)))
8401 or else Synchronized_Present (Type_Definition (Parent (Typ)))
8402 or else Task_Present (Type_Definition (Parent (Typ)));
8404 end Is_Synchronized_Interface;
8406 ---------------------------
8407 -- Is_Synchronized_State --
8408 ---------------------------
8410 function Is_Synchronized_State (Id : E) return B is
8412 -- To qualify, the abstract state must appear with simple option
8413 -- "synchronous" (SPARK RM 7.1.4(9)).
8416 Ekind (Id) = E_Abstract_State
8417 and then Has_Option (Id, Name_Synchronous);
8418 end Is_Synchronized_State;
8420 -----------------------
8421 -- Is_Task_Interface --
8422 -----------------------
8424 function Is_Task_Interface (Id : E) return B is
8425 Typ : constant Entity_Id := Base_Type (Id);
8427 if not Is_Interface (Typ) then
8429 elsif Is_Class_Wide_Type (Typ) then
8430 return Is_Task_Interface (Etype (Typ));
8432 return Task_Present (Type_Definition (Parent (Typ)));
8434 end Is_Task_Interface;
8436 -------------------------
8437 -- Is_Task_Record_Type --
8438 -------------------------
8440 function Is_Task_Record_Type (Id : E) return B is
8443 Is_Concurrent_Record_Type (Id)
8444 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
8445 end Is_Task_Record_Type;
8447 ------------------------
8448 -- Is_Wrapper_Package --
8449 ------------------------
8451 function Is_Wrapper_Package (Id : E) return B is
8453 return Ekind (Id) = E_Package and then Present (Related_Instance (Id));
8454 end Is_Wrapper_Package;
8460 function Last_Formal (Id : E) return E is
8465 (Is_Overloadable (Id)
8466 or else Ekind (Id) in E_Entry_Family
8468 | E_Subprogram_Type);
8470 if Ekind (Id) = E_Enumeration_Literal then
8474 Formal := First_Formal (Id);
8476 if Present (Formal) then
8477 while Present (Next_Formal (Formal)) loop
8478 Next_Formal (Formal);
8490 procedure Link_Entities (First : Entity_Id; Second : Node_Id) is
8492 if Present (Second) then
8493 Set_Prev_Entity (Second, First); -- First <-- Second
8496 Set_Next_Entity (First, Second); -- First --> Second
8499 ------------------------
8500 -- Machine_Emax_Value --
8501 ------------------------
8503 function Machine_Emax_Value (Id : E) return Uint is
8504 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8507 case Float_Rep (Id) is
8510 when 1 .. 6 => return Uint_128;
8511 when 7 .. 15 => return 2**10;
8512 when 16 .. 33 => return 2**14;
8513 when others => return No_Uint;
8517 return Uint_2 ** Uint_7 - Uint_1;
8519 end Machine_Emax_Value;
8521 ------------------------
8522 -- Machine_Emin_Value --
8523 ------------------------
8525 function Machine_Emin_Value (Id : E) return Uint is
8527 case Float_Rep (Id) is
8528 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
8529 when AAMP => return -Machine_Emax_Value (Id);
8531 end Machine_Emin_Value;
8533 ----------------------------
8534 -- Machine_Mantissa_Value --
8535 ----------------------------
8537 function Machine_Mantissa_Value (Id : E) return Uint is
8538 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8541 case Float_Rep (Id) is
8544 when 1 .. 6 => return Uint_24;
8545 when 7 .. 15 => return UI_From_Int (53);
8546 when 16 .. 18 => return Uint_64;
8547 when 19 .. 33 => return UI_From_Int (113);
8548 when others => return No_Uint;
8553 when 1 .. 6 => return Uint_24;
8554 when 7 .. 9 => return UI_From_Int (40);
8555 when others => return No_Uint;
8558 end Machine_Mantissa_Value;
8560 -------------------------
8561 -- Machine_Radix_Value --
8562 -------------------------
8564 function Machine_Radix_Value (Id : E) return U is
8566 case Float_Rep (Id) is
8572 end Machine_Radix_Value;
8574 ----------------------
8575 -- Model_Emin_Value --
8576 ----------------------
8578 function Model_Emin_Value (Id : E) return Uint is
8580 return Machine_Emin_Value (Id);
8581 end Model_Emin_Value;
8583 -------------------------
8584 -- Model_Epsilon_Value --
8585 -------------------------
8587 function Model_Epsilon_Value (Id : E) return Ureal is
8588 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8590 return Radix ** (1 - Model_Mantissa_Value (Id));
8591 end Model_Epsilon_Value;
8593 --------------------------
8594 -- Model_Mantissa_Value --
8595 --------------------------
8597 function Model_Mantissa_Value (Id : E) return Uint is
8599 return Machine_Mantissa_Value (Id);
8600 end Model_Mantissa_Value;
8602 -----------------------
8603 -- Model_Small_Value --
8604 -----------------------
8606 function Model_Small_Value (Id : E) return Ureal is
8607 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8609 return Radix ** (Model_Emin_Value (Id) - 1);
8610 end Model_Small_Value;
8612 --------------------
8613 -- Next_Component --
8614 --------------------
8616 function Next_Component (Id : E) return E is
8617 Comp_Id : Entity_Id;
8620 Comp_Id := Next_Entity (Id);
8621 while Present (Comp_Id) loop
8622 exit when Ekind (Comp_Id) = E_Component;
8623 Next_Entity (Comp_Id);
8629 ------------------------------------
8630 -- Next_Component_Or_Discriminant --
8631 ------------------------------------
8633 function Next_Component_Or_Discriminant (Id : E) return E is
8634 Comp_Id : Entity_Id;
8637 Comp_Id := Next_Entity (Id);
8638 while Present (Comp_Id) loop
8639 exit when Ekind (Comp_Id) in E_Component | E_Discriminant;
8640 Next_Entity (Comp_Id);
8644 end Next_Component_Or_Discriminant;
8646 -----------------------
8647 -- Next_Discriminant --
8648 -----------------------
8650 -- This function actually implements both Next_Discriminant and
8651 -- Next_Stored_Discriminant by making sure that the Discriminant
8652 -- returned is of the same variety as Id.
8654 function Next_Discriminant (Id : E) return E is
8656 -- Derived Tagged types with private extensions look like this...
8658 -- E_Discriminant d1
8659 -- E_Discriminant d2
8661 -- E_Discriminant d1
8662 -- E_Discriminant d2
8665 -- so it is critical not to go past the leading discriminants
8670 pragma Assert (Ekind (Id) = E_Discriminant);
8675 or else (Ekind (D) /= E_Discriminant
8676 and then not Is_Itype (D))
8681 exit when Ekind (D) = E_Discriminant
8682 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
8686 end Next_Discriminant;
8692 function Next_Formal (Id : E) return E is
8696 -- Follow the chain of declared entities as long as the kind of the
8697 -- entity corresponds to a formal parameter. Skip internal entities
8698 -- that may have been created for implicit subtypes, in the process
8699 -- of analyzing default expressions.
8705 if No (P) or else Is_Formal (P) then
8707 elsif not Is_Internal (P) then
8713 -----------------------------
8714 -- Next_Formal_With_Extras --
8715 -----------------------------
8717 function Next_Formal_With_Extras (Id : E) return E is
8719 if Present (Extra_Formal (Id)) then
8720 return Extra_Formal (Id);
8722 return Next_Formal (Id);
8724 end Next_Formal_With_Extras;
8730 function Next_Index (Id : Node_Id) return Node_Id is
8739 function Next_Literal (Id : E) return E is
8741 pragma Assert (Nkind (Id) in N_Entity);
8745 ------------------------------
8746 -- Next_Stored_Discriminant --
8747 ------------------------------
8749 function Next_Stored_Discriminant (Id : E) return E is
8751 -- See comment in Next_Discriminant
8753 return Next_Discriminant (Id);
8754 end Next_Stored_Discriminant;
8756 -----------------------
8757 -- Number_Dimensions --
8758 -----------------------
8760 function Number_Dimensions (Id : E) return Pos is
8765 if Ekind (Id) = E_String_Literal_Subtype then
8770 T := First_Index (Id);
8771 while Present (T) loop
8778 end Number_Dimensions;
8780 --------------------
8781 -- Number_Entries --
8782 --------------------
8784 function Number_Entries (Id : E) return Nat is
8789 pragma Assert (Is_Concurrent_Type (Id));
8792 Ent := First_Entity (Id);
8793 while Present (Ent) loop
8794 if Is_Entry (Ent) then
8804 --------------------
8805 -- Number_Formals --
8806 --------------------
8808 function Number_Formals (Id : E) return Pos is
8814 Formal := First_Formal (Id);
8815 while Present (Formal) loop
8817 Next_Formal (Formal);
8823 ------------------------
8824 -- Object_Size_Clause --
8825 ------------------------
8827 function Object_Size_Clause (Id : E) return N is
8829 return Get_Attribute_Definition_Clause (Id, Attribute_Object_Size);
8830 end Object_Size_Clause;
8832 --------------------
8833 -- Parameter_Mode --
8834 --------------------
8836 function Parameter_Mode (Id : E) return Formal_Kind is
8841 ---------------------------
8842 -- Partial_DIC_Procedure --
8843 ---------------------------
8845 function Partial_DIC_Procedure (Id : E) return E is
8846 Subp_Elmt : Elmt_Id;
8847 Subp_Id : Entity_Id;
8851 pragma Assert (Is_Type (Id));
8853 Subps := Subprograms_For_Type (Base_Type (Id));
8855 if Present (Subps) then
8856 Subp_Elmt := First_Elmt (Subps);
8857 while Present (Subp_Elmt) loop
8858 Subp_Id := Node (Subp_Elmt);
8860 if Is_Partial_DIC_Procedure (Subp_Id) then
8864 Next_Elmt (Subp_Elmt);
8869 end Partial_DIC_Procedure;
8871 ---------------------------------
8872 -- Partial_Invariant_Procedure --
8873 ---------------------------------
8875 function Partial_Invariant_Procedure (Id : E) return E is
8876 Subp_Elmt : Elmt_Id;
8877 Subp_Id : Entity_Id;
8881 pragma Assert (Is_Type (Id));
8883 Subps := Subprograms_For_Type (Base_Type (Id));
8885 if Present (Subps) then
8886 Subp_Elmt := First_Elmt (Subps);
8887 while Present (Subp_Elmt) loop
8888 Subp_Id := Node (Subp_Elmt);
8890 if Is_Partial_Invariant_Procedure (Subp_Id) then
8894 Next_Elmt (Subp_Elmt);
8899 end Partial_Invariant_Procedure;
8901 -------------------------------------
8902 -- Partial_Refinement_Constituents --
8903 -------------------------------------
8905 function Partial_Refinement_Constituents (Id : E) return L is
8906 Constits : Elist_Id := No_Elist;
8908 procedure Add_Usable_Constituents (Item : E);
8909 -- Add global item Item and/or its constituents to list Constits when
8910 -- they can be used in a global refinement within the current scope. The
8912 -- 1) If Item is an abstract state with full refinement visible, add
8913 -- its constituents.
8914 -- 2) If Item is an abstract state with only partial refinement
8915 -- visible, add both Item and its constituents.
8916 -- 3) If Item is an abstract state without a visible refinement, add
8918 -- 4) If Id is not an abstract state, add it.
8920 procedure Add_Usable_Constituents (List : Elist_Id);
8921 -- Apply Add_Usable_Constituents to every constituent in List
8923 -----------------------------
8924 -- Add_Usable_Constituents --
8925 -----------------------------
8927 procedure Add_Usable_Constituents (Item : E) is
8929 if Ekind (Item) = E_Abstract_State then
8930 if Has_Visible_Refinement (Item) then
8931 Add_Usable_Constituents (Refinement_Constituents (Item));
8933 elsif Has_Partial_Visible_Refinement (Item) then
8934 Append_New_Elmt (Item, Constits);
8935 Add_Usable_Constituents (Part_Of_Constituents (Item));
8938 Append_New_Elmt (Item, Constits);
8942 Append_New_Elmt (Item, Constits);
8944 end Add_Usable_Constituents;
8946 procedure Add_Usable_Constituents (List : Elist_Id) is
8947 Constit_Elmt : Elmt_Id;
8949 if Present (List) then
8950 Constit_Elmt := First_Elmt (List);
8951 while Present (Constit_Elmt) loop
8952 Add_Usable_Constituents (Node (Constit_Elmt));
8953 Next_Elmt (Constit_Elmt);
8956 end Add_Usable_Constituents;
8958 -- Start of processing for Partial_Refinement_Constituents
8961 -- "Refinement" is a concept applicable only to abstract states
8963 pragma Assert (Ekind (Id) = E_Abstract_State);
8965 if Has_Visible_Refinement (Id) then
8966 Constits := Refinement_Constituents (Id);
8968 -- A refinement may be partially visible when objects declared in the
8969 -- private part of a package are subject to a Part_Of indicator.
8971 elsif Has_Partial_Visible_Refinement (Id) then
8972 Add_Usable_Constituents (Part_Of_Constituents (Id));
8974 -- Function should only be called when full or partial refinement is
8978 raise Program_Error;
8982 end Partial_Refinement_Constituents;
8984 ------------------------
8985 -- Predicate_Function --
8986 ------------------------
8988 function Predicate_Function (Id : E) return E is
8989 Subp_Elmt : Elmt_Id;
8990 Subp_Id : Entity_Id;
8995 pragma Assert (Is_Type (Id));
8997 -- If type is private and has a completion, predicate may be defined on
9000 if Is_Private_Type (Id)
9002 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
9003 and then Present (Full_View (Id))
9005 Typ := Full_View (Id);
9007 elsif Ekind (Id) in E_Array_Subtype
9009 | E_Record_Subtype_With_Private
9010 and then Present (Predicated_Parent (Id))
9012 Typ := Predicated_Parent (Id);
9018 Subps := Subprograms_For_Type (Typ);
9020 if Present (Subps) then
9021 Subp_Elmt := First_Elmt (Subps);
9022 while Present (Subp_Elmt) loop
9023 Subp_Id := Node (Subp_Elmt);
9025 if Ekind (Subp_Id) = E_Function
9026 and then Is_Predicate_Function (Subp_Id)
9031 Next_Elmt (Subp_Elmt);
9036 end Predicate_Function;
9038 --------------------------
9039 -- Predicate_Function_M --
9040 --------------------------
9042 function Predicate_Function_M (Id : E) return E is
9043 Subp_Elmt : Elmt_Id;
9044 Subp_Id : Entity_Id;
9049 pragma Assert (Is_Type (Id));
9051 -- If type is private and has a completion, predicate may be defined on
9054 if Is_Private_Type (Id)
9056 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
9057 and then Present (Full_View (Id))
9059 Typ := Full_View (Id);
9065 Subps := Subprograms_For_Type (Typ);
9067 if Present (Subps) then
9068 Subp_Elmt := First_Elmt (Subps);
9069 while Present (Subp_Elmt) loop
9070 Subp_Id := Node (Subp_Elmt);
9072 if Ekind (Subp_Id) = E_Function
9073 and then Is_Predicate_Function_M (Subp_Id)
9078 Next_Elmt (Subp_Elmt);
9083 end Predicate_Function_M;
9085 -------------------------
9086 -- Present_In_Rep_Item --
9087 -------------------------
9089 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
9093 Ritem := First_Rep_Item (E);
9095 while Present (Ritem) loop
9100 Next_Rep_Item (Ritem);
9104 end Present_In_Rep_Item;
9106 --------------------------
9107 -- Primitive_Operations --
9108 --------------------------
9110 function Primitive_Operations (Id : E) return L is
9112 if Is_Concurrent_Type (Id) then
9113 if Present (Corresponding_Record_Type (Id)) then
9114 return Direct_Primitive_Operations
9115 (Corresponding_Record_Type (Id));
9117 -- If expansion is disabled the corresponding record type is absent,
9118 -- but if the type has ancestors it may have primitive operations.
9120 elsif Is_Tagged_Type (Id) then
9121 return Direct_Primitive_Operations (Id);
9127 return Direct_Primitive_Operations (Id);
9129 end Primitive_Operations;
9131 ---------------------
9132 -- Record_Rep_Item --
9133 ---------------------
9135 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
9137 Set_Next_Rep_Item (N, First_Rep_Item (E));
9138 Set_First_Rep_Item (E, N);
9139 end Record_Rep_Item;
9145 procedure Remove_Entity (Id : Entity_Id) is
9146 Next : constant Entity_Id := Next_Entity (Id);
9147 Prev : constant Entity_Id := Prev_Entity (Id);
9148 Scop : constant Entity_Id := Scope (Id);
9149 First : constant Entity_Id := First_Entity (Scop);
9150 Last : constant Entity_Id := Last_Entity (Scop);
9153 -- Eliminate any existing linkages from the entity
9155 Set_Prev_Entity (Id, Empty); -- Empty <-- Id
9156 Set_Next_Entity (Id, Empty); -- Id --> Empty
9158 -- The eliminated entity was the only element in the entity chain
9160 if Id = First and then Id = Last then
9161 Set_First_Entity (Scop, Empty);
9162 Set_Last_Entity (Scop, Empty);
9164 -- The eliminated entity was the head of the entity chain
9166 elsif Id = First then
9167 Set_First_Entity (Scop, Next);
9169 -- The eliminated entity was the tail of the entity chain
9171 elsif Id = Last then
9172 Set_Last_Entity (Scop, Prev);
9174 -- Otherwise the eliminated entity comes from the middle of the entity
9178 Link_Entities (Prev, Next); -- Prev <-- Next, Prev --> Next
9186 function Root_Type (Id : E) return E is
9187 T, Etyp : Entity_Id;
9190 pragma Assert (Nkind (Id) in N_Entity);
9192 T := Base_Type (Id);
9194 if Ekind (T) = E_Class_Wide_Type then
9206 -- Following test catches some error cases resulting from
9209 elsif No (Etyp) then
9210 Check_Error_Detected;
9213 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
9216 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
9222 -- Return if there is a circularity in the inheritance chain. This
9223 -- happens in some error situations and we do not want to get
9224 -- stuck in this loop.
9226 if T = Base_Type (Id) then
9233 ---------------------
9234 -- Safe_Emax_Value --
9235 ---------------------
9237 function Safe_Emax_Value (Id : E) return Uint is
9239 return Machine_Emax_Value (Id);
9240 end Safe_Emax_Value;
9242 ----------------------
9243 -- Safe_First_Value --
9244 ----------------------
9246 function Safe_First_Value (Id : E) return Ureal is
9248 return -Safe_Last_Value (Id);
9249 end Safe_First_Value;
9251 ---------------------
9252 -- Safe_Last_Value --
9253 ---------------------
9255 function Safe_Last_Value (Id : E) return Ureal is
9256 Radix : constant Uint := Machine_Radix_Value (Id);
9257 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
9258 Emax : constant Uint := Safe_Emax_Value (Id);
9259 Significand : constant Uint := Radix ** Mantissa - 1;
9260 Exponent : constant Uint := Emax - Mantissa;
9266 (Num => Significand * 2 ** (Exponent mod 4),
9267 Den => -Exponent / 4,
9272 (Num => Significand,
9276 end Safe_Last_Value;
9282 function Scope_Depth (Id : E) return Uint is
9287 while Is_Record_Type (Scop) loop
9288 Scop := Scope (Scop);
9291 return Scope_Depth_Value (Scop);
9294 ---------------------
9295 -- Scope_Depth_Set --
9296 ---------------------
9298 function Scope_Depth_Set (Id : E) return B is
9300 return not Is_Record_Type (Id)
9301 and then Field22 (Id) /= Union_Id (Empty);
9302 end Scope_Depth_Set;
9304 -----------------------------
9305 -- Set_Component_Alignment --
9306 -----------------------------
9308 -- Component Alignment is encoded using two flags, Flag128/129 as
9309 -- follows. Note that both flags False = Align_Default, so that the
9310 -- default initialization of flags to False initializes component
9311 -- alignment to the default value as required.
9313 -- Flag128 Flag129 Value
9314 -- ------- ------- -----
9315 -- False False Calign_Default
9316 -- False True Calign_Component_Size
9317 -- True False Calign_Component_Size_4
9318 -- True True Calign_Storage_Unit
9320 procedure Set_Component_Alignment (Id : E; V : C) is
9322 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
9323 and then Is_Base_Type (Id));
9326 when Calign_Default =>
9327 Set_Flag128 (Id, False);
9328 Set_Flag129 (Id, False);
9330 when Calign_Component_Size =>
9331 Set_Flag128 (Id, False);
9332 Set_Flag129 (Id, True);
9334 when Calign_Component_Size_4 =>
9335 Set_Flag128 (Id, True);
9336 Set_Flag129 (Id, False);
9338 when Calign_Storage_Unit =>
9339 Set_Flag128 (Id, True);
9340 Set_Flag129 (Id, True);
9342 end Set_Component_Alignment;
9344 -----------------------
9345 -- Set_DIC_Procedure --
9346 -----------------------
9348 procedure Set_DIC_Procedure (Id : E; V : E) is
9349 Base_Typ : Entity_Id;
9353 pragma Assert (Is_Type (Id));
9355 Base_Typ := Base_Type (Id);
9356 Subps := Subprograms_For_Type (Base_Typ);
9359 Subps := New_Elmt_List;
9360 Set_Subprograms_For_Type (Base_Typ, Subps);
9363 Prepend_Elmt (V, Subps);
9364 end Set_DIC_Procedure;
9366 -------------------------------------
9367 -- Set_Partial_Invariant_Procedure --
9368 -------------------------------------
9370 procedure Set_Partial_DIC_Procedure (Id : E; V : E) is
9372 Set_DIC_Procedure (Id, V);
9373 end Set_Partial_DIC_Procedure;
9375 -----------------------------
9376 -- Set_Invariant_Procedure --
9377 -----------------------------
9379 procedure Set_Invariant_Procedure (Id : E; V : E) is
9380 Base_Typ : Entity_Id;
9381 Subp_Elmt : Elmt_Id;
9382 Subp_Id : Entity_Id;
9386 pragma Assert (Is_Type (Id));
9388 Base_Typ := Base_Type (Id);
9389 Subps := Subprograms_For_Type (Base_Typ);
9392 Subps := New_Elmt_List;
9393 Set_Subprograms_For_Type (Base_Typ, Subps);
9396 Subp_Elmt := First_Elmt (Subps);
9397 Prepend_Elmt (V, Subps);
9399 -- Check for a duplicate invariant procedure
9401 while Present (Subp_Elmt) loop
9402 Subp_Id := Node (Subp_Elmt);
9404 if Is_Invariant_Procedure (Subp_Id) then
9405 raise Program_Error;
9408 Next_Elmt (Subp_Elmt);
9410 end Set_Invariant_Procedure;
9412 -------------------------------------
9413 -- Set_Partial_Invariant_Procedure --
9414 -------------------------------------
9416 procedure Set_Partial_Invariant_Procedure (Id : E; V : E) is
9417 Base_Typ : Entity_Id;
9418 Subp_Elmt : Elmt_Id;
9419 Subp_Id : Entity_Id;
9423 pragma Assert (Is_Type (Id));
9425 Base_Typ := Base_Type (Id);
9426 Subps := Subprograms_For_Type (Base_Typ);
9429 Subps := New_Elmt_List;
9430 Set_Subprograms_For_Type (Base_Typ, Subps);
9433 Subp_Elmt := First_Elmt (Subps);
9434 Prepend_Elmt (V, Subps);
9436 -- Check for a duplicate partial invariant procedure
9438 while Present (Subp_Elmt) loop
9439 Subp_Id := Node (Subp_Elmt);
9441 if Is_Partial_Invariant_Procedure (Subp_Id) then
9442 raise Program_Error;
9445 Next_Elmt (Subp_Elmt);
9447 end Set_Partial_Invariant_Procedure;
9449 ----------------------------
9450 -- Set_Predicate_Function --
9451 ----------------------------
9453 procedure Set_Predicate_Function (Id : E; V : E) is
9454 Subp_Elmt : Elmt_Id;
9455 Subp_Id : Entity_Id;
9459 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9461 Subps := Subprograms_For_Type (Id);
9464 Subps := New_Elmt_List;
9465 Set_Subprograms_For_Type (Id, Subps);
9468 Subp_Elmt := First_Elmt (Subps);
9469 Prepend_Elmt (V, Subps);
9471 -- Check for a duplicate predication function
9473 while Present (Subp_Elmt) loop
9474 Subp_Id := Node (Subp_Elmt);
9476 if Ekind (Subp_Id) = E_Function
9477 and then Is_Predicate_Function (Subp_Id)
9479 raise Program_Error;
9482 Next_Elmt (Subp_Elmt);
9484 end Set_Predicate_Function;
9486 ------------------------------
9487 -- Set_Predicate_Function_M --
9488 ------------------------------
9490 procedure Set_Predicate_Function_M (Id : E; V : E) is
9491 Subp_Elmt : Elmt_Id;
9492 Subp_Id : Entity_Id;
9496 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
9498 Subps := Subprograms_For_Type (Id);
9501 Subps := New_Elmt_List;
9502 Set_Subprograms_For_Type (Id, Subps);
9505 Subp_Elmt := First_Elmt (Subps);
9506 Prepend_Elmt (V, Subps);
9508 -- Check for a duplicate predication function
9510 while Present (Subp_Elmt) loop
9511 Subp_Id := Node (Subp_Elmt);
9513 if Ekind (Subp_Id) = E_Function
9514 and then Is_Predicate_Function_M (Subp_Id)
9516 raise Program_Error;
9519 Next_Elmt (Subp_Elmt);
9521 end Set_Predicate_Function_M;
9527 function Size_Clause (Id : E) return N is
9529 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
9532 ------------------------
9533 -- Stream_Size_Clause --
9534 ------------------------
9536 function Stream_Size_Clause (Id : E) return N is
9538 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
9539 end Stream_Size_Clause;
9545 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
9551 Kind := E_Access_Subtype;
9553 when E_Array_Subtype
9556 Kind := E_Array_Subtype;
9558 when E_Class_Wide_Subtype
9561 Kind := E_Class_Wide_Subtype;
9563 when E_Decimal_Fixed_Point_Subtype
9564 | E_Decimal_Fixed_Point_Type
9566 Kind := E_Decimal_Fixed_Point_Subtype;
9568 when E_Ordinary_Fixed_Point_Subtype
9569 | E_Ordinary_Fixed_Point_Type
9571 Kind := E_Ordinary_Fixed_Point_Subtype;
9573 when E_Private_Subtype
9576 Kind := E_Private_Subtype;
9578 when E_Limited_Private_Subtype
9579 | E_Limited_Private_Type
9581 Kind := E_Limited_Private_Subtype;
9583 when E_Record_Subtype_With_Private
9584 | E_Record_Type_With_Private
9586 Kind := E_Record_Subtype_With_Private;
9588 when E_Record_Subtype
9591 Kind := E_Record_Subtype;
9593 when Enumeration_Kind =>
9594 Kind := E_Enumeration_Subtype;
9596 when E_Incomplete_Type =>
9597 Kind := E_Incomplete_Subtype;
9600 Kind := E_Floating_Point_Subtype;
9602 when Signed_Integer_Kind =>
9603 Kind := E_Signed_Integer_Subtype;
9605 when Modular_Integer_Kind =>
9606 Kind := E_Modular_Integer_Subtype;
9608 when Protected_Kind =>
9609 Kind := E_Protected_Subtype;
9612 Kind := E_Task_Subtype;
9616 raise Program_Error;
9622 ---------------------
9623 -- Type_High_Bound --
9624 ---------------------
9626 function Type_High_Bound (Id : E) return Node_Id is
9627 Rng : constant Node_Id := Scalar_Range (Id);
9629 if Nkind (Rng) = N_Subtype_Indication then
9630 return High_Bound (Range_Expression (Constraint (Rng)));
9632 return High_Bound (Rng);
9634 end Type_High_Bound;
9636 --------------------
9637 -- Type_Low_Bound --
9638 --------------------
9640 function Type_Low_Bound (Id : E) return Node_Id is
9641 Rng : constant Node_Id := Scalar_Range (Id);
9643 if Nkind (Rng) = N_Subtype_Indication then
9644 return Low_Bound (Range_Expression (Constraint (Rng)));
9646 return Low_Bound (Rng);
9650 ---------------------
9651 -- Underlying_Type --
9652 ---------------------
9654 function Underlying_Type (Id : E) return E is
9656 -- For record_with_private the underlying type is always the direct full
9657 -- view. Never try to take the full view of the parent it does not make
9660 if Ekind (Id) = E_Record_Type_With_Private then
9661 return Full_View (Id);
9663 -- If we have a class-wide type that comes from the limited view then we
9664 -- return the Underlying_Type of its nonlimited view.
9666 elsif Ekind (Id) = E_Class_Wide_Type
9667 and then From_Limited_With (Id)
9668 and then Present (Non_Limited_View (Id))
9670 return Underlying_Type (Non_Limited_View (Id));
9672 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
9674 -- If we have an incomplete or private type with a full view, then we
9675 -- return the Underlying_Type of this full view.
9677 if Present (Full_View (Id)) then
9678 if Id = Full_View (Id) then
9680 -- Previous error in declaration
9685 return Underlying_Type (Full_View (Id));
9688 -- If we have a private type with an underlying full view, then we
9689 -- return the Underlying_Type of this underlying full view.
9691 elsif Ekind (Id) in Private_Kind
9692 and then Present (Underlying_Full_View (Id))
9694 return Underlying_Type (Underlying_Full_View (Id));
9696 -- If we have an incomplete entity that comes from the limited view
9697 -- then we return the Underlying_Type of its nonlimited view.
9699 elsif From_Limited_With (Id)
9700 and then Present (Non_Limited_View (Id))
9702 return Underlying_Type (Non_Limited_View (Id));
9704 -- Otherwise check for the case where we have a derived type or
9705 -- subtype, and if so get the Underlying_Type of the parent type.
9707 elsif Etype (Id) /= Id then
9708 return Underlying_Type (Etype (Id));
9710 -- Otherwise we have an incomplete or private type that has no full
9711 -- view, which means that we have not encountered the completion, so
9712 -- return Empty to indicate the underlying type is not yet known.
9718 -- For non-incomplete, non-private types, return the type itself. Also
9719 -- for entities that are not types at all return the entity itself.
9724 end Underlying_Type;
9726 ------------------------
9727 -- Unlink_Next_Entity --
9728 ------------------------
9730 procedure Unlink_Next_Entity (Id : Entity_Id) is
9731 Next : constant Entity_Id := Next_Entity (Id);
9734 if Present (Next) then
9735 Set_Prev_Entity (Next, Empty); -- Empty <-- Next
9738 Set_Next_Entity (Id, Empty); -- Id --> Empty
9739 end Unlink_Next_Entity;
9741 ------------------------
9742 -- Write_Entity_Flags --
9743 ------------------------
9745 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
9747 procedure W (Flag_Name : String; Flag : Boolean);
9748 -- Write out given flag if it is set
9754 procedure W (Flag_Name : String; Flag : Boolean) is
9758 Write_Str (Flag_Name);
9759 Write_Str (" = True");
9764 -- Start of processing for Write_Entity_Flags
9767 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
9768 and then Is_Base_Type (Id)
9771 Write_Str ("Component_Alignment = ");
9773 case Component_Alignment (Id) is
9774 when Calign_Default =>
9775 Write_Str ("Calign_Default");
9777 when Calign_Component_Size =>
9778 Write_Str ("Calign_Component_Size");
9780 when Calign_Component_Size_4 =>
9781 Write_Str ("Calign_Component_Size_4");
9783 when Calign_Storage_Unit =>
9784 Write_Str ("Calign_Storage_Unit");
9790 W ("Address_Taken", Flag104 (Id));
9791 W ("Body_Needed_For_Inlining", Flag299 (Id));
9792 W ("Body_Needed_For_SAL", Flag40 (Id));
9793 W ("C_Pass_By_Copy", Flag125 (Id));
9794 W ("Can_Never_Be_Null", Flag38 (Id));
9795 W ("Checks_May_Be_Suppressed", Flag31 (Id));
9796 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
9797 W ("Debug_Info_Off", Flag166 (Id));
9798 W ("Default_Expressions_Processed", Flag108 (Id));
9799 W ("Delay_Cleanups", Flag114 (Id));
9800 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
9801 W ("Depends_On_Private", Flag14 (Id));
9802 W ("Discard_Names", Flag88 (Id));
9803 W ("Elaboration_Entity_Required", Flag174 (Id));
9804 W ("Elaborate_Body_Desirable", Flag210 (Id));
9805 W ("Entry_Accepted", Flag152 (Id));
9806 W ("Can_Use_Internal_Rep", Flag229 (Id));
9807 W ("Finalize_Storage_Only", Flag158 (Id));
9808 W ("From_Limited_With", Flag159 (Id));
9809 W ("Has_Aliased_Components", Flag135 (Id));
9810 W ("Has_Alignment_Clause", Flag46 (Id));
9811 W ("Has_All_Calls_Remote", Flag79 (Id));
9812 W ("Has_Atomic_Components", Flag86 (Id));
9813 W ("Has_Biased_Representation", Flag139 (Id));
9814 W ("Has_Completion", Flag26 (Id));
9815 W ("Has_Completion_In_Body", Flag71 (Id));
9816 W ("Has_Complex_Representation", Flag140 (Id));
9817 W ("Has_Component_Size_Clause", Flag68 (Id));
9818 W ("Has_Contiguous_Rep", Flag181 (Id));
9819 W ("Has_Controlled_Component", Flag43 (Id));
9820 W ("Has_Controlling_Result", Flag98 (Id));
9821 W ("Has_Convention_Pragma", Flag119 (Id));
9822 W ("Has_Default_Aspect", Flag39 (Id));
9823 W ("Has_Delayed_Aspects", Flag200 (Id));
9824 W ("Has_Delayed_Freeze", Flag18 (Id));
9825 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
9826 W ("Has_Discriminants", Flag5 (Id));
9827 W ("Has_Dispatch_Table", Flag220 (Id));
9828 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
9829 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
9830 W ("Has_Exit", Flag47 (Id));
9831 W ("Has_Expanded_Contract", Flag240 (Id));
9832 W ("Has_Forward_Instantiation", Flag175 (Id));
9833 W ("Has_Fully_Qualified_Name", Flag173 (Id));
9834 W ("Has_Gigi_Rep_Item", Flag82 (Id));
9835 W ("Has_Homonym", Flag56 (Id));
9836 W ("Has_Implicit_Dereference", Flag251 (Id));
9837 W ("Has_Independent_Components", Flag34 (Id));
9838 W ("Has_Inheritable_Invariants", Flag248 (Id));
9839 W ("Has_Inherited_DIC", Flag133 (Id));
9840 W ("Has_Inherited_Invariants", Flag291 (Id));
9841 W ("Has_Initial_Value", Flag219 (Id));
9842 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
9843 W ("Has_Machine_Radix_Clause", Flag83 (Id));
9844 W ("Has_Master_Entity", Flag21 (Id));
9845 W ("Has_Missing_Return", Flag142 (Id));
9846 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
9847 W ("Has_Nested_Subprogram", Flag282 (Id));
9848 W ("Has_Non_Standard_Rep", Flag75 (Id));
9849 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
9850 W ("Has_Object_Size_Clause", Flag172 (Id));
9851 W ("Has_Own_DIC", Flag3 (Id));
9852 W ("Has_Own_Invariants", Flag232 (Id));
9853 W ("Has_Per_Object_Constraint", Flag154 (Id));
9854 W ("Has_Pragma_Controlled", Flag27 (Id));
9855 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
9856 W ("Has_Pragma_Inline", Flag157 (Id));
9857 W ("Has_Pragma_Inline_Always", Flag230 (Id));
9858 W ("Has_Pragma_No_Inline", Flag201 (Id));
9859 W ("Has_Pragma_Ordered", Flag198 (Id));
9860 W ("Has_Pragma_Pack", Flag121 (Id));
9861 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
9862 W ("Has_Pragma_Pure", Flag203 (Id));
9863 W ("Has_Pragma_Pure_Function", Flag179 (Id));
9864 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
9865 W ("Has_Pragma_Unmodified", Flag233 (Id));
9866 W ("Has_Pragma_Unreferenced", Flag180 (Id));
9867 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
9868 W ("Has_Pragma_Unused", Flag294 (Id));
9869 W ("Has_Predicates", Flag250 (Id));
9870 W ("Has_Primitive_Operations", Flag120 (Id));
9871 W ("Has_Private_Ancestor", Flag151 (Id));
9872 W ("Has_Private_Declaration", Flag155 (Id));
9873 W ("Has_Private_Extension", Flag300 (Id));
9874 W ("Has_Protected", Flag271 (Id));
9875 W ("Has_Qualified_Name", Flag161 (Id));
9876 W ("Has_RACW", Flag214 (Id));
9877 W ("Has_Record_Rep_Clause", Flag65 (Id));
9878 W ("Has_Recursive_Call", Flag143 (Id));
9879 W ("Has_Shift_Operator", Flag267 (Id));
9880 W ("Has_Size_Clause", Flag29 (Id));
9881 W ("Has_Small_Clause", Flag67 (Id));
9882 W ("Has_Specified_Layout", Flag100 (Id));
9883 W ("Has_Specified_Stream_Input", Flag190 (Id));
9884 W ("Has_Specified_Stream_Output", Flag191 (Id));
9885 W ("Has_Specified_Stream_Read", Flag192 (Id));
9886 W ("Has_Specified_Stream_Write", Flag193 (Id));
9887 W ("Has_Static_Discriminants", Flag211 (Id));
9888 W ("Has_Static_Predicate", Flag269 (Id));
9889 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
9890 W ("Has_Storage_Size_Clause", Flag23 (Id));
9891 W ("Has_Stream_Size_Clause", Flag184 (Id));
9892 W ("Has_Task", Flag30 (Id));
9893 W ("Has_Timing_Event", Flag289 (Id));
9894 W ("Has_Thunks", Flag228 (Id));
9895 W ("Has_Unchecked_Union", Flag123 (Id));
9896 W ("Has_Unknown_Discriminants", Flag72 (Id));
9897 W ("Has_Visible_Refinement", Flag263 (Id));
9898 W ("Has_Volatile_Components", Flag87 (Id));
9899 W ("Has_Xref_Entry", Flag182 (Id));
9900 W ("Has_Yield_Aspect", Flag308 (Id));
9901 W ("Ignore_SPARK_Mode_Pragmas", Flag301 (Id));
9902 W ("In_Package_Body", Flag48 (Id));
9903 W ("In_Private_Part", Flag45 (Id));
9904 W ("In_Use", Flag8 (Id));
9905 W ("Is_Abstract_Subprogram", Flag19 (Id));
9906 W ("Is_Abstract_Type", Flag146 (Id));
9907 W ("Is_Access_Constant", Flag69 (Id));
9908 W ("Is_Activation_Record", Flag305 (Id));
9909 W ("Is_Actual_Subtype", Flag293 (Id));
9910 W ("Is_Ada_2005_Only", Flag185 (Id));
9911 W ("Is_Ada_2012_Only", Flag199 (Id));
9912 W ("Is_Aliased", Flag15 (Id));
9913 W ("Is_Asynchronous", Flag81 (Id));
9914 W ("Is_Atomic", Flag85 (Id));
9915 W ("Is_Bit_Packed_Array", Flag122 (Id));
9916 W ("Is_CPP_Class", Flag74 (Id));
9917 W ("Is_CUDA_Kernel", Flag118 (Id));
9918 W ("Is_Called", Flag102 (Id));
9919 W ("Is_Character_Type", Flag63 (Id));
9920 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
9921 W ("Is_Child_Unit", Flag73 (Id));
9922 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
9923 W ("Is_Compilation_Unit", Flag149 (Id));
9924 W ("Is_Completely_Hidden", Flag103 (Id));
9925 W ("Is_Concurrent_Record_Type", Flag20 (Id));
9926 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
9927 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
9928 W ("Is_Constrained", Flag12 (Id));
9929 W ("Is_Constructor", Flag76 (Id));
9930 W ("Is_Controlled_Active", Flag42 (Id));
9931 W ("Is_Controlling_Formal", Flag97 (Id));
9932 W ("Is_Descendant_Of_Address", Flag223 (Id));
9933 W ("Is_DIC_Procedure", Flag132 (Id));
9934 W ("Is_Discrim_SO_Function", Flag176 (Id));
9935 W ("Is_Discriminant_Check_Function", Flag264 (Id));
9936 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
9937 W ("Is_Dispatching_Operation", Flag6 (Id));
9938 W ("Is_Elaboration_Checks_OK_Id", Flag148 (Id));
9939 W ("Is_Elaboration_Warnings_OK_Id", Flag304 (Id));
9940 W ("Is_Eliminated", Flag124 (Id));
9941 W ("Is_Entry_Formal", Flag52 (Id));
9942 W ("Is_Exception_Handler", Flag286 (Id));
9943 W ("Is_Exported", Flag99 (Id));
9944 W ("Is_Finalized_Transient", Flag252 (Id));
9945 W ("Is_First_Subtype", Flag70 (Id));
9946 W ("Is_Formal_Subprogram", Flag111 (Id));
9947 W ("Is_Frozen", Flag4 (Id));
9948 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
9949 W ("Is_Generic_Actual_Type", Flag94 (Id));
9950 W ("Is_Generic_Instance", Flag130 (Id));
9951 W ("Is_Generic_Type", Flag13 (Id));
9952 W ("Is_Hidden", Flag57 (Id));
9953 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
9954 W ("Is_Hidden_Open_Scope", Flag171 (Id));
9955 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
9956 W ("Is_Ignored_Transient", Flag295 (Id));
9957 W ("Is_Immediately_Visible", Flag7 (Id));
9958 W ("Is_Implementation_Defined", Flag254 (Id));
9959 W ("Is_Imported", Flag24 (Id));
9960 W ("Is_Independent", Flag268 (Id));
9961 W ("Is_Initial_Condition_Procedure", Flag302 (Id));
9962 W ("Is_Inlined", Flag11 (Id));
9963 W ("Is_Inlined_Always", Flag1 (Id));
9964 W ("Is_Instantiated", Flag126 (Id));
9965 W ("Is_Interface", Flag186 (Id));
9966 W ("Is_Internal", Flag17 (Id));
9967 W ("Is_Interrupt_Handler", Flag89 (Id));
9968 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
9969 W ("Is_Invariant_Procedure", Flag257 (Id));
9970 W ("Is_Itype", Flag91 (Id));
9971 W ("Is_Known_Non_Null", Flag37 (Id));
9972 W ("Is_Known_Null", Flag204 (Id));
9973 W ("Is_Known_Valid", Flag170 (Id));
9974 W ("Is_Limited_Composite", Flag106 (Id));
9975 W ("Is_Limited_Interface", Flag197 (Id));
9976 W ("Is_Limited_Record", Flag25 (Id));
9977 W ("Is_Local_Anonymous_Access", Flag194 (Id));
9978 W ("Is_Loop_Parameter", Flag307 (Id));
9979 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
9980 W ("Is_Non_Static_Subtype", Flag109 (Id));
9981 W ("Is_Null_Init_Proc", Flag178 (Id));
9982 W ("Is_Obsolescent", Flag153 (Id));
9983 W ("Is_Only_Out_Parameter", Flag226 (Id));
9984 W ("Is_Package_Body_Entity", Flag160 (Id));
9985 W ("Is_Packed", Flag51 (Id));
9986 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
9987 W ("Is_Param_Block_Component_Type", Flag215 (Id));
9988 W ("Is_Partial_Invariant_Procedure", Flag292 (Id));
9989 W ("Is_Potentially_Use_Visible", Flag9 (Id));
9990 W ("Is_Predicate_Function", Flag255 (Id));
9991 W ("Is_Predicate_Function_M", Flag256 (Id));
9992 W ("Is_Preelaborated", Flag59 (Id));
9993 W ("Is_Primitive", Flag218 (Id));
9994 W ("Is_Primitive_Wrapper", Flag195 (Id));
9995 W ("Is_Private_Composite", Flag107 (Id));
9996 W ("Is_Private_Descendant", Flag53 (Id));
9997 W ("Is_Private_Primitive", Flag245 (Id));
9998 W ("Is_Public", Flag10 (Id));
9999 W ("Is_Pure", Flag44 (Id));
10000 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
10001 W ("Is_RACW_Stub_Type", Flag244 (Id));
10002 W ("Is_Raised", Flag224 (Id));
10003 W ("Is_Remote_Call_Interface", Flag62 (Id));
10004 W ("Is_Remote_Types", Flag61 (Id));
10005 W ("Is_Renaming_Of_Object", Flag112 (Id));
10006 W ("Is_Return_Object", Flag209 (Id));
10007 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
10008 W ("Is_Shared_Passive", Flag60 (Id));
10009 W ("Is_Static_Type", Flag281 (Id));
10010 W ("Is_Statically_Allocated", Flag28 (Id));
10011 W ("Is_Tag", Flag78 (Id));
10012 W ("Is_Tagged_Type", Flag55 (Id));
10013 W ("Is_Thunk", Flag225 (Id));
10014 W ("Is_Trivial_Subprogram", Flag235 (Id));
10015 W ("Is_True_Constant", Flag163 (Id));
10016 W ("Is_Unchecked_Union", Flag117 (Id));
10017 W ("Is_Underlying_Full_View", Flag298 (Id));
10018 W ("Is_Underlying_Record_View", Flag246 (Id));
10019 W ("Is_Unimplemented", Flag284 (Id));
10020 W ("Is_Unsigned_Type", Flag144 (Id));
10021 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
10022 W ("Is_Valued_Procedure", Flag127 (Id));
10023 W ("Is_Visible_Formal", Flag206 (Id));
10024 W ("Is_Visible_Lib_Unit", Flag116 (Id));
10025 W ("Is_Volatile", Flag16 (Id));
10026 W ("Is_Volatile_Full_Access", Flag285 (Id));
10027 W ("Itype_Printed", Flag202 (Id));
10028 W ("Kill_Elaboration_Checks", Flag32 (Id));
10029 W ("Kill_Range_Checks", Flag33 (Id));
10030 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
10031 W ("Low_Bound_Tested", Flag205 (Id));
10032 W ("Machine_Radix_10", Flag84 (Id));
10033 W ("Materialize_Entity", Flag168 (Id));
10034 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
10035 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
10036 W ("Must_Have_Preelab_Init", Flag208 (Id));
10037 W ("Needs_Activation_Record", Flag306 (Id));
10038 W ("Needs_Debug_Info", Flag147 (Id));
10039 W ("Needs_No_Actuals", Flag22 (Id));
10040 W ("Never_Set_In_Source", Flag115 (Id));
10041 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
10042 W ("No_Pool_Assigned", Flag131 (Id));
10043 W ("No_Predicate_On_actual", Flag275 (Id));
10044 W ("No_Reordering", Flag239 (Id));
10045 W ("No_Return", Flag113 (Id));
10046 W ("No_Strict_Aliasing", Flag136 (Id));
10047 W ("Non_Binary_Modulus", Flag58 (Id));
10048 W ("Nonzero_Is_True", Flag162 (Id));
10049 W ("OK_To_Rename", Flag247 (Id));
10050 W ("Optimize_Alignment_Space", Flag241 (Id));
10051 W ("Optimize_Alignment_Time", Flag242 (Id));
10052 W ("Overlays_Constant", Flag243 (Id));
10053 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
10054 W ("Reachable", Flag49 (Id));
10055 W ("Referenced", Flag156 (Id));
10056 W ("Referenced_As_LHS", Flag36 (Id));
10057 W ("Referenced_As_Out_Parameter", Flag227 (Id));
10058 W ("Renamed_In_Spec", Flag231 (Id));
10059 W ("Requires_Overriding", Flag213 (Id));
10060 W ("Return_Present", Flag54 (Id));
10061 W ("Returns_By_Ref", Flag90 (Id));
10062 W ("Reverse_Bit_Order", Flag164 (Id));
10063 W ("Reverse_Storage_Order", Flag93 (Id));
10064 W ("Rewritten_For_C", Flag287 (Id));
10065 W ("Predicates_Ignored", Flag288 (Id));
10066 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
10067 W ("Size_Depends_On_Discriminant", Flag177 (Id));
10068 W ("Size_Known_At_Compile_Time", Flag92 (Id));
10069 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
10070 W ("SPARK_Pragma_Inherited", Flag265 (Id));
10071 W ("SSO_Set_High_By_Default", Flag273 (Id));
10072 W ("SSO_Set_Low_By_Default", Flag272 (Id));
10073 W ("Static_Elaboration_Desired", Flag77 (Id));
10074 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
10075 W ("Strict_Alignment", Flag145 (Id));
10076 W ("Suppress_Elaboration_Warnings", Flag303 (Id));
10077 W ("Suppress_Initialization", Flag105 (Id));
10078 W ("Suppress_Style_Checks", Flag165 (Id));
10079 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
10080 W ("Treat_As_Volatile", Flag41 (Id));
10081 W ("Universal_Aliasing", Flag216 (Id));
10082 W ("Used_As_Generic_Actual", Flag222 (Id));
10083 W ("Uses_Sec_Stack", Flag95 (Id));
10084 W ("Warnings_Off", Flag96 (Id));
10085 W ("Warnings_Off_Used", Flag236 (Id));
10086 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
10087 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
10088 W ("Was_Hidden", Flag196 (Id));
10089 end Write_Entity_Flags;
10091 -----------------------
10092 -- Write_Entity_Info --
10093 -----------------------
10095 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
10097 procedure Write_Attribute (Which : String; Nam : E);
10098 -- Write attribute value with given string name
10100 procedure Write_Kind (Id : Entity_Id);
10101 -- Write Ekind field of entity
10103 ---------------------
10104 -- Write_Attribute --
10105 ---------------------
10107 procedure Write_Attribute (Which : String; Nam : E) is
10109 Write_Str (Prefix);
10111 Write_Int (Int (Nam));
10113 Write_Name (Chars (Nam));
10115 end Write_Attribute;
10121 procedure Write_Kind (Id : Entity_Id) is
10122 K : constant String := Entity_Kind'Image (Ekind (Id));
10125 Write_Str (Prefix);
10126 Write_Str (" Kind ");
10128 if Is_Type (Id) and then Is_Tagged_Type (Id) then
10129 Write_Str ("TAGGED ");
10132 Write_Str (K (3 .. K'Length));
10135 if Is_Type (Id) and then Depends_On_Private (Id) then
10136 Write_Str ("Depends_On_Private ");
10140 -- Start of processing for Write_Entity_Info
10144 Write_Attribute ("Name ", Id);
10145 Write_Int (Int (Id));
10149 Write_Attribute (" Type ", Etype (Id));
10151 if Id /= Standard_Standard then
10152 Write_Attribute (" Scope ", Scope (Id));
10157 when Discrete_Kind =>
10158 Write_Str ("Bounds: Id = ");
10160 if Present (Scalar_Range (Id)) then
10161 Write_Int (Int (Type_Low_Bound (Id)));
10162 Write_Str (" .. Id = ");
10163 Write_Int (Int (Type_High_Bound (Id)));
10165 Write_Str ("Empty");
10176 (" Component Type ", Component_Type (Id));
10178 Write_Str (Prefix);
10179 Write_Str (" Indexes ");
10181 Index := First_Index (Id);
10182 while Present (Index) loop
10183 Write_Attribute (" ", Etype (Index));
10184 Index := Next_Index (Index);
10190 when Access_Kind =>
10192 (" Directly Designated Type ",
10193 Directly_Designated_Type (Id));
10196 when Overloadable_Kind =>
10197 if Present (Homonym (Id)) then
10198 Write_Str (" Homonym ");
10199 Write_Name (Chars (Homonym (Id)));
10201 Write_Int (Int (Homonym (Id)));
10207 when E_Component =>
10208 if Is_Record_Type (Scope (Id)) then
10210 " Original_Record_Component ",
10211 Original_Record_Component (Id));
10212 Write_Int (Int (Original_Record_Component (Id)));
10219 end Write_Entity_Info;
10221 -----------------------
10222 -- Write_Field6_Name --
10223 -----------------------
10225 procedure Write_Field6_Name (Id : Entity_Id) is
10226 pragma Unreferenced (Id);
10228 Write_Str ("First_Rep_Item");
10229 end Write_Field6_Name;
10231 -----------------------
10232 -- Write_Field7_Name --
10233 -----------------------
10235 procedure Write_Field7_Name (Id : Entity_Id) is
10236 pragma Unreferenced (Id);
10238 Write_Str ("Freeze_Node");
10239 end Write_Field7_Name;
10241 -----------------------
10242 -- Write_Field8_Name --
10243 -----------------------
10245 procedure Write_Field8_Name (Id : Entity_Id) is
10249 Write_Str ("Associated_Node_For_Itype");
10252 Write_Str ("Dependent_Instances");
10255 Write_Str ("First_Exit_Statement");
10258 Write_Str ("Hiding_Loop_Variable");
10262 | E_Subprogram_Body
10264 Write_Str ("Mechanism");
10269 Write_Str ("Normalized_First_Bit");
10271 when E_Abstract_State =>
10272 Write_Str ("Refinement_Constituents");
10275 | E_Return_Statement
10277 Write_Str ("Return_Applies_To");
10280 Write_Str ("Field8??");
10282 end Write_Field8_Name;
10284 -----------------------
10285 -- Write_Field9_Name --
10286 -----------------------
10288 procedure Write_Field9_Name (Id : Entity_Id) is
10292 Write_Str ("Class_Wide_Type");
10294 when Object_Kind =>
10295 Write_Str ("Current_Value");
10298 | E_Generic_Function
10299 | E_Generic_Package
10300 | E_Generic_Procedure
10304 Write_Str ("Renaming_Map");
10307 Write_Str ("Field9??");
10309 end Write_Field9_Name;
10311 ------------------------
10312 -- Write_Field10_Name --
10313 ------------------------
10315 procedure Write_Field10_Name (Id : Entity_Id) is
10318 when Class_Wide_Kind
10325 Write_Str ("Direct_Primitive_Operations");
10330 Write_Str ("Discriminal_Link");
10333 Write_Str ("Float_Rep");
10340 Write_Str ("Handler_Records");
10345 Write_Str ("Normalized_Position_Max");
10347 when E_Abstract_State
10350 Write_Str ("Part_Of_Constituents");
10353 Write_Str ("Field10??");
10355 end Write_Field10_Name;
10357 ------------------------
10358 -- Write_Field11_Name --
10359 ------------------------
10361 procedure Write_Field11_Name (Id : Entity_Id) is
10365 Write_Str ("Block_Node");
10370 Write_Str ("Component_Bit_Offset");
10372 when Formal_Kind =>
10373 Write_Str ("Entry_Component");
10375 when E_Enumeration_Literal =>
10376 Write_Str ("Enumeration_Pos");
10381 Write_Str ("Full_View");
10383 when E_Generic_Package =>
10384 Write_Str ("Generic_Homonym");
10387 Write_Str ("Part_Of_References");
10394 Write_Str ("Protected_Body_Subprogram");
10397 Write_Str ("Field11??");
10399 end Write_Field11_Name;
10401 ------------------------
10402 -- Write_Field12_Name --
10403 ------------------------
10405 procedure Write_Field12_Name (Id : Entity_Id) is
10409 Write_Str ("Associated_Formal_Package");
10412 Write_Str ("Barrier_Function");
10414 when E_Enumeration_Literal =>
10415 Write_Str ("Enumeration_Rep");
10423 | E_In_Out_Parameter
10428 Write_Str ("Esize");
10433 Write_Str ("Next_Inlined_Subprogram");
10436 Write_Str ("Field12??");
10438 end Write_Field12_Name;
10440 ------------------------
10441 -- Write_Field13_Name --
10442 ------------------------
10444 procedure Write_Field13_Name (Id : Entity_Id) is
10450 Write_Str ("Component_Clause");
10457 | Generic_Unit_Kind
10459 Write_Str ("Elaboration_Entity");
10464 Write_Str ("Extra_Accessibility");
10467 Write_Str ("RM_Size");
10470 Write_Str ("Field13??");
10472 end Write_Field13_Name;
10474 -----------------------
10475 -- Write_Field14_Name --
10476 -----------------------
10478 procedure Write_Field14_Name (Id : Entity_Id) is
10488 Write_Str ("Alignment");
10493 Write_Str ("Normalized_Position");
10500 Write_Str ("Postconditions_Proc");
10503 Write_Str ("Field14??");
10505 end Write_Field14_Name;
10507 ------------------------
10508 -- Write_Field15_Name --
10509 ------------------------
10511 procedure Write_Field15_Name (Id : Entity_Id) is
10514 when E_Discriminant =>
10515 Write_Str ("Discriminant_Number");
10517 when E_Component =>
10518 Write_Str ("DT_Entry_Count");
10523 Write_Str ("DT_Position");
10526 Write_Str ("Entry_Parameters_Type");
10528 when Formal_Kind =>
10529 Write_Str ("Extra_Formal");
10532 Write_Str ("Pending_Access_Types");
10537 Write_Str ("Related_Instance");
10543 Write_Str ("Status_Flag_Or_Transient_Decl");
10546 Write_Str ("Field15??");
10548 end Write_Field15_Name;
10550 ------------------------
10551 -- Write_Field16_Name --
10552 ------------------------
10554 procedure Write_Field16_Name (Id : Entity_Id) is
10558 | E_Record_Type_With_Private
10560 Write_Str ("Access_Disp_Table");
10562 when E_Abstract_State =>
10563 Write_Str ("Body_References");
10565 when E_Class_Wide_Subtype
10568 Write_Str ("Cloned_Subtype");
10573 Write_Str ("DTC_Entity");
10575 when E_Component =>
10576 Write_Str ("Entry_Formal");
10578 when Concurrent_Kind
10579 | E_Generic_Package
10582 Write_Str ("First_Private_Entity");
10584 when Enumeration_Kind =>
10585 Write_Str ("Lit_Strings");
10587 when Decimal_Fixed_Point_Kind =>
10588 Write_Str ("Scale_Value");
10590 when E_String_Literal_Subtype =>
10591 Write_Str ("String_Literal_Length");
10593 when E_Out_Parameter
10596 Write_Str ("Unset_Reference");
10599 Write_Str ("Field16??");
10601 end Write_Field16_Name;
10603 ------------------------
10604 -- Write_Field17_Name --
10605 ------------------------
10607 procedure Write_Field17_Name (Id : Entity_Id) is
10612 | E_Generic_In_Out_Parameter
10615 Write_Str ("Actual_Subtype");
10617 when Digits_Kind =>
10618 Write_Str ("Digits_Value");
10620 when E_Discriminant =>
10621 Write_Str ("Discriminal");
10623 when Class_Wide_Kind
10630 | E_Generic_Function
10631 | E_Generic_Package
10632 | E_Generic_Procedure
10640 | E_Return_Statement
10641 | E_Subprogram_Body
10642 | E_Subprogram_Type
10644 Write_Str ("First_Entity");
10647 Write_Str ("First_Index");
10649 when Enumeration_Kind =>
10650 Write_Str ("First_Literal");
10652 when Access_Kind =>
10653 Write_Str ("Master_Id");
10655 when Modular_Integer_Kind =>
10656 Write_Str ("Modulus");
10658 when E_Component =>
10659 Write_Str ("Prival");
10662 Write_Str ("Field17??");
10664 end Write_Field17_Name;
10666 ------------------------
10667 -- Write_Field18_Name --
10668 ------------------------
10670 procedure Write_Field18_Name (Id : Entity_Id) is
10673 when E_Enumeration_Literal
10678 Write_Str ("Alias");
10680 when E_Record_Type =>
10681 Write_Str ("Corresponding_Concurrent_Type");
10683 when E_Subprogram_Body =>
10684 Write_Str ("Corresponding_Protected_Entry");
10686 when Concurrent_Kind =>
10687 Write_Str ("Corresponding_Record_Type");
10693 Write_Str ("Enclosing_Scope");
10695 when E_Entry_Index_Parameter =>
10696 Write_Str ("Entry_Index_Constant");
10698 when E_Access_Protected_Subprogram_Type
10699 | E_Access_Subprogram_Type
10700 | E_Anonymous_Access_Protected_Subprogram_Type
10702 | E_Class_Wide_Subtype
10704 Write_Str ("Equivalent_Type");
10706 when Fixed_Point_Kind =>
10707 Write_Str ("Delta_Value");
10709 when Enumeration_Kind =>
10710 Write_Str ("Lit_Indexes");
10712 when Incomplete_Or_Private_Kind
10715 Write_Str ("Private_Dependents");
10718 | E_Generic_Function
10719 | E_Generic_Package
10720 | E_Generic_Procedure
10723 Write_Str ("Renamed_Entity");
10725 when Object_Kind =>
10726 Write_Str ("Renamed_Object");
10728 when E_String_Literal_Subtype =>
10729 Write_Str ("String_Literal_Low_Bound");
10732 Write_Str ("Field18??");
10734 end Write_Field18_Name;
10736 -----------------------
10737 -- Write_Field19_Name --
10738 -----------------------
10740 procedure Write_Field19_Name (Id : Entity_Id) is
10743 when E_Generic_Package
10746 Write_Str ("Body_Entity");
10748 when E_Discriminant =>
10749 Write_Str ("Corresponding_Discriminant");
10751 when Scalar_Kind =>
10752 Write_Str ("Default_Aspect_Value");
10754 when E_Array_Type =>
10755 Write_Str ("Default_Component_Value");
10757 when E_Protected_Type =>
10758 Write_Str ("Entry_Bodies_Array");
10762 | E_Subprogram_Type
10764 Write_Str ("Extra_Accessibility_Of_Result");
10766 when E_Abstract_State
10767 | E_Class_Wide_Type
10768 | E_Incomplete_Type
10770 Write_Str ("Non_Limited_View");
10772 when E_Incomplete_Subtype =>
10773 if From_Limited_With (Id) then
10774 Write_Str ("Non_Limited_View");
10777 when E_Record_Type =>
10778 Write_Str ("Parent_Subtype");
10780 when E_Procedure =>
10781 Write_Str ("Receiving_Entry");
10786 Write_Str ("Size_Check_Code");
10791 Write_Str ("Spec_Entity");
10793 when Private_Kind =>
10794 Write_Str ("Underlying_Full_View");
10797 Write_Str ("Field19??");
10799 end Write_Field19_Name;
10801 -----------------------
10802 -- Write_Field20_Name --
10803 -----------------------
10805 procedure Write_Field20_Name (Id : Entity_Id) is
10809 Write_Str ("Component_Type");
10811 when E_Generic_In_Parameter
10814 Write_Str ("Default_Value");
10816 when Access_Kind =>
10817 Write_Str ("Directly_Designated_Type");
10819 when E_Component =>
10820 Write_Str ("Discriminant_Checking_Func");
10822 when E_Discriminant =>
10823 Write_Str ("Discriminant_Default_Value");
10825 when Class_Wide_Kind
10832 | E_Generic_Function
10833 | E_Generic_Package
10834 | E_Generic_Procedure
10842 | E_Return_Statement
10843 | E_Subprogram_Body
10844 | E_Subprogram_Type
10846 Write_Str ("Last_Entity");
10851 Write_Str ("Prival_Link");
10853 when E_Exception =>
10854 Write_Str ("Register_Exception_Call");
10856 when Scalar_Kind =>
10857 Write_Str ("Scalar_Range");
10860 Write_Str ("Field20??");
10862 end Write_Field20_Name;
10864 -----------------------
10865 -- Write_Field21_Name --
10866 -----------------------
10868 procedure Write_Field21_Name (Id : Entity_Id) is
10872 Write_Str ("Accept_Address");
10877 Write_Str ("Corresponding_Record_Component");
10879 when E_In_Parameter =>
10880 Write_Str ("Default_Expr_Function");
10882 when Concurrent_Kind
10883 | Incomplete_Or_Private_Kind
10888 Write_Str ("Discriminant_Constraint");
10893 | E_Generic_Function
10894 | E_Generic_Procedure
10898 Write_Str ("Interface_Name");
10900 when Enumeration_Kind =>
10901 Write_Str ("Lit_Hash");
10904 | Modular_Integer_Kind
10906 Write_Str ("Original_Array_Type");
10908 when Fixed_Point_Kind =>
10909 Write_Str ("Small_Value");
10912 Write_Str ("Field21??");
10914 end Write_Field21_Name;
10916 -----------------------
10917 -- Write_Field22_Name --
10918 -----------------------
10920 procedure Write_Field22_Name (Id : Entity_Id) is
10923 when Access_Kind =>
10924 Write_Str ("Associated_Storage_Pool");
10927 Write_Str ("Component_Size");
10929 when E_Record_Type =>
10930 Write_Str ("Corresponding_Remote_Type");
10935 Write_Str ("Original_Record_Component");
10937 when E_Enumeration_Literal =>
10938 Write_Str ("Enumeration_Rep_Expr");
10940 when Formal_Kind =>
10941 Write_Str ("Protected_Formal");
10943 when Concurrent_Kind
10945 | Generic_Unit_Kind
10950 | E_Subprogram_Body
10951 | E_Private_Type .. E_Limited_Private_Subtype
10954 | E_Return_Statement
10956 Write_Str ("Scope_Depth_Value");
10959 Write_Str ("Shared_Var_Procs_Instance");
10962 Write_Str ("Field22??");
10964 end Write_Field22_Name;
10966 ------------------------
10967 -- Write_Field23_Name --
10968 ------------------------
10970 procedure Write_Field23_Name (Id : Entity_Id) is
10973 when E_Discriminant =>
10974 Write_Str ("CR_Discriminant");
10977 Write_Str ("Entry_Cancel_Parameter");
10979 when E_Enumeration_Type =>
10980 Write_Str ("Enum_Pos_To_Rep");
10985 Write_Str ("Extra_Constrained");
10987 when Access_Kind =>
10988 Write_Str ("Finalization_Master");
10990 when E_Generic_Function
10991 | E_Generic_Package
10992 | E_Generic_Procedure
10994 Write_Str ("Inner_Instances");
10997 Write_Str ("Packed_Array_Impl_Type");
11000 Write_Str ("Protection_Object");
11002 when Class_Wide_Kind
11004 | Incomplete_Or_Private_Kind
11008 Write_Str ("Stored_Constraint");
11013 if Present (Scope (Id))
11014 and then Is_Protected_Type (Scope (Id))
11016 Write_Str ("Protection_Object");
11018 Write_Str ("Generic_Renamings");
11022 if Is_Generic_Instance (Id) then
11023 Write_Str ("Generic_Renamings");
11025 Write_Str ("Limited_View");
11029 Write_Str ("Field23??");
11031 end Write_Field23_Name;
11033 ------------------------
11034 -- Write_Field24_Name --
11035 ------------------------
11037 procedure Write_Field24_Name (Id : Entity_Id) is
11041 Write_Str ("Incomplete_Actuals");
11048 Write_Str ("Related_Expression");
11050 when Formal_Kind =>
11051 Write_Str ("Minimum_Accessibility");
11057 Write_Str ("Subps_Index");
11060 Write_Str ("Field24???");
11062 end Write_Field24_Name;
11064 ------------------------
11065 -- Write_Field25_Name --
11066 ------------------------
11068 procedure Write_Field25_Name (Id : Entity_Id) is
11071 when E_Generic_Package
11074 Write_Str ("Abstract_States");
11079 Write_Str ("Contract_Wrapper");
11082 Write_Str ("Debug_Renaming_Link");
11084 when E_Component =>
11085 Write_Str ("DT_Offset_To_Top_Func");
11090 Write_Str ("Interface_Alias");
11092 when E_Record_Subtype
11093 | E_Record_Subtype_With_Private
11095 | E_Record_Type_With_Private
11097 Write_Str ("Interfaces");
11099 when E_Array_Subtype
11102 Write_Str ("Related_Array_Object");
11104 when Discrete_Kind =>
11105 Write_Str ("Static_Discrete_Predicate");
11108 Write_Str ("Static_Real_Or_String_Predicate");
11111 Write_Str ("Task_Body_Procedure");
11114 Write_Str ("Field25??");
11116 end Write_Field25_Name;
11118 ------------------------
11119 -- Write_Field26_Name --
11120 ------------------------
11122 procedure Write_Field26_Name (Id : Entity_Id) is
11126 | E_Record_Type_With_Private
11128 Write_Str ("Dispatch_Table_Wrappers");
11130 when E_In_Out_Parameter
11134 Write_Str ("Last_Assignment");
11139 Write_Str ("Overridden_Operation");
11141 when E_Generic_Package
11144 Write_Str ("Package_Instantiation");
11149 Write_Str ("Related_Type");
11154 Write_Str ("Storage_Size_Variable");
11157 Write_Str ("Field26??");
11159 end Write_Field26_Name;
11161 ------------------------
11162 -- Write_Field27_Name --
11163 ------------------------
11165 procedure Write_Field27_Name (Id : Entity_Id) is
11171 Write_Str ("Current_Use_Clause");
11177 Write_Str ("Related_Type");
11182 Write_Str ("Wrapped_Entity");
11185 Write_Str ("Field27??");
11187 end Write_Field27_Name;
11189 ------------------------
11190 -- Write_Field28_Name --
11191 ------------------------
11193 procedure Write_Field28_Name (Id : Entity_Id) is
11200 | E_Subprogram_Body
11201 | E_Subprogram_Type
11203 Write_Str ("Extra_Formals");
11208 Write_Str ("Finalizer");
11213 Write_Str ("Initialization_Statements");
11215 when E_Access_Subprogram_Type =>
11216 Write_Str ("Original_Access_Type");
11219 Write_Str ("Relative_Deadline_Variable");
11221 when E_Record_Type =>
11222 Write_Str ("Underlying_Record_View");
11225 Write_Str ("Field28??");
11227 end Write_Field28_Name;
11229 ------------------------
11230 -- Write_Field29_Name --
11231 ------------------------
11233 procedure Write_Field29_Name (Id : Entity_Id) is
11239 | E_Subprogram_Body
11241 Write_Str ("Anonymous_Masters");
11246 Write_Str ("BIP_Initialization_Call");
11249 Write_Str ("Subprograms_For_Type");
11252 Write_Str ("Field29??");
11254 end Write_Field29_Name;
11256 ------------------------
11257 -- Write_Field30_Name --
11258 ------------------------
11260 procedure Write_Field30_Name (Id : Entity_Id) is
11264 | E_Record_Type_With_Private
11266 Write_Str ("Access_Disp_Table_Elab_Flag");
11268 when E_Protected_Type
11271 Write_Str ("Anonymous_Object");
11274 Write_Str ("Corresponding_Equality");
11279 Write_Str ("Last_Aggregate_Assignment");
11281 when E_Procedure =>
11282 Write_Str ("Static_Initialization");
11285 Write_Str ("Field30??");
11287 end Write_Field30_Name;
11289 ------------------------
11290 -- Write_Field31_Name --
11291 ------------------------
11293 procedure Write_Field31_Name (Id : Entity_Id) is
11298 | E_In_Out_Parameter
11303 Write_Str ("Activation_Record_Component");
11306 Write_Str ("Derived_Type_Link");
11311 Write_Str ("Thunk_Entity");
11314 Write_Str ("Field31??");
11316 end Write_Field31_Name;
11318 ------------------------
11319 -- Write_Field32_Name --
11320 ------------------------
11322 procedure Write_Field32_Name (Id : Entity_Id) is
11325 when E_Procedure =>
11326 Write_Str ("Corresponding_Function");
11329 Write_Str ("Corresponding_Procedure");
11331 when E_Abstract_State
11335 Write_Str ("Encapsulating_State");
11338 Write_Str ("No_Tagged_Streams_Pragma");
11341 Write_Str ("Field32??");
11343 end Write_Field32_Name;
11345 ------------------------
11346 -- Write_Field33_Name --
11347 ------------------------
11349 procedure Write_Field33_Name (Id : Entity_Id) is
11352 when Subprogram_Kind
11357 Write_Str ("Linker_Section_Pragma");
11360 Write_Str ("Field33??");
11362 end Write_Field33_Name;
11364 ------------------------
11365 -- Write_Field34_Name --
11366 ------------------------
11368 procedure Write_Field34_Name (Id : Entity_Id) is
11375 | E_Generic_Function
11376 | E_Generic_Package
11377 | E_Generic_Procedure
11382 | E_Subprogram_Body
11388 Write_Str ("Contract");
11391 Write_Str ("Field34??");
11393 end Write_Field34_Name;
11395 ------------------------
11396 -- Write_Field35_Name --
11397 ------------------------
11399 procedure Write_Field35_Name (Id : Entity_Id) is
11403 Write_Str ("Anonymous_Designated_Type");
11408 Write_Str ("Entry_Max_Queue_Lenghts_Array");
11410 when Subprogram_Kind =>
11411 Write_Str ("Import_Pragma");
11414 Write_Str ("Field35??");
11416 end Write_Field35_Name;
11418 ------------------------
11419 -- Write_Field36_Name --
11420 ------------------------
11422 procedure Write_Field36_Name (Id : Entity_Id) is
11423 pragma Unreferenced (Id);
11425 Write_Str ("Prev_Entity");
11426 end Write_Field36_Name;
11428 ------------------------
11429 -- Write_Field37_Name --
11430 ------------------------
11432 procedure Write_Field37_Name (Id : Entity_Id) is
11433 pragma Unreferenced (Id);
11435 Write_Str ("Associated_Entity");
11436 end Write_Field37_Name;
11438 ------------------------
11439 -- Write_Field38_Name --
11440 ------------------------
11442 procedure Write_Field38_Name (Id : Entity_Id) is
11448 Write_Str ("Class_Wide_Clone");
11450 when E_Array_Subtype
11452 | E_Record_Subtype_With_Private
11454 Write_Str ("Predicated_Parent");
11457 Write_Str ("Validated_Object");
11460 Write_Str ("Field38??");
11462 end Write_Field38_Name;
11464 ------------------------
11465 -- Write_Field39_Name --
11466 ------------------------
11468 procedure Write_Field39_Name (Id : Entity_Id) is
11474 Write_Str ("Protected_Subprogram");
11477 Write_Str ("Field39??");
11479 end Write_Field39_Name;
11481 ------------------------
11482 -- Write_Field40_Name --
11483 ------------------------
11485 procedure Write_Field40_Name (Id : Entity_Id) is
11488 when E_Abstract_State
11493 | E_Generic_Function
11494 | E_Generic_Package
11495 | E_Generic_Procedure
11501 | E_Subprogram_Body
11507 Write_Str ("SPARK_Pragma");
11510 Write_Str ("Field40??");
11512 end Write_Field40_Name;
11514 ------------------------
11515 -- Write_Field41_Name --
11516 ------------------------
11518 procedure Write_Field41_Name (Id : Entity_Id) is
11524 Write_Str ("Original_Protected_Subprogram");
11526 when E_Generic_Package
11532 Write_Str ("SPARK_Aux_Pragma");
11534 when E_Subprogram_Type =>
11535 Write_Str ("Access_Subprogram_Wrapper");
11538 Write_Str ("Field41??");
11540 end Write_Field41_Name;
11542 -------------------------
11543 -- Iterator Procedures --
11544 -------------------------
11546 procedure Proc_Next_Component (N : in out Node_Id) is
11548 N := Next_Component (N);
11549 end Proc_Next_Component;
11551 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
11553 N := Next_Entity (N);
11554 while Present (N) loop
11555 exit when Ekind (N) in E_Component | E_Discriminant;
11556 N := Next_Entity (N);
11558 end Proc_Next_Component_Or_Discriminant;
11560 procedure Proc_Next_Discriminant (N : in out Node_Id) is
11562 N := Next_Discriminant (N);
11563 end Proc_Next_Discriminant;
11565 procedure Proc_Next_Formal (N : in out Node_Id) is
11567 N := Next_Formal (N);
11568 end Proc_Next_Formal;
11570 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
11572 N := Next_Formal_With_Extras (N);
11573 end Proc_Next_Formal_With_Extras;
11575 procedure Proc_Next_Index (N : in out Node_Id) is
11577 N := Next_Index (N);
11578 end Proc_Next_Index;
11580 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
11582 N := Next_Inlined_Subprogram (N);
11583 end Proc_Next_Inlined_Subprogram;
11585 procedure Proc_Next_Literal (N : in out Node_Id) is
11587 N := Next_Literal (N);
11588 end Proc_Next_Literal;
11590 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
11592 N := Next_Stored_Discriminant (N);
11593 end Proc_Next_Stored_Discriminant;