1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
73 -- Associated_Entity Node37
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Part_Of_Constituents Elist10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Part_Of_References Elist11
105 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- Normalized_Position Uint14
119 -- Postconditions_Proc Node14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Pending_Access_Types Elist15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
131 -- Access_Disp_Table Elist16
132 -- Body_References Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- Scale_Value Uint16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
153 -- Corresponding_Concurrent_Type Node18
154 -- Corresponding_Protected_Entry Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Lit_Indexes Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
163 -- String_Literal_Low_Bound Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Entry_Bodies_Array Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Non_Limited_View Node19
172 -- Parent_Subtype Node19
173 -- Size_Check_Code Node19
174 -- Spec_Entity Node19
175 -- Underlying_Full_View Node19
177 -- Component_Type Node20
178 -- Default_Value Node20
179 -- Directly_Designated_Type Node20
180 -- Discriminant_Checking_Func Node20
181 -- Discriminant_Default_Value Node20
182 -- Last_Entity Node20
183 -- Prival_Link Node20
184 -- Register_Exception_Call Node20
185 -- Scalar_Range Node20
187 -- Accept_Address Elist21
188 -- Default_Expr_Function Node21
189 -- Discriminant_Constraint Elist21
190 -- Interface_Name Node21
191 -- Original_Array_Type Node21
192 -- Small_Value Ureal21
194 -- Associated_Storage_Pool Node22
195 -- Component_Size Uint22
196 -- Corresponding_Remote_Type Node22
197 -- Enumeration_Rep_Expr Node22
198 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Impl_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Incomplete_Actuals Elist24
217 -- Related_Expression Node24
218 -- Subps_Index Uint24
220 -- Contract_Wrapper Node25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- Interface_Alias Node25
224 -- Interfaces Elist25
225 -- Related_Array_Object Node25
226 -- Static_Discrete_Predicate List25
227 -- Static_Real_Or_String_Predicate Node25
228 -- Task_Body_Procedure Node25
230 -- Dispatch_Table_Wrappers Elist26
231 -- Last_Assignment Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Storage_Size_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
242 -- Initialization_Statements Node28
243 -- Original_Access_Type Node28
244 -- Relative_Deadline_Variable Node28
245 -- Underlying_Record_View Node28
247 -- BIP_Initialization_Call Node29
248 -- Subprograms_For_Type Node29
250 -- Anonymous_Object Node30
251 -- Corresponding_Equality Node30
252 -- Last_Aggregate_Assignment Node30
253 -- Static_Initialization Node30
255 -- Derived_Type_Link Node31
256 -- Thunk_Entity Node31
257 -- Activation_Record_Component Node31
259 -- Corresponding_Function Node32
260 -- Corresponding_Procedure Node32
261 -- Encapsulating_State Node32
262 -- No_Tagged_Streams_Pragma Node32
264 -- Linker_Section_Pragma Node33
268 -- Import_Pragma Node35
270 -- Anonymous_Master Node36
272 -- Class_Wide_Preconds List38
274 -- Class_Wide_Postconds List39
276 -- SPARK_Pragma Node40
278 -- SPARK_Aux_Pragma Node41
280 ---------------------------------------------
281 -- Usage of Flags in Defining Entity Nodes --
282 ---------------------------------------------
284 -- All flags are unique, there is no overlaying, so each flag is physically
285 -- present in every entity. However, for many of the flags, it only makes
286 -- sense for them to be set true for certain subsets of entity kinds. See
287 -- the spec of Einfo for further details.
289 -- Is_Inlined_Always Flag1
290 -- Is_Hidden_Non_Overridden_Subpgm Flag2
291 -- Has_Default_Init_Cond Flag3
293 -- Has_Discriminants Flag5
294 -- Is_Dispatching_Operation Flag6
295 -- Is_Immediately_Visible Flag7
297 -- Is_Potentially_Use_Visible Flag9
301 -- Is_Constrained Flag12
302 -- Is_Generic_Type Flag13
303 -- Depends_On_Private Flag14
305 -- Is_Volatile Flag16
306 -- Is_Internal Flag17
307 -- Has_Delayed_Freeze Flag18
308 -- Is_Abstract_Subprogram Flag19
309 -- Is_Concurrent_Record_Type Flag20
311 -- Has_Master_Entity Flag21
312 -- Needs_No_Actuals Flag22
313 -- Has_Storage_Size_Clause Flag23
314 -- Is_Imported Flag24
315 -- Is_Limited_Record Flag25
316 -- Has_Completion Flag26
317 -- Has_Pragma_Controlled Flag27
318 -- Is_Statically_Allocated Flag28
319 -- Has_Size_Clause Flag29
322 -- Checks_May_Be_Suppressed Flag31
323 -- Kill_Elaboration_Checks Flag32
324 -- Kill_Range_Checks Flag33
325 -- Has_Independent_Components Flag34
326 -- Is_Class_Wide_Equivalent_Type Flag35
327 -- Referenced_As_LHS Flag36
328 -- Is_Known_Non_Null Flag37
329 -- Can_Never_Be_Null Flag38
330 -- Has_Default_Aspect Flag39
331 -- Body_Needed_For_SAL Flag40
333 -- Treat_As_Volatile Flag41
334 -- Is_Controlled Flag42
335 -- Has_Controlled_Component Flag43
337 -- In_Private_Part Flag45
338 -- Has_Alignment_Clause Flag46
340 -- In_Package_Body Flag48
342 -- Delay_Subprogram_Descriptors Flag50
345 -- Is_Entry_Formal Flag52
346 -- Is_Private_Descendant Flag53
347 -- Return_Present Flag54
348 -- Is_Tagged_Type Flag55
349 -- Has_Homonym Flag56
351 -- Non_Binary_Modulus Flag58
352 -- Is_Preelaborated Flag59
353 -- Is_Shared_Passive Flag60
355 -- Is_Remote_Types Flag61
356 -- Is_Remote_Call_Interface Flag62
357 -- Is_Character_Type Flag63
358 -- Is_Intrinsic_Subprogram Flag64
359 -- Has_Record_Rep_Clause Flag65
360 -- Has_Enumeration_Rep_Clause Flag66
361 -- Has_Small_Clause Flag67
362 -- Has_Component_Size_Clause Flag68
363 -- Is_Access_Constant Flag69
364 -- Is_First_Subtype Flag70
366 -- Has_Completion_In_Body Flag71
367 -- Has_Unknown_Discriminants Flag72
368 -- Is_Child_Unit Flag73
369 -- Is_CPP_Class Flag74
370 -- Has_Non_Standard_Rep Flag75
371 -- Is_Constructor Flag76
372 -- Static_Elaboration_Desired Flag77
374 -- Has_All_Calls_Remote Flag79
375 -- Is_Constr_Subt_For_U_Nominal Flag80
377 -- Is_Asynchronous Flag81
378 -- Has_Gigi_Rep_Item Flag82
379 -- Has_Machine_Radix_Clause Flag83
380 -- Machine_Radix_10 Flag84
382 -- Has_Atomic_Components Flag86
383 -- Has_Volatile_Components Flag87
384 -- Discard_Names Flag88
385 -- Is_Interrupt_Handler Flag89
386 -- Returns_By_Ref Flag90
389 -- Size_Known_At_Compile_Time Flag92
390 -- Reverse_Storage_Order Flag93
391 -- Is_Generic_Actual_Type Flag94
392 -- Uses_Sec_Stack Flag95
393 -- Warnings_Off Flag96
394 -- Is_Controlling_Formal Flag97
395 -- Has_Controlling_Result Flag98
396 -- Is_Exported Flag99
397 -- Has_Specified_Layout Flag100
399 -- Has_Nested_Block_With_Handler Flag101
401 -- Is_Completely_Hidden Flag103
402 -- Address_Taken Flag104
403 -- Suppress_Initialization Flag105
404 -- Is_Limited_Composite Flag106
405 -- Is_Private_Composite Flag107
406 -- Default_Expressions_Processed Flag108
407 -- Is_Non_Static_Subtype Flag109
408 -- Has_Out_Or_In_Out_Parameter Flag110
410 -- Is_Formal_Subprogram Flag111
411 -- Is_Renaming_Of_Object Flag112
413 -- Delay_Cleanups Flag114
414 -- Never_Set_In_Source Flag115
415 -- Is_Visible_Lib_Unit Flag116
416 -- Is_Unchecked_Union Flag117
417 -- Is_For_Access_Subtype Flag118
418 -- Has_Convention_Pragma Flag119
419 -- Has_Primitive_Operations Flag120
421 -- Has_Pragma_Pack Flag121
422 -- Is_Bit_Packed_Array Flag122
423 -- Has_Unchecked_Union Flag123
424 -- Is_Eliminated Flag124
425 -- C_Pass_By_Copy Flag125
426 -- Is_Instantiated Flag126
427 -- Is_Valued_Procedure Flag127
428 -- (used for Component_Alignment) Flag128
429 -- (used for Component_Alignment) Flag129
430 -- Is_Generic_Instance Flag130
432 -- No_Pool_Assigned Flag131
433 -- Is_Default_Init_Cond_Procedure Flag132
434 -- Has_Inherited_Default_Init_Cond Flag133
435 -- Returns_Limited_View Flag134
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 -- Suppress_Elaboration_Warnings 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
518 -- 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
529 -- 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
540 -- Has_Pragma_Inline_Always Flag230
542 -- Renamed_In_Spec Flag231
543 -- Has_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 -- OK_To_Reorder_Components Flag239
551 -- 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
562 -- Has_Predicates Flag250
564 -- Has_Implicit_Dereference Flag251
565 -- Is_Processed_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
573 -- 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
584 -- 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
595 -- 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
619 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
621 -----------------------
622 -- Local subprograms --
623 -----------------------
626 (State_Id : Entity_Id;
627 Option_Nam : Name_Id) return Boolean;
628 -- Determine whether abstract state State_Id has particular option denoted
629 -- by the name Option_Nam.
635 function Float_Rep (Id : E) return F is
636 pragma Assert (Is_Floating_Point_Type (Id));
638 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
646 (State_Id : Entity_Id;
647 Option_Nam : Name_Id) return Boolean
649 Decl : constant Node_Id := Parent (State_Id);
654 pragma Assert (Ekind (State_Id) = E_Abstract_State);
656 -- The declaration of abstract states with options appear as an
657 -- extension aggregate. If this is not the case, the option is not
660 if Nkind (Decl) /= N_Extension_Aggregate then
666 Opt := First (Expressions (Decl));
667 while Present (Opt) loop
668 if Nkind (Opt) = N_Identifier and then Chars (Opt) = Option_Nam then
675 -- Complex options with various specifiers
677 Opt := First (Component_Associations (Decl));
678 while Present (Opt) loop
679 Opt_Nam := First (Choices (Opt));
681 if Nkind (Opt_Nam) = N_Identifier
682 and then Chars (Opt_Nam) = Option_Nam
693 --------------------------------
694 -- Attribute Access Functions --
695 --------------------------------
697 function Abstract_States (Id : E) return L is
699 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
703 function Accept_Address (Id : E) return L is
708 function Access_Disp_Table (Id : E) return L is
710 pragma Assert (Ekind_In (Id, E_Record_Type,
711 E_Record_Type_With_Private,
713 return Elist16 (Implementation_Base_Type (Id));
714 end Access_Disp_Table;
716 function Activation_Record_Component (Id : E) return E is
718 pragma Assert (Ekind_In (Id, E_Constant,
725 end Activation_Record_Component;
727 function Actual_Subtype (Id : E) return E is
730 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
731 or else Is_Formal (Id));
735 function Address_Taken (Id : E) return B is
740 function Alias (Id : E) return E is
743 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
747 function Alignment (Id : E) return U is
749 pragma Assert (Is_Type (Id)
750 or else Is_Formal (Id)
751 or else Ekind_In (Id, E_Loop_Parameter,
758 function Anonymous_Master (Id : E) return E is
760 pragma Assert (Ekind_In (Id, E_Function,
766 end Anonymous_Master;
768 function Anonymous_Object (Id : E) return E is
770 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
772 end Anonymous_Object;
774 function Associated_Entity (Id : E) return E is
777 end Associated_Entity;
779 function Associated_Formal_Package (Id : E) return E is
781 pragma Assert (Ekind (Id) = E_Package);
783 end Associated_Formal_Package;
785 function Associated_Node_For_Itype (Id : E) return N is
788 end Associated_Node_For_Itype;
790 function Associated_Storage_Pool (Id : E) return E is
792 pragma Assert (Is_Access_Type (Id));
793 return Node22 (Root_Type (Id));
794 end Associated_Storage_Pool;
796 function Barrier_Function (Id : E) return N is
798 pragma Assert (Is_Entry (Id));
800 end Barrier_Function;
802 function Block_Node (Id : E) return N is
804 pragma Assert (Ekind (Id) = E_Block);
808 function Body_Entity (Id : E) return E is
810 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
814 function Body_Needed_For_SAL (Id : E) return B is
817 (Ekind (Id) = E_Package
818 or else Is_Subprogram (Id)
819 or else Is_Generic_Unit (Id));
821 end Body_Needed_For_SAL;
823 function Body_References (Id : E) return L is
825 pragma Assert (Ekind (Id) = E_Abstract_State);
829 function BIP_Initialization_Call (Id : E) return N is
831 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
833 end BIP_Initialization_Call;
835 function C_Pass_By_Copy (Id : E) return B is
837 pragma Assert (Is_Record_Type (Id));
838 return Flag125 (Implementation_Base_Type (Id));
841 function Can_Never_Be_Null (Id : E) return B is
844 end Can_Never_Be_Null;
846 function Checks_May_Be_Suppressed (Id : E) return B is
849 end Checks_May_Be_Suppressed;
851 function Class_Wide_Postconds (Id : E) return S is
853 pragma Assert (Is_Subprogram (Id));
855 end Class_Wide_Postconds;
857 function Class_Wide_Preconds (Id : E) return S is
859 pragma Assert (Is_Subprogram (Id));
861 end Class_Wide_Preconds;
863 function Class_Wide_Type (Id : E) return E is
865 pragma Assert (Is_Type (Id));
869 function Cloned_Subtype (Id : E) return E is
871 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
875 function Component_Bit_Offset (Id : E) return U is
877 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
879 end Component_Bit_Offset;
881 function Component_Clause (Id : E) return N is
883 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
885 end Component_Clause;
887 function Component_Size (Id : E) return U is
889 pragma Assert (Is_Array_Type (Id));
890 return Uint22 (Implementation_Base_Type (Id));
893 function Component_Type (Id : E) return E is
895 pragma Assert (Is_Array_Type (Id));
896 return Node20 (Implementation_Base_Type (Id));
899 function Corresponding_Concurrent_Type (Id : E) return E is
901 pragma Assert (Ekind (Id) = E_Record_Type);
903 end Corresponding_Concurrent_Type;
905 function Corresponding_Discriminant (Id : E) return E is
907 pragma Assert (Ekind (Id) = E_Discriminant);
909 end Corresponding_Discriminant;
911 function Corresponding_Equality (Id : E) return E is
914 (Ekind (Id) = E_Function
915 and then not Comes_From_Source (Id)
916 and then Chars (Id) = Name_Op_Ne);
918 end Corresponding_Equality;
920 function Corresponding_Function (Id : E) return E is
922 pragma Assert (Ekind (Id) = E_Procedure);
924 end Corresponding_Function;
926 function Corresponding_Procedure (Id : E) return E is
928 pragma Assert (Ekind (Id) = E_Function);
930 end Corresponding_Procedure;
932 function Corresponding_Protected_Entry (Id : E) return E is
934 pragma Assert (Ekind (Id) = E_Subprogram_Body);
936 end Corresponding_Protected_Entry;
938 function Corresponding_Record_Type (Id : E) return E is
940 pragma Assert (Is_Concurrent_Type (Id));
942 end Corresponding_Record_Type;
944 function Corresponding_Remote_Type (Id : E) return E is
947 end Corresponding_Remote_Type;
949 function Current_Use_Clause (Id : E) return E is
951 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
953 end Current_Use_Clause;
955 function Current_Value (Id : E) return N is
957 pragma Assert (Ekind (Id) in Object_Kind);
961 function CR_Discriminant (Id : E) return E is
966 function Debug_Info_Off (Id : E) return B is
971 function Debug_Renaming_Link (Id : E) return E is
974 end Debug_Renaming_Link;
976 function Default_Aspect_Component_Value (Id : E) return N is
978 pragma Assert (Is_Array_Type (Id));
979 return Node19 (Base_Type (Id));
980 end Default_Aspect_Component_Value;
982 function Default_Aspect_Value (Id : E) return N is
984 pragma Assert (Is_Scalar_Type (Id));
985 return Node19 (Base_Type (Id));
986 end Default_Aspect_Value;
988 function Default_Expr_Function (Id : E) return E is
990 pragma Assert (Is_Formal (Id));
992 end Default_Expr_Function;
994 function Default_Expressions_Processed (Id : E) return B is
997 end Default_Expressions_Processed;
999 function Default_Value (Id : E) return N is
1001 pragma Assert (Is_Formal (Id));
1005 function Delay_Cleanups (Id : E) return B is
1007 return Flag114 (Id);
1010 function Delay_Subprogram_Descriptors (Id : E) return B is
1013 end Delay_Subprogram_Descriptors;
1015 function Delta_Value (Id : E) return R is
1017 pragma Assert (Is_Fixed_Point_Type (Id));
1018 return Ureal18 (Id);
1021 function Dependent_Instances (Id : E) return L is
1023 pragma Assert (Is_Generic_Instance (Id));
1025 end Dependent_Instances;
1027 function Depends_On_Private (Id : E) return B is
1029 pragma Assert (Nkind (Id) in N_Entity);
1031 end Depends_On_Private;
1033 function Derived_Type_Link (Id : E) return E is
1035 pragma Assert (Is_Type (Id));
1036 return Node31 (Base_Type (Id));
1037 end Derived_Type_Link;
1039 function Digits_Value (Id : E) return U is
1042 (Is_Floating_Point_Type (Id)
1043 or else Is_Decimal_Fixed_Point_Type (Id));
1047 function Direct_Primitive_Operations (Id : E) return L is
1049 pragma Assert (Is_Tagged_Type (Id));
1050 return Elist10 (Id);
1051 end Direct_Primitive_Operations;
1053 function Directly_Designated_Type (Id : E) return E is
1055 pragma Assert (Is_Access_Type (Id));
1057 end Directly_Designated_Type;
1059 function Disable_Controlled (Id : E) return B is
1061 return Flag253 (Base_Type (Id));
1062 end Disable_Controlled;
1064 function Discard_Names (Id : E) return B is
1069 function Discriminal (Id : E) return E is
1071 pragma Assert (Ekind (Id) = E_Discriminant);
1075 function Discriminal_Link (Id : E) return N is
1078 end Discriminal_Link;
1080 function Discriminant_Checking_Func (Id : E) return E is
1082 pragma Assert (Ekind (Id) = E_Component);
1084 end Discriminant_Checking_Func;
1086 function Discriminant_Constraint (Id : E) return L is
1088 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1089 return Elist21 (Id);
1090 end Discriminant_Constraint;
1092 function Discriminant_Default_Value (Id : E) return N is
1094 pragma Assert (Ekind (Id) = E_Discriminant);
1096 end Discriminant_Default_Value;
1098 function Discriminant_Number (Id : E) return U is
1100 pragma Assert (Ekind (Id) = E_Discriminant);
1102 end Discriminant_Number;
1104 function Dispatch_Table_Wrappers (Id : E) return L is
1106 pragma Assert (Ekind_In (Id, E_Record_Type,
1108 return Elist26 (Implementation_Base_Type (Id));
1109 end Dispatch_Table_Wrappers;
1111 function DT_Entry_Count (Id : E) return U is
1113 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1117 function DT_Offset_To_Top_Func (Id : E) return E is
1119 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1121 end DT_Offset_To_Top_Func;
1123 function DT_Position (Id : E) return U is
1125 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1126 and then Present (DTC_Entity (Id)));
1130 function DTC_Entity (Id : E) return E is
1132 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1136 function Elaborate_Body_Desirable (Id : E) return B is
1138 pragma Assert (Ekind (Id) = E_Package);
1139 return Flag210 (Id);
1140 end Elaborate_Body_Desirable;
1142 function Elaboration_Entity (Id : E) return E is
1147 Ekind (Id) = E_Package
1149 Is_Generic_Unit (Id));
1151 end Elaboration_Entity;
1153 function Elaboration_Entity_Required (Id : E) return B is
1158 Ekind (Id) = E_Package
1160 Is_Generic_Unit (Id));
1161 return Flag174 (Id);
1162 end Elaboration_Entity_Required;
1164 function Encapsulating_State (Id : E) return N is
1166 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1168 end Encapsulating_State;
1170 function Enclosing_Scope (Id : E) return E is
1173 end Enclosing_Scope;
1175 function Entry_Accepted (Id : E) return B is
1177 pragma Assert (Is_Entry (Id));
1178 return Flag152 (Id);
1181 function Entry_Bodies_Array (Id : E) return E is
1184 end Entry_Bodies_Array;
1186 function Entry_Cancel_Parameter (Id : E) return E is
1189 end Entry_Cancel_Parameter;
1191 function Entry_Component (Id : E) return E is
1194 end Entry_Component;
1196 function Entry_Formal (Id : E) return E is
1201 function Entry_Index_Constant (Id : E) return N is
1203 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1205 end Entry_Index_Constant;
1207 function Contains_Ignored_Ghost_Code (Id : E) return B is
1210 (Ekind_In (Id, E_Block,
1214 E_Generic_Procedure,
1218 E_Subprogram_Body));
1219 return Flag279 (Id);
1220 end Contains_Ignored_Ghost_Code;
1222 function Contract (Id : E) return N is
1225 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
1229 Ekind_In (Id, E_Constant, -- object variants
1232 Ekind_In (Id, E_Entry, -- overloadable variants
1236 E_Generic_Procedure,
1241 Ekind_In (Id, E_Generic_Package, -- package variants
1245 Ekind (Id) = E_Void); -- special purpose
1249 function Contract_Wrapper (Id : E) return E is
1251 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
1253 end Contract_Wrapper;
1255 function Entry_Parameters_Type (Id : E) return E is
1258 end Entry_Parameters_Type;
1260 function Enum_Pos_To_Rep (Id : E) return E is
1262 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1264 end Enum_Pos_To_Rep;
1266 function Enumeration_Pos (Id : E) return Uint is
1268 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1270 end Enumeration_Pos;
1272 function Enumeration_Rep (Id : E) return U is
1274 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1276 end Enumeration_Rep;
1278 function Enumeration_Rep_Expr (Id : E) return N is
1280 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1282 end Enumeration_Rep_Expr;
1284 function Equivalent_Type (Id : E) return E is
1287 (Ekind_In (Id, E_Class_Wide_Type,
1288 E_Class_Wide_Subtype,
1289 E_Access_Subprogram_Type,
1290 E_Access_Protected_Subprogram_Type,
1291 E_Anonymous_Access_Protected_Subprogram_Type,
1292 E_Access_Subprogram_Type,
1295 end Equivalent_Type;
1297 function Esize (Id : E) return Uint is
1302 function Extra_Accessibility (Id : E) return E is
1305 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1307 end Extra_Accessibility;
1309 function Extra_Accessibility_Of_Result (Id : E) return E is
1311 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1313 end Extra_Accessibility_Of_Result;
1315 function Extra_Constrained (Id : E) return E is
1317 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1319 end Extra_Constrained;
1321 function Extra_Formal (Id : E) return E is
1326 function Extra_Formals (Id : E) return E is
1329 (Is_Overloadable (Id)
1330 or else Ekind_In (Id, E_Entry_Family,
1332 E_Subprogram_Type));
1336 function Can_Use_Internal_Rep (Id : E) return B is
1338 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1339 return Flag229 (Base_Type (Id));
1340 end Can_Use_Internal_Rep;
1342 function Finalization_Master (Id : E) return E is
1344 pragma Assert (Is_Access_Type (Id));
1345 return Node23 (Root_Type (Id));
1346 end Finalization_Master;
1348 function Finalize_Storage_Only (Id : E) return B is
1350 pragma Assert (Is_Type (Id));
1351 return Flag158 (Base_Type (Id));
1352 end Finalize_Storage_Only;
1354 function Finalizer (Id : E) return E is
1356 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1360 function First_Entity (Id : E) return E is
1365 function First_Exit_Statement (Id : E) return N is
1367 pragma Assert (Ekind (Id) = E_Loop);
1369 end First_Exit_Statement;
1371 function First_Index (Id : E) return N is
1373 pragma Assert (Is_Array_Type (Id));
1377 function First_Literal (Id : E) return E is
1379 pragma Assert (Is_Enumeration_Type (Id));
1383 function First_Private_Entity (Id : E) return E is
1385 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1386 or else Ekind (Id) in Concurrent_Kind);
1388 end First_Private_Entity;
1390 function First_Rep_Item (Id : E) return E is
1395 function Freeze_Node (Id : E) return N is
1400 function From_Limited_With (Id : E) return B is
1402 return Flag159 (Id);
1403 end From_Limited_With;
1405 function Full_View (Id : E) return E is
1407 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1411 function Generic_Homonym (Id : E) return E is
1413 pragma Assert (Ekind (Id) = E_Generic_Package);
1415 end Generic_Homonym;
1417 function Generic_Renamings (Id : E) return L is
1419 return Elist23 (Id);
1420 end Generic_Renamings;
1422 function Handler_Records (Id : E) return S is
1425 end Handler_Records;
1427 function Has_Aliased_Components (Id : E) return B is
1429 return Flag135 (Implementation_Base_Type (Id));
1430 end Has_Aliased_Components;
1432 function Has_Alignment_Clause (Id : E) return B is
1435 end Has_Alignment_Clause;
1437 function Has_All_Calls_Remote (Id : E) return B is
1440 end Has_All_Calls_Remote;
1442 function Has_Atomic_Components (Id : E) return B is
1444 return Flag86 (Implementation_Base_Type (Id));
1445 end Has_Atomic_Components;
1447 function Has_Biased_Representation (Id : E) return B is
1449 return Flag139 (Id);
1450 end Has_Biased_Representation;
1452 function Has_Completion (Id : E) return B is
1457 function Has_Completion_In_Body (Id : E) return B is
1459 pragma Assert (Is_Type (Id));
1461 end Has_Completion_In_Body;
1463 function Has_Complex_Representation (Id : E) return B is
1465 pragma Assert (Is_Type (Id));
1466 return Flag140 (Implementation_Base_Type (Id));
1467 end Has_Complex_Representation;
1469 function Has_Component_Size_Clause (Id : E) return B is
1471 pragma Assert (Is_Array_Type (Id));
1472 return Flag68 (Implementation_Base_Type (Id));
1473 end Has_Component_Size_Clause;
1475 function Has_Constrained_Partial_View (Id : E) return B is
1477 pragma Assert (Is_Type (Id));
1478 return Flag187 (Id);
1479 end Has_Constrained_Partial_View;
1481 function Has_Controlled_Component (Id : E) return B is
1483 return Flag43 (Base_Type (Id));
1484 end Has_Controlled_Component;
1486 function Has_Contiguous_Rep (Id : E) return B is
1488 return Flag181 (Id);
1489 end Has_Contiguous_Rep;
1491 function Has_Controlling_Result (Id : E) return B is
1494 end Has_Controlling_Result;
1496 function Has_Convention_Pragma (Id : E) return B is
1498 return Flag119 (Id);
1499 end Has_Convention_Pragma;
1501 function Has_Default_Aspect (Id : E) return B is
1503 return Flag39 (Base_Type (Id));
1504 end Has_Default_Aspect;
1506 function Has_Default_Init_Cond (Id : E) return B is
1508 pragma Assert (Is_Type (Id));
1509 return Flag3 (Base_Type (Id));
1510 end Has_Default_Init_Cond;
1512 function Has_Delayed_Aspects (Id : E) return B is
1514 pragma Assert (Nkind (Id) in N_Entity);
1515 return Flag200 (Id);
1516 end Has_Delayed_Aspects;
1518 function Has_Delayed_Freeze (Id : E) return B is
1520 pragma Assert (Nkind (Id) in N_Entity);
1522 end Has_Delayed_Freeze;
1524 function Has_Delayed_Rep_Aspects (Id : E) return B is
1526 pragma Assert (Nkind (Id) in N_Entity);
1527 return Flag261 (Id);
1528 end Has_Delayed_Rep_Aspects;
1530 function Has_Discriminants (Id : E) return B is
1532 pragma Assert (Nkind (Id) in N_Entity);
1534 end Has_Discriminants;
1536 function Has_Dispatch_Table (Id : E) return B is
1538 pragma Assert (Is_Tagged_Type (Id));
1539 return Flag220 (Id);
1540 end Has_Dispatch_Table;
1542 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1544 pragma Assert (Is_Type (Id));
1545 return Flag258 (Id);
1546 end Has_Dynamic_Predicate_Aspect;
1548 function Has_Enumeration_Rep_Clause (Id : E) return B is
1550 pragma Assert (Is_Enumeration_Type (Id));
1552 end Has_Enumeration_Rep_Clause;
1554 function Has_Exit (Id : E) return B is
1559 function Has_Expanded_Contract (Id : E) return B is
1561 pragma Assert (Is_Subprogram (Id));
1562 return Flag240 (Id);
1563 end Has_Expanded_Contract;
1565 function Has_Forward_Instantiation (Id : E) return B is
1567 return Flag175 (Id);
1568 end Has_Forward_Instantiation;
1570 function Has_Fully_Qualified_Name (Id : E) return B is
1572 return Flag173 (Id);
1573 end Has_Fully_Qualified_Name;
1575 function Has_Gigi_Rep_Item (Id : E) return B is
1578 end Has_Gigi_Rep_Item;
1580 function Has_Homonym (Id : E) return B is
1585 function Has_Implicit_Dereference (Id : E) return B is
1587 return Flag251 (Id);
1588 end Has_Implicit_Dereference;
1590 function Has_Independent_Components (Id : E) return B is
1592 return Flag34 (Implementation_Base_Type (Id));
1593 end Has_Independent_Components;
1595 function Has_Inheritable_Invariants (Id : E) return B is
1597 pragma Assert (Is_Type (Id));
1598 return Flag248 (Id);
1599 end Has_Inheritable_Invariants;
1601 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1603 pragma Assert (Is_Type (Id));
1604 return Flag133 (Base_Type (Id));
1605 end Has_Inherited_Default_Init_Cond;
1607 function Has_Initial_Value (Id : E) return B is
1609 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1610 return Flag219 (Id);
1611 end Has_Initial_Value;
1613 function Has_Invariants (Id : E) return B is
1615 pragma Assert (Is_Type (Id));
1616 return Flag232 (Id);
1619 function Has_Loop_Entry_Attributes (Id : E) return B is
1621 pragma Assert (Ekind (Id) = E_Loop);
1622 return Flag260 (Id);
1623 end Has_Loop_Entry_Attributes;
1625 function Has_Machine_Radix_Clause (Id : E) return B is
1627 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1629 end Has_Machine_Radix_Clause;
1631 function Has_Master_Entity (Id : E) return B is
1634 end Has_Master_Entity;
1636 function Has_Missing_Return (Id : E) return B is
1638 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1639 return Flag142 (Id);
1640 end Has_Missing_Return;
1642 function Has_Nested_Block_With_Handler (Id : E) return B is
1644 return Flag101 (Id);
1645 end Has_Nested_Block_With_Handler;
1647 function Has_Nested_Subprogram (Id : E) return B is
1649 pragma Assert (Is_Subprogram (Id));
1650 return Flag282 (Id);
1651 end Has_Nested_Subprogram;
1653 function Has_Non_Standard_Rep (Id : E) return B is
1655 return Flag75 (Implementation_Base_Type (Id));
1656 end Has_Non_Standard_Rep;
1658 function Has_Object_Size_Clause (Id : E) return B is
1660 pragma Assert (Is_Type (Id));
1661 return Flag172 (Id);
1662 end Has_Object_Size_Clause;
1664 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1667 (Ekind_In (Id, E_Entry, E_Entry_Family)
1668 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1669 return Flag110 (Id);
1670 end Has_Out_Or_In_Out_Parameter;
1672 function Has_Per_Object_Constraint (Id : E) return B is
1674 return Flag154 (Id);
1675 end Has_Per_Object_Constraint;
1677 function Has_Pragma_Controlled (Id : E) return B is
1679 pragma Assert (Is_Access_Type (Id));
1680 return Flag27 (Implementation_Base_Type (Id));
1681 end Has_Pragma_Controlled;
1683 function Has_Pragma_Elaborate_Body (Id : E) return B is
1685 return Flag150 (Id);
1686 end Has_Pragma_Elaborate_Body;
1688 function Has_Pragma_Inline (Id : E) return B is
1690 return Flag157 (Id);
1691 end Has_Pragma_Inline;
1693 function Has_Pragma_Inline_Always (Id : E) return B is
1695 return Flag230 (Id);
1696 end Has_Pragma_Inline_Always;
1698 function Has_Pragma_No_Inline (Id : E) return B is
1700 return Flag201 (Id);
1701 end Has_Pragma_No_Inline;
1703 function Has_Pragma_Ordered (Id : E) return B is
1705 pragma Assert (Is_Enumeration_Type (Id));
1706 return Flag198 (Implementation_Base_Type (Id));
1707 end Has_Pragma_Ordered;
1709 function Has_Pragma_Pack (Id : E) return B is
1711 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1712 return Flag121 (Implementation_Base_Type (Id));
1713 end Has_Pragma_Pack;
1715 function Has_Pragma_Preelab_Init (Id : E) return B is
1717 return Flag221 (Id);
1718 end Has_Pragma_Preelab_Init;
1720 function Has_Pragma_Pure (Id : E) return B is
1722 return Flag203 (Id);
1723 end Has_Pragma_Pure;
1725 function Has_Pragma_Pure_Function (Id : E) return B is
1727 return Flag179 (Id);
1728 end Has_Pragma_Pure_Function;
1730 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1732 return Flag169 (Id);
1733 end Has_Pragma_Thread_Local_Storage;
1735 function Has_Pragma_Unmodified (Id : E) return B is
1737 return Flag233 (Id);
1738 end Has_Pragma_Unmodified;
1740 function Has_Pragma_Unreferenced (Id : E) return B is
1742 return Flag180 (Id);
1743 end Has_Pragma_Unreferenced;
1745 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1747 pragma Assert (Is_Type (Id));
1748 return Flag212 (Id);
1749 end Has_Pragma_Unreferenced_Objects;
1751 function Has_Predicates (Id : E) return B is
1753 pragma Assert (Is_Type (Id));
1754 return Flag250 (Id);
1757 function Has_Primitive_Operations (Id : E) return B is
1759 pragma Assert (Is_Type (Id));
1760 return Flag120 (Base_Type (Id));
1761 end Has_Primitive_Operations;
1763 function Has_Private_Ancestor (Id : E) return B is
1765 return Flag151 (Id);
1766 end Has_Private_Ancestor;
1768 function Has_Private_Declaration (Id : E) return B is
1770 return Flag155 (Id);
1771 end Has_Private_Declaration;
1773 function Has_Protected (Id : E) return B is
1775 return Flag271 (Base_Type (Id));
1778 function Has_Qualified_Name (Id : E) return B is
1780 return Flag161 (Id);
1781 end Has_Qualified_Name;
1783 function Has_RACW (Id : E) return B is
1785 pragma Assert (Ekind (Id) = E_Package);
1786 return Flag214 (Id);
1789 function Has_Record_Rep_Clause (Id : E) return B is
1791 pragma Assert (Is_Record_Type (Id));
1792 return Flag65 (Implementation_Base_Type (Id));
1793 end Has_Record_Rep_Clause;
1795 function Has_Recursive_Call (Id : E) return B is
1797 pragma Assert (Is_Subprogram (Id));
1798 return Flag143 (Id);
1799 end Has_Recursive_Call;
1801 function Has_Shift_Operator (Id : E) return B is
1803 pragma Assert (Is_Integer_Type (Id));
1804 return Flag267 (Base_Type (Id));
1805 end Has_Shift_Operator;
1807 function Has_Size_Clause (Id : E) return B is
1810 end Has_Size_Clause;
1812 function Has_Small_Clause (Id : E) return B is
1814 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
1816 end Has_Small_Clause;
1818 function Has_Specified_Layout (Id : E) return B is
1820 pragma Assert (Is_Type (Id));
1821 return Flag100 (Implementation_Base_Type (Id));
1822 end Has_Specified_Layout;
1824 function Has_Specified_Stream_Input (Id : E) return B is
1826 pragma Assert (Is_Type (Id));
1827 return Flag190 (Id);
1828 end Has_Specified_Stream_Input;
1830 function Has_Specified_Stream_Output (Id : E) return B is
1832 pragma Assert (Is_Type (Id));
1833 return Flag191 (Id);
1834 end Has_Specified_Stream_Output;
1836 function Has_Specified_Stream_Read (Id : E) return B is
1838 pragma Assert (Is_Type (Id));
1839 return Flag192 (Id);
1840 end Has_Specified_Stream_Read;
1842 function Has_Specified_Stream_Write (Id : E) return B is
1844 pragma Assert (Is_Type (Id));
1845 return Flag193 (Id);
1846 end Has_Specified_Stream_Write;
1848 function Has_Static_Discriminants (Id : E) return B is
1850 pragma Assert (Is_Type (Id));
1851 return Flag211 (Id);
1852 end Has_Static_Discriminants;
1854 function Has_Static_Predicate (Id : E) return B is
1856 pragma Assert (Is_Type (Id));
1857 return Flag269 (Id);
1858 end Has_Static_Predicate;
1860 function Has_Static_Predicate_Aspect (Id : E) return B is
1862 pragma Assert (Is_Type (Id));
1863 return Flag259 (Id);
1864 end Has_Static_Predicate_Aspect;
1866 function Has_Storage_Size_Clause (Id : E) return B is
1868 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1869 return Flag23 (Implementation_Base_Type (Id));
1870 end Has_Storage_Size_Clause;
1872 function Has_Stream_Size_Clause (Id : E) return B is
1874 return Flag184 (Id);
1875 end Has_Stream_Size_Clause;
1877 function Has_Task (Id : E) return B is
1879 return Flag30 (Base_Type (Id));
1882 function Has_Thunks (Id : E) return B is
1884 return Flag228 (Id);
1887 function Has_Unchecked_Union (Id : E) return B is
1889 return Flag123 (Base_Type (Id));
1890 end Has_Unchecked_Union;
1892 function Has_Unknown_Discriminants (Id : E) return B is
1894 pragma Assert (Is_Type (Id));
1896 end Has_Unknown_Discriminants;
1898 function Has_Visible_Refinement (Id : E) return B is
1900 pragma Assert (Ekind (Id) = E_Abstract_State);
1901 return Flag263 (Id);
1902 end Has_Visible_Refinement;
1904 function Has_Volatile_Components (Id : E) return B is
1906 return Flag87 (Implementation_Base_Type (Id));
1907 end Has_Volatile_Components;
1909 function Has_Xref_Entry (Id : E) return B is
1911 return Flag182 (Id);
1914 function Hiding_Loop_Variable (Id : E) return E is
1916 pragma Assert (Ekind (Id) = E_Variable);
1918 end Hiding_Loop_Variable;
1920 function Homonym (Id : E) return E is
1925 function Import_Pragma (Id : E) return E is
1927 pragma Assert (Is_Subprogram (Id));
1931 function Incomplete_Actuals (Id : E) return L is
1933 pragma Assert (Ekind (Id) = E_Package);
1934 return Elist24 (Id);
1935 end Incomplete_Actuals;
1937 function Interface_Alias (Id : E) return E is
1939 pragma Assert (Is_Subprogram (Id));
1941 end Interface_Alias;
1943 function Interfaces (Id : E) return L is
1945 pragma Assert (Is_Record_Type (Id));
1946 return Elist25 (Id);
1949 function In_Package_Body (Id : E) return B is
1952 end In_Package_Body;
1954 function In_Private_Part (Id : E) return B is
1957 end In_Private_Part;
1959 function In_Use (Id : E) return B is
1961 pragma Assert (Nkind (Id) in N_Entity);
1965 function Initialization_Statements (Id : E) return N is
1967 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1969 end Initialization_Statements;
1971 function Inner_Instances (Id : E) return L is
1973 return Elist23 (Id);
1974 end Inner_Instances;
1976 function Interface_Name (Id : E) return N is
1981 function Is_Abstract_Subprogram (Id : E) return B is
1983 pragma Assert (Is_Overloadable (Id));
1985 end Is_Abstract_Subprogram;
1987 function Is_Abstract_Type (Id : E) return B is
1989 pragma Assert (Is_Type (Id));
1990 return Flag146 (Id);
1991 end Is_Abstract_Type;
1993 function Is_Access_Constant (Id : E) return B is
1995 pragma Assert (Is_Access_Type (Id));
1997 end Is_Access_Constant;
1999 function Is_Ada_2005_Only (Id : E) return B is
2001 return Flag185 (Id);
2002 end Is_Ada_2005_Only;
2004 function Is_Ada_2012_Only (Id : E) return B is
2006 return Flag199 (Id);
2007 end Is_Ada_2012_Only;
2009 function Is_Aliased (Id : E) return B is
2011 pragma Assert (Nkind (Id) in N_Entity);
2015 function Is_Asynchronous (Id : E) return B is
2017 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
2019 end Is_Asynchronous;
2021 function Is_Atomic (Id : E) return B is
2026 function Is_Bit_Packed_Array (Id : E) return B is
2028 return Flag122 (Implementation_Base_Type (Id));
2029 end Is_Bit_Packed_Array;
2031 function Is_Called (Id : E) return B is
2033 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
2034 return Flag102 (Id);
2037 function Is_Character_Type (Id : E) return B is
2040 end Is_Character_Type;
2042 function Is_Checked_Ghost_Entity (Id : E) return B is
2044 pragma Assert (Nkind (Id) in N_Entity);
2045 return Flag277 (Id);
2046 end Is_Checked_Ghost_Entity;
2048 function Is_Child_Unit (Id : E) return B is
2053 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2056 end Is_Class_Wide_Equivalent_Type;
2058 function Is_Compilation_Unit (Id : E) return B is
2060 return Flag149 (Id);
2061 end Is_Compilation_Unit;
2063 function Is_Completely_Hidden (Id : E) return B is
2065 pragma Assert (Ekind (Id) = E_Discriminant);
2066 return Flag103 (Id);
2067 end Is_Completely_Hidden;
2069 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2072 end Is_Constr_Subt_For_U_Nominal;
2074 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2076 return Flag141 (Id);
2077 end Is_Constr_Subt_For_UN_Aliased;
2079 function Is_Constrained (Id : E) return B is
2081 pragma Assert (Nkind (Id) in N_Entity);
2085 function Is_Constructor (Id : E) return B is
2090 function Is_Controlled (Id : E) return B is
2092 return Flag42 (Base_Type (Id));
2095 function Is_Controlling_Formal (Id : E) return B is
2097 pragma Assert (Is_Formal (Id));
2099 end Is_Controlling_Formal;
2101 function Is_CPP_Class (Id : E) return B is
2106 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2108 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2109 return Flag132 (Id);
2110 end Is_Default_Init_Cond_Procedure;
2112 function Is_Descendant_Of_Address (Id : E) return B is
2114 return Flag223 (Id);
2115 end Is_Descendant_Of_Address;
2117 function Is_Discrim_SO_Function (Id : E) return B is
2119 return Flag176 (Id);
2120 end Is_Discrim_SO_Function;
2122 function Is_Discriminant_Check_Function (Id : E) return B is
2124 return Flag264 (Id);
2125 end Is_Discriminant_Check_Function;
2127 function Is_Dispatch_Table_Entity (Id : E) return B is
2129 return Flag234 (Id);
2130 end Is_Dispatch_Table_Entity;
2132 function Is_Dispatching_Operation (Id : E) return B is
2134 pragma Assert (Nkind (Id) in N_Entity);
2136 end Is_Dispatching_Operation;
2138 function Is_Eliminated (Id : E) return B is
2140 return Flag124 (Id);
2143 function Is_Entry_Formal (Id : E) return B is
2146 end Is_Entry_Formal;
2148 function Is_Exception_Handler (Id : E) return B is
2150 pragma Assert (Ekind (Id) = E_Block);
2151 return Flag286 (Id);
2152 end Is_Exception_Handler;
2154 function Is_Exported (Id : E) return B is
2159 function Is_First_Subtype (Id : E) return B is
2162 end Is_First_Subtype;
2164 function Is_For_Access_Subtype (Id : E) return B is
2166 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2167 return Flag118 (Id);
2168 end Is_For_Access_Subtype;
2170 function Is_Formal_Subprogram (Id : E) return B is
2172 return Flag111 (Id);
2173 end Is_Formal_Subprogram;
2175 function Is_Frozen (Id : E) return B is
2180 function Is_Generic_Actual_Subprogram (Id : E) return B is
2182 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2183 return Flag274 (Id);
2184 end Is_Generic_Actual_Subprogram;
2186 function Is_Generic_Actual_Type (Id : E) return B is
2188 pragma Assert (Is_Type (Id));
2190 end Is_Generic_Actual_Type;
2192 function Is_Generic_Instance (Id : E) return B is
2194 return Flag130 (Id);
2195 end Is_Generic_Instance;
2197 function Is_Generic_Type (Id : E) return B is
2199 pragma Assert (Nkind (Id) in N_Entity);
2201 end Is_Generic_Type;
2203 function Is_Hidden (Id : E) return B is
2208 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2211 end Is_Hidden_Non_Overridden_Subpgm;
2213 function Is_Hidden_Open_Scope (Id : E) return B is
2215 return Flag171 (Id);
2216 end Is_Hidden_Open_Scope;
2218 function Is_Ignored_Ghost_Entity (Id : E) return B is
2220 pragma Assert (Nkind (Id) in N_Entity);
2221 return Flag278 (Id);
2222 end Is_Ignored_Ghost_Entity;
2224 function Is_Immediately_Visible (Id : E) return B is
2226 pragma Assert (Nkind (Id) in N_Entity);
2228 end Is_Immediately_Visible;
2230 function Is_Implementation_Defined (Id : E) return B is
2232 return Flag254 (Id);
2233 end Is_Implementation_Defined;
2235 function Is_Imported (Id : E) return B is
2240 function Is_Independent (Id : E) return B is
2242 return Flag268 (Id);
2245 function Is_Inlined (Id : E) return B is
2250 function Is_Inlined_Always (Id : E) return B is
2252 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2254 end Is_Inlined_Always;
2256 function Is_Interface (Id : E) return B is
2258 return Flag186 (Id);
2261 function Is_Instantiated (Id : E) return B is
2263 return Flag126 (Id);
2264 end Is_Instantiated;
2266 function Is_Internal (Id : E) return B is
2268 pragma Assert (Nkind (Id) in N_Entity);
2272 function Is_Interrupt_Handler (Id : E) return B is
2274 pragma Assert (Nkind (Id) in N_Entity);
2276 end Is_Interrupt_Handler;
2278 function Is_Intrinsic_Subprogram (Id : E) return B is
2281 end Is_Intrinsic_Subprogram;
2283 function Is_Invariant_Procedure (Id : E) return B is
2285 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2286 return Flag257 (Id);
2287 end Is_Invariant_Procedure;
2289 function Is_Itype (Id : E) return B is
2294 function Is_Known_Non_Null (Id : E) return B is
2297 end Is_Known_Non_Null;
2299 function Is_Known_Null (Id : E) return B is
2301 return Flag204 (Id);
2304 function Is_Known_Valid (Id : E) return B is
2306 return Flag170 (Id);
2309 function Is_Limited_Composite (Id : E) return B is
2311 return Flag106 (Id);
2312 end Is_Limited_Composite;
2314 function Is_Limited_Interface (Id : E) return B is
2316 return Flag197 (Id);
2317 end Is_Limited_Interface;
2319 function Is_Limited_Record (Id : E) return B is
2322 end Is_Limited_Record;
2324 function Is_Local_Anonymous_Access (Id : E) return B is
2326 pragma Assert (Is_Access_Type (Id));
2327 return Flag194 (Id);
2328 end Is_Local_Anonymous_Access;
2330 function Is_Machine_Code_Subprogram (Id : E) return B is
2332 pragma Assert (Is_Subprogram (Id));
2333 return Flag137 (Id);
2334 end Is_Machine_Code_Subprogram;
2336 function Is_Non_Static_Subtype (Id : E) return B is
2338 pragma Assert (Is_Type (Id));
2339 return Flag109 (Id);
2340 end Is_Non_Static_Subtype;
2342 function Is_Null_Init_Proc (Id : E) return B is
2344 pragma Assert (Ekind (Id) = E_Procedure);
2345 return Flag178 (Id);
2346 end Is_Null_Init_Proc;
2348 function Is_Obsolescent (Id : E) return B is
2350 return Flag153 (Id);
2353 function Is_Only_Out_Parameter (Id : E) return B is
2355 pragma Assert (Is_Formal (Id));
2356 return Flag226 (Id);
2357 end Is_Only_Out_Parameter;
2359 function Is_Package_Body_Entity (Id : E) return B is
2361 return Flag160 (Id);
2362 end Is_Package_Body_Entity;
2364 function Is_Packed (Id : E) return B is
2366 return Flag51 (Implementation_Base_Type (Id));
2369 function Is_Packed_Array_Impl_Type (Id : E) return B is
2371 return Flag138 (Id);
2372 end Is_Packed_Array_Impl_Type;
2374 function Is_Param_Block_Component_Type (Id : E) return B is
2376 pragma Assert (Is_Access_Type (Id));
2377 return Flag215 (Base_Type (Id));
2378 end Is_Param_Block_Component_Type;
2380 function Is_Potentially_Use_Visible (Id : E) return B is
2382 pragma Assert (Nkind (Id) in N_Entity);
2384 end Is_Potentially_Use_Visible;
2386 function Is_Predicate_Function (Id : E) return B is
2388 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2389 return Flag255 (Id);
2390 end Is_Predicate_Function;
2392 function Is_Predicate_Function_M (Id : E) return B is
2394 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2395 return Flag256 (Id);
2396 end Is_Predicate_Function_M;
2398 function Is_Preelaborated (Id : E) return B is
2401 end Is_Preelaborated;
2403 function Is_Primitive (Id : E) return B is
2406 (Is_Overloadable (Id)
2407 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2408 return Flag218 (Id);
2411 function Is_Primitive_Wrapper (Id : E) return B is
2413 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2414 return Flag195 (Id);
2415 end Is_Primitive_Wrapper;
2417 function Is_Private_Composite (Id : E) return B is
2419 pragma Assert (Is_Type (Id));
2420 return Flag107 (Id);
2421 end Is_Private_Composite;
2423 function Is_Private_Descendant (Id : E) return B is
2426 end Is_Private_Descendant;
2428 function Is_Private_Primitive (Id : E) return B is
2430 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2431 return Flag245 (Id);
2432 end Is_Private_Primitive;
2434 function Is_Processed_Transient (Id : E) return B is
2436 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2437 return Flag252 (Id);
2438 end Is_Processed_Transient;
2440 function Is_Public (Id : E) return B is
2442 pragma Assert (Nkind (Id) in N_Entity);
2446 function Is_Pure (Id : E) return B is
2451 function Is_Pure_Unit_Access_Type (Id : E) return B is
2453 pragma Assert (Is_Access_Type (Id));
2454 return Flag189 (Id);
2455 end Is_Pure_Unit_Access_Type;
2457 function Is_RACW_Stub_Type (Id : E) return B is
2459 pragma Assert (Is_Type (Id));
2460 return Flag244 (Id);
2461 end Is_RACW_Stub_Type;
2463 function Is_Raised (Id : E) return B is
2465 pragma Assert (Ekind (Id) = E_Exception);
2466 return Flag224 (Id);
2469 function Is_Remote_Call_Interface (Id : E) return B is
2472 end Is_Remote_Call_Interface;
2474 function Is_Remote_Types (Id : E) return B is
2477 end Is_Remote_Types;
2479 function Is_Renaming_Of_Object (Id : E) return B is
2481 return Flag112 (Id);
2482 end Is_Renaming_Of_Object;
2484 function Is_Return_Object (Id : E) return B is
2486 return Flag209 (Id);
2487 end Is_Return_Object;
2489 function Is_Safe_To_Reevaluate (Id : E) return B is
2491 return Flag249 (Id);
2492 end Is_Safe_To_Reevaluate;
2494 function Is_Shared_Passive (Id : E) return B is
2497 end Is_Shared_Passive;
2499 function Is_Static_Type (Id : E) return B is
2501 return Flag281 (Id);
2504 function Is_Statically_Allocated (Id : E) return B is
2507 end Is_Statically_Allocated;
2509 function Is_Tag (Id : E) return B is
2511 pragma Assert (Nkind (Id) in N_Entity);
2515 function Is_Tagged_Type (Id : E) return B is
2520 function Is_Thunk (Id : E) return B is
2522 return Flag225 (Id);
2525 function Is_Trivial_Subprogram (Id : E) return B is
2527 return Flag235 (Id);
2528 end Is_Trivial_Subprogram;
2530 function Is_True_Constant (Id : E) return B is
2532 return Flag163 (Id);
2533 end Is_True_Constant;
2535 function Is_Unchecked_Union (Id : E) return B is
2537 return Flag117 (Implementation_Base_Type (Id));
2538 end Is_Unchecked_Union;
2540 function Is_Underlying_Record_View (Id : E) return B is
2542 return Flag246 (Id);
2543 end Is_Underlying_Record_View;
2545 function Is_Unimplemented (Id : E) return B is
2547 return Flag284 (Id);
2548 end Is_Unimplemented;
2550 function Is_Unsigned_Type (Id : E) return B is
2552 pragma Assert (Is_Type (Id));
2553 return Flag144 (Id);
2554 end Is_Unsigned_Type;
2556 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2558 return Flag283 (Id);
2559 end Is_Uplevel_Referenced_Entity;
2561 function Is_Valued_Procedure (Id : E) return B is
2563 pragma Assert (Ekind (Id) = E_Procedure);
2564 return Flag127 (Id);
2565 end Is_Valued_Procedure;
2567 function Is_Visible_Formal (Id : E) return B is
2569 return Flag206 (Id);
2570 end Is_Visible_Formal;
2572 function Is_Visible_Lib_Unit (Id : E) return B is
2574 return Flag116 (Id);
2575 end Is_Visible_Lib_Unit;
2577 function Is_Volatile (Id : E) return B is
2579 pragma Assert (Nkind (Id) in N_Entity);
2581 if Is_Type (Id) then
2582 return Flag16 (Base_Type (Id));
2588 function Is_Volatile_Full_Access (Id : E) return B is
2590 return Flag285 (Id);
2591 end Is_Volatile_Full_Access;
2593 function Itype_Printed (Id : E) return B is
2595 pragma Assert (Is_Itype (Id));
2596 return Flag202 (Id);
2599 function Kill_Elaboration_Checks (Id : E) return B is
2602 end Kill_Elaboration_Checks;
2604 function Kill_Range_Checks (Id : E) return B is
2607 end Kill_Range_Checks;
2609 function Known_To_Have_Preelab_Init (Id : E) return B is
2611 pragma Assert (Is_Type (Id));
2612 return Flag207 (Id);
2613 end Known_To_Have_Preelab_Init;
2615 function Last_Aggregate_Assignment (Id : E) return N is
2617 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2619 end Last_Aggregate_Assignment;
2621 function Last_Assignment (Id : E) return N is
2623 pragma Assert (Is_Assignable (Id));
2625 end Last_Assignment;
2627 function Last_Entity (Id : E) return E is
2632 function Limited_View (Id : E) return E is
2634 pragma Assert (Ekind (Id) = E_Package);
2638 function Linker_Section_Pragma (Id : E) return N is
2641 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2643 end Linker_Section_Pragma;
2645 function Lit_Indexes (Id : E) return E is
2647 pragma Assert (Is_Enumeration_Type (Id));
2651 function Lit_Strings (Id : E) return E is
2653 pragma Assert (Is_Enumeration_Type (Id));
2657 function Low_Bound_Tested (Id : E) return B is
2659 return Flag205 (Id);
2660 end Low_Bound_Tested;
2662 function Machine_Radix_10 (Id : E) return B is
2664 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2666 end Machine_Radix_10;
2668 function Master_Id (Id : E) return E is
2670 pragma Assert (Is_Access_Type (Id));
2674 function Materialize_Entity (Id : E) return B is
2676 return Flag168 (Id);
2677 end Materialize_Entity;
2679 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2681 return Flag262 (Id);
2682 end May_Inherit_Delayed_Rep_Aspects;
2684 function Mechanism (Id : E) return M is
2686 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2687 return UI_To_Int (Uint8 (Id));
2690 function Modulus (Id : E) return Uint is
2692 pragma Assert (Is_Modular_Integer_Type (Id));
2693 return Uint17 (Base_Type (Id));
2696 function Must_Be_On_Byte_Boundary (Id : E) return B is
2698 pragma Assert (Is_Type (Id));
2699 return Flag183 (Id);
2700 end Must_Be_On_Byte_Boundary;
2702 function Must_Have_Preelab_Init (Id : E) return B is
2704 pragma Assert (Is_Type (Id));
2705 return Flag208 (Id);
2706 end Must_Have_Preelab_Init;
2708 function Needs_Debug_Info (Id : E) return B is
2710 return Flag147 (Id);
2711 end Needs_Debug_Info;
2713 function Needs_No_Actuals (Id : E) return B is
2716 (Is_Overloadable (Id)
2717 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2719 end Needs_No_Actuals;
2721 function Never_Set_In_Source (Id : E) return B is
2723 return Flag115 (Id);
2724 end Never_Set_In_Source;
2726 function Next_Inlined_Subprogram (Id : E) return E is
2729 end Next_Inlined_Subprogram;
2731 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2733 pragma Assert (Is_Discrete_Type (Id));
2734 return Flag276 (Id);
2735 end No_Dynamic_Predicate_On_Actual;
2737 function No_Pool_Assigned (Id : E) return B is
2739 pragma Assert (Is_Access_Type (Id));
2740 return Flag131 (Root_Type (Id));
2741 end No_Pool_Assigned;
2743 function No_Predicate_On_Actual (Id : E) return Boolean is
2745 pragma Assert (Is_Discrete_Type (Id));
2746 return Flag275 (Id);
2747 end No_Predicate_On_Actual;
2749 function No_Return (Id : E) return B is
2751 return Flag113 (Id);
2754 function No_Strict_Aliasing (Id : E) return B is
2756 pragma Assert (Is_Access_Type (Id));
2757 return Flag136 (Base_Type (Id));
2758 end No_Strict_Aliasing;
2760 function No_Tagged_Streams_Pragma (Id : E) return N is
2762 pragma Assert (Is_Tagged_Type (Id));
2764 end No_Tagged_Streams_Pragma;
2766 function Non_Binary_Modulus (Id : E) return B is
2768 pragma Assert (Is_Type (Id));
2769 return Flag58 (Base_Type (Id));
2770 end Non_Binary_Modulus;
2772 function Non_Limited_View (Id : E) return E is
2775 (Ekind (Id) in Incomplete_Kind
2777 Ekind (Id) in Class_Wide_Kind
2779 Ekind (Id) = E_Abstract_State);
2781 end Non_Limited_View;
2783 function Nonzero_Is_True (Id : E) return B is
2785 pragma Assert (Root_Type (Id) = Standard_Boolean);
2786 return Flag162 (Base_Type (Id));
2787 end Nonzero_Is_True;
2789 function Normalized_First_Bit (Id : E) return U is
2791 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2793 end Normalized_First_Bit;
2795 function Normalized_Position (Id : E) return U is
2797 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2799 end Normalized_Position;
2801 function Normalized_Position_Max (Id : E) return U is
2803 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2805 end Normalized_Position_Max;
2807 function OK_To_Rename (Id : E) return B is
2809 pragma Assert (Ekind (Id) = E_Variable);
2810 return Flag247 (Id);
2813 function OK_To_Reorder_Components (Id : E) return B is
2815 pragma Assert (Is_Record_Type (Id));
2816 return Flag239 (Base_Type (Id));
2817 end OK_To_Reorder_Components;
2819 function Optimize_Alignment_Space (Id : E) return B is
2822 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2823 return Flag241 (Id);
2824 end Optimize_Alignment_Space;
2826 function Optimize_Alignment_Time (Id : E) return B is
2829 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2830 return Flag242 (Id);
2831 end Optimize_Alignment_Time;
2833 function Original_Access_Type (Id : E) return E is
2835 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2837 end Original_Access_Type;
2839 function Original_Array_Type (Id : E) return E is
2841 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2843 end Original_Array_Type;
2845 function Original_Record_Component (Id : E) return E is
2847 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2849 end Original_Record_Component;
2851 function Overlays_Constant (Id : E) return B is
2853 return Flag243 (Id);
2854 end Overlays_Constant;
2856 function Overridden_Operation (Id : E) return E is
2858 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
2860 end Overridden_Operation;
2862 function Package_Instantiation (Id : E) return N is
2864 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2866 end Package_Instantiation;
2868 function Packed_Array_Impl_Type (Id : E) return E is
2870 pragma Assert (Is_Array_Type (Id));
2872 end Packed_Array_Impl_Type;
2874 function Parent_Subtype (Id : E) return E is
2876 pragma Assert (Is_Record_Type (Id));
2877 return Node19 (Base_Type (Id));
2880 function Part_Of_Constituents (Id : E) return L is
2882 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2883 return Elist10 (Id);
2884 end Part_Of_Constituents;
2886 function Part_Of_References (Id : E) return L is
2888 pragma Assert (Ekind (Id) = E_Variable);
2889 return Elist11 (Id);
2890 end Part_Of_References;
2892 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2894 pragma Assert (Is_Type (Id));
2895 return Flag280 (Id);
2896 end Partial_View_Has_Unknown_Discr;
2898 function Pending_Access_Types (Id : E) return L is
2900 pragma Assert (Is_Type (Id));
2901 return Elist15 (Id);
2902 end Pending_Access_Types;
2904 function Postconditions_Proc (Id : E) return E is
2906 pragma Assert (Ekind_In (Id, E_Entry,
2911 end Postconditions_Proc;
2913 function Prival (Id : E) return E is
2915 pragma Assert (Is_Protected_Component (Id));
2919 function Prival_Link (Id : E) return E is
2921 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2925 function Private_Dependents (Id : E) return L is
2927 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2928 return Elist18 (Id);
2929 end Private_Dependents;
2931 function Private_View (Id : E) return N is
2933 pragma Assert (Is_Private_Type (Id));
2937 function Protected_Body_Subprogram (Id : E) return E is
2939 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2941 end Protected_Body_Subprogram;
2943 function Protected_Formal (Id : E) return E is
2945 pragma Assert (Is_Formal (Id));
2947 end Protected_Formal;
2949 function Protection_Object (Id : E) return E is
2952 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2954 end Protection_Object;
2956 function Reachable (Id : E) return B is
2961 function Referenced (Id : E) return B is
2963 return Flag156 (Id);
2966 function Referenced_As_LHS (Id : E) return B is
2969 end Referenced_As_LHS;
2971 function Referenced_As_Out_Parameter (Id : E) return B is
2973 return Flag227 (Id);
2974 end Referenced_As_Out_Parameter;
2976 function Refinement_Constituents (Id : E) return L is
2978 pragma Assert (Ekind (Id) = E_Abstract_State);
2980 end Refinement_Constituents;
2982 function Register_Exception_Call (Id : E) return N is
2984 pragma Assert (Ekind (Id) = E_Exception);
2986 end Register_Exception_Call;
2988 function Related_Array_Object (Id : E) return E is
2990 pragma Assert (Is_Array_Type (Id));
2992 end Related_Array_Object;
2994 function Related_Expression (Id : E) return N is
2996 pragma Assert (Ekind (Id) in Type_Kind
2997 or else Ekind_In (Id, E_Constant, E_Variable));
2999 end Related_Expression;
3001 function Related_Instance (Id : E) return E is
3003 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3005 end Related_Instance;
3007 function Related_Type (Id : E) return E is
3009 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
3013 function Relative_Deadline_Variable (Id : E) return E is
3015 pragma Assert (Is_Task_Type (Id));
3016 return Node28 (Implementation_Base_Type (Id));
3017 end Relative_Deadline_Variable;
3019 function Renamed_Entity (Id : E) return N is
3024 function Renamed_In_Spec (Id : E) return B is
3026 pragma Assert (Ekind (Id) = E_Package);
3027 return Flag231 (Id);
3028 end Renamed_In_Spec;
3030 function Renamed_Object (Id : E) return N is
3035 function Renaming_Map (Id : E) return U is
3040 function Requires_Overriding (Id : E) return B is
3042 pragma Assert (Is_Overloadable (Id));
3043 return Flag213 (Id);
3044 end Requires_Overriding;
3046 function Return_Present (Id : E) return B is
3051 function Return_Applies_To (Id : E) return N is
3054 end Return_Applies_To;
3056 function Returns_By_Ref (Id : E) return B is
3061 function Returns_Limited_View (Id : E) return B is
3063 pragma Assert (Ekind (Id) = E_Function);
3064 return Flag134 (Id);
3065 end Returns_Limited_View;
3067 function Reverse_Bit_Order (Id : E) return B is
3069 pragma Assert (Is_Record_Type (Id));
3070 return Flag164 (Base_Type (Id));
3071 end Reverse_Bit_Order;
3073 function Reverse_Storage_Order (Id : E) return B is
3075 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3076 return Flag93 (Base_Type (Id));
3077 end Reverse_Storage_Order;
3079 function Rewritten_For_C (Id : E) return B is
3081 pragma Assert (Ekind (Id) = E_Function);
3082 return Flag287 (Id);
3083 end Rewritten_For_C;
3085 function RM_Size (Id : E) return U is
3087 pragma Assert (Is_Type (Id));
3091 function Scalar_Range (Id : E) return N is
3096 function Scale_Value (Id : E) return U is
3101 function Scope_Depth_Value (Id : E) return U is
3104 end Scope_Depth_Value;
3106 function Sec_Stack_Needed_For_Return (Id : E) return B is
3108 return Flag167 (Id);
3109 end Sec_Stack_Needed_For_Return;
3111 function Shadow_Entities (Id : E) return S is
3113 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3115 end Shadow_Entities;
3117 function Shared_Var_Procs_Instance (Id : E) return E is
3119 pragma Assert (Ekind (Id) = E_Variable);
3121 end Shared_Var_Procs_Instance;
3123 function Size_Check_Code (Id : E) return N is
3125 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3127 end Size_Check_Code;
3129 function Size_Depends_On_Discriminant (Id : E) return B is
3131 return Flag177 (Id);
3132 end Size_Depends_On_Discriminant;
3134 function Size_Known_At_Compile_Time (Id : E) return B is
3137 end Size_Known_At_Compile_Time;
3139 function Small_Value (Id : E) return R is
3141 pragma Assert (Is_Fixed_Point_Type (Id));
3142 return Ureal21 (Id);
3145 function SPARK_Aux_Pragma (Id : E) return N is
3148 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
3151 Ekind_In (Id, E_Generic_Package, -- package variants
3155 end SPARK_Aux_Pragma;
3157 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3160 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
3163 Ekind_In (Id, E_Generic_Package, -- package variants
3166 return Flag266 (Id);
3167 end SPARK_Aux_Pragma_Inherited;
3169 function SPARK_Pragma (Id : E) return N is
3172 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
3177 Ekind_In (Id, E_Entry, -- overloadable variants
3181 E_Generic_Procedure,
3186 Ekind_In (Id, E_Generic_Package, -- package variants
3190 Ekind (Id) = E_Variable); -- variable
3194 function SPARK_Pragma_Inherited (Id : E) return B is
3197 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
3202 Ekind_In (Id, E_Entry, -- overloadable variants
3206 E_Generic_Procedure,
3211 Ekind_In (Id, E_Generic_Package, -- package variants
3215 Ekind (Id) = E_Variable); -- variable
3216 return Flag265 (Id);
3217 end SPARK_Pragma_Inherited;
3219 function Spec_Entity (Id : E) return E is
3221 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3225 function SSO_Set_High_By_Default (Id : E) return B is
3227 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3228 return Flag273 (Base_Type (Id));
3229 end SSO_Set_High_By_Default;
3231 function SSO_Set_Low_By_Default (Id : E) return B is
3233 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3234 return Flag272 (Base_Type (Id));
3235 end SSO_Set_Low_By_Default;
3237 function Static_Discrete_Predicate (Id : E) return S is
3239 pragma Assert (Is_Discrete_Type (Id));
3241 end Static_Discrete_Predicate;
3243 function Static_Real_Or_String_Predicate (Id : E) return N is
3245 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3247 end Static_Real_Or_String_Predicate;
3249 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3251 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3253 end Status_Flag_Or_Transient_Decl;
3255 function Storage_Size_Variable (Id : E) return E is
3257 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3258 return Node26 (Implementation_Base_Type (Id));
3259 end Storage_Size_Variable;
3261 function Static_Elaboration_Desired (Id : E) return B is
3263 pragma Assert (Ekind (Id) = E_Package);
3265 end Static_Elaboration_Desired;
3267 function Static_Initialization (Id : E) return N is
3270 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3272 end Static_Initialization;
3274 function Stored_Constraint (Id : E) return L is
3277 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3278 return Elist23 (Id);
3279 end Stored_Constraint;
3281 function Stores_Attribute_Old_Prefix (Id : E) return B is
3283 return Flag270 (Id);
3284 end Stores_Attribute_Old_Prefix;
3286 function Strict_Alignment (Id : E) return B is
3288 return Flag145 (Implementation_Base_Type (Id));
3289 end Strict_Alignment;
3291 function String_Literal_Length (Id : E) return U is
3294 end String_Literal_Length;
3296 function String_Literal_Low_Bound (Id : E) return N is
3299 end String_Literal_Low_Bound;
3301 function Subprograms_For_Type (Id : E) return E is
3303 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3305 end Subprograms_For_Type;
3307 function Subps_Index (Id : E) return U is
3309 pragma Assert (Is_Subprogram (Id));
3313 function Suppress_Elaboration_Warnings (Id : E) return B is
3315 return Flag148 (Id);
3316 end Suppress_Elaboration_Warnings;
3318 function Suppress_Initialization (Id : E) return B is
3320 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3321 return Flag105 (Id);
3322 end Suppress_Initialization;
3324 function Suppress_Style_Checks (Id : E) return B is
3326 return Flag165 (Id);
3327 end Suppress_Style_Checks;
3329 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3331 return Flag217 (Id);
3332 end Suppress_Value_Tracking_On_Call;
3334 function Task_Body_Procedure (Id : E) return N is
3336 pragma Assert (Ekind (Id) in Task_Kind);
3338 end Task_Body_Procedure;
3340 function Thunk_Entity (Id : E) return E is
3342 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3343 and then Is_Thunk (Id));
3347 function Treat_As_Volatile (Id : E) return B is
3350 end Treat_As_Volatile;
3352 function Underlying_Full_View (Id : E) return E is
3354 pragma Assert (Ekind (Id) in Private_Kind);
3356 end Underlying_Full_View;
3358 function Underlying_Record_View (Id : E) return E is
3361 end Underlying_Record_View;
3363 function Universal_Aliasing (Id : E) return B is
3365 pragma Assert (Is_Type (Id));
3366 return Flag216 (Implementation_Base_Type (Id));
3367 end Universal_Aliasing;
3369 function Unset_Reference (Id : E) return N is
3372 end Unset_Reference;
3374 function Used_As_Generic_Actual (Id : E) return B is
3376 return Flag222 (Id);
3377 end Used_As_Generic_Actual;
3379 function Uses_Lock_Free (Id : E) return B is
3381 pragma Assert (Is_Protected_Type (Id));
3382 return Flag188 (Id);
3385 function Uses_Sec_Stack (Id : E) return B is
3390 function Warnings_Off (Id : E) return B is
3395 function Warnings_Off_Used (Id : E) return B is
3397 return Flag236 (Id);
3398 end Warnings_Off_Used;
3400 function Warnings_Off_Used_Unmodified (Id : E) return B is
3402 return Flag237 (Id);
3403 end Warnings_Off_Used_Unmodified;
3405 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3407 return Flag238 (Id);
3408 end Warnings_Off_Used_Unreferenced;
3410 function Wrapped_Entity (Id : E) return E is
3412 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3413 and then Is_Primitive_Wrapper (Id));
3417 function Was_Hidden (Id : E) return B is
3419 return Flag196 (Id);
3422 ------------------------------
3423 -- Classification Functions --
3424 ------------------------------
3426 function Is_Access_Type (Id : E) return B is
3428 return Ekind (Id) in Access_Kind;
3431 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3433 return Ekind (Id) in Access_Protected_Kind;
3434 end Is_Access_Protected_Subprogram_Type;
3436 function Is_Access_Subprogram_Type (Id : E) return B is
3438 return Ekind (Id) in Access_Subprogram_Kind;
3439 end Is_Access_Subprogram_Type;
3441 function Is_Aggregate_Type (Id : E) return B is
3443 return Ekind (Id) in Aggregate_Kind;
3444 end Is_Aggregate_Type;
3446 function Is_Array_Type (Id : E) return B is
3448 return Ekind (Id) in Array_Kind;
3451 function Is_Assignable (Id : E) return B is
3453 return Ekind (Id) in Assignable_Kind;
3456 function Is_Class_Wide_Type (Id : E) return B is
3458 return Ekind (Id) in Class_Wide_Kind;
3459 end Is_Class_Wide_Type;
3461 function Is_Composite_Type (Id : E) return B is
3463 return Ekind (Id) in Composite_Kind;
3464 end Is_Composite_Type;
3466 function Is_Concurrent_Body (Id : E) return B is
3468 return Ekind (Id) in Concurrent_Body_Kind;
3469 end Is_Concurrent_Body;
3471 function Is_Concurrent_Record_Type (Id : E) return B is
3474 end Is_Concurrent_Record_Type;
3476 function Is_Concurrent_Type (Id : E) return B is
3478 return Ekind (Id) in Concurrent_Kind;
3479 end Is_Concurrent_Type;
3481 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3483 return Ekind (Id) in Decimal_Fixed_Point_Kind;
3484 end Is_Decimal_Fixed_Point_Type;
3486 function Is_Digits_Type (Id : E) return B is
3488 return Ekind (Id) in Digits_Kind;
3491 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3493 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3494 end Is_Discrete_Or_Fixed_Point_Type;
3496 function Is_Discrete_Type (Id : E) return B is
3498 return Ekind (Id) in Discrete_Kind;
3499 end Is_Discrete_Type;
3501 function Is_Elementary_Type (Id : E) return B is
3503 return Ekind (Id) in Elementary_Kind;
3504 end Is_Elementary_Type;
3506 function Is_Entry (Id : E) return B is
3508 return Ekind (Id) in Entry_Kind;
3511 function Is_Enumeration_Type (Id : E) return B is
3513 return Ekind (Id) in Enumeration_Kind;
3514 end Is_Enumeration_Type;
3516 function Is_Fixed_Point_Type (Id : E) return B is
3518 return Ekind (Id) in Fixed_Point_Kind;
3519 end Is_Fixed_Point_Type;
3521 function Is_Floating_Point_Type (Id : E) return B is
3523 return Ekind (Id) in Float_Kind;
3524 end Is_Floating_Point_Type;
3526 function Is_Formal (Id : E) return B is
3528 return Ekind (Id) in Formal_Kind;
3531 function Is_Formal_Object (Id : E) return B is
3533 return Ekind (Id) in Formal_Object_Kind;
3534 end Is_Formal_Object;
3536 function Is_Generic_Subprogram (Id : E) return B is
3538 return Ekind (Id) in Generic_Subprogram_Kind;
3539 end Is_Generic_Subprogram;
3541 function Is_Generic_Unit (Id : E) return B is
3543 return Ekind (Id) in Generic_Unit_Kind;
3544 end Is_Generic_Unit;
3546 function Is_Ghost_Entity (Id : Entity_Id) return Boolean is
3548 return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id);
3549 end Is_Ghost_Entity;
3551 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3553 return Ekind (Id) in Incomplete_Or_Private_Kind;
3554 end Is_Incomplete_Or_Private_Type;
3556 function Is_Incomplete_Type (Id : E) return B is
3558 return Ekind (Id) in Incomplete_Kind;
3559 end Is_Incomplete_Type;
3561 function Is_Integer_Type (Id : E) return B is
3563 return Ekind (Id) in Integer_Kind;
3564 end Is_Integer_Type;
3566 function Is_Modular_Integer_Type (Id : E) return B is
3568 return Ekind (Id) in Modular_Integer_Kind;
3569 end Is_Modular_Integer_Type;
3571 function Is_Named_Number (Id : E) return B is
3573 return Ekind (Id) in Named_Kind;
3574 end Is_Named_Number;
3576 function Is_Numeric_Type (Id : E) return B is
3578 return Ekind (Id) in Numeric_Kind;
3579 end Is_Numeric_Type;
3581 function Is_Object (Id : E) return B is
3583 return Ekind (Id) in Object_Kind;
3586 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3588 return Ekind (Id) in Ordinary_Fixed_Point_Kind;
3589 end Is_Ordinary_Fixed_Point_Type;
3591 function Is_Overloadable (Id : E) return B is
3593 return Ekind (Id) in Overloadable_Kind;
3594 end Is_Overloadable;
3596 function Is_Private_Type (Id : E) return B is
3598 return Ekind (Id) in Private_Kind;
3599 end Is_Private_Type;
3601 function Is_Protected_Type (Id : E) return B is
3603 return Ekind (Id) in Protected_Kind;
3604 end Is_Protected_Type;
3606 function Is_Real_Type (Id : E) return B is
3608 return Ekind (Id) in Real_Kind;
3611 function Is_Record_Type (Id : E) return B is
3613 return Ekind (Id) in Record_Kind;
3616 function Is_Scalar_Type (Id : E) return B is
3618 return Ekind (Id) in Scalar_Kind;
3621 function Is_Signed_Integer_Type (Id : E) return B is
3623 return Ekind (Id) in Signed_Integer_Kind;
3624 end Is_Signed_Integer_Type;
3626 function Is_Subprogram (Id : E) return B is
3628 return Ekind (Id) in Subprogram_Kind;
3631 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3633 return Ekind (Id) in Subprogram_Kind
3635 Ekind (Id) in Generic_Subprogram_Kind;
3636 end Is_Subprogram_Or_Generic_Subprogram;
3638 function Is_Task_Type (Id : E) return B is
3640 return Ekind (Id) in Task_Kind;
3643 function Is_Type (Id : E) return B is
3645 return Ekind (Id) in Type_Kind;
3648 ------------------------------
3649 -- Attribute Set Procedures --
3650 ------------------------------
3652 -- Note: in many of these set procedures an "obvious" assertion is missing.
3653 -- The reason for this is that in many cases, a field is set before the
3654 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3655 -- it is possible to add assertions that specifically include the E_Void
3656 -- possibility, but in some cases, we just omit the assertions.
3658 procedure Set_Abstract_States (Id : E; V : L) is
3660 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3661 Set_Elist25 (Id, V);
3662 end Set_Abstract_States;
3664 procedure Set_Accept_Address (Id : E; V : L) is
3666 Set_Elist21 (Id, V);
3667 end Set_Accept_Address;
3669 procedure Set_Access_Disp_Table (Id : E; V : L) is
3671 pragma Assert (Ekind (Id) = E_Record_Type
3672 and then Id = Implementation_Base_Type (Id));
3673 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3674 Set_Elist16 (Id, V);
3675 end Set_Access_Disp_Table;
3677 procedure Set_Anonymous_Master (Id : E; V : E) is
3679 pragma Assert (Ekind_In (Id, E_Function,
3683 E_Subprogram_Body));
3685 end Set_Anonymous_Master;
3687 procedure Set_Anonymous_Object (Id : E; V : E) is
3689 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
3691 end Set_Anonymous_Object;
3693 procedure Set_Associated_Entity (Id : E; V : E) is
3696 end Set_Associated_Entity;
3698 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3701 end Set_Associated_Formal_Package;
3703 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3706 end Set_Associated_Node_For_Itype;
3708 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3710 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3712 end Set_Associated_Storage_Pool;
3714 procedure Set_Activation_Record_Component (Id : E; V : E) is
3716 pragma Assert (Ekind_In (Id, E_Constant,
3723 end Set_Activation_Record_Component;
3725 procedure Set_Actual_Subtype (Id : E; V : E) is
3728 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3729 or else Is_Formal (Id));
3731 end Set_Actual_Subtype;
3733 procedure Set_Address_Taken (Id : E; V : B := True) is
3735 Set_Flag104 (Id, V);
3736 end Set_Address_Taken;
3738 procedure Set_Alias (Id : E; V : E) is
3741 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3745 procedure Set_Alignment (Id : E; V : U) is
3747 pragma Assert (Is_Type (Id)
3748 or else Is_Formal (Id)
3749 or else Ekind_In (Id, E_Loop_Parameter,
3756 procedure Set_Barrier_Function (Id : E; V : N) is
3758 pragma Assert (Is_Entry (Id));
3760 end Set_Barrier_Function;
3762 procedure Set_Block_Node (Id : E; V : N) is
3764 pragma Assert (Ekind (Id) = E_Block);
3768 procedure Set_Body_Entity (Id : E; V : E) is
3770 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3772 end Set_Body_Entity;
3774 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3777 (Ekind (Id) = E_Package
3778 or else Is_Subprogram (Id)
3779 or else Is_Generic_Unit (Id));
3781 end Set_Body_Needed_For_SAL;
3783 procedure Set_Body_References (Id : E; V : L) is
3785 pragma Assert (Ekind (Id) = E_Abstract_State);
3786 Set_Elist16 (Id, V);
3787 end Set_Body_References;
3789 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3791 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3793 end Set_BIP_Initialization_Call;
3795 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3797 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3798 Set_Flag125 (Id, V);
3799 end Set_C_Pass_By_Copy;
3801 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3804 end Set_Can_Never_Be_Null;
3806 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3809 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3810 Set_Flag229 (Id, V);
3811 end Set_Can_Use_Internal_Rep;
3813 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3816 end Set_Checks_May_Be_Suppressed;
3818 procedure Set_Class_Wide_Preconds (Id : E; V : S) is
3820 pragma Assert (Is_Subprogram (Id));
3822 end Set_Class_Wide_Preconds;
3824 procedure Set_Class_Wide_Postconds (Id : E; V : S) is
3826 pragma Assert (Is_Subprogram (Id));
3828 end Set_Class_Wide_Postconds;
3830 procedure Set_Class_Wide_Type (Id : E; V : E) is
3832 pragma Assert (Is_Type (Id));
3834 end Set_Class_Wide_Type;
3836 procedure Set_Cloned_Subtype (Id : E; V : E) is
3838 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3840 end Set_Cloned_Subtype;
3842 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3844 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3846 end Set_Component_Bit_Offset;
3848 procedure Set_Component_Clause (Id : E; V : N) is
3850 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3852 end Set_Component_Clause;
3854 procedure Set_Component_Size (Id : E; V : U) is
3856 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3858 end Set_Component_Size;
3860 procedure Set_Component_Type (Id : E; V : E) is
3862 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3864 end Set_Component_Type;
3866 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3869 (Ekind_In (Id, E_Block,
3873 E_Generic_Procedure,
3877 E_Subprogram_Body));
3878 Set_Flag279 (Id, V);
3879 end Set_Contains_Ignored_Ghost_Code;
3881 procedure Set_Contract (Id : E; V : N) is
3884 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
3888 Ekind_In (Id, E_Constant, -- object variants
3891 Ekind_In (Id, E_Entry, -- overloadable variants
3895 E_Generic_Procedure,
3900 Ekind_In (Id, E_Generic_Package, -- package variants
3904 Ekind (Id) = E_Void); -- special purpose
3908 procedure Set_Contract_Wrapper (Id : E; V : E) is
3910 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
3912 end Set_Contract_Wrapper;
3914 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3917 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3919 end Set_Corresponding_Concurrent_Type;
3921 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3923 pragma Assert (Ekind (Id) = E_Discriminant);
3925 end Set_Corresponding_Discriminant;
3927 procedure Set_Corresponding_Equality (Id : E; V : E) is
3930 (Ekind (Id) = E_Function
3931 and then not Comes_From_Source (Id)
3932 and then Chars (Id) = Name_Op_Ne);
3934 end Set_Corresponding_Equality;
3936 procedure Set_Corresponding_Function (Id : E; V : E) is
3938 pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
3940 end Set_Corresponding_Function;
3942 procedure Set_Corresponding_Procedure (Id : E; V : E) is
3944 pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
3946 end Set_Corresponding_Procedure;
3948 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3950 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3952 end Set_Corresponding_Protected_Entry;
3954 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3956 pragma Assert (Is_Concurrent_Type (Id));
3958 end Set_Corresponding_Record_Type;
3960 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3963 end Set_Corresponding_Remote_Type;
3965 procedure Set_Current_Use_Clause (Id : E; V : E) is
3967 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3969 end Set_Current_Use_Clause;
3971 procedure Set_Current_Value (Id : E; V : N) is
3973 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3975 end Set_Current_Value;
3977 procedure Set_CR_Discriminant (Id : E; V : E) is
3980 end Set_CR_Discriminant;
3982 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3984 Set_Flag166 (Id, V);
3985 end Set_Debug_Info_Off;
3987 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3990 end Set_Debug_Renaming_Link;
3992 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3994 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3996 end Set_Default_Aspect_Component_Value;
3998 procedure Set_Default_Aspect_Value (Id : E; V : E) is
4000 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
4002 end Set_Default_Aspect_Value;
4004 procedure Set_Default_Expr_Function (Id : E; V : E) is
4006 pragma Assert (Is_Formal (Id));
4008 end Set_Default_Expr_Function;
4010 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
4012 Set_Flag108 (Id, V);
4013 end Set_Default_Expressions_Processed;
4015 procedure Set_Default_Value (Id : E; V : N) is
4017 pragma Assert (Is_Formal (Id));
4019 end Set_Default_Value;
4021 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
4025 or else Is_Task_Type (Id)
4026 or else Ekind (Id) = E_Block);
4027 Set_Flag114 (Id, V);
4028 end Set_Delay_Cleanups;
4030 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
4033 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
4036 end Set_Delay_Subprogram_Descriptors;
4038 procedure Set_Delta_Value (Id : E; V : R) is
4040 pragma Assert (Is_Fixed_Point_Type (Id));
4041 Set_Ureal18 (Id, V);
4042 end Set_Delta_Value;
4044 procedure Set_Dependent_Instances (Id : E; V : L) is
4046 pragma Assert (Is_Generic_Instance (Id));
4048 end Set_Dependent_Instances;
4050 procedure Set_Depends_On_Private (Id : E; V : B := True) is
4052 pragma Assert (Nkind (Id) in N_Entity);
4054 end Set_Depends_On_Private;
4056 procedure Set_Derived_Type_Link (Id : E; V : E) is
4058 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4060 end Set_Derived_Type_Link;
4062 procedure Set_Digits_Value (Id : E; V : U) is
4065 (Is_Floating_Point_Type (Id)
4066 or else Is_Decimal_Fixed_Point_Type (Id));
4068 end Set_Digits_Value;
4070 procedure Set_Directly_Designated_Type (Id : E; V : E) is
4073 end Set_Directly_Designated_Type;
4075 procedure Set_Disable_Controlled (Id : E; V : B := True) is
4077 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4078 Set_Flag253 (Id, V);
4079 end Set_Disable_Controlled;
4081 procedure Set_Discard_Names (Id : E; V : B := True) is
4084 end Set_Discard_Names;
4086 procedure Set_Discriminal (Id : E; V : E) is
4088 pragma Assert (Ekind (Id) = E_Discriminant);
4090 end Set_Discriminal;
4092 procedure Set_Discriminal_Link (Id : E; V : E) is
4095 end Set_Discriminal_Link;
4097 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
4099 pragma Assert (Ekind (Id) = E_Component);
4101 end Set_Discriminant_Checking_Func;
4103 procedure Set_Discriminant_Constraint (Id : E; V : L) is
4105 pragma Assert (Nkind (Id) in N_Entity);
4106 Set_Elist21 (Id, V);
4107 end Set_Discriminant_Constraint;
4109 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
4112 end Set_Discriminant_Default_Value;
4114 procedure Set_Discriminant_Number (Id : E; V : U) is
4117 end Set_Discriminant_Number;
4119 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
4121 pragma Assert (Ekind (Id) = E_Record_Type
4122 and then Id = Implementation_Base_Type (Id));
4123 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
4124 Set_Elist26 (Id, V);
4125 end Set_Dispatch_Table_Wrappers;
4127 procedure Set_DT_Entry_Count (Id : E; V : U) is
4129 pragma Assert (Ekind (Id) = E_Component);
4131 end Set_DT_Entry_Count;
4133 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4135 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4137 end Set_DT_Offset_To_Top_Func;
4139 procedure Set_DT_Position (Id : E; V : U) is
4141 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4143 end Set_DT_Position;
4145 procedure Set_DTC_Entity (Id : E; V : E) is
4147 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4151 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4153 pragma Assert (Ekind (Id) = E_Package);
4154 Set_Flag210 (Id, V);
4155 end Set_Elaborate_Body_Desirable;
4157 procedure Set_Elaboration_Entity (Id : E; V : E) is
4162 Ekind (Id) = E_Package
4164 Is_Generic_Unit (Id));
4166 end Set_Elaboration_Entity;
4168 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4173 Ekind (Id) = E_Package
4175 Is_Generic_Unit (Id));
4176 Set_Flag174 (Id, V);
4177 end Set_Elaboration_Entity_Required;
4179 procedure Set_Encapsulating_State (Id : E; V : E) is
4181 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4183 end Set_Encapsulating_State;
4185 procedure Set_Enclosing_Scope (Id : E; V : E) is
4188 end Set_Enclosing_Scope;
4190 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4192 pragma Assert (Is_Entry (Id));
4193 Set_Flag152 (Id, V);
4194 end Set_Entry_Accepted;
4196 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4199 end Set_Entry_Bodies_Array;
4201 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4204 end Set_Entry_Cancel_Parameter;
4206 procedure Set_Entry_Component (Id : E; V : E) is
4209 end Set_Entry_Component;
4211 procedure Set_Entry_Formal (Id : E; V : E) is
4214 end Set_Entry_Formal;
4216 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4218 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4220 end Set_Entry_Index_Constant;
4222 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4225 end Set_Entry_Parameters_Type;
4227 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4229 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4231 end Set_Enum_Pos_To_Rep;
4233 procedure Set_Enumeration_Pos (Id : E; V : U) is
4235 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4237 end Set_Enumeration_Pos;
4239 procedure Set_Enumeration_Rep (Id : E; V : U) is
4241 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4243 end Set_Enumeration_Rep;
4245 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4247 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4249 end Set_Enumeration_Rep_Expr;
4251 procedure Set_Equivalent_Type (Id : E; V : E) is
4254 (Ekind_In (Id, E_Class_Wide_Type,
4255 E_Class_Wide_Subtype,
4256 E_Access_Protected_Subprogram_Type,
4257 E_Anonymous_Access_Protected_Subprogram_Type,
4258 E_Access_Subprogram_Type,
4261 end Set_Equivalent_Type;
4263 procedure Set_Esize (Id : E; V : U) is
4268 procedure Set_Extra_Accessibility (Id : E; V : E) is
4271 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4273 end Set_Extra_Accessibility;
4275 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4277 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4279 end Set_Extra_Accessibility_Of_Result;
4281 procedure Set_Extra_Constrained (Id : E; V : E) is
4283 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4285 end Set_Extra_Constrained;
4287 procedure Set_Extra_Formal (Id : E; V : E) is
4290 end Set_Extra_Formal;
4292 procedure Set_Extra_Formals (Id : E; V : E) is
4295 (Is_Overloadable (Id)
4296 or else Ekind_In (Id, E_Entry_Family,
4298 E_Subprogram_Type));
4300 end Set_Extra_Formals;
4302 procedure Set_Finalization_Master (Id : E; V : E) is
4304 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4306 end Set_Finalization_Master;
4308 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4310 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4311 Set_Flag158 (Id, V);
4312 end Set_Finalize_Storage_Only;
4314 procedure Set_Finalizer (Id : E; V : E) is
4316 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4320 procedure Set_First_Entity (Id : E; V : E) is
4323 end Set_First_Entity;
4325 procedure Set_First_Exit_Statement (Id : E; V : N) is
4327 pragma Assert (Ekind (Id) = E_Loop);
4329 end Set_First_Exit_Statement;
4331 procedure Set_First_Index (Id : E; V : N) is
4333 pragma Assert (Is_Array_Type (Id));
4335 end Set_First_Index;
4337 procedure Set_First_Literal (Id : E; V : E) is
4339 pragma Assert (Is_Enumeration_Type (Id));
4341 end Set_First_Literal;
4343 procedure Set_First_Private_Entity (Id : E; V : E) is
4345 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4346 or else Ekind (Id) in Concurrent_Kind);
4348 end Set_First_Private_Entity;
4350 procedure Set_First_Rep_Item (Id : E; V : N) is
4353 end Set_First_Rep_Item;
4355 procedure Set_Float_Rep (Id : E; V : F) is
4356 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4358 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4361 procedure Set_Freeze_Node (Id : E; V : N) is
4364 end Set_Freeze_Node;
4366 procedure Set_From_Limited_With (Id : E; V : B := True) is
4369 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4370 Set_Flag159 (Id, V);
4371 end Set_From_Limited_With;
4373 procedure Set_Full_View (Id : E; V : E) is
4375 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4379 procedure Set_Generic_Homonym (Id : E; V : E) is
4382 end Set_Generic_Homonym;
4384 procedure Set_Generic_Renamings (Id : E; V : L) is
4386 Set_Elist23 (Id, V);
4387 end Set_Generic_Renamings;
4389 procedure Set_Handler_Records (Id : E; V : S) is
4392 end Set_Handler_Records;
4394 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4396 pragma Assert (Id = Base_Type (Id));
4397 Set_Flag135 (Id, V);
4398 end Set_Has_Aliased_Components;
4400 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4403 end Set_Has_Alignment_Clause;
4405 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4408 end Set_Has_All_Calls_Remote;
4410 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4412 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4414 end Set_Has_Atomic_Components;
4416 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4419 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4420 Set_Flag139 (Id, V);
4421 end Set_Has_Biased_Representation;
4423 procedure Set_Has_Completion (Id : E; V : B := True) is
4426 end Set_Has_Completion;
4428 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4430 pragma Assert (Is_Type (Id));
4432 end Set_Has_Completion_In_Body;
4434 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4436 pragma Assert (Ekind (Id) = E_Record_Type);
4437 Set_Flag140 (Id, V);
4438 end Set_Has_Complex_Representation;
4440 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4442 pragma Assert (Ekind (Id) = E_Array_Type);
4444 end Set_Has_Component_Size_Clause;
4446 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4448 pragma Assert (Is_Type (Id));
4449 Set_Flag187 (Id, V);
4450 end Set_Has_Constrained_Partial_View;
4452 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4454 Set_Flag181 (Id, V);
4455 end Set_Has_Contiguous_Rep;
4457 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4459 pragma Assert (Id = Base_Type (Id));
4461 end Set_Has_Controlled_Component;
4463 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4466 end Set_Has_Controlling_Result;
4468 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4470 Set_Flag119 (Id, V);
4471 end Set_Has_Convention_Pragma;
4473 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4476 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4477 and then Is_Base_Type (Id));
4479 end Set_Has_Default_Aspect;
4481 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4483 pragma Assert (Is_Type (Id));
4484 Set_Flag3 (Base_Type (Id), V);
4485 end Set_Has_Default_Init_Cond;
4487 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4489 pragma Assert (Nkind (Id) in N_Entity);
4490 Set_Flag200 (Id, V);
4491 end Set_Has_Delayed_Aspects;
4493 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4495 pragma Assert (Nkind (Id) in N_Entity);
4497 end Set_Has_Delayed_Freeze;
4499 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4501 pragma Assert (Nkind (Id) in N_Entity);
4502 Set_Flag261 (Id, V);
4503 end Set_Has_Delayed_Rep_Aspects;
4505 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4507 pragma Assert (Nkind (Id) in N_Entity);
4509 end Set_Has_Discriminants;
4511 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4513 pragma Assert (Ekind (Id) = E_Record_Type
4514 and then Is_Tagged_Type (Id));
4515 Set_Flag220 (Id, V);
4516 end Set_Has_Dispatch_Table;
4518 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4520 pragma Assert (Is_Type (Id));
4521 Set_Flag258 (Id, V);
4522 end Set_Has_Dynamic_Predicate_Aspect;
4524 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4526 pragma Assert (Is_Enumeration_Type (Id));
4528 end Set_Has_Enumeration_Rep_Clause;
4530 procedure Set_Has_Exit (Id : E; V : B := True) is
4535 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4537 pragma Assert (Ekind_In (Id, E_Entry,
4541 Set_Flag240 (Id, V);
4542 end Set_Has_Expanded_Contract;
4544 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4546 Set_Flag175 (Id, V);
4547 end Set_Has_Forward_Instantiation;
4549 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4551 Set_Flag173 (Id, V);
4552 end Set_Has_Fully_Qualified_Name;
4554 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4557 end Set_Has_Gigi_Rep_Item;
4559 procedure Set_Has_Homonym (Id : E; V : B := True) is
4562 end Set_Has_Homonym;
4564 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4566 Set_Flag251 (Id, V);
4567 end Set_Has_Implicit_Dereference;
4569 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4571 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4573 end Set_Has_Independent_Components;
4575 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4577 pragma Assert (Is_Type (Id));
4578 Set_Flag248 (Id, V);
4579 end Set_Has_Inheritable_Invariants;
4581 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4583 pragma Assert (Is_Type (Id));
4584 Set_Flag133 (Base_Type (Id), V);
4585 end Set_Has_Inherited_Default_Init_Cond;
4587 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4589 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4590 Set_Flag219 (Id, V);
4591 end Set_Has_Initial_Value;
4593 procedure Set_Has_Invariants (Id : E; V : B := True) is
4595 pragma Assert (Is_Type (Id));
4596 Set_Flag232 (Id, V);
4597 end Set_Has_Invariants;
4599 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4601 pragma Assert (Ekind (Id) = E_Loop);
4602 Set_Flag260 (Id, V);
4603 end Set_Has_Loop_Entry_Attributes;
4605 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4607 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4609 end Set_Has_Machine_Radix_Clause;
4611 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4614 end Set_Has_Master_Entity;
4616 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4618 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4619 Set_Flag142 (Id, V);
4620 end Set_Has_Missing_Return;
4622 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4624 Set_Flag101 (Id, V);
4625 end Set_Has_Nested_Block_With_Handler;
4627 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4629 pragma Assert (Is_Subprogram (Id));
4630 Set_Flag282 (Id, V);
4631 end Set_Has_Nested_Subprogram;
4633 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4635 pragma Assert (Id = Base_Type (Id));
4637 end Set_Has_Non_Standard_Rep;
4639 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4641 pragma Assert (Is_Type (Id));
4642 Set_Flag172 (Id, V);
4643 end Set_Has_Object_Size_Clause;
4645 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4648 (Ekind_In (Id, E_Entry, E_Entry_Family)
4649 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4650 Set_Flag110 (Id, V);
4651 end Set_Has_Out_Or_In_Out_Parameter;
4653 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4655 Set_Flag154 (Id, V);
4656 end Set_Has_Per_Object_Constraint;
4658 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4660 pragma Assert (Is_Access_Type (Id));
4661 Set_Flag27 (Base_Type (Id), V);
4662 end Set_Has_Pragma_Controlled;
4664 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4666 Set_Flag150 (Id, V);
4667 end Set_Has_Pragma_Elaborate_Body;
4669 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4671 Set_Flag157 (Id, V);
4672 end Set_Has_Pragma_Inline;
4674 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4676 Set_Flag230 (Id, V);
4677 end Set_Has_Pragma_Inline_Always;
4679 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4681 Set_Flag201 (Id, V);
4682 end Set_Has_Pragma_No_Inline;
4684 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4686 pragma Assert (Is_Enumeration_Type (Id));
4687 pragma Assert (Id = Base_Type (Id));
4688 Set_Flag198 (Id, V);
4689 end Set_Has_Pragma_Ordered;
4691 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4693 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4694 pragma Assert (Id = Base_Type (Id));
4695 Set_Flag121 (Id, V);
4696 end Set_Has_Pragma_Pack;
4698 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4700 Set_Flag221 (Id, V);
4701 end Set_Has_Pragma_Preelab_Init;
4703 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4705 Set_Flag203 (Id, V);
4706 end Set_Has_Pragma_Pure;
4708 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4710 Set_Flag179 (Id, V);
4711 end Set_Has_Pragma_Pure_Function;
4713 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4715 Set_Flag169 (Id, V);
4716 end Set_Has_Pragma_Thread_Local_Storage;
4718 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4720 Set_Flag233 (Id, V);
4721 end Set_Has_Pragma_Unmodified;
4723 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4725 Set_Flag180 (Id, V);
4726 end Set_Has_Pragma_Unreferenced;
4728 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4730 pragma Assert (Is_Type (Id));
4731 Set_Flag212 (Id, V);
4732 end Set_Has_Pragma_Unreferenced_Objects;
4734 procedure Set_Has_Predicates (Id : E; V : B := True) is
4736 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4737 Set_Flag250 (Id, V);
4738 end Set_Has_Predicates;
4740 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4742 pragma Assert (Id = Base_Type (Id));
4743 Set_Flag120 (Id, V);
4744 end Set_Has_Primitive_Operations;
4746 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4748 pragma Assert (Is_Type (Id));
4749 Set_Flag151 (Id, V);
4750 end Set_Has_Private_Ancestor;
4752 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4754 Set_Flag155 (Id, V);
4755 end Set_Has_Private_Declaration;
4757 procedure Set_Has_Protected (Id : E; V : B := True) is
4759 Set_Flag271 (Id, V);
4760 end Set_Has_Protected;
4762 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4764 Set_Flag161 (Id, V);
4765 end Set_Has_Qualified_Name;
4767 procedure Set_Has_RACW (Id : E; V : B := True) is
4769 pragma Assert (Ekind (Id) = E_Package);
4770 Set_Flag214 (Id, V);
4773 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4775 pragma Assert (Id = Base_Type (Id));
4777 end Set_Has_Record_Rep_Clause;
4779 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4781 pragma Assert (Is_Subprogram (Id));
4782 Set_Flag143 (Id, V);
4783 end Set_Has_Recursive_Call;
4785 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4787 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4788 Set_Flag267 (Id, V);
4789 end Set_Has_Shift_Operator;
4791 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4794 end Set_Has_Size_Clause;
4796 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4798 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
4800 end Set_Has_Small_Clause;
4802 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4804 pragma Assert (Id = Base_Type (Id));
4805 Set_Flag100 (Id, V);
4806 end Set_Has_Specified_Layout;
4808 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4810 pragma Assert (Is_Type (Id));
4811 Set_Flag190 (Id, V);
4812 end Set_Has_Specified_Stream_Input;
4814 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4816 pragma Assert (Is_Type (Id));
4817 Set_Flag191 (Id, V);
4818 end Set_Has_Specified_Stream_Output;
4820 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4822 pragma Assert (Is_Type (Id));
4823 Set_Flag192 (Id, V);
4824 end Set_Has_Specified_Stream_Read;
4826 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4828 pragma Assert (Is_Type (Id));
4829 Set_Flag193 (Id, V);
4830 end Set_Has_Specified_Stream_Write;
4832 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4834 Set_Flag211 (Id, V);
4835 end Set_Has_Static_Discriminants;
4837 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4839 pragma Assert (Is_Type (Id));
4840 Set_Flag269 (Id, V);
4841 end Set_Has_Static_Predicate;
4843 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4845 pragma Assert (Is_Type (Id));
4846 Set_Flag259 (Id, V);
4847 end Set_Has_Static_Predicate_Aspect;
4849 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4851 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4852 pragma Assert (Id = Base_Type (Id));
4854 end Set_Has_Storage_Size_Clause;
4856 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4858 pragma Assert (Is_Elementary_Type (Id));
4859 Set_Flag184 (Id, V);
4860 end Set_Has_Stream_Size_Clause;
4862 procedure Set_Has_Task (Id : E; V : B := True) is
4864 pragma Assert (Id = Base_Type (Id));
4868 procedure Set_Has_Thunks (Id : E; V : B := True) is
4870 pragma Assert (Is_Tag (Id));
4871 Set_Flag228 (Id, V);
4874 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4876 pragma Assert (Id = Base_Type (Id));
4877 Set_Flag123 (Id, V);
4878 end Set_Has_Unchecked_Union;
4880 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4882 pragma Assert (Is_Type (Id));
4884 end Set_Has_Unknown_Discriminants;
4886 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4888 pragma Assert (Ekind (Id) = E_Abstract_State);
4889 Set_Flag263 (Id, V);
4890 end Set_Has_Visible_Refinement;
4892 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4894 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4896 end Set_Has_Volatile_Components;
4898 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4900 Set_Flag182 (Id, V);
4901 end Set_Has_Xref_Entry;
4903 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4905 pragma Assert (Ekind (Id) = E_Variable);
4907 end Set_Hiding_Loop_Variable;
4909 procedure Set_Homonym (Id : E; V : E) is
4911 pragma Assert (Id /= V);
4915 procedure Set_Incomplete_Actuals (Id : E; V : L) is
4917 pragma Assert (Ekind (Id) = E_Package);
4918 Set_Elist24 (Id, V);
4919 end Set_Incomplete_Actuals;
4921 procedure Set_Import_Pragma (Id : E; V : E) is
4923 pragma Assert (Is_Subprogram (Id));
4925 end Set_Import_Pragma;
4927 procedure Set_Interface_Alias (Id : E; V : E) is
4931 and then Is_Hidden (Id)
4932 and then (Ekind_In (Id, E_Procedure, E_Function)));
4934 end Set_Interface_Alias;
4936 procedure Set_Interfaces (Id : E; V : L) is
4938 pragma Assert (Is_Record_Type (Id));
4939 Set_Elist25 (Id, V);
4942 procedure Set_In_Package_Body (Id : E; V : B := True) is
4945 end Set_In_Package_Body;
4947 procedure Set_In_Private_Part (Id : E; V : B := True) is
4950 end Set_In_Private_Part;
4952 procedure Set_In_Use (Id : E; V : B := True) is
4954 pragma Assert (Nkind (Id) in N_Entity);
4958 procedure Set_Initialization_Statements (Id : E; V : N) is
4960 -- Tolerate an E_Void entity since this can be called while resolving
4961 -- an aggregate used as the initialization expression for an object
4962 -- declaration, and this occurs before the Ekind for the object is set.
4964 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4966 end Set_Initialization_Statements;
4968 procedure Set_Inner_Instances (Id : E; V : L) is
4970 Set_Elist23 (Id, V);
4971 end Set_Inner_Instances;
4973 procedure Set_Interface_Name (Id : E; V : N) is
4976 end Set_Interface_Name;
4978 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4980 pragma Assert (Is_Overloadable (Id));
4982 end Set_Is_Abstract_Subprogram;
4984 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4986 pragma Assert (Is_Type (Id));
4987 Set_Flag146 (Id, V);
4988 end Set_Is_Abstract_Type;
4990 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4992 pragma Assert (Is_Access_Type (Id));
4993 Set_Flag194 (Id, V);
4994 end Set_Is_Local_Anonymous_Access;
4996 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4998 pragma Assert (Is_Access_Type (Id));
5000 end Set_Is_Access_Constant;
5002 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
5004 Set_Flag185 (Id, V);
5005 end Set_Is_Ada_2005_Only;
5007 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
5009 Set_Flag199 (Id, V);
5010 end Set_Is_Ada_2012_Only;
5012 procedure Set_Is_Aliased (Id : E; V : B := True) is
5014 pragma Assert (Nkind (Id) in N_Entity);
5018 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
5021 (Ekind (Id) = E_Procedure or else Is_Type (Id));
5023 end Set_Is_Asynchronous;
5025 procedure Set_Is_Atomic (Id : E; V : B := True) is
5030 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
5032 pragma Assert ((not V)
5033 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
5034 Set_Flag122 (Id, V);
5035 end Set_Is_Bit_Packed_Array;
5037 procedure Set_Is_Called (Id : E; V : B := True) is
5039 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
5040 Set_Flag102 (Id, V);
5043 procedure Set_Is_Character_Type (Id : E; V : B := True) is
5046 end Set_Is_Character_Type;
5048 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
5050 pragma Assert (Is_Formal (Id)
5051 or else Is_Object (Id)
5052 or else Is_Package_Or_Generic_Package (Id)
5053 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5054 or else Is_Type (Id)
5055 or else Ekind (Id) = E_Abstract_State
5056 or else Ekind (Id) = E_Component
5057 or else Ekind (Id) = E_Discriminant
5058 or else Ekind (Id) = E_Exception
5059 or else Ekind (Id) = E_Package_Body
5060 or else Ekind (Id) = E_Subprogram_Body
5062 -- Allow this attribute to appear on non-analyzed entities
5064 or else Ekind (Id) = E_Void);
5065 Set_Flag277 (Id, V);
5066 end Set_Is_Checked_Ghost_Entity;
5068 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
5071 end Set_Is_Child_Unit;
5073 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
5076 end Set_Is_Class_Wide_Equivalent_Type;
5078 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
5080 Set_Flag149 (Id, V);
5081 end Set_Is_Compilation_Unit;
5083 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
5085 pragma Assert (Ekind (Id) = E_Discriminant);
5086 Set_Flag103 (Id, V);
5087 end Set_Is_Completely_Hidden;
5089 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
5092 end Set_Is_Concurrent_Record_Type;
5094 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
5097 end Set_Is_Constr_Subt_For_U_Nominal;
5099 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
5101 Set_Flag141 (Id, V);
5102 end Set_Is_Constr_Subt_For_UN_Aliased;
5104 procedure Set_Is_Constrained (Id : E; V : B := True) is
5106 pragma Assert (Nkind (Id) in N_Entity);
5108 end Set_Is_Constrained;
5110 procedure Set_Is_Constructor (Id : E; V : B := True) is
5113 end Set_Is_Constructor;
5115 procedure Set_Is_Controlled (Id : E; V : B := True) is
5117 pragma Assert (Id = Base_Type (Id));
5119 end Set_Is_Controlled;
5121 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5123 pragma Assert (Is_Formal (Id));
5125 end Set_Is_Controlling_Formal;
5127 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5130 end Set_Is_CPP_Class;
5132 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
5134 pragma Assert (Ekind (Id) = E_Procedure);
5135 Set_Flag132 (Id, V);
5136 end Set_Is_Default_Init_Cond_Procedure;
5138 procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
5140 pragma Assert (Is_Type (Id));
5141 Set_Flag223 (Id, V);
5142 end Set_Is_Descendant_Of_Address;
5144 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5146 Set_Flag176 (Id, V);
5147 end Set_Is_Discrim_SO_Function;
5149 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5151 Set_Flag264 (Id, V);
5152 end Set_Is_Discriminant_Check_Function;
5154 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5156 Set_Flag234 (Id, V);
5157 end Set_Is_Dispatch_Table_Entity;
5159 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5164 Is_Overloadable (Id)
5166 Ekind (Id) = E_Subprogram_Type);
5169 end Set_Is_Dispatching_Operation;
5171 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5173 Set_Flag124 (Id, V);
5174 end Set_Is_Eliminated;
5176 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5179 end Set_Is_Entry_Formal;
5181 procedure Set_Is_Exception_Handler (Id : E; V : B := True) is
5183 pragma Assert (Ekind (Id) = E_Block);
5184 Set_Flag286 (Id, V);
5185 end Set_Is_Exception_Handler;
5187 procedure Set_Is_Exported (Id : E; V : B := True) is
5190 end Set_Is_Exported;
5192 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5195 end Set_Is_First_Subtype;
5197 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5199 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5200 Set_Flag118 (Id, V);
5201 end Set_Is_For_Access_Subtype;
5203 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5205 Set_Flag111 (Id, V);
5206 end Set_Is_Formal_Subprogram;
5208 procedure Set_Is_Frozen (Id : E; V : B := True) is
5210 pragma Assert (Nkind (Id) in N_Entity);
5214 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5216 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5217 Set_Flag274 (Id, V);
5218 end Set_Is_Generic_Actual_Subprogram;
5220 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5222 pragma Assert (Is_Type (Id));
5224 end Set_Is_Generic_Actual_Type;
5226 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5228 Set_Flag130 (Id, V);
5229 end Set_Is_Generic_Instance;
5231 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5233 pragma Assert (Nkind (Id) in N_Entity);
5235 end Set_Is_Generic_Type;
5237 procedure Set_Is_Hidden (Id : E; V : B := True) is
5242 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5244 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5246 end Set_Is_Hidden_Non_Overridden_Subpgm;
5248 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5250 Set_Flag171 (Id, V);
5251 end Set_Is_Hidden_Open_Scope;
5253 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5255 pragma Assert (Is_Formal (Id)
5256 or else Is_Object (Id)
5257 or else Is_Package_Or_Generic_Package (Id)
5258 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5259 or else Is_Type (Id)
5260 or else Ekind (Id) = E_Abstract_State
5261 or else Ekind (Id) = E_Component
5262 or else Ekind (Id) = E_Discriminant
5263 or else Ekind (Id) = E_Exception
5264 or else Ekind (Id) = E_Package_Body
5265 or else Ekind (Id) = E_Subprogram_Body
5267 -- Allow this attribute to appear on non-analyzed entities
5269 or else Ekind (Id) = E_Void);
5270 Set_Flag278 (Id, V);
5271 end Set_Is_Ignored_Ghost_Entity;
5273 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5275 pragma Assert (Nkind (Id) in N_Entity);
5277 end Set_Is_Immediately_Visible;
5279 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5281 Set_Flag254 (Id, V);
5282 end Set_Is_Implementation_Defined;
5284 procedure Set_Is_Imported (Id : E; V : B := True) is
5287 end Set_Is_Imported;
5289 procedure Set_Is_Independent (Id : E; V : B := True) is
5291 Set_Flag268 (Id, V);
5292 end Set_Is_Independent;
5294 procedure Set_Is_Inlined (Id : E; V : B := True) is
5299 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5301 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5303 end Set_Is_Inlined_Always;
5305 procedure Set_Is_Interface (Id : E; V : B := True) is
5307 pragma Assert (Is_Record_Type (Id));
5308 Set_Flag186 (Id, V);
5309 end Set_Is_Interface;
5311 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5313 Set_Flag126 (Id, V);
5314 end Set_Is_Instantiated;
5316 procedure Set_Is_Internal (Id : E; V : B := True) is
5318 pragma Assert (Nkind (Id) in N_Entity);
5320 end Set_Is_Internal;
5322 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5324 pragma Assert (Nkind (Id) in N_Entity);
5326 end Set_Is_Interrupt_Handler;
5328 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5331 end Set_Is_Intrinsic_Subprogram;
5333 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5335 pragma Assert (Ekind (Id) = E_Procedure);
5336 Set_Flag257 (Id, V);
5337 end Set_Is_Invariant_Procedure;
5339 procedure Set_Is_Itype (Id : E; V : B := True) is
5344 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5347 end Set_Is_Known_Non_Null;
5349 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5351 Set_Flag204 (Id, V);
5352 end Set_Is_Known_Null;
5354 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5356 Set_Flag170 (Id, V);
5357 end Set_Is_Known_Valid;
5359 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5361 pragma Assert (Is_Type (Id));
5362 Set_Flag106 (Id, V);
5363 end Set_Is_Limited_Composite;
5365 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5367 pragma Assert (Is_Interface (Id));
5368 Set_Flag197 (Id, V);
5369 end Set_Is_Limited_Interface;
5371 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5374 end Set_Is_Limited_Record;
5376 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5378 pragma Assert (Is_Subprogram (Id));
5379 Set_Flag137 (Id, V);
5380 end Set_Is_Machine_Code_Subprogram;
5382 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5384 pragma Assert (Is_Type (Id));
5385 Set_Flag109 (Id, V);
5386 end Set_Is_Non_Static_Subtype;
5388 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5390 pragma Assert (Ekind (Id) = E_Procedure);
5391 Set_Flag178 (Id, V);
5392 end Set_Is_Null_Init_Proc;
5394 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5396 Set_Flag153 (Id, V);
5397 end Set_Is_Obsolescent;
5399 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5401 pragma Assert (Ekind (Id) = E_Out_Parameter);
5402 Set_Flag226 (Id, V);
5403 end Set_Is_Only_Out_Parameter;
5405 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5407 Set_Flag160 (Id, V);
5408 end Set_Is_Package_Body_Entity;
5410 procedure Set_Is_Packed (Id : E; V : B := True) is
5412 pragma Assert (Id = Base_Type (Id));
5416 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5418 Set_Flag138 (Id, V);
5419 end Set_Is_Packed_Array_Impl_Type;
5421 procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
5423 pragma Assert (Ekind_In (Id, E_Void, E_General_Access_Type));
5424 Set_Flag215 (Id, V);
5425 end Set_Is_Param_Block_Component_Type;
5427 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5429 pragma Assert (Nkind (Id) in N_Entity);
5431 end Set_Is_Potentially_Use_Visible;
5433 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5435 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5436 Set_Flag255 (Id, V);
5437 end Set_Is_Predicate_Function;
5439 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5441 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5442 Set_Flag256 (Id, V);
5443 end Set_Is_Predicate_Function_M;
5445 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5448 end Set_Is_Preelaborated;
5450 procedure Set_Is_Primitive (Id : E; V : B := True) is
5453 (Is_Overloadable (Id)
5454 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5455 Set_Flag218 (Id, V);
5456 end Set_Is_Primitive;
5458 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5460 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5461 Set_Flag195 (Id, V);
5462 end Set_Is_Primitive_Wrapper;
5464 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5466 pragma Assert (Is_Type (Id));
5467 Set_Flag107 (Id, V);
5468 end Set_Is_Private_Composite;
5470 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5473 end Set_Is_Private_Descendant;
5475 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5477 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5478 Set_Flag245 (Id, V);
5479 end Set_Is_Private_Primitive;
5481 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5483 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5484 Set_Flag252 (Id, V);
5485 end Set_Is_Processed_Transient;
5487 procedure Set_Is_Public (Id : E; V : B := True) is
5489 pragma Assert (Nkind (Id) in N_Entity);
5493 procedure Set_Is_Pure (Id : E; V : B := True) is
5498 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5500 pragma Assert (Is_Access_Type (Id));
5501 Set_Flag189 (Id, V);
5502 end Set_Is_Pure_Unit_Access_Type;
5504 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5506 pragma Assert (Is_Type (Id));
5507 Set_Flag244 (Id, V);
5508 end Set_Is_RACW_Stub_Type;
5510 procedure Set_Is_Raised (Id : E; V : B := True) is
5512 pragma Assert (Ekind (Id) = E_Exception);
5513 Set_Flag224 (Id, V);
5516 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5519 end Set_Is_Remote_Call_Interface;
5521 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5524 end Set_Is_Remote_Types;
5526 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5528 Set_Flag112 (Id, V);
5529 end Set_Is_Renaming_Of_Object;
5531 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5533 Set_Flag209 (Id, V);
5534 end Set_Is_Return_Object;
5536 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5538 pragma Assert (Ekind (Id) = E_Variable);
5539 Set_Flag249 (Id, V);
5540 end Set_Is_Safe_To_Reevaluate;
5542 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5545 end Set_Is_Shared_Passive;
5547 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5549 pragma Assert (Is_Type (Id));
5550 Set_Flag281 (Id, V);
5551 end Set_Is_Static_Type;
5553 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5557 or else Ekind_In (Id, E_Exception,
5562 end Set_Is_Statically_Allocated;
5564 procedure Set_Is_Tag (Id : E; V : B := True) is
5566 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5570 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5573 end Set_Is_Tagged_Type;
5575 procedure Set_Is_Thunk (Id : E; V : B := True) is
5577 pragma Assert (Is_Subprogram (Id));
5578 Set_Flag225 (Id, V);
5581 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5583 Set_Flag235 (Id, V);
5584 end Set_Is_Trivial_Subprogram;
5586 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5588 Set_Flag163 (Id, V);
5589 end Set_Is_True_Constant;
5591 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5593 pragma Assert (Id = Base_Type (Id));
5594 Set_Flag117 (Id, V);
5595 end Set_Is_Unchecked_Union;
5597 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5599 pragma Assert (Ekind (Id) = E_Record_Type);
5600 Set_Flag246 (Id, V);
5601 end Set_Is_Underlying_Record_View;
5603 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5605 Set_Flag284 (Id, V);
5606 end Set_Is_Unimplemented;
5608 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5610 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5611 Set_Flag144 (Id, V);
5612 end Set_Is_Unsigned_Type;
5614 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5617 (Ekind_In (Id, E_Constant, E_Variable)
5618 or else Is_Formal (Id)
5619 or else Is_Type (Id));
5620 Set_Flag283 (Id, V);
5621 end Set_Is_Uplevel_Referenced_Entity;
5623 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5625 pragma Assert (Ekind (Id) = E_Procedure);
5626 Set_Flag127 (Id, V);
5627 end Set_Is_Valued_Procedure;
5629 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5631 Set_Flag206 (Id, V);
5632 end Set_Is_Visible_Formal;
5634 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5636 Set_Flag116 (Id, V);
5637 end Set_Is_Visible_Lib_Unit;
5639 procedure Set_Is_Volatile (Id : E; V : B := True) is
5641 pragma Assert (Nkind (Id) in N_Entity);
5643 end Set_Is_Volatile;
5645 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
5647 Set_Flag285 (Id, V);
5648 end Set_Is_Volatile_Full_Access;
5650 procedure Set_Itype_Printed (Id : E; V : B := True) is
5652 pragma Assert (Is_Itype (Id));
5653 Set_Flag202 (Id, V);
5654 end Set_Itype_Printed;
5656 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5659 end Set_Kill_Elaboration_Checks;
5661 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5664 end Set_Kill_Range_Checks;
5666 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5668 pragma Assert (Is_Type (Id));
5669 Set_Flag207 (Id, V);
5670 end Set_Known_To_Have_Preelab_Init;
5672 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5674 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5676 end Set_Last_Aggregate_Assignment;
5678 procedure Set_Last_Assignment (Id : E; V : N) is
5680 pragma Assert (Is_Assignable (Id));
5682 end Set_Last_Assignment;
5684 procedure Set_Last_Entity (Id : E; V : E) is
5687 end Set_Last_Entity;
5689 procedure Set_Limited_View (Id : E; V : E) is
5691 pragma Assert (Ekind (Id) = E_Package);
5693 end Set_Limited_View;
5695 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5697 pragma Assert (Is_Type (Id)
5698 or else Ekind_In (Id, E_Constant, E_Variable)
5699 or else Is_Subprogram (Id));
5701 end Set_Linker_Section_Pragma;
5703 procedure Set_Lit_Indexes (Id : E; V : E) is
5705 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5707 end Set_Lit_Indexes;
5709 procedure Set_Lit_Strings (Id : E; V : E) is
5711 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5713 end Set_Lit_Strings;
5715 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5717 pragma Assert (Is_Formal (Id));
5718 Set_Flag205 (Id, V);
5719 end Set_Low_Bound_Tested;
5721 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5723 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5725 end Set_Machine_Radix_10;
5727 procedure Set_Master_Id (Id : E; V : E) is
5729 pragma Assert (Is_Access_Type (Id));
5733 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5735 Set_Flag168 (Id, V);
5736 end Set_Materialize_Entity;
5738 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5740 Set_Flag262 (Id, V);
5741 end Set_May_Inherit_Delayed_Rep_Aspects;
5743 procedure Set_Mechanism (Id : E; V : M) is
5745 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5746 Set_Uint8 (Id, UI_From_Int (V));
5749 procedure Set_Modulus (Id : E; V : U) is
5751 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5755 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5757 pragma Assert (Is_Type (Id));
5758 Set_Flag183 (Id, V);
5759 end Set_Must_Be_On_Byte_Boundary;
5761 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5763 pragma Assert (Is_Type (Id));
5764 Set_Flag208 (Id, V);
5765 end Set_Must_Have_Preelab_Init;
5767 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5769 Set_Flag147 (Id, V);
5770 end Set_Needs_Debug_Info;
5772 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5775 (Is_Overloadable (Id)
5776 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5778 end Set_Needs_No_Actuals;
5780 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5782 Set_Flag115 (Id, V);
5783 end Set_Never_Set_In_Source;
5785 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5788 end Set_Next_Inlined_Subprogram;
5790 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5792 pragma Assert (Is_Discrete_Type (Id));
5793 Set_Flag276 (Id, V);
5794 end Set_No_Dynamic_Predicate_On_Actual;
5796 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5798 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5799 Set_Flag131 (Id, V);
5800 end Set_No_Pool_Assigned;
5802 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5804 pragma Assert (Is_Discrete_Type (Id));
5805 Set_Flag275 (Id, V);
5806 end Set_No_Predicate_On_Actual;
5808 procedure Set_No_Return (Id : E; V : B := True) is
5811 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5812 Set_Flag113 (Id, V);
5815 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5817 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5818 Set_Flag136 (Id, V);
5819 end Set_No_Strict_Aliasing;
5821 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5823 pragma Assert (Is_Tagged_Type (Id));
5825 end Set_No_Tagged_Streams_Pragma;
5827 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5829 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5831 end Set_Non_Binary_Modulus;
5833 procedure Set_Non_Limited_View (Id : E; V : E) is
5836 (Ekind (Id) in Incomplete_Kind
5837 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
5839 end Set_Non_Limited_View;
5841 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5844 (Root_Type (Id) = Standard_Boolean
5845 and then Ekind (Id) = E_Enumeration_Type);
5846 Set_Flag162 (Id, V);
5847 end Set_Nonzero_Is_True;
5849 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5851 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5853 end Set_Normalized_First_Bit;
5855 procedure Set_Normalized_Position (Id : E; V : U) is
5857 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5859 end Set_Normalized_Position;
5861 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5863 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5865 end Set_Normalized_Position_Max;
5867 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5869 pragma Assert (Ekind (Id) = E_Variable);
5870 Set_Flag247 (Id, V);
5871 end Set_OK_To_Rename;
5873 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5876 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5877 Set_Flag239 (Id, V);
5878 end Set_OK_To_Reorder_Components;
5880 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5883 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5884 Set_Flag241 (Id, V);
5885 end Set_Optimize_Alignment_Space;
5887 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5890 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5891 Set_Flag242 (Id, V);
5892 end Set_Optimize_Alignment_Time;
5894 procedure Set_Original_Access_Type (Id : E; V : E) is
5896 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5898 end Set_Original_Access_Type;
5900 procedure Set_Original_Array_Type (Id : E; V : E) is
5902 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5904 end Set_Original_Array_Type;
5906 procedure Set_Original_Record_Component (Id : E; V : E) is
5908 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5910 end Set_Original_Record_Component;
5912 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5914 Set_Flag243 (Id, V);
5915 end Set_Overlays_Constant;
5917 procedure Set_Overridden_Operation (Id : E; V : E) is
5919 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
5921 end Set_Overridden_Operation;
5923 procedure Set_Package_Instantiation (Id : E; V : N) is
5925 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5927 end Set_Package_Instantiation;
5929 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5931 pragma Assert (Is_Array_Type (Id));
5933 end Set_Packed_Array_Impl_Type;
5935 procedure Set_Parent_Subtype (Id : E; V : E) is
5937 pragma Assert (Ekind (Id) = E_Record_Type);
5939 end Set_Parent_Subtype;
5941 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5943 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5944 Set_Elist10 (Id, V);
5945 end Set_Part_Of_Constituents;
5947 procedure Set_Part_Of_References (Id : E; V : L) is
5949 pragma Assert (Ekind (Id) = E_Variable);
5950 Set_Elist11 (Id, V);
5951 end Set_Part_Of_References;
5953 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
5955 pragma Assert (Is_Type (Id));
5956 Set_Flag280 (Id, V);
5957 end Set_Partial_View_Has_Unknown_Discr;
5959 procedure Set_Pending_Access_Types (Id : E; V : L) is
5961 pragma Assert (Is_Type (Id));
5962 Set_Elist15 (Id, V);
5963 end Set_Pending_Access_Types;
5965 procedure Set_Postconditions_Proc (Id : E; V : E) is
5967 pragma Assert (Ekind_In (Id, E_Entry,
5972 end Set_Postconditions_Proc;
5974 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5976 pragma Assert (Is_Tagged_Type (Id));
5977 Set_Elist10 (Id, V);
5978 end Set_Direct_Primitive_Operations;
5980 procedure Set_Prival (Id : E; V : E) is
5982 pragma Assert (Is_Protected_Component (Id));
5986 procedure Set_Prival_Link (Id : E; V : E) is
5988 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5990 end Set_Prival_Link;
5992 procedure Set_Private_Dependents (Id : E; V : L) is
5994 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5995 Set_Elist18 (Id, V);
5996 end Set_Private_Dependents;
5998 procedure Set_Private_View (Id : E; V : N) is
6000 pragma Assert (Is_Private_Type (Id));
6002 end Set_Private_View;
6004 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
6006 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
6008 end Set_Protected_Body_Subprogram;
6010 procedure Set_Protected_Formal (Id : E; V : E) is
6012 pragma Assert (Is_Formal (Id));
6014 end Set_Protected_Formal;
6016 procedure Set_Protection_Object (Id : E; V : E) is
6018 pragma Assert (Ekind_In (Id, E_Entry,
6023 end Set_Protection_Object;
6025 procedure Set_Reachable (Id : E; V : B := True) is
6030 procedure Set_Referenced (Id : E; V : B := True) is
6032 Set_Flag156 (Id, V);
6035 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
6038 end Set_Referenced_As_LHS;
6040 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
6042 Set_Flag227 (Id, V);
6043 end Set_Referenced_As_Out_Parameter;
6045 procedure Set_Refinement_Constituents (Id : E; V : L) is
6047 pragma Assert (Ekind (Id) = E_Abstract_State);
6049 end Set_Refinement_Constituents;
6051 procedure Set_Register_Exception_Call (Id : E; V : N) is
6053 pragma Assert (Ekind (Id) = E_Exception);
6055 end Set_Register_Exception_Call;
6057 procedure Set_Related_Array_Object (Id : E; V : E) is
6059 pragma Assert (Is_Array_Type (Id));
6061 end Set_Related_Array_Object;
6063 procedure Set_Related_Expression (Id : E; V : N) is
6065 pragma Assert (Ekind (Id) in Type_Kind
6066 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
6068 end Set_Related_Expression;
6070 procedure Set_Related_Instance (Id : E; V : E) is
6072 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
6074 end Set_Related_Instance;
6076 procedure Set_Related_Type (Id : E; V : E) is
6078 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
6080 end Set_Related_Type;
6082 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
6084 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
6086 end Set_Relative_Deadline_Variable;
6088 procedure Set_Renamed_Entity (Id : E; V : N) is
6091 end Set_Renamed_Entity;
6093 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
6095 pragma Assert (Ekind (Id) = E_Package);
6096 Set_Flag231 (Id, V);
6097 end Set_Renamed_In_Spec;
6099 procedure Set_Renamed_Object (Id : E; V : N) is
6102 end Set_Renamed_Object;
6104 procedure Set_Renaming_Map (Id : E; V : U) is
6107 end Set_Renaming_Map;
6109 procedure Set_Requires_Overriding (Id : E; V : B := True) is
6111 pragma Assert (Is_Overloadable (Id));
6112 Set_Flag213 (Id, V);
6113 end Set_Requires_Overriding;
6115 procedure Set_Return_Present (Id : E; V : B := True) is
6118 end Set_Return_Present;
6120 procedure Set_Return_Applies_To (Id : E; V : N) is
6123 end Set_Return_Applies_To;
6125 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
6128 end Set_Returns_By_Ref;
6130 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
6132 pragma Assert (Ekind (Id) = E_Function);
6133 Set_Flag134 (Id, V);
6134 end Set_Returns_Limited_View;
6136 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6139 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6140 Set_Flag164 (Id, V);
6141 end Set_Reverse_Bit_Order;
6143 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6147 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6149 end Set_Reverse_Storage_Order;
6151 procedure Set_Rewritten_For_C (Id : E; V : B := True) is
6153 pragma Assert (Ekind (Id) = E_Function);
6154 Set_Flag287 (Id, V);
6155 end Set_Rewritten_For_C;
6157 procedure Set_RM_Size (Id : E; V : U) is
6159 pragma Assert (Is_Type (Id));
6163 procedure Set_Scalar_Range (Id : E; V : N) is
6166 end Set_Scalar_Range;
6168 procedure Set_Scale_Value (Id : E; V : U) is
6171 end Set_Scale_Value;
6173 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6175 pragma Assert (not Is_Record_Type (Id));
6177 end Set_Scope_Depth_Value;
6179 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6181 Set_Flag167 (Id, V);
6182 end Set_Sec_Stack_Needed_For_Return;
6184 procedure Set_Shadow_Entities (Id : E; V : S) is
6186 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
6188 end Set_Shadow_Entities;
6190 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6192 pragma Assert (Ekind (Id) = E_Variable);
6194 end Set_Shared_Var_Procs_Instance;
6196 procedure Set_Size_Check_Code (Id : E; V : N) is
6198 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6200 end Set_Size_Check_Code;
6202 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6204 Set_Flag177 (Id, V);
6205 end Set_Size_Depends_On_Discriminant;
6207 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6210 end Set_Size_Known_At_Compile_Time;
6212 procedure Set_Small_Value (Id : E; V : R) is
6214 pragma Assert (Is_Fixed_Point_Type (Id));
6215 Set_Ureal21 (Id, V);
6216 end Set_Small_Value;
6218 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6221 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
6224 Ekind_In (Id, E_Generic_Package, -- package variants
6228 end Set_SPARK_Aux_Pragma;
6230 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6233 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
6236 Ekind_In (Id, E_Generic_Package, -- package variants
6239 Set_Flag266 (Id, V);
6240 end Set_SPARK_Aux_Pragma_Inherited;
6242 procedure Set_SPARK_Pragma (Id : E; V : N) is
6245 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
6250 Ekind_In (Id, E_Entry, -- overloadable variants
6254 E_Generic_Procedure,
6259 Ekind_In (Id, E_Generic_Package, -- package variants
6263 Ekind (Id) = E_Variable); -- variable
6265 end Set_SPARK_Pragma;
6267 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6270 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
6275 Ekind_In (Id, E_Entry, -- overloadable variants
6279 E_Generic_Procedure,
6284 Ekind_In (Id, E_Generic_Package, -- package variants
6288 Ekind (Id) = E_Variable); -- variable
6289 Set_Flag265 (Id, V);
6290 end Set_SPARK_Pragma_Inherited;
6292 procedure Set_Spec_Entity (Id : E; V : E) is
6294 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6296 end Set_Spec_Entity;
6298 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6302 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6303 Set_Flag273 (Id, V);
6304 end Set_SSO_Set_High_By_Default;
6306 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6310 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6311 Set_Flag272 (Id, V);
6312 end Set_SSO_Set_Low_By_Default;
6314 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6316 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6318 end Set_Static_Discrete_Predicate;
6320 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6322 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6323 and then Has_Predicates (Id));
6325 end Set_Static_Real_Or_String_Predicate;
6327 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6329 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6331 end Set_Status_Flag_Or_Transient_Decl;
6333 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6335 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6336 pragma Assert (Id = Base_Type (Id));
6338 end Set_Storage_Size_Variable;
6340 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6342 pragma Assert (Ekind (Id) = E_Package);
6344 end Set_Static_Elaboration_Desired;
6346 procedure Set_Static_Initialization (Id : E; V : N) is
6349 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6351 end Set_Static_Initialization;
6353 procedure Set_Stored_Constraint (Id : E; V : L) is
6355 pragma Assert (Nkind (Id) in N_Entity);
6356 Set_Elist23 (Id, V);
6357 end Set_Stored_Constraint;
6359 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6361 pragma Assert (Ekind (Id) = E_Constant);
6362 Set_Flag270 (Id, V);
6363 end Set_Stores_Attribute_Old_Prefix;
6365 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6367 pragma Assert (Id = Base_Type (Id));
6368 Set_Flag145 (Id, V);
6369 end Set_Strict_Alignment;
6371 procedure Set_String_Literal_Length (Id : E; V : U) is
6373 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6375 end Set_String_Literal_Length;
6377 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6379 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6381 end Set_String_Literal_Low_Bound;
6383 procedure Set_Subprograms_For_Type (Id : E; V : E) is
6385 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
6387 end Set_Subprograms_For_Type;
6389 procedure Set_Subps_Index (Id : E; V : U) is
6391 pragma Assert (Is_Subprogram (Id));
6393 end Set_Subps_Index;
6395 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6397 Set_Flag148 (Id, V);
6398 end Set_Suppress_Elaboration_Warnings;
6400 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6402 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6403 Set_Flag105 (Id, V);
6404 end Set_Suppress_Initialization;
6406 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6408 Set_Flag165 (Id, V);
6409 end Set_Suppress_Style_Checks;
6411 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6413 Set_Flag217 (Id, V);
6414 end Set_Suppress_Value_Tracking_On_Call;
6416 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6418 pragma Assert (Ekind (Id) in Task_Kind);
6420 end Set_Task_Body_Procedure;
6422 procedure Set_Thunk_Entity (Id : E; V : E) is
6424 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6425 and then Is_Thunk (Id));
6427 end Set_Thunk_Entity;
6429 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6432 end Set_Treat_As_Volatile;
6434 procedure Set_Underlying_Full_View (Id : E; V : E) is
6436 pragma Assert (Ekind (Id) in Private_Kind);
6438 end Set_Underlying_Full_View;
6440 procedure Set_Underlying_Record_View (Id : E; V : E) is
6442 pragma Assert (Ekind (Id) = E_Record_Type);
6444 end Set_Underlying_Record_View;
6446 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6448 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6449 Set_Flag216 (Id, V);
6450 end Set_Universal_Aliasing;
6452 procedure Set_Unset_Reference (Id : E; V : N) is
6455 end Set_Unset_Reference;
6457 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6459 Set_Flag222 (Id, V);
6460 end Set_Used_As_Generic_Actual;
6462 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6464 pragma Assert (Ekind (Id) = E_Protected_Type);
6465 Set_Flag188 (Id, V);
6466 end Set_Uses_Lock_Free;
6468 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6471 end Set_Uses_Sec_Stack;
6473 procedure Set_Warnings_Off (Id : E; V : B := True) is
6476 end Set_Warnings_Off;
6478 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6480 Set_Flag236 (Id, V);
6481 end Set_Warnings_Off_Used;
6483 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6485 Set_Flag237 (Id, V);
6486 end Set_Warnings_Off_Used_Unmodified;
6488 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6490 Set_Flag238 (Id, V);
6491 end Set_Warnings_Off_Used_Unreferenced;
6493 procedure Set_Was_Hidden (Id : E; V : B := True) is
6495 Set_Flag196 (Id, V);
6498 procedure Set_Wrapped_Entity (Id : E; V : E) is
6500 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6501 and then Is_Primitive_Wrapper (Id));
6503 end Set_Wrapped_Entity;
6505 -----------------------------------
6506 -- Field Initialization Routines --
6507 -----------------------------------
6509 procedure Init_Alignment (Id : E) is
6511 Set_Uint14 (Id, Uint_0);
6514 procedure Init_Alignment (Id : E; V : Int) is
6516 Set_Uint14 (Id, UI_From_Int (V));
6519 procedure Init_Component_Bit_Offset (Id : E) is
6521 Set_Uint11 (Id, No_Uint);
6522 end Init_Component_Bit_Offset;
6524 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6526 Set_Uint11 (Id, UI_From_Int (V));
6527 end Init_Component_Bit_Offset;
6529 procedure Init_Component_Size (Id : E) is
6531 Set_Uint22 (Id, Uint_0);
6532 end Init_Component_Size;
6534 procedure Init_Component_Size (Id : E; V : Int) is
6536 Set_Uint22 (Id, UI_From_Int (V));
6537 end Init_Component_Size;
6539 procedure Init_Digits_Value (Id : E) is
6541 Set_Uint17 (Id, Uint_0);
6542 end Init_Digits_Value;
6544 procedure Init_Digits_Value (Id : E; V : Int) is
6546 Set_Uint17 (Id, UI_From_Int (V));
6547 end Init_Digits_Value;
6549 procedure Init_Esize (Id : E) is
6551 Set_Uint12 (Id, Uint_0);
6554 procedure Init_Esize (Id : E; V : Int) is
6556 Set_Uint12 (Id, UI_From_Int (V));
6559 procedure Init_Normalized_First_Bit (Id : E) is
6561 Set_Uint8 (Id, No_Uint);
6562 end Init_Normalized_First_Bit;
6564 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6566 Set_Uint8 (Id, UI_From_Int (V));
6567 end Init_Normalized_First_Bit;
6569 procedure Init_Normalized_Position (Id : E) is
6571 Set_Uint14 (Id, No_Uint);
6572 end Init_Normalized_Position;
6574 procedure Init_Normalized_Position (Id : E; V : Int) is
6576 Set_Uint14 (Id, UI_From_Int (V));
6577 end Init_Normalized_Position;
6579 procedure Init_Normalized_Position_Max (Id : E) is
6581 Set_Uint10 (Id, No_Uint);
6582 end Init_Normalized_Position_Max;
6584 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6586 Set_Uint10 (Id, UI_From_Int (V));
6587 end Init_Normalized_Position_Max;
6589 procedure Init_RM_Size (Id : E) is
6591 Set_Uint13 (Id, Uint_0);
6594 procedure Init_RM_Size (Id : E; V : Int) is
6596 Set_Uint13 (Id, UI_From_Int (V));
6599 -----------------------------
6600 -- Init_Component_Location --
6601 -----------------------------
6603 procedure Init_Component_Location (Id : E) is
6605 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6606 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6607 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6608 Set_Uint12 (Id, Uint_0); -- Esize
6609 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6610 end Init_Component_Location;
6612 ----------------------------
6613 -- Init_Object_Size_Align --
6614 ----------------------------
6616 procedure Init_Object_Size_Align (Id : E) is
6618 Set_Uint12 (Id, Uint_0); -- Esize
6619 Set_Uint14 (Id, Uint_0); -- Alignment
6620 end Init_Object_Size_Align;
6626 procedure Init_Size (Id : E; V : Int) is
6628 pragma Assert (not Is_Object (Id));
6629 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6630 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6633 ---------------------
6634 -- Init_Size_Align --
6635 ---------------------
6637 procedure Init_Size_Align (Id : E) is
6639 pragma Assert (not Is_Object (Id));
6640 Set_Uint12 (Id, Uint_0); -- Esize
6641 Set_Uint13 (Id, Uint_0); -- RM_Size
6642 Set_Uint14 (Id, Uint_0); -- Alignment
6643 end Init_Size_Align;
6645 ----------------------------------------------
6646 -- Type Representation Attribute Predicates --
6647 ----------------------------------------------
6649 function Known_Alignment (E : Entity_Id) return B is
6651 return Uint14 (E) /= Uint_0
6652 and then Uint14 (E) /= No_Uint;
6653 end Known_Alignment;
6655 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6657 return Uint11 (E) /= No_Uint;
6658 end Known_Component_Bit_Offset;
6660 function Known_Component_Size (E : Entity_Id) return B is
6662 return Uint22 (Base_Type (E)) /= Uint_0
6663 and then Uint22 (Base_Type (E)) /= No_Uint;
6664 end Known_Component_Size;
6666 function Known_Esize (E : Entity_Id) return B is
6668 return Uint12 (E) /= Uint_0
6669 and then Uint12 (E) /= No_Uint;
6672 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6674 return Uint8 (E) /= No_Uint;
6675 end Known_Normalized_First_Bit;
6677 function Known_Normalized_Position (E : Entity_Id) return B is
6679 return Uint14 (E) /= No_Uint;
6680 end Known_Normalized_Position;
6682 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6684 return Uint10 (E) /= No_Uint;
6685 end Known_Normalized_Position_Max;
6687 function Known_RM_Size (E : Entity_Id) return B is
6689 return Uint13 (E) /= No_Uint
6690 and then (Uint13 (E) /= Uint_0
6691 or else Is_Discrete_Type (E)
6692 or else Is_Fixed_Point_Type (E));
6695 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6697 return Uint11 (E) /= No_Uint
6698 and then Uint11 (E) >= Uint_0;
6699 end Known_Static_Component_Bit_Offset;
6701 function Known_Static_Component_Size (E : Entity_Id) return B is
6703 return Uint22 (Base_Type (E)) > Uint_0;
6704 end Known_Static_Component_Size;
6706 function Known_Static_Esize (E : Entity_Id) return B is
6708 return Uint12 (E) > Uint_0
6709 and then not Is_Generic_Type (E);
6710 end Known_Static_Esize;
6712 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6714 return Uint8 (E) /= No_Uint
6715 and then Uint8 (E) >= Uint_0;
6716 end Known_Static_Normalized_First_Bit;
6718 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6720 return Uint14 (E) /= No_Uint
6721 and then Uint14 (E) >= Uint_0;
6722 end Known_Static_Normalized_Position;
6724 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6726 return Uint10 (E) /= No_Uint
6727 and then Uint10 (E) >= Uint_0;
6728 end Known_Static_Normalized_Position_Max;
6730 function Known_Static_RM_Size (E : Entity_Id) return B is
6732 return (Uint13 (E) > Uint_0
6733 or else Is_Discrete_Type (E)
6734 or else Is_Fixed_Point_Type (E))
6735 and then not Is_Generic_Type (E);
6736 end Known_Static_RM_Size;
6738 function Unknown_Alignment (E : Entity_Id) return B is
6740 return Uint14 (E) = Uint_0
6741 or else Uint14 (E) = No_Uint;
6742 end Unknown_Alignment;
6744 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6746 return Uint11 (E) = No_Uint;
6747 end Unknown_Component_Bit_Offset;
6749 function Unknown_Component_Size (E : Entity_Id) return B is
6751 return Uint22 (Base_Type (E)) = Uint_0
6753 Uint22 (Base_Type (E)) = No_Uint;
6754 end Unknown_Component_Size;
6756 function Unknown_Esize (E : Entity_Id) return B is
6758 return Uint12 (E) = No_Uint
6760 Uint12 (E) = Uint_0;
6763 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6765 return Uint8 (E) = No_Uint;
6766 end Unknown_Normalized_First_Bit;
6768 function Unknown_Normalized_Position (E : Entity_Id) return B is
6770 return Uint14 (E) = No_Uint;
6771 end Unknown_Normalized_Position;
6773 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6775 return Uint10 (E) = No_Uint;
6776 end Unknown_Normalized_Position_Max;
6778 function Unknown_RM_Size (E : Entity_Id) return B is
6780 return (Uint13 (E) = Uint_0
6781 and then not Is_Discrete_Type (E)
6782 and then not Is_Fixed_Point_Type (E))
6783 or else Uint13 (E) = No_Uint;
6784 end Unknown_RM_Size;
6786 --------------------
6787 -- Address_Clause --
6788 --------------------
6790 function Address_Clause (Id : E) return N is
6792 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6799 function Aft_Value (Id : E) return U is
6801 Delta_Val : Ureal := Delta_Value (Id);
6803 while Delta_Val < Ureal_Tenth loop
6804 Delta_Val := Delta_Val * Ureal_10;
6805 Result := Result + 1;
6808 return UI_From_Int (Result);
6811 ----------------------
6812 -- Alignment_Clause --
6813 ----------------------
6815 function Alignment_Clause (Id : E) return N is
6817 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6818 end Alignment_Clause;
6824 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6826 if Last_Entity (V) = Empty then
6827 Set_First_Entity (Id => V, V => Id);
6829 Set_Next_Entity (Last_Entity (V), Id);
6832 Set_Next_Entity (Id, Empty);
6834 Set_Last_Entity (Id => V, V => Id);
6841 function Base_Type (Id : E) return E is
6843 if Is_Base_Type (Id) then
6846 pragma Assert (Is_Type (Id));
6851 -------------------------
6852 -- Component_Alignment --
6853 -------------------------
6855 -- Component Alignment is encoded using two flags, Flag128/129 as
6856 -- follows. Note that both flags False = Align_Default, so that the
6857 -- default initialization of flags to False initializes component
6858 -- alignment to the default value as required.
6860 -- Flag128 Flag129 Value
6861 -- ------- ------- -----
6862 -- False False Calign_Default
6863 -- False True Calign_Component_Size
6864 -- True False Calign_Component_Size_4
6865 -- True True Calign_Storage_Unit
6867 function Component_Alignment (Id : E) return C is
6868 BT : constant Node_Id := Base_Type (Id);
6871 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6873 if Flag128 (BT) then
6874 if Flag129 (BT) then
6875 return Calign_Storage_Unit;
6877 return Calign_Component_Size_4;
6881 if Flag129 (BT) then
6882 return Calign_Component_Size;
6884 return Calign_Default;
6887 end Component_Alignment;
6889 ----------------------
6890 -- Declaration_Node --
6891 ----------------------
6893 function Declaration_Node (Id : E) return N is
6897 if Ekind (Id) = E_Incomplete_Type
6898 and then Present (Full_View (Id))
6900 P := Parent (Full_View (Id));
6906 if Nkind (P) /= N_Selected_Component
6907 and then Nkind (P) /= N_Expanded_Name
6909 not (Nkind (P) = N_Defining_Program_Unit_Name
6910 and then Is_Child_Unit (Id))
6917 end Declaration_Node;
6919 ---------------------------------
6920 -- Default_Init_Cond_Procedure --
6921 ---------------------------------
6923 function Default_Init_Cond_Procedure (Id : E) return E is
6924 Subp_Id : Entity_Id;
6929 and then (Has_Default_Init_Cond (Id)
6930 or Has_Inherited_Default_Init_Cond (Id)));
6932 Subp_Id := Subprograms_For_Type (Base_Type (Id));
6933 while Present (Subp_Id) loop
6934 if Is_Default_Init_Cond_Procedure (Subp_Id) then
6938 Subp_Id := Subprograms_For_Type (Subp_Id);
6942 end Default_Init_Cond_Procedure;
6944 ---------------------
6945 -- Designated_Type --
6946 ---------------------
6948 function Designated_Type (Id : E) return E is
6952 Desig_Type := Directly_Designated_Type (Id);
6954 if Ekind (Desig_Type) = E_Incomplete_Type
6955 and then Present (Full_View (Desig_Type))
6957 return Full_View (Desig_Type);
6959 elsif Is_Class_Wide_Type (Desig_Type)
6960 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6961 and then Present (Full_View (Etype (Desig_Type)))
6962 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6964 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6969 end Designated_Type;
6971 ----------------------
6972 -- Entry_Index_Type --
6973 ----------------------
6975 function Entry_Index_Type (Id : E) return N is
6977 pragma Assert (Ekind (Id) = E_Entry_Family);
6978 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6979 end Entry_Index_Type;
6981 ---------------------
6982 -- First_Component --
6983 ---------------------
6985 function First_Component (Id : E) return E is
6990 (Is_Concurrent_Type (Id)
6991 or else Is_Incomplete_Or_Private_Type (Id)
6992 or else Is_Record_Type (Id));
6994 Comp_Id := First_Entity (Id);
6995 while Present (Comp_Id) loop
6996 exit when Ekind (Comp_Id) = E_Component;
6997 Comp_Id := Next_Entity (Comp_Id);
7001 end First_Component;
7003 -------------------------------------
7004 -- First_Component_Or_Discriminant --
7005 -------------------------------------
7007 function First_Component_Or_Discriminant (Id : E) return E is
7012 (Is_Concurrent_Type (Id)
7013 or else Is_Incomplete_Or_Private_Type (Id)
7014 or else Is_Record_Type (Id)
7015 or else Has_Discriminants (Id));
7017 Comp_Id := First_Entity (Id);
7018 while Present (Comp_Id) loop
7019 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7020 Comp_Id := Next_Entity (Comp_Id);
7024 end First_Component_Or_Discriminant;
7030 function First_Formal (Id : E) return E is
7035 (Is_Generic_Subprogram (Id)
7036 or else Is_Overloadable (Id)
7037 or else Ekind_In (Id, E_Entry_Family,
7039 E_Subprogram_Type));
7041 if Ekind (Id) = E_Enumeration_Literal then
7045 Formal := First_Entity (Id);
7047 -- Deal with the common, non-generic case first
7049 if No (Formal) or else Is_Formal (Formal) then
7053 -- The first/next entity chain of a generic subprogram contains all
7054 -- generic formal parameters, followed by the formal parameters.
7056 if Is_Generic_Subprogram (Id) then
7057 while Present (Formal) and then not Is_Formal (Formal) loop
7058 Next_Entity (Formal);
7067 ------------------------------
7068 -- First_Formal_With_Extras --
7069 ------------------------------
7071 function First_Formal_With_Extras (Id : E) return E is
7076 (Is_Generic_Subprogram (Id)
7077 or else Is_Overloadable (Id)
7078 or else Ekind_In (Id, E_Entry_Family,
7080 E_Subprogram_Type));
7082 if Ekind (Id) = E_Enumeration_Literal then
7086 Formal := First_Entity (Id);
7088 -- The first/next entity chain of a generic subprogram contains all
7089 -- generic formal parameters, followed by the formal parameters. Go
7090 -- directly to the parameters by skipping the formal part.
7092 if Is_Generic_Subprogram (Id) then
7093 while Present (Formal) and then not Is_Formal (Formal) loop
7094 Next_Entity (Formal);
7098 if Present (Formal) and then Is_Formal (Formal) then
7101 return Extra_Formals (Id); -- Empty if no extra formals
7104 end First_Formal_With_Extras;
7106 -------------------------------------
7107 -- Get_Attribute_Definition_Clause --
7108 -------------------------------------
7110 function Get_Attribute_Definition_Clause
7112 Id : Attribute_Id) return Node_Id
7117 N := First_Rep_Item (E);
7118 while Present (N) loop
7119 if Nkind (N) = N_Attribute_Definition_Clause
7120 and then Get_Attribute_Id (Chars (N)) = Id
7129 end Get_Attribute_Definition_Clause;
7135 function Get_Full_View (T : Entity_Id) return Entity_Id is
7137 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
7138 return Full_View (T);
7140 elsif Is_Class_Wide_Type (T)
7141 and then Ekind (Root_Type (T)) = E_Incomplete_Type
7142 and then Present (Full_View (Root_Type (T)))
7144 return Class_Wide_Type (Full_View (Root_Type (T)));
7155 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
7157 -- Classification pragmas
7159 Is_CLS : constant Boolean :=
7160 Id = Pragma_Abstract_State or else
7161 Id = Pragma_Attach_Handler or else
7162 Id = Pragma_Async_Readers or else
7163 Id = Pragma_Async_Writers or else
7164 Id = Pragma_Constant_After_Elaboration or else
7165 Id = Pragma_Depends or else
7166 Id = Pragma_Effective_Reads or else
7167 Id = Pragma_Effective_Writes or else
7168 Id = Pragma_Extensions_Visible or else
7169 Id = Pragma_Global or else
7170 Id = Pragma_Initial_Condition or else
7171 Id = Pragma_Initializes or else
7172 Id = Pragma_Interrupt_Handler or else
7173 Id = Pragma_Part_Of or else
7174 Id = Pragma_Refined_Depends or else
7175 Id = Pragma_Refined_Global or else
7176 Id = Pragma_Refined_State or else
7177 Id = Pragma_Volatile_Function;
7179 -- Contract / test case pragmas
7181 Is_CTC : constant Boolean :=
7182 Id = Pragma_Contract_Cases or else
7183 Id = Pragma_Test_Case;
7185 -- Pre / postcondition pragmas
7187 Is_PPC : constant Boolean :=
7188 Id = Pragma_Precondition or else
7189 Id = Pragma_Postcondition or else
7190 Id = Pragma_Refined_Post;
7192 In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC;
7198 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7199 -- extracted from their specialized list.
7202 Items := Contract (E);
7208 Item := Classifications (Items);
7211 Item := Contract_Test_Cases (Items);
7214 Item := Pre_Post_Conditions (Items);
7220 Item := First_Rep_Item (E);
7223 while Present (Item) loop
7224 if Nkind (Item) = N_Pragma
7225 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
7229 -- All nodes in N_Contract are chained using Next_Pragma
7231 elsif In_Contract then
7232 Item := Next_Pragma (Item);
7237 Next_Rep_Item (Item);
7244 --------------------------------------
7245 -- Get_Record_Representation_Clause --
7246 --------------------------------------
7248 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7252 N := First_Rep_Item (E);
7253 while Present (N) loop
7254 if Nkind (N) = N_Record_Representation_Clause then
7262 end Get_Record_Representation_Clause;
7264 ------------------------
7265 -- Has_Attach_Handler --
7266 ------------------------
7268 function Has_Attach_Handler (Id : E) return B is
7272 pragma Assert (Is_Protected_Type (Id));
7274 Ritem := First_Rep_Item (Id);
7275 while Present (Ritem) loop
7276 if Nkind (Ritem) = N_Pragma
7277 and then Pragma_Name (Ritem) = Name_Attach_Handler
7281 Next_Rep_Item (Ritem);
7286 end Has_Attach_Handler;
7292 function Has_Entries (Id : E) return B is
7296 pragma Assert (Is_Concurrent_Type (Id));
7298 Ent := First_Entity (Id);
7299 while Present (Ent) loop
7300 if Is_Entry (Ent) then
7304 Ent := Next_Entity (Ent);
7310 ----------------------------
7311 -- Has_Foreign_Convention --
7312 ----------------------------
7314 function Has_Foreign_Convention (Id : E) return B is
7316 -- While regular Intrinsics such as the Standard operators fit in the
7317 -- "Ada" convention, those with an Interface_Name materialize GCC
7318 -- builtin imports for which Ada special treatments shouldn't apply.
7320 return Convention (Id) in Foreign_Convention
7321 or else (Convention (Id) = Convention_Intrinsic
7322 and then Present (Interface_Name (Id)));
7323 end Has_Foreign_Convention;
7325 ---------------------------
7326 -- Has_Interrupt_Handler --
7327 ---------------------------
7329 function Has_Interrupt_Handler (Id : E) return B is
7333 pragma Assert (Is_Protected_Type (Id));
7335 Ritem := First_Rep_Item (Id);
7336 while Present (Ritem) loop
7337 if Nkind (Ritem) = N_Pragma
7338 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7342 Next_Rep_Item (Ritem);
7347 end Has_Interrupt_Handler;
7349 --------------------------
7350 -- Has_Non_Limited_View --
7351 --------------------------
7353 function Has_Non_Limited_View (Id : E) return B is
7355 return (Ekind (Id) in Incomplete_Kind
7356 or else Ekind (Id) in Class_Wide_Kind
7357 or else Ekind (Id) = E_Abstract_State)
7358 and then Present (Non_Limited_View (Id));
7359 end Has_Non_Limited_View;
7361 ---------------------------------
7362 -- Has_Non_Null_Abstract_State --
7363 ---------------------------------
7365 function Has_Non_Null_Abstract_State (Id : E) return B is
7367 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7370 Present (Abstract_States (Id))
7372 not Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7373 end Has_Non_Null_Abstract_State;
7375 -------------------------------------
7376 -- Has_Non_Null_Visible_Refinement --
7377 -------------------------------------
7379 function Has_Non_Null_Visible_Refinement (Id : E) return B is
7380 Constits : Elist_Id;
7383 -- "Refinement" is a concept applicable only to abstract states
7385 pragma Assert (Ekind (Id) = E_Abstract_State);
7386 Constits := Refinement_Constituents (Id);
7388 -- For a refinement to be non-null, the first constituent must be
7389 -- anything other than null.
7392 Has_Visible_Refinement (Id)
7393 and then Present (Constits)
7394 and then Nkind (Node (First_Elmt (Constits))) /= N_Null;
7395 end Has_Non_Null_Visible_Refinement;
7397 -----------------------------
7398 -- Has_Null_Abstract_State --
7399 -----------------------------
7401 function Has_Null_Abstract_State (Id : E) return B is
7403 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7406 Present (Abstract_States (Id))
7407 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7408 end Has_Null_Abstract_State;
7410 ---------------------------------
7411 -- Has_Null_Visible_Refinement --
7412 ---------------------------------
7414 function Has_Null_Visible_Refinement (Id : E) return B is
7415 Constits : Elist_Id;
7418 -- "Refinement" is a concept applicable only to abstract states
7420 pragma Assert (Ekind (Id) = E_Abstract_State);
7421 Constits := Refinement_Constituents (Id);
7423 -- For a refinement to be null, the state's sole constituent must be a
7427 Has_Visible_Refinement (Id)
7428 and then Present (Constits)
7429 and then Nkind (Node (First_Elmt (Constits))) = N_Null;
7430 end Has_Null_Visible_Refinement;
7432 --------------------
7433 -- Has_Unmodified --
7434 --------------------
7436 function Has_Unmodified (E : Entity_Id) return Boolean is
7438 if Has_Pragma_Unmodified (E) then
7440 elsif Warnings_Off (E) then
7441 Set_Warnings_Off_Used_Unmodified (E);
7448 ---------------------
7449 -- Has_Unreferenced --
7450 ---------------------
7452 function Has_Unreferenced (E : Entity_Id) return Boolean is
7454 if Has_Pragma_Unreferenced (E) then
7456 elsif Warnings_Off (E) then
7457 Set_Warnings_Off_Used_Unreferenced (E);
7462 end Has_Unreferenced;
7464 ----------------------
7465 -- Has_Warnings_Off --
7466 ----------------------
7468 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7470 if Warnings_Off (E) then
7471 Set_Warnings_Off_Used (E);
7476 end Has_Warnings_Off;
7478 ------------------------------
7479 -- Implementation_Base_Type --
7480 ------------------------------
7482 function Implementation_Base_Type (Id : E) return E is
7487 Bastyp := Base_Type (Id);
7489 if Is_Incomplete_Or_Private_Type (Bastyp) then
7490 Imptyp := Underlying_Type (Bastyp);
7492 -- If we have an implementation type, then just return it,
7493 -- otherwise we return the Base_Type anyway. This can only
7494 -- happen in error situations and should avoid some error bombs.
7496 if Present (Imptyp) then
7497 return Base_Type (Imptyp);
7505 end Implementation_Base_Type;
7507 -------------------------
7508 -- Invariant_Procedure --
7509 -------------------------
7511 function Invariant_Procedure (Id : E) return E is
7515 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7517 if No (Subprograms_For_Type (Id)) then
7521 S := Subprograms_For_Type (Id);
7522 while Present (S) loop
7523 if Is_Invariant_Procedure (S) then
7526 S := Subprograms_For_Type (S);
7532 end Invariant_Procedure;
7534 ----------------------
7535 -- Is_Atomic_Or_VFA --
7536 ----------------------
7538 function Is_Atomic_Or_VFA (Id : E) return B is
7540 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
7541 end Is_Atomic_Or_VFA;
7547 -- Global flag table allowing rapid computation of this function
7549 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7550 (E_Enumeration_Subtype |
7552 E_Signed_Integer_Subtype |
7553 E_Modular_Integer_Subtype |
7554 E_Floating_Point_Subtype |
7555 E_Ordinary_Fixed_Point_Subtype |
7556 E_Decimal_Fixed_Point_Subtype |
7560 E_Record_Subtype_With_Private |
7561 E_Limited_Private_Subtype |
7563 E_Protected_Subtype |
7565 E_String_Literal_Subtype |
7566 E_Class_Wide_Subtype => False,
7569 function Is_Base_Type (Id : E) return Boolean is
7571 return Entity_Is_Base_Type (Ekind (Id));
7574 ---------------------
7575 -- Is_Boolean_Type --
7576 ---------------------
7578 function Is_Boolean_Type (Id : E) return B is
7580 return Root_Type (Id) = Standard_Boolean;
7581 end Is_Boolean_Type;
7583 ------------------------
7584 -- Is_Constant_Object --
7585 ------------------------
7587 function Is_Constant_Object (Id : E) return B is
7588 K : constant Entity_Kind := Ekind (Id);
7591 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7592 end Is_Constant_Object;
7594 --------------------------
7595 -- Is_Controlled_Active --
7596 --------------------------
7598 function Is_Controlled_Active (Id : E) return B is
7600 return Is_Controlled (Id) and then not Disable_Controlled (Id);
7601 end Is_Controlled_Active;
7603 --------------------
7604 -- Is_Discriminal --
7605 --------------------
7607 function Is_Discriminal (Id : E) return B is
7609 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7610 and then Present (Discriminal_Link (Id)));
7613 ----------------------
7614 -- Is_Dynamic_Scope --
7615 ----------------------
7617 function Is_Dynamic_Scope (Id : E) return B is
7620 Ekind (Id) = E_Block
7622 Ekind (Id) = E_Function
7624 Ekind (Id) = E_Procedure
7626 Ekind (Id) = E_Subprogram_Body
7628 Ekind (Id) = E_Task_Type
7630 (Ekind (Id) = E_Limited_Private_Type
7631 and then Present (Full_View (Id))
7632 and then Ekind (Full_View (Id)) = E_Task_Type)
7634 Ekind (Id) = E_Entry
7636 Ekind (Id) = E_Entry_Family
7638 Ekind (Id) = E_Return_Statement;
7639 end Is_Dynamic_Scope;
7641 --------------------
7642 -- Is_Entity_Name --
7643 --------------------
7645 function Is_Entity_Name (N : Node_Id) return Boolean is
7646 Kind : constant Node_Kind := Nkind (N);
7649 -- Identifiers, operator symbols, expanded names are entity names
7651 return Kind = N_Identifier
7652 or else Kind = N_Operator_Symbol
7653 or else Kind = N_Expanded_Name
7655 -- Attribute references are entity names if they refer to an entity.
7656 -- Note that we don't do this by testing for the presence of the
7657 -- Entity field in the N_Attribute_Reference node, since it may not
7658 -- have been set yet.
7660 or else (Kind = N_Attribute_Reference
7661 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7664 -----------------------
7665 -- Is_External_State --
7666 -----------------------
7668 function Is_External_State (Id : E) return B is
7671 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7672 end Is_External_State;
7678 function Is_Finalizer (Id : E) return B is
7680 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7687 function Is_Null_State (Id : E) return B is
7690 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7693 ---------------------
7694 -- Is_Packed_Array --
7695 ---------------------
7697 function Is_Packed_Array (Id : E) return B is
7699 return Is_Array_Type (Id) and then Is_Packed (Id);
7700 end Is_Packed_Array;
7702 -----------------------------------
7703 -- Is_Package_Or_Generic_Package --
7704 -----------------------------------
7706 function Is_Package_Or_Generic_Package (Id : E) return B is
7708 return Ekind_In (Id, E_Generic_Package, E_Package);
7709 end Is_Package_Or_Generic_Package;
7715 function Is_Prival (Id : E) return B is
7717 return (Ekind_In (Id, E_Constant, E_Variable)
7718 and then Present (Prival_Link (Id)));
7721 ----------------------------
7722 -- Is_Protected_Component --
7723 ----------------------------
7725 function Is_Protected_Component (Id : E) return B is
7727 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7728 end Is_Protected_Component;
7730 ----------------------------
7731 -- Is_Protected_Interface --
7732 ----------------------------
7734 function Is_Protected_Interface (Id : E) return B is
7735 Typ : constant Entity_Id := Base_Type (Id);
7737 if not Is_Interface (Typ) then
7739 elsif Is_Class_Wide_Type (Typ) then
7740 return Is_Protected_Interface (Etype (Typ));
7742 return Protected_Present (Type_Definition (Parent (Typ)));
7744 end Is_Protected_Interface;
7746 ------------------------------
7747 -- Is_Protected_Record_Type --
7748 ------------------------------
7750 function Is_Protected_Record_Type (Id : E) return B is
7753 Is_Concurrent_Record_Type (Id)
7754 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7755 end Is_Protected_Record_Type;
7757 --------------------------------
7758 -- Is_Standard_Character_Type --
7759 --------------------------------
7761 function Is_Standard_Character_Type (Id : E) return B is
7763 if Is_Type (Id) then
7765 R : constant Entity_Id := Root_Type (Id);
7768 R = Standard_Character
7770 R = Standard_Wide_Character
7772 R = Standard_Wide_Wide_Character;
7778 end Is_Standard_Character_Type;
7780 -----------------------------
7781 -- Is_Standard_String_Type --
7782 -----------------------------
7784 function Is_Standard_String_Type (Id : E) return B is
7786 if Is_Type (Id) then
7788 R : constant Entity_Id := Root_Type (Id);
7793 R = Standard_Wide_String
7795 R = Standard_Wide_Wide_String;
7801 end Is_Standard_String_Type;
7803 --------------------
7804 -- Is_String_Type --
7805 --------------------
7807 function Is_String_Type (Id : E) return B is
7809 return Is_Array_Type (Id)
7810 and then Id /= Any_Composite
7811 and then Number_Dimensions (Id) = 1
7812 and then Is_Character_Type (Component_Type (Id));
7815 -------------------------------
7816 -- Is_Synchronized_Interface --
7817 -------------------------------
7819 function Is_Synchronized_Interface (Id : E) return B is
7820 Typ : constant Entity_Id := Base_Type (Id);
7823 if not Is_Interface (Typ) then
7826 elsif Is_Class_Wide_Type (Typ) then
7827 return Is_Synchronized_Interface (Etype (Typ));
7830 return Protected_Present (Type_Definition (Parent (Typ)))
7831 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7832 or else Task_Present (Type_Definition (Parent (Typ)));
7834 end Is_Synchronized_Interface;
7836 ---------------------------
7837 -- Is_Synchronized_State --
7838 ---------------------------
7840 function Is_Synchronized_State (Id : E) return B is
7843 Ekind (Id) = E_Abstract_State
7844 and then Has_Option (Id, Name_Synchronous);
7845 end Is_Synchronized_State;
7847 -----------------------
7848 -- Is_Task_Interface --
7849 -----------------------
7851 function Is_Task_Interface (Id : E) return B is
7852 Typ : constant Entity_Id := Base_Type (Id);
7854 if not Is_Interface (Typ) then
7856 elsif Is_Class_Wide_Type (Typ) then
7857 return Is_Task_Interface (Etype (Typ));
7859 return Task_Present (Type_Definition (Parent (Typ)));
7861 end Is_Task_Interface;
7863 -------------------------
7864 -- Is_Task_Record_Type --
7865 -------------------------
7867 function Is_Task_Record_Type (Id : E) return B is
7870 Is_Concurrent_Record_Type (Id)
7871 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7872 end Is_Task_Record_Type;
7874 ------------------------
7875 -- Is_Wrapper_Package --
7876 ------------------------
7878 function Is_Wrapper_Package (Id : E) return B is
7880 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7881 end Is_Wrapper_Package;
7887 function Last_Formal (Id : E) return E is
7892 (Is_Overloadable (Id)
7893 or else Ekind_In (Id, E_Entry_Family,
7895 E_Subprogram_Type));
7897 if Ekind (Id) = E_Enumeration_Literal then
7901 Formal := First_Formal (Id);
7903 if Present (Formal) then
7904 while Present (Next_Formal (Formal)) loop
7905 Formal := Next_Formal (Formal);
7913 function Model_Emin_Value (Id : E) return Uint is
7915 return Machine_Emin_Value (Id);
7916 end Model_Emin_Value;
7918 -------------------------
7919 -- Model_Epsilon_Value --
7920 -------------------------
7922 function Model_Epsilon_Value (Id : E) return Ureal is
7923 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7925 return Radix ** (1 - Model_Mantissa_Value (Id));
7926 end Model_Epsilon_Value;
7928 --------------------------
7929 -- Model_Mantissa_Value --
7930 --------------------------
7932 function Model_Mantissa_Value (Id : E) return Uint is
7934 return Machine_Mantissa_Value (Id);
7935 end Model_Mantissa_Value;
7937 -----------------------
7938 -- Model_Small_Value --
7939 -----------------------
7941 function Model_Small_Value (Id : E) return Ureal is
7942 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7944 return Radix ** (Model_Emin_Value (Id) - 1);
7945 end Model_Small_Value;
7947 ------------------------
7948 -- Machine_Emax_Value --
7949 ------------------------
7951 function Machine_Emax_Value (Id : E) return Uint is
7952 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7955 case Float_Rep (Id) is
7958 when 1 .. 6 => return Uint_128;
7959 when 7 .. 15 => return 2**10;
7960 when 16 .. 33 => return 2**14;
7961 when others => return No_Uint;
7965 return Uint_2 ** Uint_7 - Uint_1;
7967 end Machine_Emax_Value;
7969 ------------------------
7970 -- Machine_Emin_Value --
7971 ------------------------
7973 function Machine_Emin_Value (Id : E) return Uint is
7975 case Float_Rep (Id) is
7976 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7977 when AAMP => return -Machine_Emax_Value (Id);
7979 end Machine_Emin_Value;
7981 ----------------------------
7982 -- Machine_Mantissa_Value --
7983 ----------------------------
7985 function Machine_Mantissa_Value (Id : E) return Uint is
7986 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7989 case Float_Rep (Id) is
7992 when 1 .. 6 => return Uint_24;
7993 when 7 .. 15 => return UI_From_Int (53);
7994 when 16 .. 18 => return Uint_64;
7995 when 19 .. 33 => return UI_From_Int (113);
7996 when others => return No_Uint;
8001 when 1 .. 6 => return Uint_24;
8002 when 7 .. 9 => return UI_From_Int (40);
8003 when others => return No_Uint;
8006 end Machine_Mantissa_Value;
8008 -------------------------
8009 -- Machine_Radix_Value --
8010 -------------------------
8012 function Machine_Radix_Value (Id : E) return U is
8014 case Float_Rep (Id) is
8015 when IEEE_Binary | AAMP =>
8018 end Machine_Radix_Value;
8020 --------------------
8021 -- Next_Component --
8022 --------------------
8024 function Next_Component (Id : E) return E is
8028 Comp_Id := Next_Entity (Id);
8029 while Present (Comp_Id) loop
8030 exit when Ekind (Comp_Id) = E_Component;
8031 Comp_Id := Next_Entity (Comp_Id);
8037 ------------------------------------
8038 -- Next_Component_Or_Discriminant --
8039 ------------------------------------
8041 function Next_Component_Or_Discriminant (Id : E) return E is
8045 Comp_Id := Next_Entity (Id);
8046 while Present (Comp_Id) loop
8047 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
8048 Comp_Id := Next_Entity (Comp_Id);
8052 end Next_Component_Or_Discriminant;
8054 -----------------------
8055 -- Next_Discriminant --
8056 -----------------------
8058 -- This function actually implements both Next_Discriminant and
8059 -- Next_Stored_Discriminant by making sure that the Discriminant
8060 -- returned is of the same variety as Id.
8062 function Next_Discriminant (Id : E) return E is
8064 -- Derived Tagged types with private extensions look like this...
8066 -- E_Discriminant d1
8067 -- E_Discriminant d2
8069 -- E_Discriminant d1
8070 -- E_Discriminant d2
8073 -- so it is critical not to go past the leading discriminants
8078 pragma Assert (Ekind (Id) = E_Discriminant);
8081 D := Next_Entity (D);
8083 or else (Ekind (D) /= E_Discriminant
8084 and then not Is_Itype (D))
8089 exit when Ekind (D) = E_Discriminant
8090 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
8094 end Next_Discriminant;
8100 function Next_Formal (Id : E) return E is
8104 -- Follow the chain of declared entities as long as the kind of the
8105 -- entity corresponds to a formal parameter. Skip internal entities
8106 -- that may have been created for implicit subtypes, in the process
8107 -- of analyzing default expressions.
8113 if No (P) or else Is_Formal (P) then
8115 elsif not Is_Internal (P) then
8121 -----------------------------
8122 -- Next_Formal_With_Extras --
8123 -----------------------------
8125 function Next_Formal_With_Extras (Id : E) return E is
8127 if Present (Extra_Formal (Id)) then
8128 return Extra_Formal (Id);
8130 return Next_Formal (Id);
8132 end Next_Formal_With_Extras;
8138 function Next_Index (Id : Node_Id) return Node_Id is
8147 function Next_Literal (Id : E) return E is
8149 pragma Assert (Nkind (Id) in N_Entity);
8153 ------------------------------
8154 -- Next_Stored_Discriminant --
8155 ------------------------------
8157 function Next_Stored_Discriminant (Id : E) return E is
8159 -- See comment in Next_Discriminant
8161 return Next_Discriminant (Id);
8162 end Next_Stored_Discriminant;
8164 -----------------------
8165 -- Number_Dimensions --
8166 -----------------------
8168 function Number_Dimensions (Id : E) return Pos is
8173 if Ekind (Id) = E_String_Literal_Subtype then
8178 T := First_Index (Id);
8179 while Present (T) loop
8186 end Number_Dimensions;
8188 --------------------
8189 -- Number_Entries --
8190 --------------------
8192 function Number_Entries (Id : E) return Nat is
8197 pragma Assert (Is_Concurrent_Type (Id));
8200 Ent := First_Entity (Id);
8201 while Present (Ent) loop
8202 if Is_Entry (Ent) then
8206 Ent := Next_Entity (Ent);
8212 --------------------
8213 -- Number_Formals --
8214 --------------------
8216 function Number_Formals (Id : E) return Pos is
8222 Formal := First_Formal (Id);
8223 while Present (Formal) loop
8225 Formal := Next_Formal (Formal);
8231 --------------------
8232 -- Parameter_Mode --
8233 --------------------
8235 function Parameter_Mode (Id : E) return Formal_Kind is
8240 ------------------------
8241 -- Predicate_Function --
8242 ------------------------
8244 function Predicate_Function (Id : E) return E is
8249 pragma Assert (Is_Type (Id));
8251 -- If type is private and has a completion, predicate may be defined
8252 -- on the full view.
8254 if Is_Private_Type (Id)
8256 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8257 and then Present (Full_View (Id))
8259 T := Full_View (Id);
8265 if No (Subprograms_For_Type (T)) then
8269 S := Subprograms_For_Type (T);
8270 while Present (S) loop
8271 if Is_Predicate_Function (S) then
8274 S := Subprograms_For_Type (S);
8280 end Predicate_Function;
8282 --------------------------
8283 -- Predicate_Function_M --
8284 --------------------------
8286 function Predicate_Function_M (Id : E) return E is
8291 pragma Assert (Is_Type (Id));
8293 -- If type is private and has a completion, predicate may be defined
8294 -- on the full view.
8296 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
8297 T := Full_View (Id);
8302 if No (Subprograms_For_Type (T)) then
8306 S := Subprograms_For_Type (T);
8307 while Present (S) loop
8308 if Is_Predicate_Function_M (S) then
8311 S := Subprograms_For_Type (S);
8317 end Predicate_Function_M;
8319 -------------------------
8320 -- Present_In_Rep_Item --
8321 -------------------------
8323 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8327 Ritem := First_Rep_Item (E);
8329 while Present (Ritem) loop
8334 Next_Rep_Item (Ritem);
8338 end Present_In_Rep_Item;
8340 --------------------------
8341 -- Primitive_Operations --
8342 --------------------------
8344 function Primitive_Operations (Id : E) return L is
8346 if Is_Concurrent_Type (Id) then
8347 if Present (Corresponding_Record_Type (Id)) then
8348 return Direct_Primitive_Operations
8349 (Corresponding_Record_Type (Id));
8351 -- If expansion is disabled the corresponding record type is absent,
8352 -- but if the type has ancestors it may have primitive operations.
8354 elsif Is_Tagged_Type (Id) then
8355 return Direct_Primitive_Operations (Id);
8361 return Direct_Primitive_Operations (Id);
8363 end Primitive_Operations;
8365 ---------------------
8366 -- Record_Rep_Item --
8367 ---------------------
8369 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8371 Set_Next_Rep_Item (N, First_Rep_Item (E));
8372 Set_First_Rep_Item (E, N);
8373 end Record_Rep_Item;
8379 function Root_Type (Id : E) return E is
8383 pragma Assert (Nkind (Id) in N_Entity);
8385 T := Base_Type (Id);
8387 if Ekind (T) = E_Class_Wide_Type then
8399 -- Following test catches some error cases resulting from
8402 elsif No (Etyp) then
8403 Check_Error_Detected;
8406 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8409 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8415 -- Return if there is a circularity in the inheritance chain. This
8416 -- happens in some error situations and we do not want to get
8417 -- stuck in this loop.
8419 if T = Base_Type (Id) then
8426 ---------------------
8427 -- Safe_Emax_Value --
8428 ---------------------
8430 function Safe_Emax_Value (Id : E) return Uint is
8432 return Machine_Emax_Value (Id);
8433 end Safe_Emax_Value;
8435 ----------------------
8436 -- Safe_First_Value --
8437 ----------------------
8439 function Safe_First_Value (Id : E) return Ureal is
8441 return -Safe_Last_Value (Id);
8442 end Safe_First_Value;
8444 ---------------------
8445 -- Safe_Last_Value --
8446 ---------------------
8448 function Safe_Last_Value (Id : E) return Ureal is
8449 Radix : constant Uint := Machine_Radix_Value (Id);
8450 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8451 Emax : constant Uint := Safe_Emax_Value (Id);
8452 Significand : constant Uint := Radix ** Mantissa - 1;
8453 Exponent : constant Uint := Emax - Mantissa;
8459 (Num => Significand * 2 ** (Exponent mod 4),
8460 Den => -Exponent / 4,
8465 (Num => Significand,
8469 end Safe_Last_Value;
8475 function Scope_Depth (Id : E) return Uint is
8480 while Is_Record_Type (Scop) loop
8481 Scop := Scope (Scop);
8484 return Scope_Depth_Value (Scop);
8487 ---------------------
8488 -- Scope_Depth_Set --
8489 ---------------------
8491 function Scope_Depth_Set (Id : E) return B is
8493 return not Is_Record_Type (Id)
8494 and then Field22 (Id) /= Union_Id (Empty);
8495 end Scope_Depth_Set;
8497 -----------------------------
8498 -- Set_Component_Alignment --
8499 -----------------------------
8501 -- Component Alignment is encoded using two flags, Flag128/129 as
8502 -- follows. Note that both flags False = Align_Default, so that the
8503 -- default initialization of flags to False initializes component
8504 -- alignment to the default value as required.
8506 -- Flag128 Flag129 Value
8507 -- ------- ------- -----
8508 -- False False Calign_Default
8509 -- False True Calign_Component_Size
8510 -- True False Calign_Component_Size_4
8511 -- True True Calign_Storage_Unit
8513 procedure Set_Component_Alignment (Id : E; V : C) is
8515 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8516 and then Is_Base_Type (Id));
8519 when Calign_Default =>
8520 Set_Flag128 (Id, False);
8521 Set_Flag129 (Id, False);
8523 when Calign_Component_Size =>
8524 Set_Flag128 (Id, False);
8525 Set_Flag129 (Id, True);
8527 when Calign_Component_Size_4 =>
8528 Set_Flag128 (Id, True);
8529 Set_Flag129 (Id, False);
8531 when Calign_Storage_Unit =>
8532 Set_Flag128 (Id, True);
8533 Set_Flag129 (Id, True);
8535 end Set_Component_Alignment;
8537 -------------------------------------
8538 -- Set_Default_Init_Cond_Procedure --
8539 -------------------------------------
8541 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8542 Base_Typ : Entity_Id;
8543 Subp_Id : Entity_Id;
8548 and then (Has_Default_Init_Cond (Id)
8549 or Has_Inherited_Default_Init_Cond (Id)));
8550 Base_Typ := Base_Type (Id);
8552 Subp_Id := Subprograms_For_Type (Base_Typ);
8553 Set_Subprograms_For_Type (Base_Typ, V);
8554 Set_Subprograms_For_Type (V, Subp_Id);
8556 -- Check for a duplicate procedure
8558 while Present (Subp_Id) loop
8559 if Is_Default_Init_Cond_Procedure (Subp_Id) then
8560 raise Program_Error;
8563 Subp_Id := Subprograms_For_Type (Subp_Id);
8565 end Set_Default_Init_Cond_Procedure;
8567 -----------------------------
8568 -- Set_Invariant_Procedure --
8569 -----------------------------
8571 procedure Set_Invariant_Procedure (Id : E; V : E) is
8575 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8577 S := Subprograms_For_Type (Id);
8578 Set_Subprograms_For_Type (Id, V);
8579 Set_Subprograms_For_Type (V, S);
8581 -- Check for duplicate entry
8583 while Present (S) loop
8584 if Is_Invariant_Procedure (S) then
8585 raise Program_Error;
8587 S := Subprograms_For_Type (S);
8590 end Set_Invariant_Procedure;
8592 ----------------------------
8593 -- Set_Predicate_Function --
8594 ----------------------------
8596 procedure Set_Predicate_Function (Id : E; V : E) is
8600 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8602 S := Subprograms_For_Type (Id);
8603 Set_Subprograms_For_Type (Id, V);
8604 Set_Subprograms_For_Type (V, S);
8606 while Present (S) loop
8607 if Is_Predicate_Function (S) then
8608 raise Program_Error;
8610 S := Subprograms_For_Type (S);
8613 end Set_Predicate_Function;
8615 ------------------------------
8616 -- Set_Predicate_Function_M --
8617 ------------------------------
8619 procedure Set_Predicate_Function_M (Id : E; V : E) is
8623 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8625 S := Subprograms_For_Type (Id);
8626 Set_Subprograms_For_Type (Id, V);
8627 Set_Subprograms_For_Type (V, S);
8629 -- Check for duplicates
8631 while Present (S) loop
8632 if Is_Predicate_Function_M (S) then
8633 raise Program_Error;
8635 S := Subprograms_For_Type (S);
8638 end Set_Predicate_Function_M;
8644 function Size_Clause (Id : E) return N is
8646 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8649 ------------------------
8650 -- Stream_Size_Clause --
8651 ------------------------
8653 function Stream_Size_Clause (Id : E) return N is
8655 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8656 end Stream_Size_Clause;
8662 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8668 Kind := E_Access_Subtype;
8672 Kind := E_Array_Subtype;
8674 when E_Class_Wide_Type |
8675 E_Class_Wide_Subtype =>
8676 Kind := E_Class_Wide_Subtype;
8678 when E_Decimal_Fixed_Point_Type |
8679 E_Decimal_Fixed_Point_Subtype =>
8680 Kind := E_Decimal_Fixed_Point_Subtype;
8682 when E_Ordinary_Fixed_Point_Type |
8683 E_Ordinary_Fixed_Point_Subtype =>
8684 Kind := E_Ordinary_Fixed_Point_Subtype;
8686 when E_Private_Type |
8687 E_Private_Subtype =>
8688 Kind := E_Private_Subtype;
8690 when E_Limited_Private_Type |
8691 E_Limited_Private_Subtype =>
8692 Kind := E_Limited_Private_Subtype;
8694 when E_Record_Type_With_Private |
8695 E_Record_Subtype_With_Private =>
8696 Kind := E_Record_Subtype_With_Private;
8698 when E_Record_Type |
8700 Kind := E_Record_Subtype;
8702 when Enumeration_Kind =>
8703 Kind := E_Enumeration_Subtype;
8706 Kind := E_Floating_Point_Subtype;
8708 when Signed_Integer_Kind =>
8709 Kind := E_Signed_Integer_Subtype;
8711 when Modular_Integer_Kind =>
8712 Kind := E_Modular_Integer_Subtype;
8714 when Protected_Kind =>
8715 Kind := E_Protected_Subtype;
8718 Kind := E_Task_Subtype;
8722 raise Program_Error;
8728 ---------------------
8729 -- Type_High_Bound --
8730 ---------------------
8732 function Type_High_Bound (Id : E) return Node_Id is
8733 Rng : constant Node_Id := Scalar_Range (Id);
8735 if Nkind (Rng) = N_Subtype_Indication then
8736 return High_Bound (Range_Expression (Constraint (Rng)));
8738 return High_Bound (Rng);
8740 end Type_High_Bound;
8742 --------------------
8743 -- Type_Low_Bound --
8744 --------------------
8746 function Type_Low_Bound (Id : E) return Node_Id is
8747 Rng : constant Node_Id := Scalar_Range (Id);
8749 if Nkind (Rng) = N_Subtype_Indication then
8750 return Low_Bound (Range_Expression (Constraint (Rng)));
8752 return Low_Bound (Rng);
8756 ---------------------
8757 -- Underlying_Type --
8758 ---------------------
8760 function Underlying_Type (Id : E) return E is
8762 -- For record_with_private the underlying type is always the direct
8763 -- full view. Never try to take the full view of the parent it
8764 -- doesn't make sense.
8766 if Ekind (Id) = E_Record_Type_With_Private then
8767 return Full_View (Id);
8769 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8771 -- If we have an incomplete or private type with a full view,
8772 -- then we return the Underlying_Type of this full view.
8774 if Present (Full_View (Id)) then
8775 if Id = Full_View (Id) then
8777 -- Previous error in declaration
8782 return Underlying_Type (Full_View (Id));
8785 -- If we have a private type with an underlying full view, then we
8786 -- return the Underlying_Type of this underlying full view.
8788 elsif Ekind (Id) in Private_Kind
8789 and then Present (Underlying_Full_View (Id))
8791 return Underlying_Type (Underlying_Full_View (Id));
8793 -- If we have an incomplete entity that comes from the limited
8794 -- view then we return the Underlying_Type of its non-limited
8797 elsif From_Limited_With (Id)
8798 and then Present (Non_Limited_View (Id))
8800 return Underlying_Type (Non_Limited_View (Id));
8802 -- Otherwise check for the case where we have a derived type or
8803 -- subtype, and if so get the Underlying_Type of the parent type.
8805 elsif Etype (Id) /= Id then
8806 return Underlying_Type (Etype (Id));
8808 -- Otherwise we have an incomplete or private type that has
8809 -- no full view, which means that we have not encountered the
8810 -- completion, so return Empty to indicate the underlying type
8811 -- is not yet known.
8817 -- For non-incomplete, non-private types, return the type itself Also
8818 -- for entities that are not types at all return the entity itself.
8823 end Underlying_Type;
8825 ------------------------
8826 -- Write_Entity_Flags --
8827 ------------------------
8829 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8831 procedure W (Flag_Name : String; Flag : Boolean);
8832 -- Write out given flag if it is set
8838 procedure W (Flag_Name : String; Flag : Boolean) is
8842 Write_Str (Flag_Name);
8843 Write_Str (" = True");
8848 -- Start of processing for Write_Entity_Flags
8851 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8852 and then Is_Base_Type (Id)
8855 Write_Str ("Component_Alignment = ");
8857 case Component_Alignment (Id) is
8858 when Calign_Default =>
8859 Write_Str ("Calign_Default");
8861 when Calign_Component_Size =>
8862 Write_Str ("Calign_Component_Size");
8864 when Calign_Component_Size_4 =>
8865 Write_Str ("Calign_Component_Size_4");
8867 when Calign_Storage_Unit =>
8868 Write_Str ("Calign_Storage_Unit");
8874 W ("Address_Taken", Flag104 (Id));
8875 W ("Body_Needed_For_SAL", Flag40 (Id));
8876 W ("C_Pass_By_Copy", Flag125 (Id));
8877 W ("Can_Never_Be_Null", Flag38 (Id));
8878 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8879 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
8880 W ("Debug_Info_Off", Flag166 (Id));
8881 W ("Default_Expressions_Processed", Flag108 (Id));
8882 W ("Delay_Cleanups", Flag114 (Id));
8883 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8884 W ("Depends_On_Private", Flag14 (Id));
8885 W ("Discard_Names", Flag88 (Id));
8886 W ("Elaboration_Entity_Required", Flag174 (Id));
8887 W ("Elaborate_Body_Desirable", Flag210 (Id));
8888 W ("Entry_Accepted", Flag152 (Id));
8889 W ("Can_Use_Internal_Rep", Flag229 (Id));
8890 W ("Finalize_Storage_Only", Flag158 (Id));
8891 W ("From_Limited_With", Flag159 (Id));
8892 W ("Has_Aliased_Components", Flag135 (Id));
8893 W ("Has_Alignment_Clause", Flag46 (Id));
8894 W ("Has_All_Calls_Remote", Flag79 (Id));
8895 W ("Has_Atomic_Components", Flag86 (Id));
8896 W ("Has_Biased_Representation", Flag139 (Id));
8897 W ("Has_Completion", Flag26 (Id));
8898 W ("Has_Completion_In_Body", Flag71 (Id));
8899 W ("Has_Complex_Representation", Flag140 (Id));
8900 W ("Has_Component_Size_Clause", Flag68 (Id));
8901 W ("Has_Contiguous_Rep", Flag181 (Id));
8902 W ("Has_Controlled_Component", Flag43 (Id));
8903 W ("Has_Controlling_Result", Flag98 (Id));
8904 W ("Has_Convention_Pragma", Flag119 (Id));
8905 W ("Has_Default_Aspect", Flag39 (Id));
8906 W ("Has_Default_Init_Cond", Flag3 (Id));
8907 W ("Has_Delayed_Aspects", Flag200 (Id));
8908 W ("Has_Delayed_Freeze", Flag18 (Id));
8909 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8910 W ("Has_Discriminants", Flag5 (Id));
8911 W ("Has_Dispatch_Table", Flag220 (Id));
8912 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8913 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8914 W ("Has_Exit", Flag47 (Id));
8915 W ("Has_Expanded_Contract", Flag240 (Id));
8916 W ("Has_Forward_Instantiation", Flag175 (Id));
8917 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8918 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8919 W ("Has_Homonym", Flag56 (Id));
8920 W ("Has_Implicit_Dereference", Flag251 (Id));
8921 W ("Has_Independent_Components", Flag34 (Id));
8922 W ("Has_Inheritable_Invariants", Flag248 (Id));
8923 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8924 W ("Has_Initial_Value", Flag219 (Id));
8925 W ("Has_Invariants", Flag232 (Id));
8926 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8927 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8928 W ("Has_Master_Entity", Flag21 (Id));
8929 W ("Has_Missing_Return", Flag142 (Id));
8930 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8931 W ("Has_Nested_Subprogram", Flag282 (Id));
8932 W ("Has_Non_Standard_Rep", Flag75 (Id));
8933 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8934 W ("Has_Object_Size_Clause", Flag172 (Id));
8935 W ("Has_Per_Object_Constraint", Flag154 (Id));
8936 W ("Has_Pragma_Controlled", Flag27 (Id));
8937 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8938 W ("Has_Pragma_Inline", Flag157 (Id));
8939 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8940 W ("Has_Pragma_No_Inline", Flag201 (Id));
8941 W ("Has_Pragma_Ordered", Flag198 (Id));
8942 W ("Has_Pragma_Pack", Flag121 (Id));
8943 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8944 W ("Has_Pragma_Pure", Flag203 (Id));
8945 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8946 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8947 W ("Has_Pragma_Unmodified", Flag233 (Id));
8948 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8949 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8950 W ("Has_Predicates", Flag250 (Id));
8951 W ("Has_Primitive_Operations", Flag120 (Id));
8952 W ("Has_Private_Ancestor", Flag151 (Id));
8953 W ("Has_Private_Declaration", Flag155 (Id));
8954 W ("Has_Protected", Flag271 (Id));
8955 W ("Has_Qualified_Name", Flag161 (Id));
8956 W ("Has_RACW", Flag214 (Id));
8957 W ("Has_Record_Rep_Clause", Flag65 (Id));
8958 W ("Has_Recursive_Call", Flag143 (Id));
8959 W ("Has_Shift_Operator", Flag267 (Id));
8960 W ("Has_Size_Clause", Flag29 (Id));
8961 W ("Has_Small_Clause", Flag67 (Id));
8962 W ("Has_Specified_Layout", Flag100 (Id));
8963 W ("Has_Specified_Stream_Input", Flag190 (Id));
8964 W ("Has_Specified_Stream_Output", Flag191 (Id));
8965 W ("Has_Specified_Stream_Read", Flag192 (Id));
8966 W ("Has_Specified_Stream_Write", Flag193 (Id));
8967 W ("Has_Static_Discriminants", Flag211 (Id));
8968 W ("Has_Static_Predicate", Flag269 (Id));
8969 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8970 W ("Has_Storage_Size_Clause", Flag23 (Id));
8971 W ("Has_Stream_Size_Clause", Flag184 (Id));
8972 W ("Has_Task", Flag30 (Id));
8973 W ("Has_Thunks", Flag228 (Id));
8974 W ("Has_Unchecked_Union", Flag123 (Id));
8975 W ("Has_Unknown_Discriminants", Flag72 (Id));
8976 W ("Has_Visible_Refinement", Flag263 (Id));
8977 W ("Has_Volatile_Components", Flag87 (Id));
8978 W ("Has_Xref_Entry", Flag182 (Id));
8979 W ("In_Package_Body", Flag48 (Id));
8980 W ("In_Private_Part", Flag45 (Id));
8981 W ("In_Use", Flag8 (Id));
8982 W ("Is_Abstract_Subprogram", Flag19 (Id));
8983 W ("Is_Abstract_Type", Flag146 (Id));
8984 W ("Is_Access_Constant", Flag69 (Id));
8985 W ("Is_Ada_2005_Only", Flag185 (Id));
8986 W ("Is_Ada_2012_Only", Flag199 (Id));
8987 W ("Is_Aliased", Flag15 (Id));
8988 W ("Is_Asynchronous", Flag81 (Id));
8989 W ("Is_Atomic", Flag85 (Id));
8990 W ("Is_Bit_Packed_Array", Flag122 (Id));
8991 W ("Is_CPP_Class", Flag74 (Id));
8992 W ("Is_Called", Flag102 (Id));
8993 W ("Is_Character_Type", Flag63 (Id));
8994 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8995 W ("Is_Child_Unit", Flag73 (Id));
8996 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8997 W ("Is_Compilation_Unit", Flag149 (Id));
8998 W ("Is_Completely_Hidden", Flag103 (Id));
8999 W ("Is_Concurrent_Record_Type", Flag20 (Id));
9000 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
9001 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
9002 W ("Is_Constrained", Flag12 (Id));
9003 W ("Is_Constructor", Flag76 (Id));
9004 W ("Is_Controlled", Flag42 (Id));
9005 W ("Is_Controlling_Formal", Flag97 (Id));
9006 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
9007 W ("Is_Descendant_Of_Address", Flag223 (Id));
9008 W ("Is_Discrim_SO_Function", Flag176 (Id));
9009 W ("Is_Discriminant_Check_Function", Flag264 (Id));
9010 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
9011 W ("Is_Dispatching_Operation", Flag6 (Id));
9012 W ("Is_Eliminated", Flag124 (Id));
9013 W ("Is_Entry_Formal", Flag52 (Id));
9014 W ("Is_Exception_Handler", Flag286 (Id));
9015 W ("Is_Exported", Flag99 (Id));
9016 W ("Is_First_Subtype", Flag70 (Id));
9017 W ("Is_For_Access_Subtype", Flag118 (Id));
9018 W ("Is_Formal_Subprogram", Flag111 (Id));
9019 W ("Is_Frozen", Flag4 (Id));
9020 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
9021 W ("Is_Generic_Actual_Type", Flag94 (Id));
9022 W ("Is_Generic_Instance", Flag130 (Id));
9023 W ("Is_Generic_Type", Flag13 (Id));
9024 W ("Is_Hidden", Flag57 (Id));
9025 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
9026 W ("Is_Hidden_Open_Scope", Flag171 (Id));
9027 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
9028 W ("Is_Immediately_Visible", Flag7 (Id));
9029 W ("Is_Implementation_Defined", Flag254 (Id));
9030 W ("Is_Imported", Flag24 (Id));
9031 W ("Is_Independent", Flag268 (Id));
9032 W ("Is_Inlined", Flag11 (Id));
9033 W ("Is_Inlined_Always", Flag1 (Id));
9034 W ("Is_Instantiated", Flag126 (Id));
9035 W ("Is_Interface", Flag186 (Id));
9036 W ("Is_Internal", Flag17 (Id));
9037 W ("Is_Interrupt_Handler", Flag89 (Id));
9038 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
9039 W ("Is_Invariant_Procedure", Flag257 (Id));
9040 W ("Is_Itype", Flag91 (Id));
9041 W ("Is_Known_Non_Null", Flag37 (Id));
9042 W ("Is_Known_Null", Flag204 (Id));
9043 W ("Is_Known_Valid", Flag170 (Id));
9044 W ("Is_Limited_Composite", Flag106 (Id));
9045 W ("Is_Limited_Interface", Flag197 (Id));
9046 W ("Is_Limited_Record", Flag25 (Id));
9047 W ("Is_Local_Anonymous_Access", Flag194 (Id));
9048 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
9049 W ("Is_Non_Static_Subtype", Flag109 (Id));
9050 W ("Is_Null_Init_Proc", Flag178 (Id));
9051 W ("Is_Obsolescent", Flag153 (Id));
9052 W ("Is_Only_Out_Parameter", Flag226 (Id));
9053 W ("Is_Package_Body_Entity", Flag160 (Id));
9054 W ("Is_Packed", Flag51 (Id));
9055 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
9056 W ("Is_Param_Block_Component_Type", Flag215 (Id));
9057 W ("Is_Potentially_Use_Visible", Flag9 (Id));
9058 W ("Is_Predicate_Function", Flag255 (Id));
9059 W ("Is_Predicate_Function_M", Flag256 (Id));
9060 W ("Is_Preelaborated", Flag59 (Id));
9061 W ("Is_Primitive", Flag218 (Id));
9062 W ("Is_Primitive_Wrapper", Flag195 (Id));
9063 W ("Is_Private_Composite", Flag107 (Id));
9064 W ("Is_Private_Descendant", Flag53 (Id));
9065 W ("Is_Private_Primitive", Flag245 (Id));
9066 W ("Is_Processed_Transient", Flag252 (Id));
9067 W ("Is_Public", Flag10 (Id));
9068 W ("Is_Pure", Flag44 (Id));
9069 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
9070 W ("Is_RACW_Stub_Type", Flag244 (Id));
9071 W ("Is_Raised", Flag224 (Id));
9072 W ("Is_Remote_Call_Interface", Flag62 (Id));
9073 W ("Is_Remote_Types", Flag61 (Id));
9074 W ("Is_Renaming_Of_Object", Flag112 (Id));
9075 W ("Is_Return_Object", Flag209 (Id));
9076 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
9077 W ("Is_Shared_Passive", Flag60 (Id));
9078 W ("Is_Static_Type", Flag281 (Id));
9079 W ("Is_Statically_Allocated", Flag28 (Id));
9080 W ("Is_Tag", Flag78 (Id));
9081 W ("Is_Tagged_Type", Flag55 (Id));
9082 W ("Is_Thunk", Flag225 (Id));
9083 W ("Is_Trivial_Subprogram", Flag235 (Id));
9084 W ("Is_True_Constant", Flag163 (Id));
9085 W ("Is_Unchecked_Union", Flag117 (Id));
9086 W ("Is_Underlying_Record_View", Flag246 (Id));
9087 W ("Is_Unimplemented", Flag284 (Id));
9088 W ("Is_Unsigned_Type", Flag144 (Id));
9089 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
9090 W ("Is_Valued_Procedure", Flag127 (Id));
9091 W ("Is_Visible_Formal", Flag206 (Id));
9092 W ("Is_Visible_Lib_Unit", Flag116 (Id));
9093 W ("Is_Volatile", Flag16 (Id));
9094 W ("Is_Volatile_Full_Access", Flag285 (Id));
9095 W ("Itype_Printed", Flag202 (Id));
9096 W ("Kill_Elaboration_Checks", Flag32 (Id));
9097 W ("Kill_Range_Checks", Flag33 (Id));
9098 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
9099 W ("Low_Bound_Tested", Flag205 (Id));
9100 W ("Machine_Radix_10", Flag84 (Id));
9101 W ("Materialize_Entity", Flag168 (Id));
9102 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
9103 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
9104 W ("Must_Have_Preelab_Init", Flag208 (Id));
9105 W ("Needs_Debug_Info", Flag147 (Id));
9106 W ("Needs_No_Actuals", Flag22 (Id));
9107 W ("Never_Set_In_Source", Flag115 (Id));
9108 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
9109 W ("No_Pool_Assigned", Flag131 (Id));
9110 W ("No_Predicate_On_actual", Flag275 (Id));
9111 W ("No_Return", Flag113 (Id));
9112 W ("No_Strict_Aliasing", Flag136 (Id));
9113 W ("Non_Binary_Modulus", Flag58 (Id));
9114 W ("Nonzero_Is_True", Flag162 (Id));
9115 W ("OK_To_Rename", Flag247 (Id));
9116 W ("OK_To_Reorder_Components", Flag239 (Id));
9117 W ("Optimize_Alignment_Space", Flag241 (Id));
9118 W ("Optimize_Alignment_Time", Flag242 (Id));
9119 W ("Overlays_Constant", Flag243 (Id));
9120 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
9121 W ("Reachable", Flag49 (Id));
9122 W ("Referenced", Flag156 (Id));
9123 W ("Referenced_As_LHS", Flag36 (Id));
9124 W ("Referenced_As_Out_Parameter", Flag227 (Id));
9125 W ("Renamed_In_Spec", Flag231 (Id));
9126 W ("Requires_Overriding", Flag213 (Id));
9127 W ("Return_Present", Flag54 (Id));
9128 W ("Returns_By_Ref", Flag90 (Id));
9129 W ("Returns_Limited_View", Flag134 (Id));
9130 W ("Reverse_Bit_Order", Flag164 (Id));
9131 W ("Reverse_Storage_Order", Flag93 (Id));
9132 W ("Rewritten_For_C", Flag287 (Id));
9133 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
9134 W ("Size_Depends_On_Discriminant", Flag177 (Id));
9135 W ("Size_Known_At_Compile_Time", Flag92 (Id));
9136 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
9137 W ("SPARK_Pragma_Inherited", Flag265 (Id));
9138 W ("SSO_Set_High_By_Default", Flag273 (Id));
9139 W ("SSO_Set_Low_By_Default", Flag272 (Id));
9140 W ("Static_Elaboration_Desired", Flag77 (Id));
9141 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
9142 W ("Strict_Alignment", Flag145 (Id));
9143 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
9144 W ("Suppress_Initialization", Flag105 (Id));
9145 W ("Suppress_Style_Checks", Flag165 (Id));
9146 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
9147 W ("Treat_As_Volatile", Flag41 (Id));
9148 W ("Universal_Aliasing", Flag216 (Id));
9149 W ("Used_As_Generic_Actual", Flag222 (Id));
9150 W ("Uses_Sec_Stack", Flag95 (Id));
9151 W ("Warnings_Off", Flag96 (Id));
9152 W ("Warnings_Off_Used", Flag236 (Id));
9153 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
9154 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
9155 W ("Was_Hidden", Flag196 (Id));
9156 end Write_Entity_Flags;
9158 -----------------------
9159 -- Write_Entity_Info --
9160 -----------------------
9162 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
9164 procedure Write_Attribute (Which : String; Nam : E);
9165 -- Write attribute value with given string name
9167 procedure Write_Kind (Id : Entity_Id);
9168 -- Write Ekind field of entity
9170 ---------------------
9171 -- Write_Attribute --
9172 ---------------------
9174 procedure Write_Attribute (Which : String; Nam : E) is
9178 Write_Int (Int (Nam));
9180 Write_Name (Chars (Nam));
9182 end Write_Attribute;
9188 procedure Write_Kind (Id : Entity_Id) is
9189 K : constant String := Entity_Kind'Image (Ekind (Id));
9193 Write_Str (" Kind ");
9195 if Is_Type (Id) and then Is_Tagged_Type (Id) then
9196 Write_Str ("TAGGED ");
9199 Write_Str (K (3 .. K'Length));
9202 if Is_Type (Id) and then Depends_On_Private (Id) then
9203 Write_Str ("Depends_On_Private ");
9207 -- Start of processing for Write_Entity_Info
9211 Write_Attribute ("Name ", Id);
9212 Write_Int (Int (Id));
9216 Write_Attribute (" Type ", Etype (Id));
9218 Write_Attribute (" Scope ", Scope (Id));
9223 when Discrete_Kind =>
9224 Write_Str ("Bounds: Id = ");
9226 if Present (Scalar_Range (Id)) then
9227 Write_Int (Int (Type_Low_Bound (Id)));
9228 Write_Str (" .. Id = ");
9229 Write_Int (Int (Type_High_Bound (Id)));
9231 Write_Str ("Empty");
9242 (" Component Type ", Component_Type (Id));
9245 Write_Str (" Indexes ");
9247 Index := First_Index (Id);
9248 while Present (Index) loop
9249 Write_Attribute (" ", Etype (Index));
9250 Index := Next_Index (Index);
9258 (" Directly Designated Type ",
9259 Directly_Designated_Type (Id));
9262 when Overloadable_Kind =>
9263 if Present (Homonym (Id)) then
9264 Write_Str (" Homonym ");
9265 Write_Name (Chars (Homonym (Id)));
9267 Write_Int (Int (Homonym (Id)));
9274 if Ekind (Scope (Id)) in Record_Kind then
9276 " Original_Record_Component ",
9277 Original_Record_Component (Id));
9278 Write_Int (Int (Original_Record_Component (Id)));
9282 when others => null;
9284 end Write_Entity_Info;
9286 -----------------------
9287 -- Write_Field6_Name --
9288 -----------------------
9290 procedure Write_Field6_Name (Id : Entity_Id) is
9291 pragma Unreferenced (Id);
9293 Write_Str ("First_Rep_Item");
9294 end Write_Field6_Name;
9296 -----------------------
9297 -- Write_Field7_Name --
9298 -----------------------
9300 procedure Write_Field7_Name (Id : Entity_Id) is
9301 pragma Unreferenced (Id);
9303 Write_Str ("Freeze_Node");
9304 end Write_Field7_Name;
9306 -----------------------
9307 -- Write_Field8_Name --
9308 -----------------------
9310 procedure Write_Field8_Name (Id : Entity_Id) is
9314 Write_Str ("Associated_Node_For_Itype");
9317 Write_Str ("Dependent_Instances");
9320 Write_Str ("First_Exit_Statement");
9323 Write_Str ("Hiding_Loop_Variable");
9327 E_Subprogram_Body =>
9328 Write_Str ("Mechanism");
9332 Write_Str ("Normalized_First_Bit");
9334 when E_Abstract_State =>
9335 Write_Str ("Refinement_Constituents");
9337 when E_Return_Statement =>
9338 Write_Str ("Return_Applies_To");
9341 Write_Str ("Field8??");
9343 end Write_Field8_Name;
9345 -----------------------
9346 -- Write_Field9_Name --
9347 -----------------------
9349 procedure Write_Field9_Name (Id : Entity_Id) is
9353 Write_Str ("Class_Wide_Type");
9356 Write_Str ("Current_Value");
9359 E_Generic_Function |
9361 E_Generic_Procedure |
9364 Write_Str ("Renaming_Map");
9367 Write_Str ("Field9??");
9369 end Write_Field9_Name;
9371 ------------------------
9372 -- Write_Field10_Name --
9373 ------------------------
9375 procedure Write_Field10_Name (Id : Entity_Id) is
9378 when Class_Wide_Kind |
9384 Write_Str ("Direct_Primitive_Operations");
9386 when E_In_Parameter |
9388 Write_Str ("Discriminal_Link");
9391 Write_Str ("Float_Rep");
9397 Write_Str ("Handler_Records");
9401 Write_Str ("Normalized_Position_Max");
9403 when E_Abstract_State |
9405 Write_Str ("Part_Of_Constituents");
9408 Write_Str ("Field10??");
9410 end Write_Field10_Name;
9412 ------------------------
9413 -- Write_Field11_Name --
9414 ------------------------
9416 procedure Write_Field11_Name (Id : Entity_Id) is
9420 Write_Str ("Block_Node");
9424 Write_Str ("Component_Bit_Offset");
9427 Write_Str ("Entry_Component");
9429 when E_Enumeration_Literal =>
9430 Write_Str ("Enumeration_Pos");
9434 Write_Str ("Full_View");
9436 when E_Generic_Package =>
9437 Write_Str ("Generic_Homonym");
9440 Write_Str ("Part_Of_References");
9446 Write_Str ("Protected_Body_Subprogram");
9449 Write_Str ("Field11??");
9451 end Write_Field11_Name;
9453 ------------------------
9454 -- Write_Field12_Name --
9455 ------------------------
9457 procedure Write_Field12_Name (Id : Entity_Id) is
9461 Write_Str ("Associated_Formal_Package");
9464 Write_Str ("Barrier_Function");
9466 when E_Enumeration_Literal =>
9467 Write_Str ("Enumeration_Rep");
9475 E_In_Out_Parameter |
9479 Write_Str ("Esize");
9483 Write_Str ("Next_Inlined_Subprogram");
9486 Write_Str ("Field12??");
9488 end Write_Field12_Name;
9490 ------------------------
9491 -- Write_Field13_Name --
9492 ------------------------
9494 procedure Write_Field13_Name (Id : Entity_Id) is
9499 Write_Str ("Component_Clause");
9502 Write_Str ("Elaboration_Entity");
9506 Generic_Unit_Kind =>
9507 Write_Str ("Elaboration_Entity");
9511 Write_Str ("Extra_Accessibility");
9514 Write_Str ("RM_Size");
9517 Write_Str ("Field13??");
9519 end Write_Field13_Name;
9521 -----------------------
9522 -- Write_Field14_Name --
9523 -----------------------
9525 procedure Write_Field14_Name (Id : Entity_Id) is
9534 Write_Str ("Alignment");
9538 Write_Str ("Normalized_Position");
9544 Write_Str ("Postconditions_Proc");
9546 when E_Generic_Package |
9548 Write_Str ("Shadow_Entities");
9551 Write_Str ("Field14??");
9553 end Write_Field14_Name;
9555 ------------------------
9556 -- Write_Field15_Name --
9557 ------------------------
9559 procedure Write_Field15_Name (Id : Entity_Id) is
9562 when E_Discriminant =>
9563 Write_Str ("Discriminant_Number");
9566 Write_Str ("DT_Entry_Count");
9570 Write_Str ("DT_Position");
9573 Write_Str ("Entry_Parameters_Type");
9576 Write_Str ("Extra_Formal");
9579 Write_Str ("Pending_Access_Types");
9583 Write_Str ("Related_Instance");
9587 Write_Str ("Status_Flag_Or_Transient_Decl");
9590 Write_Str ("Field15??");
9592 end Write_Field15_Name;
9594 ------------------------
9595 -- Write_Field16_Name --
9596 ------------------------
9598 procedure Write_Field16_Name (Id : Entity_Id) is
9601 when E_Record_Type |
9602 E_Record_Type_With_Private =>
9603 Write_Str ("Access_Disp_Table");
9605 when E_Abstract_State =>
9606 Write_Str ("Body_References");
9608 when E_Record_Subtype |
9609 E_Class_Wide_Subtype =>
9610 Write_Str ("Cloned_Subtype");
9614 Write_Str ("DTC_Entity");
9617 Write_Str ("Entry_Formal");
9622 Write_Str ("First_Private_Entity");
9624 when Enumeration_Kind =>
9625 Write_Str ("Lit_Strings");
9627 when Decimal_Fixed_Point_Kind =>
9628 Write_Str ("Scale_Value");
9630 when E_String_Literal_Subtype =>
9631 Write_Str ("String_Literal_Length");
9635 Write_Str ("Unset_Reference");
9638 Write_Str ("Field16??");
9640 end Write_Field16_Name;
9642 ------------------------
9643 -- Write_Field17_Name --
9644 ------------------------
9646 procedure Write_Field17_Name (Id : Entity_Id) is
9651 E_Generic_In_Out_Parameter |
9653 Write_Str ("Actual_Subtype");
9656 Write_Str ("Digits_Value");
9658 when E_Discriminant =>
9659 Write_Str ("Discriminal");
9668 E_Generic_Function |
9670 E_Generic_Procedure |
9678 E_Return_Statement |
9680 E_Subprogram_Type =>
9681 Write_Str ("First_Entity");
9684 Write_Str ("First_Index");
9686 when Enumeration_Kind =>
9687 Write_Str ("First_Literal");
9690 Write_Str ("Master_Id");
9692 when Modular_Integer_Kind =>
9693 Write_Str ("Modulus");
9696 Write_Str ("Prival");
9699 Write_Str ("Field17??");
9701 end Write_Field17_Name;
9703 ------------------------
9704 -- Write_Field18_Name --
9705 ------------------------
9707 procedure Write_Field18_Name (Id : Entity_Id) is
9710 when E_Enumeration_Literal |
9714 Write_Str ("Alias");
9716 when E_Record_Type =>
9717 Write_Str ("Corresponding_Concurrent_Type");
9719 when E_Subprogram_Body =>
9720 Write_Str ("Corresponding_Protected_Entry");
9722 when Concurrent_Kind =>
9723 Write_Str ("Corresponding_Record_Type");
9728 Write_Str ("Enclosing_Scope");
9730 when E_Entry_Index_Parameter =>
9731 Write_Str ("Entry_Index_Constant");
9733 when E_Class_Wide_Subtype |
9734 E_Access_Protected_Subprogram_Type |
9735 E_Anonymous_Access_Protected_Subprogram_Type |
9736 E_Access_Subprogram_Type |
9738 Write_Str ("Equivalent_Type");
9740 when Fixed_Point_Kind =>
9741 Write_Str ("Delta_Value");
9743 when Enumeration_Kind =>
9744 Write_Str ("Lit_Indexes");
9746 when Incomplete_Or_Private_Kind |
9748 Write_Str ("Private_Dependents");
9751 Write_Str ("Renamed_Object");
9755 E_Generic_Function |
9756 E_Generic_Procedure |
9757 E_Generic_Package =>
9758 Write_Str ("Renamed_Entity");
9760 when E_String_Literal_Subtype =>
9761 Write_Str ("String_Literal_Low_Bound");
9764 Write_Str ("Field18??");
9766 end Write_Field18_Name;
9768 -----------------------
9769 -- Write_Field19_Name --
9770 -----------------------
9772 procedure Write_Field19_Name (Id : Entity_Id) is
9776 E_Generic_Package =>
9777 Write_Str ("Body_Entity");
9779 when E_Discriminant =>
9780 Write_Str ("Corresponding_Discriminant");
9783 Write_Str ("Default_Aspect_Value");
9785 when E_Abstract_State |
9787 E_Incomplete_Type =>
9788 Write_Str ("Non_Limited_View");
9790 when E_Incomplete_Subtype =>
9791 if From_Limited_With (Id) then
9792 Write_Str ("Non_Limited_View");
9795 when E_Array_Type =>
9796 Write_Str ("Default_Component_Value");
9798 when E_Protected_Type =>
9799 Write_Str ("Entry_Bodies_Array");
9803 E_Subprogram_Type =>
9804 Write_Str ("Extra_Accessibility_Of_Result");
9806 when E_Record_Type =>
9807 Write_Str ("Parent_Subtype");
9811 Write_Str ("Size_Check_Code");
9813 when E_Package_Body |
9815 Write_Str ("Spec_Entity");
9817 when Private_Kind =>
9818 Write_Str ("Underlying_Full_View");
9821 Write_Str ("Field19??");
9823 end Write_Field19_Name;
9825 -----------------------
9826 -- Write_Field20_Name --
9827 -----------------------
9829 procedure Write_Field20_Name (Id : Entity_Id) is
9833 Write_Str ("Component_Type");
9835 when E_In_Parameter |
9836 E_Generic_In_Parameter =>
9837 Write_Str ("Default_Value");
9840 Write_Str ("Directly_Designated_Type");
9843 Write_Str ("Discriminant_Checking_Func");
9845 when E_Discriminant =>
9846 Write_Str ("Discriminant_Default_Value");
9855 E_Generic_Function |
9857 E_Generic_Procedure |
9865 E_Return_Statement |
9867 E_Subprogram_Type =>
9868 Write_Str ("Last_Entity");
9872 Write_Str ("Prival_Link");
9875 Write_Str ("Scalar_Range");
9878 Write_Str ("Register_Exception_Call");
9881 Write_Str ("Field20??");
9883 end Write_Field20_Name;
9885 -----------------------
9886 -- Write_Field21_Name --
9887 -----------------------
9889 procedure Write_Field21_Name (Id : Entity_Id) is
9893 Write_Str ("Accept_Address");
9895 when E_In_Parameter =>
9896 Write_Str ("Default_Expr_Function");
9898 when Concurrent_Kind |
9899 Incomplete_Or_Private_Kind |
9903 Write_Str ("Discriminant_Constraint");
9908 E_Generic_Function |
9910 E_Generic_Procedure |
9912 Write_Str ("Interface_Name");
9915 Modular_Integer_Kind =>
9916 Write_Str ("Original_Array_Type");
9918 when Fixed_Point_Kind =>
9919 Write_Str ("Small_Value");
9922 Write_Str ("Field21??");
9924 end Write_Field21_Name;
9926 -----------------------
9927 -- Write_Field22_Name --
9928 -----------------------
9930 procedure Write_Field22_Name (Id : Entity_Id) is
9934 Write_Str ("Associated_Storage_Pool");
9937 Write_Str ("Component_Size");
9939 when E_Record_Type =>
9940 Write_Str ("Corresponding_Remote_Type");
9944 Write_Str ("Original_Record_Component");
9946 when E_Enumeration_Literal =>
9947 Write_Str ("Enumeration_Rep_Expr");
9949 when E_Record_Type_With_Private |
9950 E_Record_Subtype_With_Private |
9953 E_Limited_Private_Type |
9954 E_Limited_Private_Subtype =>
9955 Write_Str ("Private_View");
9958 Write_Str ("Protected_Formal");
9968 E_Generic_Function |
9969 E_Generic_Procedure |
9972 E_Return_Statement |
9975 Write_Str ("Scope_Depth_Value");
9978 Write_Str ("Shared_Var_Procs_Instance");
9981 Write_Str ("Field22??");
9983 end Write_Field22_Name;
9985 ------------------------
9986 -- Write_Field23_Name --
9987 ------------------------
9989 procedure Write_Field23_Name (Id : Entity_Id) is
9992 when E_Discriminant =>
9993 Write_Str ("CR_Discriminant");
9996 Write_Str ("Entry_Cancel_Parameter");
9998 when E_Enumeration_Type =>
9999 Write_Str ("Enum_Pos_To_Rep");
10003 Write_Str ("Extra_Constrained");
10005 when Access_Kind =>
10006 Write_Str ("Finalization_Master");
10008 when E_Generic_Function |
10009 E_Generic_Package |
10010 E_Generic_Procedure =>
10011 Write_Str ("Inner_Instances");
10014 Write_Str ("Packed_Array_Impl_Type");
10017 Write_Str ("Protection_Object");
10019 when Concurrent_Kind |
10020 Incomplete_Or_Private_Kind |
10023 E_Record_Subtype =>
10024 Write_Str ("Stored_Constraint");
10028 if Present (Scope (Id))
10029 and then Is_Protected_Type (Scope (Id))
10031 Write_Str ("Protection_Object");
10033 Write_Str ("Generic_Renamings");
10037 if Is_Generic_Instance (Id) then
10038 Write_Str ("Generic_Renamings");
10040 Write_Str ("Limited_View");
10044 Write_Str ("Field23??");
10046 end Write_Field23_Name;
10048 ------------------------
10049 -- Write_Field24_Name --
10050 ------------------------
10052 procedure Write_Field24_Name (Id : Entity_Id) is
10058 Write_Str ("Related_Expression");
10063 Write_Str ("Subps_Index");
10066 Write_Str ("Incomplete_Actuals");
10069 Write_Str ("Field24???");
10071 end Write_Field24_Name;
10073 ------------------------
10074 -- Write_Field25_Name --
10075 ------------------------
10077 procedure Write_Field25_Name (Id : Entity_Id) is
10080 when E_Generic_Package |
10082 Write_Str ("Abstract_States");
10086 Write_Str ("Contract_Wrapper");
10089 Write_Str ("Debug_Renaming_Link");
10091 when E_Component =>
10092 Write_Str ("DT_Offset_To_Top_Func");
10096 Write_Str ("Interface_Alias");
10098 when E_Record_Type |
10100 E_Record_Type_With_Private |
10101 E_Record_Subtype_With_Private =>
10102 Write_Str ("Interfaces");
10104 when E_Array_Type |
10106 Write_Str ("Related_Array_Object");
10109 Write_Str ("Task_Body_Procedure");
10111 when Discrete_Kind =>
10112 Write_Str ("Static_Discrete_Predicate");
10115 Write_Str ("Static_Real_Or_String_Predicate");
10118 Write_Str ("Field25??");
10120 end Write_Field25_Name;
10122 ------------------------
10123 -- Write_Field26_Name --
10124 ------------------------
10126 procedure Write_Field26_Name (Id : Entity_Id) is
10129 when E_Record_Type |
10130 E_Record_Type_With_Private =>
10131 Write_Str ("Dispatch_Table_Wrappers");
10133 when E_In_Out_Parameter |
10136 Write_Str ("Last_Assignment");
10140 Write_Str ("Overridden_Operation");
10142 when E_Generic_Package |
10144 Write_Str ("Package_Instantiation");
10148 Write_Str ("Related_Type");
10152 Write_Str ("Storage_Size_Variable");
10155 Write_Str ("Field26??");
10157 end Write_Field26_Name;
10159 ------------------------
10160 -- Write_Field27_Name --
10161 ------------------------
10163 procedure Write_Field27_Name (Id : Entity_Id) is
10168 Write_Str ("Current_Use_Clause");
10173 Write_Str ("Related_Type");
10177 Write_Str ("Wrapped_Entity");
10180 Write_Str ("Field27??");
10182 end Write_Field27_Name;
10184 ------------------------
10185 -- Write_Field28_Name --
10186 ------------------------
10188 procedure Write_Field28_Name (Id : Entity_Id) is
10195 E_Subprogram_Body |
10196 E_Subprogram_Type =>
10197 Write_Str ("Extra_Formals");
10201 Write_Str ("Finalizer");
10205 Write_Str ("Initialization_Statements");
10207 when E_Access_Subprogram_Type =>
10208 Write_Str ("Original_Access_Type");
10211 Write_Str ("Relative_Deadline_Variable");
10213 when E_Record_Type =>
10214 Write_Str ("Underlying_Record_View");
10217 Write_Str ("Field28??");
10219 end Write_Field28_Name;
10221 ------------------------
10222 -- Write_Field29_Name --
10223 ------------------------
10225 procedure Write_Field29_Name (Id : Entity_Id) is
10230 Write_Str ("BIP_Initialization_Call");
10233 Write_Str ("Subprograms_For_Type");
10236 Write_Str ("Field29??");
10238 end Write_Field29_Name;
10240 ------------------------
10241 -- Write_Field30_Name --
10242 ------------------------
10244 procedure Write_Field30_Name (Id : Entity_Id) is
10247 when E_Protected_Type |
10249 Write_Str ("Anonymous_Object");
10252 Write_Str ("Corresponding_Equality");
10256 Write_Str ("Last_Aggregate_Assignment");
10258 when E_Procedure =>
10259 Write_Str ("Static_Initialization");
10262 Write_Str ("Field30??");
10264 end Write_Field30_Name;
10266 ------------------------
10267 -- Write_Field31_Name --
10268 ------------------------
10270 procedure Write_Field31_Name (Id : Entity_Id) is
10275 Write_Str ("Thunk_Entity");
10278 Write_Str ("Derived_Type_Link");
10282 E_In_Out_Parameter |
10286 Write_Str ("Activation_Record_Component");
10289 Write_Str ("Field31??");
10291 end Write_Field31_Name;
10293 ------------------------
10294 -- Write_Field32_Name --
10295 ------------------------
10297 procedure Write_Field32_Name (Id : Entity_Id) is
10300 when E_Abstract_State |
10303 Write_Str ("Encapsulating_State");
10306 Write_Str ("Corresponding_Procedure");
10308 when E_Procedure =>
10309 Write_Str ("Corresponding_Function");
10312 Write_Str ("No_Tagged_Streams_Pragma");
10315 Write_Str ("Field32??");
10317 end Write_Field32_Name;
10319 ------------------------
10320 -- Write_Field33_Name --
10321 ------------------------
10323 procedure Write_Field33_Name (Id : Entity_Id) is
10330 Write_Str ("Linker_Section_Pragma");
10333 Write_Str ("Field33??");
10335 end Write_Field33_Name;
10337 ------------------------
10338 -- Write_Field34_Name --
10339 ------------------------
10341 procedure Write_Field34_Name (Id : Entity_Id) is
10348 E_Generic_Function |
10349 E_Generic_Package |
10350 E_Generic_Procedure |
10356 E_Subprogram_Body |
10361 Write_Str ("Contract");
10364 Write_Str ("Field34??");
10366 end Write_Field34_Name;
10368 ------------------------
10369 -- Write_Field35_Name --
10370 ------------------------
10372 procedure Write_Field35_Name (Id : Entity_Id) is
10375 when Subprogram_Kind =>
10376 Write_Str ("Import_Pragma");
10379 Write_Str ("Field35??");
10381 end Write_Field35_Name;
10383 ------------------------
10384 -- Write_Field36_Name --
10385 ------------------------
10387 procedure Write_Field36_Name (Id : Entity_Id) is
10395 E_Subprogram_Body =>
10396 Write_Str ("Anonymous_Master");
10399 Write_Str ("Field36??");
10401 end Write_Field36_Name;
10403 ------------------------
10404 -- Write_Field37_Name --
10405 ------------------------
10407 procedure Write_Field37_Name (Id : Entity_Id) is
10408 pragma Unreferenced (Id);
10410 Write_Str ("Associated_Entity");
10411 end Write_Field37_Name;
10413 ------------------------
10414 -- Write_Field38_Name --
10415 ------------------------
10417 procedure Write_Field38_Name (Id : Entity_Id) is
10422 Write_Str ("Class-wide preconditions");
10425 Write_Str ("Field38??");
10427 end Write_Field38_Name;
10429 ------------------------
10430 -- Write_Field39_Name --
10431 ------------------------
10433 procedure Write_Field39_Name (Id : Entity_Id) is
10438 Write_Str ("Class-wide postcondition");
10441 Write_Str ("Field39??");
10443 end Write_Field39_Name;
10445 ------------------------
10446 -- Write_Field40_Name --
10447 ------------------------
10449 procedure Write_Field40_Name (Id : Entity_Id) is
10455 E_Generic_Function |
10456 E_Generic_Package |
10457 E_Generic_Procedure |
10464 E_Subprogram_Body |
10468 Write_Str ("SPARK_Pragma");
10471 Write_Str ("Field40??");
10473 end Write_Field40_Name;
10475 ------------------------
10476 -- Write_Field41_Name --
10477 ------------------------
10479 procedure Write_Field41_Name (Id : Entity_Id) is
10482 when E_Generic_Package |
10487 Write_Str ("SPARK_Aux_Pragma");
10490 Write_Str ("Field41??");
10492 end Write_Field41_Name;
10494 -------------------------
10495 -- Iterator Procedures --
10496 -------------------------
10498 procedure Proc_Next_Component (N : in out Node_Id) is
10500 N := Next_Component (N);
10501 end Proc_Next_Component;
10503 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10505 N := Next_Entity (N);
10506 while Present (N) loop
10507 exit when Ekind_In (N, E_Component, E_Discriminant);
10508 N := Next_Entity (N);
10510 end Proc_Next_Component_Or_Discriminant;
10512 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10514 N := Next_Discriminant (N);
10515 end Proc_Next_Discriminant;
10517 procedure Proc_Next_Formal (N : in out Node_Id) is
10519 N := Next_Formal (N);
10520 end Proc_Next_Formal;
10522 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10524 N := Next_Formal_With_Extras (N);
10525 end Proc_Next_Formal_With_Extras;
10527 procedure Proc_Next_Index (N : in out Node_Id) is
10529 N := Next_Index (N);
10530 end Proc_Next_Index;
10532 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10534 N := Next_Inlined_Subprogram (N);
10535 end Proc_Next_Inlined_Subprogram;
10537 procedure Proc_Next_Literal (N : in out Node_Id) is
10539 N := Next_Literal (N);
10540 end Proc_Next_Literal;
10542 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10544 N := Next_Stored_Discriminant (N);
10545 end Proc_Next_Stored_Discriminant;