1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Part_Of_Constituents Elist9
92 -- Encapsulating_State Node10
93 -- Direct_Primitive_Operations Elist10
94 -- Discriminal_Link Node10
95 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
96 -- Handler_Records List10
97 -- Normalized_Position_Max Uint10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- 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 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Body_References Elist16
136 -- Cloned_Subtype Node16
138 -- Entry_Formal Node16
139 -- First_Private_Entity Node16
140 -- Lit_Strings Node16
141 -- String_Literal_Length Uint16
142 -- Unset_Reference Node16
144 -- Actual_Subtype Node17
145 -- Digits_Value Uint17
146 -- Discriminal Node17
147 -- First_Entity Node17
148 -- First_Index Node17
149 -- First_Literal Node17
152 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Protected_Entry Node18
158 -- Corresponding_Record_Type Node18
159 -- Delta_Value Ureal18
160 -- Enclosing_Scope Node18
161 -- Equivalent_Type Node18
162 -- Private_Dependents Elist18
163 -- Renamed_Entity Node18
164 -- Renamed_Object Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Impl_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
217 -- Interface_Alias Node25
218 -- Interfaces Elist25
219 -- Debug_Renaming_Link Node25
220 -- DT_Offset_To_Top_Func Node25
221 -- PPC_Wrapper Node25
222 -- Related_Array_Object Node25
223 -- Static_Discrete_Predicate List25
224 -- Static_Real_Or_String_Predicate Node25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- BIP_Initialization_Call Node29
244 -- Subprograms_For_Type Node29
246 -- Corresponding_Equality Node30
247 -- Last_Aggregate_Assignment Node30
248 -- Static_Initialization Node30
250 -- Derived_Type_Link Node31
251 -- Thunk_Entity Node31
253 -- SPARK_Pragma Node32
254 -- No_Tagged_Streams_Pragma Node32
256 -- Linker_Section_Pragma Node33
257 -- SPARK_Aux_Pragma Node33
261 -- Import_Pragma Node35
263 ---------------------------------------------
264 -- Usage of Flags in Defining Entity Nodes --
265 ---------------------------------------------
267 -- All flags are unique, there is no overlaying, so each flag is physically
268 -- present in every entity. However, for many of the flags, it only makes
269 -- sense for them to be set true for certain subsets of entity kinds. See
270 -- the spec of Einfo for further details.
272 -- Is_Inlined_Always Flag1
273 -- Is_Hidden_Non_Overridden_Subpgm Flag2
274 -- Has_Default_Init_Cond Flag3
276 -- Has_Discriminants Flag5
277 -- Is_Dispatching_Operation Flag6
278 -- Is_Immediately_Visible Flag7
280 -- Is_Potentially_Use_Visible Flag9
284 -- Is_Constrained Flag12
285 -- Is_Generic_Type Flag13
286 -- Depends_On_Private Flag14
288 -- Is_Volatile Flag16
289 -- Is_Internal Flag17
290 -- Has_Delayed_Freeze Flag18
291 -- Is_Abstract_Subprogram Flag19
292 -- Is_Concurrent_Record_Type Flag20
294 -- Has_Master_Entity Flag21
295 -- Needs_No_Actuals Flag22
296 -- Has_Storage_Size_Clause Flag23
297 -- Is_Imported Flag24
298 -- Is_Limited_Record Flag25
299 -- Has_Completion Flag26
300 -- Has_Pragma_Controlled Flag27
301 -- Is_Statically_Allocated Flag28
302 -- Has_Size_Clause Flag29
305 -- Checks_May_Be_Suppressed Flag31
306 -- Kill_Elaboration_Checks Flag32
307 -- Kill_Range_Checks Flag33
308 -- Has_Independent_Components Flag34
309 -- Is_Class_Wide_Equivalent_Type Flag35
310 -- Referenced_As_LHS Flag36
311 -- Is_Known_Non_Null Flag37
312 -- Can_Never_Be_Null Flag38
313 -- Has_Default_Aspect Flag39
314 -- Body_Needed_For_SAL Flag40
316 -- Treat_As_Volatile Flag41
317 -- Is_Controlled Flag42
318 -- Has_Controlled_Component Flag43
320 -- In_Private_Part Flag45
321 -- Has_Alignment_Clause Flag46
323 -- In_Package_Body Flag48
325 -- Delay_Subprogram_Descriptors Flag50
328 -- Is_Entry_Formal Flag52
329 -- Is_Private_Descendant Flag53
330 -- Return_Present Flag54
331 -- Is_Tagged_Type Flag55
332 -- Has_Homonym Flag56
334 -- Non_Binary_Modulus Flag58
335 -- Is_Preelaborated Flag59
336 -- Is_Shared_Passive Flag60
338 -- Is_Remote_Types Flag61
339 -- Is_Remote_Call_Interface Flag62
340 -- Is_Character_Type Flag63
341 -- Is_Intrinsic_Subprogram Flag64
342 -- Has_Record_Rep_Clause Flag65
343 -- Has_Enumeration_Rep_Clause Flag66
344 -- Has_Small_Clause Flag67
345 -- Has_Component_Size_Clause Flag68
346 -- Is_Access_Constant Flag69
347 -- Is_First_Subtype Flag70
349 -- Has_Completion_In_Body Flag71
350 -- Has_Unknown_Discriminants Flag72
351 -- Is_Child_Unit Flag73
352 -- Is_CPP_Class Flag74
353 -- Has_Non_Standard_Rep Flag75
354 -- Is_Constructor Flag76
355 -- Static_Elaboration_Desired Flag77
357 -- Has_All_Calls_Remote Flag79
358 -- Is_Constr_Subt_For_U_Nominal Flag80
360 -- Is_Asynchronous Flag81
361 -- Has_Gigi_Rep_Item Flag82
362 -- Has_Machine_Radix_Clause Flag83
363 -- Machine_Radix_10 Flag84
365 -- Has_Atomic_Components Flag86
366 -- Has_Volatile_Components Flag87
367 -- Discard_Names Flag88
368 -- Is_Interrupt_Handler Flag89
369 -- Returns_By_Ref Flag90
372 -- Size_Known_At_Compile_Time Flag92
373 -- Reverse_Storage_Order Flag93
374 -- Is_Generic_Actual_Type Flag94
375 -- Uses_Sec_Stack Flag95
376 -- Warnings_Off Flag96
377 -- Is_Controlling_Formal Flag97
378 -- Has_Controlling_Result Flag98
379 -- Is_Exported Flag99
380 -- Has_Specified_Layout Flag100
382 -- Has_Nested_Block_With_Handler Flag101
384 -- Is_Completely_Hidden Flag103
385 -- Address_Taken Flag104
386 -- Suppress_Initialization Flag105
387 -- Is_Limited_Composite Flag106
388 -- Is_Private_Composite Flag107
389 -- Default_Expressions_Processed Flag108
390 -- Is_Non_Static_Subtype Flag109
391 -- Has_Out_Or_In_Out_Parameter Flag110
393 -- Is_Formal_Subprogram Flag111
394 -- Is_Renaming_Of_Object Flag112
396 -- Delay_Cleanups Flag114
397 -- Never_Set_In_Source Flag115
398 -- Is_Visible_Lib_Unit Flag116
399 -- Is_Unchecked_Union Flag117
400 -- Is_For_Access_Subtype Flag118
401 -- Has_Convention_Pragma Flag119
402 -- Has_Primitive_Operations Flag120
404 -- Has_Pragma_Pack Flag121
405 -- Is_Bit_Packed_Array Flag122
406 -- Has_Unchecked_Union Flag123
407 -- Is_Eliminated Flag124
408 -- C_Pass_By_Copy Flag125
409 -- Is_Instantiated Flag126
410 -- Is_Valued_Procedure Flag127
411 -- (used for Component_Alignment) Flag128
412 -- (used for Component_Alignment) Flag129
413 -- Is_Generic_Instance Flag130
415 -- No_Pool_Assigned Flag131
416 -- Is_Default_Init_Cond_Procedure Flag132
417 -- Has_Inherited_Default_Init_Cond Flag133
418 -- Returns_Limited_View Flag134
419 -- Has_Aliased_Components Flag135
420 -- No_Strict_Aliasing Flag136
421 -- Is_Machine_Code_Subprogram Flag137
422 -- Is_Packed_Array_Impl_Type Flag138
423 -- Has_Biased_Representation Flag139
424 -- Has_Complex_Representation Flag140
426 -- Is_Constr_Subt_For_UN_Aliased Flag141
427 -- Has_Missing_Return Flag142
428 -- Has_Recursive_Call Flag143
429 -- Is_Unsigned_Type Flag144
430 -- Strict_Alignment Flag145
431 -- Is_Abstract_Type Flag146
432 -- Needs_Debug_Info Flag147
433 -- Suppress_Elaboration_Warnings Flag148
434 -- Is_Compilation_Unit Flag149
435 -- Has_Pragma_Elaborate_Body Flag150
437 -- Has_Private_Ancestor Flag151
438 -- Entry_Accepted Flag152
439 -- Is_Obsolescent Flag153
440 -- Has_Per_Object_Constraint Flag154
441 -- Has_Private_Declaration Flag155
442 -- Referenced Flag156
443 -- Has_Pragma_Inline Flag157
444 -- Finalize_Storage_Only Flag158
445 -- From_Limited_With Flag159
446 -- Is_Package_Body_Entity Flag160
448 -- Has_Qualified_Name Flag161
449 -- Nonzero_Is_True Flag162
450 -- Is_True_Constant Flag163
451 -- Reverse_Bit_Order Flag164
452 -- Suppress_Style_Checks Flag165
453 -- Debug_Info_Off Flag166
454 -- Sec_Stack_Needed_For_Return Flag167
455 -- Materialize_Entity Flag168
456 -- Has_Pragma_Thread_Local_Storage Flag169
457 -- Is_Known_Valid Flag170
459 -- Is_Hidden_Open_Scope Flag171
460 -- Has_Object_Size_Clause Flag172
461 -- Has_Fully_Qualified_Name Flag173
462 -- Elaboration_Entity_Required Flag174
463 -- Has_Forward_Instantiation Flag175
464 -- Is_Discrim_SO_Function Flag176
465 -- Size_Depends_On_Discriminant Flag177
466 -- Is_Null_Init_Proc Flag178
467 -- Has_Pragma_Pure_Function Flag179
468 -- Has_Pragma_Unreferenced Flag180
470 -- Has_Contiguous_Rep Flag181
471 -- Has_Xref_Entry Flag182
472 -- Must_Be_On_Byte_Boundary Flag183
473 -- Has_Stream_Size_Clause Flag184
474 -- Is_Ada_2005_Only Flag185
475 -- Is_Interface Flag186
476 -- Has_Constrained_Partial_View Flag187
477 -- Uses_Lock_Free Flag188
478 -- Is_Pure_Unit_Access_Type Flag189
479 -- Has_Specified_Stream_Input Flag190
481 -- Has_Specified_Stream_Output Flag191
482 -- Has_Specified_Stream_Read Flag192
483 -- Has_Specified_Stream_Write Flag193
484 -- Is_Local_Anonymous_Access Flag194
485 -- Is_Primitive_Wrapper Flag195
486 -- Was_Hidden Flag196
487 -- Is_Limited_Interface Flag197
488 -- Has_Pragma_Ordered Flag198
489 -- Is_Ada_2012_Only Flag199
491 -- Has_Delayed_Aspects Flag200
492 -- Has_Pragma_No_Inline Flag201
493 -- Itype_Printed Flag202
494 -- Has_Pragma_Pure Flag203
495 -- Is_Known_Null Flag204
496 -- Low_Bound_Tested Flag205
497 -- Is_Visible_Formal Flag206
498 -- Known_To_Have_Preelab_Init Flag207
499 -- Must_Have_Preelab_Init Flag208
500 -- Is_Return_Object Flag209
501 -- Elaborate_Body_Desirable Flag210
503 -- Has_Static_Discriminants Flag211
504 -- Has_Pragma_Unreferenced_Objects Flag212
505 -- Requires_Overriding Flag213
507 -- Has_Up_Level_Access Flag215
508 -- Universal_Aliasing Flag216
509 -- Suppress_Value_Tracking_On_Call Flag217
510 -- Is_Primitive Flag218
511 -- Has_Initial_Value Flag219
512 -- Has_Dispatch_Table Flag220
514 -- Has_Pragma_Preelab_Init Flag221
515 -- Used_As_Generic_Actual Flag222
516 -- Is_Descendent_Of_Address Flag223
519 -- Is_Only_Out_Parameter Flag226
520 -- Referenced_As_Out_Parameter Flag227
521 -- Has_Thunks Flag228
522 -- Can_Use_Internal_Rep Flag229
523 -- Has_Pragma_Inline_Always Flag230
525 -- Renamed_In_Spec Flag231
526 -- Has_Invariants Flag232
527 -- Has_Pragma_Unmodified Flag233
528 -- Is_Dispatch_Table_Entity Flag234
529 -- Is_Trivial_Subprogram Flag235
530 -- Warnings_Off_Used Flag236
531 -- Warnings_Off_Used_Unmodified Flag237
532 -- Warnings_Off_Used_Unreferenced Flag238
533 -- OK_To_Reorder_Components Flag239
534 -- Has_Postconditions Flag240
536 -- Optimize_Alignment_Space Flag241
537 -- Optimize_Alignment_Time Flag242
538 -- Overlays_Constant Flag243
539 -- Is_RACW_Stub_Type Flag244
540 -- Is_Private_Primitive Flag245
541 -- Is_Underlying_Record_View Flag246
542 -- OK_To_Rename Flag247
543 -- Has_Inheritable_Invariants Flag248
544 -- Is_Safe_To_Reevaluate Flag249
545 -- Has_Predicates Flag250
547 -- Has_Implicit_Dereference Flag251
548 -- Is_Processed_Transient Flag252
549 -- Has_Anonymous_Master Flag253
550 -- Is_Implementation_Defined Flag254
551 -- Is_Predicate_Function Flag255
552 -- Is_Predicate_Function_M Flag256
553 -- Is_Invariant_Procedure Flag257
554 -- Has_Dynamic_Predicate_Aspect Flag258
555 -- Has_Static_Predicate_Aspect Flag259
556 -- Has_Loop_Entry_Attributes Flag260
558 -- Has_Delayed_Rep_Aspects Flag261
559 -- May_Inherit_Delayed_Rep_Aspects Flag262
560 -- Has_Visible_Refinement Flag263
561 -- Is_Discriminant_Check_Function Flag264
562 -- SPARK_Pragma_Inherited Flag265
563 -- SPARK_Aux_Pragma_Inherited Flag266
564 -- Has_Shift_Operator Flag267
565 -- Is_Independent Flag268
566 -- Has_Static_Predicate Flag269
567 -- Stores_Attribute_Old_Prefix Flag270
569 -- (Has_Protected) Flag271
570 -- (SSO_Set_Low_By_Default) Flag272
571 -- (SSO_Set_High_By_Default) Flag273
572 -- Is_Generic_Actual_Subprogram Flag274
573 -- No_Predicate_On_Actual Flag275
574 -- No_Dynamic_Predicate_On_Actual Flag276
575 -- Is_Checked_Ghost_Entity Flag277
576 -- Is_Ignored_Ghost_Entity Flag278
588 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
590 -----------------------
591 -- Local subprograms --
592 -----------------------
595 (State_Id : Entity_Id;
596 Option_Nam : Name_Id) return Boolean;
597 -- Determine whether abstract state State_Id has particular option denoted
598 -- by the name Option_Nam.
604 function Float_Rep (Id : E) return F is
605 pragma Assert (Is_Floating_Point_Type (Id));
607 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
615 (State_Id : Entity_Id;
616 Option_Nam : Name_Id) return Boolean
618 Decl : constant Node_Id := Parent (State_Id);
623 pragma Assert (Ekind (State_Id) = E_Abstract_State);
625 -- The declaration of abstract states with options appear as an
626 -- extension aggregate. If this is not the case, the option is not
629 if Nkind (Decl) /= N_Extension_Aggregate then
635 Opt := First (Expressions (Decl));
636 while Present (Opt) loop
638 -- Currently the only simple option allowed is External
640 if Nkind (Opt) = N_Identifier
641 and then Chars (Opt) = Name_External
642 and then Chars (Opt) = Option_Nam
650 -- Complex options with various specifiers
652 Opt := First (Component_Associations (Decl));
653 while Present (Opt) loop
654 Opt_Nam := First (Choices (Opt));
656 if Nkind (Opt_Nam) = N_Identifier
657 and then Chars (Opt_Nam) = Option_Nam
668 --------------------------------
669 -- Attribute Access Functions --
670 --------------------------------
672 function Abstract_States (Id : E) return L is
674 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
678 function Accept_Address (Id : E) return L is
683 function Access_Disp_Table (Id : E) return L is
685 pragma Assert (Ekind_In (Id, E_Record_Type,
687 return Elist16 (Implementation_Base_Type (Id));
688 end Access_Disp_Table;
690 function Actual_Subtype (Id : E) return E is
693 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
694 or else Is_Formal (Id));
698 function Address_Taken (Id : E) return B is
703 function Alias (Id : E) return E is
706 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
710 function Alignment (Id : E) return U is
712 pragma Assert (Is_Type (Id)
713 or else Is_Formal (Id)
714 or else Ekind_In (Id, E_Loop_Parameter,
721 function Associated_Formal_Package (Id : E) return E is
723 pragma Assert (Ekind (Id) = E_Package);
725 end Associated_Formal_Package;
727 function Associated_Node_For_Itype (Id : E) return N is
730 end Associated_Node_For_Itype;
732 function Associated_Storage_Pool (Id : E) return E is
734 pragma Assert (Is_Access_Type (Id));
735 return Node22 (Root_Type (Id));
736 end Associated_Storage_Pool;
738 function Barrier_Function (Id : E) return N is
740 pragma Assert (Is_Entry (Id));
742 end Barrier_Function;
744 function Block_Node (Id : E) return N is
746 pragma Assert (Ekind (Id) = E_Block);
750 function Body_Entity (Id : E) return E is
752 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
756 function Body_Needed_For_SAL (Id : E) return B is
759 (Ekind (Id) = E_Package
760 or else Is_Subprogram (Id)
761 or else Is_Generic_Unit (Id));
763 end Body_Needed_For_SAL;
765 function Body_References (Id : E) return L is
767 pragma Assert (Ekind (Id) = E_Abstract_State);
771 function BIP_Initialization_Call (Id : E) return N is
773 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
775 end BIP_Initialization_Call;
777 function C_Pass_By_Copy (Id : E) return B is
779 pragma Assert (Is_Record_Type (Id));
780 return Flag125 (Implementation_Base_Type (Id));
783 function Can_Never_Be_Null (Id : E) return B is
786 end Can_Never_Be_Null;
788 function Checks_May_Be_Suppressed (Id : E) return B is
791 end Checks_May_Be_Suppressed;
793 function Class_Wide_Type (Id : E) return E is
795 pragma Assert (Is_Type (Id));
799 function Cloned_Subtype (Id : E) return E is
801 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
805 function Component_Bit_Offset (Id : E) return U is
807 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
809 end Component_Bit_Offset;
811 function Component_Clause (Id : E) return N is
813 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
815 end Component_Clause;
817 function Component_Size (Id : E) return U is
819 pragma Assert (Is_Array_Type (Id));
820 return Uint22 (Implementation_Base_Type (Id));
823 function Component_Type (Id : E) return E is
825 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
826 return Node20 (Implementation_Base_Type (Id));
829 function Corresponding_Concurrent_Type (Id : E) return E is
831 pragma Assert (Ekind (Id) = E_Record_Type);
833 end Corresponding_Concurrent_Type;
835 function Corresponding_Discriminant (Id : E) return E is
837 pragma Assert (Ekind (Id) = E_Discriminant);
839 end Corresponding_Discriminant;
841 function Corresponding_Equality (Id : E) return E is
844 (Ekind (Id) = E_Function
845 and then not Comes_From_Source (Id)
846 and then Chars (Id) = Name_Op_Ne);
848 end Corresponding_Equality;
850 function Corresponding_Protected_Entry (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Subprogram_Body);
854 end Corresponding_Protected_Entry;
856 function Corresponding_Record_Type (Id : E) return E is
858 pragma Assert (Is_Concurrent_Type (Id));
860 end Corresponding_Record_Type;
862 function Corresponding_Remote_Type (Id : E) return E is
865 end Corresponding_Remote_Type;
867 function Current_Use_Clause (Id : E) return E is
869 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
871 end Current_Use_Clause;
873 function Current_Value (Id : E) return N is
875 pragma Assert (Ekind (Id) in Object_Kind);
879 function CR_Discriminant (Id : E) return E is
884 function Debug_Info_Off (Id : E) return B is
889 function Debug_Renaming_Link (Id : E) return E is
892 end Debug_Renaming_Link;
894 function Default_Aspect_Component_Value (Id : E) return N is
896 pragma Assert (Is_Array_Type (Id));
897 return Node19 (Base_Type (Id));
898 end Default_Aspect_Component_Value;
900 function Default_Aspect_Value (Id : E) return N is
902 pragma Assert (Is_Scalar_Type (Id));
903 return Node19 (Base_Type (Id));
904 end Default_Aspect_Value;
906 function Default_Expr_Function (Id : E) return E is
908 pragma Assert (Is_Formal (Id));
910 end Default_Expr_Function;
912 function Default_Expressions_Processed (Id : E) return B is
915 end Default_Expressions_Processed;
917 function Default_Value (Id : E) return N is
919 pragma Assert (Is_Formal (Id));
923 function Delay_Cleanups (Id : E) return B is
928 function Delay_Subprogram_Descriptors (Id : E) return B is
931 end Delay_Subprogram_Descriptors;
933 function Delta_Value (Id : E) return R is
935 pragma Assert (Is_Fixed_Point_Type (Id));
939 function Dependent_Instances (Id : E) return L is
941 pragma Assert (Is_Generic_Instance (Id));
943 end Dependent_Instances;
945 function Depends_On_Private (Id : E) return B is
947 pragma Assert (Nkind (Id) in N_Entity);
949 end Depends_On_Private;
951 function Derived_Type_Link (Id : E) return E is
953 pragma Assert (Is_Type (Id));
954 return Node31 (Base_Type (Id));
955 end Derived_Type_Link;
957 function Digits_Value (Id : E) return U is
960 (Is_Floating_Point_Type (Id)
961 or else Is_Decimal_Fixed_Point_Type (Id));
965 function Direct_Primitive_Operations (Id : E) return L is
967 pragma Assert (Is_Tagged_Type (Id));
969 end Direct_Primitive_Operations;
971 function Directly_Designated_Type (Id : E) return E is
973 pragma Assert (Is_Access_Type (Id));
975 end Directly_Designated_Type;
977 function Discard_Names (Id : E) return B is
982 function Discriminal (Id : E) return E is
984 pragma Assert (Ekind (Id) = E_Discriminant);
988 function Discriminal_Link (Id : E) return N is
991 end Discriminal_Link;
993 function Discriminant_Checking_Func (Id : E) return E is
995 pragma Assert (Ekind (Id) = E_Component);
997 end Discriminant_Checking_Func;
999 function Discriminant_Constraint (Id : E) return L is
1001 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1002 return Elist21 (Id);
1003 end Discriminant_Constraint;
1005 function Discriminant_Default_Value (Id : E) return N is
1007 pragma Assert (Ekind (Id) = E_Discriminant);
1009 end Discriminant_Default_Value;
1011 function Discriminant_Number (Id : E) return U is
1013 pragma Assert (Ekind (Id) = E_Discriminant);
1015 end Discriminant_Number;
1017 function Dispatch_Table_Wrappers (Id : E) return L is
1019 pragma Assert (Ekind_In (Id, E_Record_Type,
1021 return Elist26 (Implementation_Base_Type (Id));
1022 end Dispatch_Table_Wrappers;
1024 function DT_Entry_Count (Id : E) return U is
1026 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1030 function DT_Offset_To_Top_Func (Id : E) return E is
1032 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1034 end DT_Offset_To_Top_Func;
1036 function DT_Position (Id : E) return U is
1038 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1039 and then Present (DTC_Entity (Id)));
1043 function DTC_Entity (Id : E) return E is
1045 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1049 function Elaborate_Body_Desirable (Id : E) return B is
1051 pragma Assert (Ekind (Id) = E_Package);
1052 return Flag210 (Id);
1053 end Elaborate_Body_Desirable;
1055 function Elaboration_Entity (Id : E) return E is
1060 Ekind (Id) = E_Package
1062 Is_Generic_Unit (Id));
1064 end Elaboration_Entity;
1066 function Elaboration_Entity_Required (Id : E) return B is
1071 Ekind (Id) = E_Package
1073 Is_Generic_Unit (Id));
1074 return Flag174 (Id);
1075 end Elaboration_Entity_Required;
1077 function Encapsulating_State (Id : E) return N is
1079 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1081 end Encapsulating_State;
1083 function Enclosing_Scope (Id : E) return E is
1086 end Enclosing_Scope;
1088 function Entry_Accepted (Id : E) return B is
1090 pragma Assert (Is_Entry (Id));
1091 return Flag152 (Id);
1094 function Entry_Bodies_Array (Id : E) return E is
1097 end Entry_Bodies_Array;
1099 function Entry_Cancel_Parameter (Id : E) return E is
1102 end Entry_Cancel_Parameter;
1104 function Entry_Component (Id : E) return E is
1107 end Entry_Component;
1109 function Entry_Formal (Id : E) return E is
1114 function Entry_Index_Constant (Id : E) return N is
1116 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1118 end Entry_Index_Constant;
1120 function Contract (Id : E) return N is
1123 (Ekind_In (Id, E_Entry,
1130 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1134 function Entry_Parameters_Type (Id : E) return E is
1137 end Entry_Parameters_Type;
1139 function Enum_Pos_To_Rep (Id : E) return E is
1141 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1143 end Enum_Pos_To_Rep;
1145 function Enumeration_Pos (Id : E) return Uint is
1147 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1149 end Enumeration_Pos;
1151 function Enumeration_Rep (Id : E) return U is
1153 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1155 end Enumeration_Rep;
1157 function Enumeration_Rep_Expr (Id : E) return N is
1159 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1161 end Enumeration_Rep_Expr;
1163 function Equivalent_Type (Id : E) return E is
1166 (Ekind_In (Id, E_Class_Wide_Type,
1167 E_Class_Wide_Subtype,
1168 E_Access_Subprogram_Type,
1169 E_Access_Protected_Subprogram_Type,
1170 E_Anonymous_Access_Protected_Subprogram_Type,
1171 E_Access_Subprogram_Type,
1174 end Equivalent_Type;
1176 function Esize (Id : E) return Uint is
1181 function Extra_Accessibility (Id : E) return E is
1184 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1186 end Extra_Accessibility;
1188 function Extra_Accessibility_Of_Result (Id : E) return E is
1190 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1192 end Extra_Accessibility_Of_Result;
1194 function Extra_Constrained (Id : E) return E is
1196 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1198 end Extra_Constrained;
1200 function Extra_Formal (Id : E) return E is
1205 function Extra_Formals (Id : E) return E is
1208 (Is_Overloadable (Id)
1209 or else Ekind_In (Id, E_Entry_Family,
1211 E_Subprogram_Type));
1215 function Can_Use_Internal_Rep (Id : E) return B is
1217 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1218 return Flag229 (Base_Type (Id));
1219 end Can_Use_Internal_Rep;
1221 function Finalization_Master (Id : E) return E is
1223 pragma Assert (Is_Access_Type (Id));
1224 return Node23 (Root_Type (Id));
1225 end Finalization_Master;
1227 function Finalize_Storage_Only (Id : E) return B is
1229 pragma Assert (Is_Type (Id));
1230 return Flag158 (Base_Type (Id));
1231 end Finalize_Storage_Only;
1233 function Finalizer (Id : E) return E is
1235 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1239 function First_Entity (Id : E) return E is
1244 function First_Exit_Statement (Id : E) return N is
1246 pragma Assert (Ekind (Id) = E_Loop);
1248 end First_Exit_Statement;
1250 function First_Index (Id : E) return N is
1252 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1256 function First_Literal (Id : E) return E is
1258 pragma Assert (Is_Enumeration_Type (Id));
1262 function First_Private_Entity (Id : E) return E is
1264 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1265 or else Ekind (Id) in Concurrent_Kind);
1267 end First_Private_Entity;
1269 function First_Rep_Item (Id : E) return E is
1274 function Freeze_Node (Id : E) return N is
1279 function From_Limited_With (Id : E) return B is
1281 return Flag159 (Id);
1282 end From_Limited_With;
1284 function Full_View (Id : E) return E is
1286 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1290 function Generic_Homonym (Id : E) return E is
1292 pragma Assert (Ekind (Id) = E_Generic_Package);
1294 end Generic_Homonym;
1296 function Generic_Renamings (Id : E) return L is
1298 return Elist23 (Id);
1299 end Generic_Renamings;
1301 function Handler_Records (Id : E) return S is
1304 end Handler_Records;
1306 function Has_Aliased_Components (Id : E) return B is
1308 return Flag135 (Implementation_Base_Type (Id));
1309 end Has_Aliased_Components;
1311 function Has_Alignment_Clause (Id : E) return B is
1314 end Has_Alignment_Clause;
1316 function Has_All_Calls_Remote (Id : E) return B is
1319 end Has_All_Calls_Remote;
1321 function Has_Anonymous_Master (Id : E) return B is
1324 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1325 return Flag253 (Id);
1326 end Has_Anonymous_Master;
1328 function Has_Atomic_Components (Id : E) return B is
1330 return Flag86 (Implementation_Base_Type (Id));
1331 end Has_Atomic_Components;
1333 function Has_Biased_Representation (Id : E) return B is
1335 return Flag139 (Id);
1336 end Has_Biased_Representation;
1338 function Has_Completion (Id : E) return B is
1343 function Has_Completion_In_Body (Id : E) return B is
1345 pragma Assert (Is_Type (Id));
1347 end Has_Completion_In_Body;
1349 function Has_Complex_Representation (Id : E) return B is
1351 pragma Assert (Is_Type (Id));
1352 return Flag140 (Implementation_Base_Type (Id));
1353 end Has_Complex_Representation;
1355 function Has_Component_Size_Clause (Id : E) return B is
1357 pragma Assert (Is_Array_Type (Id));
1358 return Flag68 (Implementation_Base_Type (Id));
1359 end Has_Component_Size_Clause;
1361 function Has_Constrained_Partial_View (Id : E) return B is
1363 pragma Assert (Is_Type (Id));
1364 return Flag187 (Id);
1365 end Has_Constrained_Partial_View;
1367 function Has_Controlled_Component (Id : E) return B is
1369 return Flag43 (Base_Type (Id));
1370 end Has_Controlled_Component;
1372 function Has_Contiguous_Rep (Id : E) return B is
1374 return Flag181 (Id);
1375 end Has_Contiguous_Rep;
1377 function Has_Controlling_Result (Id : E) return B is
1380 end Has_Controlling_Result;
1382 function Has_Convention_Pragma (Id : E) return B is
1384 return Flag119 (Id);
1385 end Has_Convention_Pragma;
1387 function Has_Default_Aspect (Id : E) return B is
1389 return Flag39 (Base_Type (Id));
1390 end Has_Default_Aspect;
1392 function Has_Default_Init_Cond (Id : E) return B is
1395 end Has_Default_Init_Cond;
1397 function Has_Delayed_Aspects (Id : E) return B is
1399 pragma Assert (Nkind (Id) in N_Entity);
1400 return Flag200 (Id);
1401 end Has_Delayed_Aspects;
1403 function Has_Delayed_Freeze (Id : E) return B is
1405 pragma Assert (Nkind (Id) in N_Entity);
1407 end Has_Delayed_Freeze;
1409 function Has_Delayed_Rep_Aspects (Id : E) return B is
1411 pragma Assert (Nkind (Id) in N_Entity);
1412 return Flag261 (Id);
1413 end Has_Delayed_Rep_Aspects;
1415 function Has_Discriminants (Id : E) return B is
1417 pragma Assert (Nkind (Id) in N_Entity);
1419 end Has_Discriminants;
1421 function Has_Dispatch_Table (Id : E) return B is
1423 pragma Assert (Is_Tagged_Type (Id));
1424 return Flag220 (Id);
1425 end Has_Dispatch_Table;
1427 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1429 pragma Assert (Is_Type (Id));
1430 return Flag258 (Id);
1431 end Has_Dynamic_Predicate_Aspect;
1433 function Has_Enumeration_Rep_Clause (Id : E) return B is
1435 pragma Assert (Is_Enumeration_Type (Id));
1437 end Has_Enumeration_Rep_Clause;
1439 function Has_Exit (Id : E) return B is
1444 function Has_Forward_Instantiation (Id : E) return B is
1446 return Flag175 (Id);
1447 end Has_Forward_Instantiation;
1449 function Has_Fully_Qualified_Name (Id : E) return B is
1451 return Flag173 (Id);
1452 end Has_Fully_Qualified_Name;
1454 function Has_Gigi_Rep_Item (Id : E) return B is
1457 end Has_Gigi_Rep_Item;
1459 function Has_Homonym (Id : E) return B is
1464 function Has_Implicit_Dereference (Id : E) return B is
1466 return Flag251 (Id);
1467 end Has_Implicit_Dereference;
1469 function Has_Independent_Components (Id : E) return B is
1471 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1472 return Flag34 (Base_Type (Id));
1473 end Has_Independent_Components;
1475 function Has_Inheritable_Invariants (Id : E) return B is
1477 pragma Assert (Is_Type (Id));
1478 return Flag248 (Id);
1479 end Has_Inheritable_Invariants;
1481 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1483 pragma Assert (Is_Type (Id));
1484 return Flag133 (Id);
1485 end Has_Inherited_Default_Init_Cond;
1487 function Has_Initial_Value (Id : E) return B is
1489 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1490 return Flag219 (Id);
1491 end Has_Initial_Value;
1493 function Has_Invariants (Id : E) return B is
1495 pragma Assert (Is_Type (Id));
1496 return Flag232 (Id);
1499 function Has_Loop_Entry_Attributes (Id : E) return B is
1501 pragma Assert (Ekind (Id) = E_Loop);
1502 return Flag260 (Id);
1503 end Has_Loop_Entry_Attributes;
1505 function Has_Machine_Radix_Clause (Id : E) return B is
1507 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1509 end Has_Machine_Radix_Clause;
1511 function Has_Master_Entity (Id : E) return B is
1514 end Has_Master_Entity;
1516 function Has_Missing_Return (Id : E) return B is
1518 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1519 return Flag142 (Id);
1520 end Has_Missing_Return;
1522 function Has_Nested_Block_With_Handler (Id : E) return B is
1524 return Flag101 (Id);
1525 end Has_Nested_Block_With_Handler;
1527 function Has_Non_Standard_Rep (Id : E) return B is
1529 return Flag75 (Implementation_Base_Type (Id));
1530 end Has_Non_Standard_Rep;
1532 function Has_Object_Size_Clause (Id : E) return B is
1534 pragma Assert (Is_Type (Id));
1535 return Flag172 (Id);
1536 end Has_Object_Size_Clause;
1538 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1540 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1541 return Flag110 (Id);
1542 end Has_Out_Or_In_Out_Parameter;
1544 function Has_Per_Object_Constraint (Id : E) return B is
1546 return Flag154 (Id);
1547 end Has_Per_Object_Constraint;
1549 function Has_Postconditions (Id : E) return B is
1551 pragma Assert (Is_Subprogram (Id));
1552 return Flag240 (Id);
1553 end Has_Postconditions;
1555 function Has_Pragma_Controlled (Id : E) return B is
1557 pragma Assert (Is_Access_Type (Id));
1558 return Flag27 (Implementation_Base_Type (Id));
1559 end Has_Pragma_Controlled;
1561 function Has_Pragma_Elaborate_Body (Id : E) return B is
1563 return Flag150 (Id);
1564 end Has_Pragma_Elaborate_Body;
1566 function Has_Pragma_Inline (Id : E) return B is
1568 return Flag157 (Id);
1569 end Has_Pragma_Inline;
1571 function Has_Pragma_Inline_Always (Id : E) return B is
1573 return Flag230 (Id);
1574 end Has_Pragma_Inline_Always;
1576 function Has_Pragma_No_Inline (Id : E) return B is
1578 return Flag201 (Id);
1579 end Has_Pragma_No_Inline;
1581 function Has_Pragma_Ordered (Id : E) return B is
1583 pragma Assert (Is_Enumeration_Type (Id));
1584 return Flag198 (Implementation_Base_Type (Id));
1585 end Has_Pragma_Ordered;
1587 function Has_Pragma_Pack (Id : E) return B is
1589 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1590 return Flag121 (Implementation_Base_Type (Id));
1591 end Has_Pragma_Pack;
1593 function Has_Pragma_Preelab_Init (Id : E) return B is
1595 return Flag221 (Id);
1596 end Has_Pragma_Preelab_Init;
1598 function Has_Pragma_Pure (Id : E) return B is
1600 return Flag203 (Id);
1601 end Has_Pragma_Pure;
1603 function Has_Pragma_Pure_Function (Id : E) return B is
1605 return Flag179 (Id);
1606 end Has_Pragma_Pure_Function;
1608 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1610 return Flag169 (Id);
1611 end Has_Pragma_Thread_Local_Storage;
1613 function Has_Pragma_Unmodified (Id : E) return B is
1615 return Flag233 (Id);
1616 end Has_Pragma_Unmodified;
1618 function Has_Pragma_Unreferenced (Id : E) return B is
1620 return Flag180 (Id);
1621 end Has_Pragma_Unreferenced;
1623 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1625 pragma Assert (Is_Type (Id));
1626 return Flag212 (Id);
1627 end Has_Pragma_Unreferenced_Objects;
1629 function Has_Predicates (Id : E) return B is
1631 pragma Assert (Is_Type (Id));
1632 return Flag250 (Id);
1635 function Has_Primitive_Operations (Id : E) return B is
1637 pragma Assert (Is_Type (Id));
1638 return Flag120 (Base_Type (Id));
1639 end Has_Primitive_Operations;
1641 function Has_Private_Ancestor (Id : E) return B is
1643 return Flag151 (Id);
1644 end Has_Private_Ancestor;
1646 function Has_Private_Declaration (Id : E) return B is
1648 return Flag155 (Id);
1649 end Has_Private_Declaration;
1651 function Has_Protected (Id : E) return B is
1653 return Flag271 (Base_Type (Id));
1656 function Has_Qualified_Name (Id : E) return B is
1658 return Flag161 (Id);
1659 end Has_Qualified_Name;
1661 function Has_RACW (Id : E) return B is
1663 pragma Assert (Ekind (Id) = E_Package);
1664 return Flag214 (Id);
1667 function Has_Record_Rep_Clause (Id : E) return B is
1669 pragma Assert (Is_Record_Type (Id));
1670 return Flag65 (Implementation_Base_Type (Id));
1671 end Has_Record_Rep_Clause;
1673 function Has_Recursive_Call (Id : E) return B is
1675 pragma Assert (Is_Subprogram (Id));
1676 return Flag143 (Id);
1677 end Has_Recursive_Call;
1679 function Has_Shift_Operator (Id : E) return B is
1681 pragma Assert (Is_Integer_Type (Id));
1682 return Flag267 (Base_Type (Id));
1683 end Has_Shift_Operator;
1685 function Has_Size_Clause (Id : E) return B is
1688 end Has_Size_Clause;
1690 function Has_Small_Clause (Id : E) return B is
1693 end Has_Small_Clause;
1695 function Has_Specified_Layout (Id : E) return B is
1697 pragma Assert (Is_Type (Id));
1698 return Flag100 (Implementation_Base_Type (Id));
1699 end Has_Specified_Layout;
1701 function Has_Specified_Stream_Input (Id : E) return B is
1703 pragma Assert (Is_Type (Id));
1704 return Flag190 (Id);
1705 end Has_Specified_Stream_Input;
1707 function Has_Specified_Stream_Output (Id : E) return B is
1709 pragma Assert (Is_Type (Id));
1710 return Flag191 (Id);
1711 end Has_Specified_Stream_Output;
1713 function Has_Specified_Stream_Read (Id : E) return B is
1715 pragma Assert (Is_Type (Id));
1716 return Flag192 (Id);
1717 end Has_Specified_Stream_Read;
1719 function Has_Specified_Stream_Write (Id : E) return B is
1721 pragma Assert (Is_Type (Id));
1722 return Flag193 (Id);
1723 end Has_Specified_Stream_Write;
1725 function Has_Static_Discriminants (Id : E) return B is
1727 pragma Assert (Is_Type (Id));
1728 return Flag211 (Id);
1729 end Has_Static_Discriminants;
1731 function Has_Static_Predicate (Id : E) return B is
1733 pragma Assert (Is_Type (Id));
1734 return Flag269 (Id);
1735 end Has_Static_Predicate;
1737 function Has_Static_Predicate_Aspect (Id : E) return B is
1739 pragma Assert (Is_Type (Id));
1740 return Flag259 (Id);
1741 end Has_Static_Predicate_Aspect;
1743 function Has_Storage_Size_Clause (Id : E) return B is
1745 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1746 return Flag23 (Implementation_Base_Type (Id));
1747 end Has_Storage_Size_Clause;
1749 function Has_Stream_Size_Clause (Id : E) return B is
1751 return Flag184 (Id);
1752 end Has_Stream_Size_Clause;
1754 function Has_Task (Id : E) return B is
1756 return Flag30 (Base_Type (Id));
1759 function Has_Thunks (Id : E) return B is
1761 return Flag228 (Id);
1764 function Has_Unchecked_Union (Id : E) return B is
1766 return Flag123 (Base_Type (Id));
1767 end Has_Unchecked_Union;
1769 function Has_Unknown_Discriminants (Id : E) return B is
1771 pragma Assert (Is_Type (Id));
1773 end Has_Unknown_Discriminants;
1775 function Has_Up_Level_Access (Id : E) return B is
1778 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1779 return Flag215 (Id);
1780 end Has_Up_Level_Access;
1782 function Has_Visible_Refinement (Id : E) return B is
1784 pragma Assert (Ekind (Id) = E_Abstract_State);
1785 return Flag263 (Id);
1786 end Has_Visible_Refinement;
1788 function Has_Volatile_Components (Id : E) return B is
1790 return Flag87 (Implementation_Base_Type (Id));
1791 end Has_Volatile_Components;
1793 function Has_Xref_Entry (Id : E) return B is
1795 return Flag182 (Id);
1798 function Hiding_Loop_Variable (Id : E) return E is
1800 pragma Assert (Ekind (Id) = E_Variable);
1802 end Hiding_Loop_Variable;
1804 function Homonym (Id : E) return E is
1809 function Import_Pragma (Id : E) return E is
1811 pragma Assert (Is_Subprogram (Id));
1815 function Interface_Alias (Id : E) return E is
1817 pragma Assert (Is_Subprogram (Id));
1819 end Interface_Alias;
1821 function Interfaces (Id : E) return L is
1823 pragma Assert (Is_Record_Type (Id));
1824 return Elist25 (Id);
1827 function In_Package_Body (Id : E) return B is
1830 end In_Package_Body;
1832 function In_Private_Part (Id : E) return B is
1835 end In_Private_Part;
1837 function In_Use (Id : E) return B is
1839 pragma Assert (Nkind (Id) in N_Entity);
1843 function Initialization_Statements (Id : E) return N is
1845 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1847 end Initialization_Statements;
1849 function Inner_Instances (Id : E) return L is
1851 return Elist23 (Id);
1852 end Inner_Instances;
1854 function Interface_Name (Id : E) return N is
1859 function Is_Abstract_Subprogram (Id : E) return B is
1861 pragma Assert (Is_Overloadable (Id));
1863 end Is_Abstract_Subprogram;
1865 function Is_Abstract_Type (Id : E) return B is
1867 pragma Assert (Is_Type (Id));
1868 return Flag146 (Id);
1869 end Is_Abstract_Type;
1871 function Is_Local_Anonymous_Access (Id : E) return B is
1873 pragma Assert (Is_Access_Type (Id));
1874 return Flag194 (Id);
1875 end Is_Local_Anonymous_Access;
1877 function Is_Access_Constant (Id : E) return B is
1879 pragma Assert (Is_Access_Type (Id));
1881 end Is_Access_Constant;
1883 function Is_Ada_2005_Only (Id : E) return B is
1885 return Flag185 (Id);
1886 end Is_Ada_2005_Only;
1888 function Is_Ada_2012_Only (Id : E) return B is
1890 return Flag199 (Id);
1891 end Is_Ada_2012_Only;
1893 function Is_Aliased (Id : E) return B is
1895 pragma Assert (Nkind (Id) in N_Entity);
1899 function Is_Asynchronous (Id : E) return B is
1901 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1903 end Is_Asynchronous;
1905 function Is_Atomic (Id : E) return B is
1910 function Is_Bit_Packed_Array (Id : E) return B is
1912 return Flag122 (Implementation_Base_Type (Id));
1913 end Is_Bit_Packed_Array;
1915 function Is_Called (Id : E) return B is
1917 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1918 return Flag102 (Id);
1921 function Is_Character_Type (Id : E) return B is
1924 end Is_Character_Type;
1926 function Is_Checked_Ghost_Entity (Id : E) return B is
1928 pragma Assert (Nkind (Id) in N_Entity);
1929 return Flag277 (Id);
1930 end Is_Checked_Ghost_Entity;
1932 function Is_Child_Unit (Id : E) return B is
1937 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1940 end Is_Class_Wide_Equivalent_Type;
1942 function Is_Compilation_Unit (Id : E) return B is
1944 return Flag149 (Id);
1945 end Is_Compilation_Unit;
1947 function Is_Completely_Hidden (Id : E) return B is
1949 pragma Assert (Ekind (Id) = E_Discriminant);
1950 return Flag103 (Id);
1951 end Is_Completely_Hidden;
1953 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1956 end Is_Constr_Subt_For_U_Nominal;
1958 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1960 return Flag141 (Id);
1961 end Is_Constr_Subt_For_UN_Aliased;
1963 function Is_Constrained (Id : E) return B is
1965 pragma Assert (Nkind (Id) in N_Entity);
1969 function Is_Constructor (Id : E) return B is
1974 function Is_Controlled (Id : E) return B is
1976 return Flag42 (Base_Type (Id));
1979 function Is_Controlling_Formal (Id : E) return B is
1981 pragma Assert (Is_Formal (Id));
1983 end Is_Controlling_Formal;
1985 function Is_CPP_Class (Id : E) return B is
1990 function Is_Default_Init_Cond_Procedure (Id : E) return B is
1992 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1993 return Flag132 (Id);
1994 end Is_Default_Init_Cond_Procedure;
1996 function Is_Descendent_Of_Address (Id : E) return B is
1998 return Flag223 (Id);
1999 end Is_Descendent_Of_Address;
2001 function Is_Discrim_SO_Function (Id : E) return B is
2003 return Flag176 (Id);
2004 end Is_Discrim_SO_Function;
2006 function Is_Discriminant_Check_Function (Id : E) return B is
2008 return Flag264 (Id);
2009 end Is_Discriminant_Check_Function;
2011 function Is_Dispatch_Table_Entity (Id : E) return B is
2013 return Flag234 (Id);
2014 end Is_Dispatch_Table_Entity;
2016 function Is_Dispatching_Operation (Id : E) return B is
2018 pragma Assert (Nkind (Id) in N_Entity);
2020 end Is_Dispatching_Operation;
2022 function Is_Eliminated (Id : E) return B is
2024 return Flag124 (Id);
2027 function Is_Entry_Formal (Id : E) return B is
2030 end Is_Entry_Formal;
2032 function Is_Exported (Id : E) return B is
2037 function Is_First_Subtype (Id : E) return B is
2040 end Is_First_Subtype;
2042 function Is_For_Access_Subtype (Id : E) return B is
2044 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2045 return Flag118 (Id);
2046 end Is_For_Access_Subtype;
2048 function Is_Formal_Subprogram (Id : E) return B is
2050 return Flag111 (Id);
2051 end Is_Formal_Subprogram;
2053 function Is_Frozen (Id : E) return B is
2058 function Is_Generic_Actual_Subprogram (Id : E) return B is
2060 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2061 return Flag274 (Id);
2062 end Is_Generic_Actual_Subprogram;
2064 function Is_Generic_Actual_Type (Id : E) return B is
2066 pragma Assert (Is_Type (Id));
2068 end Is_Generic_Actual_Type;
2070 function Is_Generic_Instance (Id : E) return B is
2072 return Flag130 (Id);
2073 end Is_Generic_Instance;
2075 function Is_Generic_Type (Id : E) return B is
2077 pragma Assert (Nkind (Id) in N_Entity);
2079 end Is_Generic_Type;
2081 function Is_Hidden (Id : E) return B is
2086 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2089 end Is_Hidden_Non_Overridden_Subpgm;
2091 function Is_Hidden_Open_Scope (Id : E) return B is
2093 return Flag171 (Id);
2094 end Is_Hidden_Open_Scope;
2096 function Is_Ignored_Ghost_Entity (Id : E) return B is
2098 pragma Assert (Nkind (Id) in N_Entity);
2099 return Flag278 (Id);
2100 end Is_Ignored_Ghost_Entity;
2102 function Is_Immediately_Visible (Id : E) return B is
2104 pragma Assert (Nkind (Id) in N_Entity);
2106 end Is_Immediately_Visible;
2108 function Is_Implementation_Defined (Id : E) return B is
2110 return Flag254 (Id);
2111 end Is_Implementation_Defined;
2113 function Is_Imported (Id : E) return B is
2118 function Is_Independent (Id : E) return B is
2120 pragma Assert (Ekind (Id) = E_Component);
2121 return Flag268 (Id);
2124 function Is_Inlined (Id : E) return B is
2129 function Is_Inlined_Always (Id : E) return B is
2131 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2133 end Is_Inlined_Always;
2135 function Is_Interface (Id : E) return B is
2137 return Flag186 (Id);
2140 function Is_Instantiated (Id : E) return B is
2142 return Flag126 (Id);
2143 end Is_Instantiated;
2145 function Is_Internal (Id : E) return B is
2147 pragma Assert (Nkind (Id) in N_Entity);
2151 function Is_Interrupt_Handler (Id : E) return B is
2153 pragma Assert (Nkind (Id) in N_Entity);
2155 end Is_Interrupt_Handler;
2157 function Is_Intrinsic_Subprogram (Id : E) return B is
2160 end Is_Intrinsic_Subprogram;
2162 function Is_Invariant_Procedure (Id : E) return B is
2164 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2165 return Flag257 (Id);
2166 end Is_Invariant_Procedure;
2168 function Is_Itype (Id : E) return B is
2173 function Is_Known_Non_Null (Id : E) return B is
2176 end Is_Known_Non_Null;
2178 function Is_Known_Null (Id : E) return B is
2180 return Flag204 (Id);
2183 function Is_Known_Valid (Id : E) return B is
2185 return Flag170 (Id);
2188 function Is_Limited_Composite (Id : E) return B is
2190 return Flag106 (Id);
2191 end Is_Limited_Composite;
2193 function Is_Limited_Interface (Id : E) return B is
2195 return Flag197 (Id);
2196 end Is_Limited_Interface;
2198 function Is_Limited_Record (Id : E) return B is
2201 end Is_Limited_Record;
2203 function Is_Machine_Code_Subprogram (Id : E) return B is
2205 pragma Assert (Is_Subprogram (Id));
2206 return Flag137 (Id);
2207 end Is_Machine_Code_Subprogram;
2209 function Is_Non_Static_Subtype (Id : E) return B is
2211 pragma Assert (Is_Type (Id));
2212 return Flag109 (Id);
2213 end Is_Non_Static_Subtype;
2215 function Is_Null_Init_Proc (Id : E) return B is
2217 pragma Assert (Ekind (Id) = E_Procedure);
2218 return Flag178 (Id);
2219 end Is_Null_Init_Proc;
2221 function Is_Obsolescent (Id : E) return B is
2223 return Flag153 (Id);
2226 function Is_Only_Out_Parameter (Id : E) return B is
2228 pragma Assert (Is_Formal (Id));
2229 return Flag226 (Id);
2230 end Is_Only_Out_Parameter;
2232 function Is_Package_Body_Entity (Id : E) return B is
2234 return Flag160 (Id);
2235 end Is_Package_Body_Entity;
2237 function Is_Packed (Id : E) return B is
2239 return Flag51 (Implementation_Base_Type (Id));
2242 function Is_Packed_Array_Impl_Type (Id : E) return B is
2244 return Flag138 (Id);
2245 end Is_Packed_Array_Impl_Type;
2247 function Is_Potentially_Use_Visible (Id : E) return B is
2249 pragma Assert (Nkind (Id) in N_Entity);
2251 end Is_Potentially_Use_Visible;
2253 function Is_Predicate_Function (Id : E) return B is
2255 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2256 return Flag255 (Id);
2257 end Is_Predicate_Function;
2259 function Is_Predicate_Function_M (Id : E) return B is
2261 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2262 return Flag256 (Id);
2263 end Is_Predicate_Function_M;
2265 function Is_Preelaborated (Id : E) return B is
2268 end Is_Preelaborated;
2270 function Is_Primitive (Id : E) return B is
2273 (Is_Overloadable (Id)
2274 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2275 return Flag218 (Id);
2278 function Is_Primitive_Wrapper (Id : E) return B is
2280 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2281 return Flag195 (Id);
2282 end Is_Primitive_Wrapper;
2284 function Is_Private_Composite (Id : E) return B is
2286 pragma Assert (Is_Type (Id));
2287 return Flag107 (Id);
2288 end Is_Private_Composite;
2290 function Is_Private_Descendant (Id : E) return B is
2293 end Is_Private_Descendant;
2295 function Is_Private_Primitive (Id : E) return B is
2297 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2298 return Flag245 (Id);
2299 end Is_Private_Primitive;
2301 function Is_Processed_Transient (Id : E) return B is
2303 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2304 return Flag252 (Id);
2305 end Is_Processed_Transient;
2307 function Is_Public (Id : E) return B is
2309 pragma Assert (Nkind (Id) in N_Entity);
2313 function Is_Pure (Id : E) return B is
2318 function Is_Pure_Unit_Access_Type (Id : E) return B is
2320 pragma Assert (Is_Access_Type (Id));
2321 return Flag189 (Id);
2322 end Is_Pure_Unit_Access_Type;
2324 function Is_RACW_Stub_Type (Id : E) return B is
2326 pragma Assert (Is_Type (Id));
2327 return Flag244 (Id);
2328 end Is_RACW_Stub_Type;
2330 function Is_Raised (Id : E) return B is
2332 pragma Assert (Ekind (Id) = E_Exception);
2333 return Flag224 (Id);
2336 function Is_Remote_Call_Interface (Id : E) return B is
2339 end Is_Remote_Call_Interface;
2341 function Is_Remote_Types (Id : E) return B is
2344 end Is_Remote_Types;
2346 function Is_Renaming_Of_Object (Id : E) return B is
2348 return Flag112 (Id);
2349 end Is_Renaming_Of_Object;
2351 function Is_Return_Object (Id : E) return B is
2353 return Flag209 (Id);
2354 end Is_Return_Object;
2356 function Is_Safe_To_Reevaluate (Id : E) return B is
2358 return Flag249 (Id);
2359 end Is_Safe_To_Reevaluate;
2361 function Is_Shared_Passive (Id : E) return B is
2364 end Is_Shared_Passive;
2366 function Is_Statically_Allocated (Id : E) return B is
2369 end Is_Statically_Allocated;
2371 function Is_Tag (Id : E) return B is
2373 pragma Assert (Nkind (Id) in N_Entity);
2377 function Is_Tagged_Type (Id : E) return B is
2382 function Is_Thunk (Id : E) return B is
2384 return Flag225 (Id);
2387 function Is_Trivial_Subprogram (Id : E) return B is
2389 return Flag235 (Id);
2390 end Is_Trivial_Subprogram;
2392 function Is_True_Constant (Id : E) return B is
2394 return Flag163 (Id);
2395 end Is_True_Constant;
2397 function Is_Unchecked_Union (Id : E) return B is
2399 return Flag117 (Implementation_Base_Type (Id));
2400 end Is_Unchecked_Union;
2402 function Is_Underlying_Record_View (Id : E) return B is
2404 return Flag246 (Id);
2405 end Is_Underlying_Record_View;
2407 function Is_Unsigned_Type (Id : E) return B is
2409 pragma Assert (Is_Type (Id));
2410 return Flag144 (Id);
2411 end Is_Unsigned_Type;
2413 function Is_Valued_Procedure (Id : E) return B is
2415 pragma Assert (Ekind (Id) = E_Procedure);
2416 return Flag127 (Id);
2417 end Is_Valued_Procedure;
2419 function Is_Visible_Formal (Id : E) return B is
2421 return Flag206 (Id);
2422 end Is_Visible_Formal;
2424 function Is_Visible_Lib_Unit (Id : E) return B is
2426 return Flag116 (Id);
2427 end Is_Visible_Lib_Unit;
2429 function Is_Volatile (Id : E) return B is
2431 pragma Assert (Nkind (Id) in N_Entity);
2433 if Is_Type (Id) then
2434 return Flag16 (Base_Type (Id));
2440 function Itype_Printed (Id : E) return B is
2442 pragma Assert (Is_Itype (Id));
2443 return Flag202 (Id);
2446 function Kill_Elaboration_Checks (Id : E) return B is
2449 end Kill_Elaboration_Checks;
2451 function Kill_Range_Checks (Id : E) return B is
2454 end Kill_Range_Checks;
2456 function Known_To_Have_Preelab_Init (Id : E) return B is
2458 pragma Assert (Is_Type (Id));
2459 return Flag207 (Id);
2460 end Known_To_Have_Preelab_Init;
2462 function Last_Aggregate_Assignment (Id : E) return N is
2464 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2466 end Last_Aggregate_Assignment;
2468 function Last_Assignment (Id : E) return N is
2470 pragma Assert (Is_Assignable (Id));
2472 end Last_Assignment;
2474 function Last_Entity (Id : E) return E is
2479 function Limited_View (Id : E) return E is
2481 pragma Assert (Ekind (Id) = E_Package);
2485 function Linker_Section_Pragma (Id : E) return N is
2488 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2490 end Linker_Section_Pragma;
2492 function Lit_Indexes (Id : E) return E is
2494 pragma Assert (Is_Enumeration_Type (Id));
2498 function Lit_Strings (Id : E) return E is
2500 pragma Assert (Is_Enumeration_Type (Id));
2504 function Low_Bound_Tested (Id : E) return B is
2506 return Flag205 (Id);
2507 end Low_Bound_Tested;
2509 function Machine_Radix_10 (Id : E) return B is
2511 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2513 end Machine_Radix_10;
2515 function Master_Id (Id : E) return E is
2517 pragma Assert (Is_Access_Type (Id));
2521 function Materialize_Entity (Id : E) return B is
2523 return Flag168 (Id);
2524 end Materialize_Entity;
2526 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2528 return Flag262 (Id);
2529 end May_Inherit_Delayed_Rep_Aspects;
2531 function Mechanism (Id : E) return M is
2533 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2534 return UI_To_Int (Uint8 (Id));
2537 function Modulus (Id : E) return Uint is
2539 pragma Assert (Is_Modular_Integer_Type (Id));
2540 return Uint17 (Base_Type (Id));
2543 function Must_Be_On_Byte_Boundary (Id : E) return B is
2545 pragma Assert (Is_Type (Id));
2546 return Flag183 (Id);
2547 end Must_Be_On_Byte_Boundary;
2549 function Must_Have_Preelab_Init (Id : E) return B is
2551 pragma Assert (Is_Type (Id));
2552 return Flag208 (Id);
2553 end Must_Have_Preelab_Init;
2555 function Needs_Debug_Info (Id : E) return B is
2557 return Flag147 (Id);
2558 end Needs_Debug_Info;
2560 function Needs_No_Actuals (Id : E) return B is
2563 (Is_Overloadable (Id)
2564 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2566 end Needs_No_Actuals;
2568 function Never_Set_In_Source (Id : E) return B is
2570 return Flag115 (Id);
2571 end Never_Set_In_Source;
2573 function Next_Inlined_Subprogram (Id : E) return E is
2576 end Next_Inlined_Subprogram;
2578 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2580 pragma Assert (Is_Discrete_Type (Id));
2581 return Flag276 (Id);
2582 end No_Dynamic_Predicate_On_Actual;
2584 function No_Pool_Assigned (Id : E) return B is
2586 pragma Assert (Is_Access_Type (Id));
2587 return Flag131 (Root_Type (Id));
2588 end No_Pool_Assigned;
2590 function No_Predicate_On_Actual (Id : E) return Boolean is
2592 pragma Assert (Is_Discrete_Type (Id));
2593 return Flag275 (Id);
2594 end No_Predicate_On_Actual;
2596 function No_Return (Id : E) return B is
2598 return Flag113 (Id);
2601 function No_Strict_Aliasing (Id : E) return B is
2603 pragma Assert (Is_Access_Type (Id));
2604 return Flag136 (Base_Type (Id));
2605 end No_Strict_Aliasing;
2607 function No_Tagged_Streams_Pragma (Id : E) return N is
2609 pragma Assert (Is_Tagged_Type (Id));
2611 end No_Tagged_Streams_Pragma;
2613 function Non_Binary_Modulus (Id : E) return B is
2615 pragma Assert (Is_Type (Id));
2616 return Flag58 (Base_Type (Id));
2617 end Non_Binary_Modulus;
2619 function Non_Limited_View (Id : E) return E is
2622 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2624 end Non_Limited_View;
2626 function Nonzero_Is_True (Id : E) return B is
2628 pragma Assert (Root_Type (Id) = Standard_Boolean);
2629 return Flag162 (Base_Type (Id));
2630 end Nonzero_Is_True;
2632 function Normalized_First_Bit (Id : E) return U is
2634 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2636 end Normalized_First_Bit;
2638 function Normalized_Position (Id : E) return U is
2640 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2642 end Normalized_Position;
2644 function Normalized_Position_Max (Id : E) return U is
2646 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2648 end Normalized_Position_Max;
2650 function OK_To_Rename (Id : E) return B is
2652 pragma Assert (Ekind (Id) = E_Variable);
2653 return Flag247 (Id);
2656 function OK_To_Reorder_Components (Id : E) return B is
2658 pragma Assert (Is_Record_Type (Id));
2659 return Flag239 (Base_Type (Id));
2660 end OK_To_Reorder_Components;
2662 function Optimize_Alignment_Space (Id : E) return B is
2665 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2666 return Flag241 (Id);
2667 end Optimize_Alignment_Space;
2669 function Optimize_Alignment_Time (Id : E) return B is
2672 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2673 return Flag242 (Id);
2674 end Optimize_Alignment_Time;
2676 function Original_Access_Type (Id : E) return E is
2678 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2680 end Original_Access_Type;
2682 function Original_Array_Type (Id : E) return E is
2684 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2686 end Original_Array_Type;
2688 function Original_Record_Component (Id : E) return E is
2690 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2692 end Original_Record_Component;
2694 function Overlays_Constant (Id : E) return B is
2696 return Flag243 (Id);
2697 end Overlays_Constant;
2699 function Overridden_Operation (Id : E) return E is
2702 end Overridden_Operation;
2704 function Package_Instantiation (Id : E) return N is
2706 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2708 end Package_Instantiation;
2710 function Packed_Array_Impl_Type (Id : E) return E is
2712 pragma Assert (Is_Array_Type (Id));
2714 end Packed_Array_Impl_Type;
2716 function Parent_Subtype (Id : E) return E is
2718 pragma Assert (Is_Record_Type (Id));
2719 return Node19 (Base_Type (Id));
2722 function Part_Of_Constituents (Id : E) return L is
2724 pragma Assert (Ekind (Id) = E_Abstract_State);
2726 end Part_Of_Constituents;
2728 function Postcondition_Proc (Id : E) return E is
2730 pragma Assert (Ekind (Id) = E_Procedure);
2732 end Postcondition_Proc;
2734 function PPC_Wrapper (Id : E) return E is
2736 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2740 function Prival (Id : E) return E is
2742 pragma Assert (Is_Protected_Component (Id));
2746 function Prival_Link (Id : E) return E is
2748 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2752 function Private_Dependents (Id : E) return L is
2754 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2755 return Elist18 (Id);
2756 end Private_Dependents;
2758 function Private_View (Id : E) return N is
2760 pragma Assert (Is_Private_Type (Id));
2764 function Protected_Body_Subprogram (Id : E) return E is
2766 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2768 end Protected_Body_Subprogram;
2770 function Protected_Formal (Id : E) return E is
2772 pragma Assert (Is_Formal (Id));
2774 end Protected_Formal;
2776 function Protection_Object (Id : E) return E is
2779 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2781 end Protection_Object;
2783 function Reachable (Id : E) return B is
2788 function Referenced (Id : E) return B is
2790 return Flag156 (Id);
2793 function Referenced_As_LHS (Id : E) return B is
2796 end Referenced_As_LHS;
2798 function Referenced_As_Out_Parameter (Id : E) return B is
2800 return Flag227 (Id);
2801 end Referenced_As_Out_Parameter;
2803 function Refinement_Constituents (Id : E) return L is
2805 pragma Assert (Ekind (Id) = E_Abstract_State);
2807 end Refinement_Constituents;
2809 function Register_Exception_Call (Id : E) return N is
2811 pragma Assert (Ekind (Id) = E_Exception);
2813 end Register_Exception_Call;
2815 function Related_Array_Object (Id : E) return E is
2817 pragma Assert (Is_Array_Type (Id));
2819 end Related_Array_Object;
2821 function Related_Expression (Id : E) return N is
2823 pragma Assert (Ekind (Id) in Type_Kind
2824 or else Ekind_In (Id, E_Constant, E_Variable));
2826 end Related_Expression;
2828 function Related_Instance (Id : E) return E is
2830 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2832 end Related_Instance;
2834 function Related_Type (Id : E) return E is
2836 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2840 function Relative_Deadline_Variable (Id : E) return E is
2842 pragma Assert (Is_Task_Type (Id));
2843 return Node26 (Implementation_Base_Type (Id));
2844 end Relative_Deadline_Variable;
2846 function Renamed_Entity (Id : E) return N is
2851 function Renamed_In_Spec (Id : E) return B is
2853 pragma Assert (Ekind (Id) = E_Package);
2854 return Flag231 (Id);
2855 end Renamed_In_Spec;
2857 function Renamed_Object (Id : E) return N is
2862 function Renaming_Map (Id : E) return U is
2867 function Requires_Overriding (Id : E) return B is
2869 pragma Assert (Is_Overloadable (Id));
2870 return Flag213 (Id);
2871 end Requires_Overriding;
2873 function Return_Present (Id : E) return B is
2878 function Return_Applies_To (Id : E) return N is
2881 end Return_Applies_To;
2883 function Returns_By_Ref (Id : E) return B is
2888 function Returns_Limited_View (Id : E) return B is
2890 pragma Assert (Ekind (Id) = E_Function);
2891 return Flag134 (Id);
2892 end Returns_Limited_View;
2894 function Reverse_Bit_Order (Id : E) return B is
2896 pragma Assert (Is_Record_Type (Id));
2897 return Flag164 (Base_Type (Id));
2898 end Reverse_Bit_Order;
2900 function Reverse_Storage_Order (Id : E) return B is
2902 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2903 return Flag93 (Base_Type (Id));
2904 end Reverse_Storage_Order;
2906 function RM_Size (Id : E) return U is
2908 pragma Assert (Is_Type (Id));
2912 function Scalar_Range (Id : E) return N is
2917 function Scale_Value (Id : E) return U is
2922 function Scope_Depth_Value (Id : E) return U is
2925 end Scope_Depth_Value;
2927 function Sec_Stack_Needed_For_Return (Id : E) return B is
2929 return Flag167 (Id);
2930 end Sec_Stack_Needed_For_Return;
2932 function Shadow_Entities (Id : E) return S is
2934 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2936 end Shadow_Entities;
2938 function Shared_Var_Procs_Instance (Id : E) return E is
2940 pragma Assert (Ekind (Id) = E_Variable);
2942 end Shared_Var_Procs_Instance;
2944 function Size_Check_Code (Id : E) return N is
2946 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2948 end Size_Check_Code;
2950 function Size_Depends_On_Discriminant (Id : E) return B is
2952 return Flag177 (Id);
2953 end Size_Depends_On_Discriminant;
2955 function Size_Known_At_Compile_Time (Id : E) return B is
2958 end Size_Known_At_Compile_Time;
2960 function Small_Value (Id : E) return R is
2962 pragma Assert (Is_Fixed_Point_Type (Id));
2963 return Ureal21 (Id);
2966 function SPARK_Aux_Pragma (Id : E) return N is
2969 (Ekind_In (Id, E_Generic_Package, -- package variants
2973 end SPARK_Aux_Pragma;
2975 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2978 (Ekind_In (Id, E_Generic_Package, -- package variants
2981 return Flag266 (Id);
2982 end SPARK_Aux_Pragma_Inherited;
2984 function SPARK_Pragma (Id : E) return N is
2987 (Ekind_In (Id, E_Function, -- subprogram variants
2989 E_Generic_Procedure,
2993 Ekind_In (Id, E_Generic_Package, -- package variants
2999 function SPARK_Pragma_Inherited (Id : E) return B is
3002 (Ekind_In (Id, E_Function, -- subprogram variants
3004 E_Generic_Procedure,
3008 Ekind_In (Id, E_Generic_Package, -- package variants
3011 return Flag265 (Id);
3012 end SPARK_Pragma_Inherited;
3014 function Spec_Entity (Id : E) return E is
3016 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3020 function SSO_Set_High_By_Default (Id : E) return B is
3022 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3023 return Flag273 (Base_Type (Id));
3024 end SSO_Set_High_By_Default;
3026 function SSO_Set_Low_By_Default (Id : E) return B is
3028 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3029 return Flag272 (Base_Type (Id));
3030 end SSO_Set_Low_By_Default;
3032 function Static_Discrete_Predicate (Id : E) return S is
3034 pragma Assert (Is_Discrete_Type (Id));
3036 end Static_Discrete_Predicate;
3038 function Static_Real_Or_String_Predicate (Id : E) return N is
3040 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3042 end Static_Real_Or_String_Predicate;
3044 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3046 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3048 end Status_Flag_Or_Transient_Decl;
3050 function Storage_Size_Variable (Id : E) return E is
3052 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3053 return Node15 (Implementation_Base_Type (Id));
3054 end Storage_Size_Variable;
3056 function Static_Elaboration_Desired (Id : E) return B is
3058 pragma Assert (Ekind (Id) = E_Package);
3060 end Static_Elaboration_Desired;
3062 function Static_Initialization (Id : E) return N is
3065 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3067 end Static_Initialization;
3069 function Stored_Constraint (Id : E) return L is
3072 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3073 return Elist23 (Id);
3074 end Stored_Constraint;
3076 function Stores_Attribute_Old_Prefix (Id : E) return B is
3078 return Flag270 (Id);
3079 end Stores_Attribute_Old_Prefix;
3081 function Strict_Alignment (Id : E) return B is
3083 return Flag145 (Implementation_Base_Type (Id));
3084 end Strict_Alignment;
3086 function String_Literal_Length (Id : E) return U is
3089 end String_Literal_Length;
3091 function String_Literal_Low_Bound (Id : E) return N is
3094 end String_Literal_Low_Bound;
3096 function Subprograms_For_Type (Id : E) return E is
3098 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3100 end Subprograms_For_Type;
3102 function Suppress_Elaboration_Warnings (Id : E) return B is
3104 return Flag148 (Id);
3105 end Suppress_Elaboration_Warnings;
3107 function Suppress_Initialization (Id : E) return B is
3109 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3110 return Flag105 (Id);
3111 end Suppress_Initialization;
3113 function Suppress_Style_Checks (Id : E) return B is
3115 return Flag165 (Id);
3116 end Suppress_Style_Checks;
3118 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3120 return Flag217 (Id);
3121 end Suppress_Value_Tracking_On_Call;
3123 function Task_Body_Procedure (Id : E) return N is
3125 pragma Assert (Ekind (Id) in Task_Kind);
3127 end Task_Body_Procedure;
3129 function Thunk_Entity (Id : E) return E is
3131 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3132 and then Is_Thunk (Id));
3136 function Treat_As_Volatile (Id : E) return B is
3139 end Treat_As_Volatile;
3141 function Underlying_Full_View (Id : E) return E is
3143 pragma Assert (Ekind (Id) in Private_Kind);
3145 end Underlying_Full_View;
3147 function Underlying_Record_View (Id : E) return E is
3150 end Underlying_Record_View;
3152 function Universal_Aliasing (Id : E) return B is
3154 pragma Assert (Is_Type (Id));
3155 return Flag216 (Implementation_Base_Type (Id));
3156 end Universal_Aliasing;
3158 function Unset_Reference (Id : E) return N is
3161 end Unset_Reference;
3163 function Used_As_Generic_Actual (Id : E) return B is
3165 return Flag222 (Id);
3166 end Used_As_Generic_Actual;
3168 function Uses_Lock_Free (Id : E) return B is
3170 pragma Assert (Is_Protected_Type (Id));
3171 return Flag188 (Id);
3174 function Uses_Sec_Stack (Id : E) return B is
3179 function Warnings_Off (Id : E) return B is
3184 function Warnings_Off_Used (Id : E) return B is
3186 return Flag236 (Id);
3187 end Warnings_Off_Used;
3189 function Warnings_Off_Used_Unmodified (Id : E) return B is
3191 return Flag237 (Id);
3192 end Warnings_Off_Used_Unmodified;
3194 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3196 return Flag238 (Id);
3197 end Warnings_Off_Used_Unreferenced;
3199 function Wrapped_Entity (Id : E) return E is
3201 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3202 and then Is_Primitive_Wrapper (Id));
3206 function Was_Hidden (Id : E) return B is
3208 return Flag196 (Id);
3211 ------------------------------
3212 -- Classification Functions --
3213 ------------------------------
3215 function Is_Access_Type (Id : E) return B is
3217 return Ekind (Id) in Access_Kind;
3220 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3222 return Ekind (Id) in Access_Protected_Kind;
3223 end Is_Access_Protected_Subprogram_Type;
3225 function Is_Access_Subprogram_Type (Id : E) return B is
3227 return Ekind (Id) in Access_Subprogram_Kind;
3228 end Is_Access_Subprogram_Type;
3230 function Is_Aggregate_Type (Id : E) return B is
3232 return Ekind (Id) in Aggregate_Kind;
3233 end Is_Aggregate_Type;
3235 function Is_Array_Type (Id : E) return B is
3237 return Ekind (Id) in Array_Kind;
3240 function Is_Assignable (Id : E) return B is
3242 return Ekind (Id) in Assignable_Kind;
3245 function Is_Class_Wide_Type (Id : E) return B is
3247 return Ekind (Id) in Class_Wide_Kind;
3248 end Is_Class_Wide_Type;
3250 function Is_Composite_Type (Id : E) return B is
3252 return Ekind (Id) in Composite_Kind;
3253 end Is_Composite_Type;
3255 function Is_Concurrent_Body (Id : E) return B is
3257 return Ekind (Id) in
3258 Concurrent_Body_Kind;
3259 end Is_Concurrent_Body;
3261 function Is_Concurrent_Record_Type (Id : E) return B is
3264 end Is_Concurrent_Record_Type;
3266 function Is_Concurrent_Type (Id : E) return B is
3268 return Ekind (Id) in Concurrent_Kind;
3269 end Is_Concurrent_Type;
3271 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3273 return Ekind (Id) in
3274 Decimal_Fixed_Point_Kind;
3275 end Is_Decimal_Fixed_Point_Type;
3277 function Is_Digits_Type (Id : E) return B is
3279 return Ekind (Id) in Digits_Kind;
3282 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3284 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3285 end Is_Discrete_Or_Fixed_Point_Type;
3287 function Is_Discrete_Type (Id : E) return B is
3289 return Ekind (Id) in Discrete_Kind;
3290 end Is_Discrete_Type;
3292 function Is_Elementary_Type (Id : E) return B is
3294 return Ekind (Id) in Elementary_Kind;
3295 end Is_Elementary_Type;
3297 function Is_Entry (Id : E) return B is
3299 return Ekind (Id) in Entry_Kind;
3302 function Is_Enumeration_Type (Id : E) return B is
3304 return Ekind (Id) in
3306 end Is_Enumeration_Type;
3308 function Is_Fixed_Point_Type (Id : E) return B is
3310 return Ekind (Id) in
3312 end Is_Fixed_Point_Type;
3314 function Is_Floating_Point_Type (Id : E) return B is
3316 return Ekind (Id) in Float_Kind;
3317 end Is_Floating_Point_Type;
3319 function Is_Formal (Id : E) return B is
3321 return Ekind (Id) in Formal_Kind;
3324 function Is_Formal_Object (Id : E) return B is
3326 return Ekind (Id) in Formal_Object_Kind;
3327 end Is_Formal_Object;
3329 function Is_Generic_Subprogram (Id : E) return B is
3331 return Ekind (Id) in Generic_Subprogram_Kind;
3332 end Is_Generic_Subprogram;
3334 function Is_Generic_Unit (Id : E) return B is
3336 return Ekind (Id) in Generic_Unit_Kind;
3337 end Is_Generic_Unit;
3339 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3341 return Ekind (Id) in
3342 Incomplete_Or_Private_Kind;
3343 end Is_Incomplete_Or_Private_Type;
3345 function Is_Incomplete_Type (Id : E) return B is
3347 return Ekind (Id) in
3349 end Is_Incomplete_Type;
3351 function Is_Integer_Type (Id : E) return B is
3353 return Ekind (Id) in Integer_Kind;
3354 end Is_Integer_Type;
3356 function Is_Modular_Integer_Type (Id : E) return B is
3358 return Ekind (Id) in
3359 Modular_Integer_Kind;
3360 end Is_Modular_Integer_Type;
3362 function Is_Named_Number (Id : E) return B is
3364 return Ekind (Id) in Named_Kind;
3365 end Is_Named_Number;
3367 function Is_Numeric_Type (Id : E) return B is
3369 return Ekind (Id) in Numeric_Kind;
3370 end Is_Numeric_Type;
3372 function Is_Object (Id : E) return B is
3374 return Ekind (Id) in Object_Kind;
3377 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3379 return Ekind (Id) in
3380 Ordinary_Fixed_Point_Kind;
3381 end Is_Ordinary_Fixed_Point_Type;
3383 function Is_Overloadable (Id : E) return B is
3385 return Ekind (Id) in Overloadable_Kind;
3386 end Is_Overloadable;
3388 function Is_Private_Type (Id : E) return B is
3390 return Ekind (Id) in Private_Kind;
3391 end Is_Private_Type;
3393 function Is_Protected_Type (Id : E) return B is
3395 return Ekind (Id) in Protected_Kind;
3396 end Is_Protected_Type;
3398 function Is_Real_Type (Id : E) return B is
3400 return Ekind (Id) in Real_Kind;
3403 function Is_Record_Type (Id : E) return B is
3405 return Ekind (Id) in Record_Kind;
3408 function Is_Scalar_Type (Id : E) return B is
3410 return Ekind (Id) in Scalar_Kind;
3413 function Is_Signed_Integer_Type (Id : E) return B is
3415 return Ekind (Id) in Signed_Integer_Kind;
3416 end Is_Signed_Integer_Type;
3418 function Is_Subprogram (Id : E) return B is
3420 return Ekind (Id) in Subprogram_Kind;
3423 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3425 return Ekind (Id) in Subprogram_Kind
3427 Ekind (Id) in Generic_Subprogram_Kind;
3428 end Is_Subprogram_Or_Generic_Subprogram;
3430 function Is_Task_Type (Id : E) return B is
3432 return Ekind (Id) in Task_Kind;
3435 function Is_Type (Id : E) return B is
3437 return Ekind (Id) in Type_Kind;
3440 ------------------------------
3441 -- Attribute Set Procedures --
3442 ------------------------------
3444 -- Note: in many of these set procedures an "obvious" assertion is missing.
3445 -- The reason for this is that in many cases, a field is set before the
3446 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3447 -- it is possible to add assertions that specifically include the E_Void
3448 -- possibility, but in some cases, we just omit the assertions.
3450 procedure Set_Abstract_States (Id : E; V : L) is
3452 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3453 Set_Elist25 (Id, V);
3454 end Set_Abstract_States;
3456 procedure Set_Accept_Address (Id : E; V : L) is
3458 Set_Elist21 (Id, V);
3459 end Set_Accept_Address;
3461 procedure Set_Access_Disp_Table (Id : E; V : L) is
3463 pragma Assert (Ekind (Id) = E_Record_Type
3464 and then Id = Implementation_Base_Type (Id));
3465 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3466 Set_Elist16 (Id, V);
3467 end Set_Access_Disp_Table;
3469 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3472 end Set_Associated_Formal_Package;
3474 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3477 end Set_Associated_Node_For_Itype;
3479 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3481 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3483 end Set_Associated_Storage_Pool;
3485 procedure Set_Actual_Subtype (Id : E; V : E) is
3488 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3489 or else Is_Formal (Id));
3491 end Set_Actual_Subtype;
3493 procedure Set_Address_Taken (Id : E; V : B := True) is
3495 Set_Flag104 (Id, V);
3496 end Set_Address_Taken;
3498 procedure Set_Alias (Id : E; V : E) is
3501 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3505 procedure Set_Alignment (Id : E; V : U) is
3507 pragma Assert (Is_Type (Id)
3508 or else Is_Formal (Id)
3509 or else Ekind_In (Id, E_Loop_Parameter,
3516 procedure Set_Barrier_Function (Id : E; V : N) is
3518 pragma Assert (Is_Entry (Id));
3520 end Set_Barrier_Function;
3522 procedure Set_Block_Node (Id : E; V : N) is
3524 pragma Assert (Ekind (Id) = E_Block);
3528 procedure Set_Body_Entity (Id : E; V : E) is
3530 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3532 end Set_Body_Entity;
3534 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3537 (Ekind (Id) = E_Package
3538 or else Is_Subprogram (Id)
3539 or else Is_Generic_Unit (Id));
3541 end Set_Body_Needed_For_SAL;
3543 procedure Set_Body_References (Id : E; V : L) is
3545 pragma Assert (Ekind (Id) = E_Abstract_State);
3546 Set_Elist16 (Id, V);
3547 end Set_Body_References;
3549 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3551 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3553 end Set_BIP_Initialization_Call;
3555 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3557 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3558 Set_Flag125 (Id, V);
3559 end Set_C_Pass_By_Copy;
3561 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3564 end Set_Can_Never_Be_Null;
3566 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3569 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3570 Set_Flag229 (Id, V);
3571 end Set_Can_Use_Internal_Rep;
3573 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3576 end Set_Checks_May_Be_Suppressed;
3578 procedure Set_Class_Wide_Type (Id : E; V : E) is
3580 pragma Assert (Is_Type (Id));
3582 end Set_Class_Wide_Type;
3584 procedure Set_Cloned_Subtype (Id : E; V : E) is
3586 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3588 end Set_Cloned_Subtype;
3590 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3592 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3594 end Set_Component_Bit_Offset;
3596 procedure Set_Component_Clause (Id : E; V : N) is
3598 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3600 end Set_Component_Clause;
3602 procedure Set_Component_Size (Id : E; V : U) is
3604 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3606 end Set_Component_Size;
3608 procedure Set_Component_Type (Id : E; V : E) is
3610 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3612 end Set_Component_Type;
3614 procedure Set_Contract (Id : E; V : N) is
3617 (Ekind_In (Id, E_Entry,
3625 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3629 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3632 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3634 end Set_Corresponding_Concurrent_Type;
3636 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3638 pragma Assert (Ekind (Id) = E_Discriminant);
3640 end Set_Corresponding_Discriminant;
3642 procedure Set_Corresponding_Equality (Id : E; V : E) is
3645 (Ekind (Id) = E_Function
3646 and then not Comes_From_Source (Id)
3647 and then Chars (Id) = Name_Op_Ne);
3649 end Set_Corresponding_Equality;
3651 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3653 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3655 end Set_Corresponding_Protected_Entry;
3657 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3659 pragma Assert (Is_Concurrent_Type (Id));
3661 end Set_Corresponding_Record_Type;
3663 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3666 end Set_Corresponding_Remote_Type;
3668 procedure Set_Current_Use_Clause (Id : E; V : E) is
3670 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3672 end Set_Current_Use_Clause;
3674 procedure Set_Current_Value (Id : E; V : N) is
3676 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3678 end Set_Current_Value;
3680 procedure Set_CR_Discriminant (Id : E; V : E) is
3683 end Set_CR_Discriminant;
3685 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3687 Set_Flag166 (Id, V);
3688 end Set_Debug_Info_Off;
3690 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3693 end Set_Debug_Renaming_Link;
3695 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3697 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3699 end Set_Default_Aspect_Component_Value;
3701 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3703 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3705 end Set_Default_Aspect_Value;
3707 procedure Set_Default_Expr_Function (Id : E; V : E) is
3709 pragma Assert (Is_Formal (Id));
3711 end Set_Default_Expr_Function;
3713 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3715 Set_Flag108 (Id, V);
3716 end Set_Default_Expressions_Processed;
3718 procedure Set_Default_Value (Id : E; V : N) is
3720 pragma Assert (Is_Formal (Id));
3722 end Set_Default_Value;
3724 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3728 or else Is_Task_Type (Id)
3729 or else Ekind (Id) = E_Block);
3730 Set_Flag114 (Id, V);
3731 end Set_Delay_Cleanups;
3733 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3736 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3739 end Set_Delay_Subprogram_Descriptors;
3741 procedure Set_Delta_Value (Id : E; V : R) is
3743 pragma Assert (Is_Fixed_Point_Type (Id));
3744 Set_Ureal18 (Id, V);
3745 end Set_Delta_Value;
3747 procedure Set_Dependent_Instances (Id : E; V : L) is
3749 pragma Assert (Is_Generic_Instance (Id));
3751 end Set_Dependent_Instances;
3753 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3755 pragma Assert (Nkind (Id) in N_Entity);
3757 end Set_Depends_On_Private;
3759 procedure Set_Derived_Type_Link (Id : E; V : E) is
3761 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3763 end Set_Derived_Type_Link;
3765 procedure Set_Digits_Value (Id : E; V : U) is
3768 (Is_Floating_Point_Type (Id)
3769 or else Is_Decimal_Fixed_Point_Type (Id));
3771 end Set_Digits_Value;
3773 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3776 end Set_Directly_Designated_Type;
3778 procedure Set_Discard_Names (Id : E; V : B := True) is
3781 end Set_Discard_Names;
3783 procedure Set_Discriminal (Id : E; V : E) is
3785 pragma Assert (Ekind (Id) = E_Discriminant);
3787 end Set_Discriminal;
3789 procedure Set_Discriminal_Link (Id : E; V : E) is
3792 end Set_Discriminal_Link;
3794 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3796 pragma Assert (Ekind (Id) = E_Component);
3798 end Set_Discriminant_Checking_Func;
3800 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3802 pragma Assert (Nkind (Id) in N_Entity);
3803 Set_Elist21 (Id, V);
3804 end Set_Discriminant_Constraint;
3806 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3809 end Set_Discriminant_Default_Value;
3811 procedure Set_Discriminant_Number (Id : E; V : U) is
3814 end Set_Discriminant_Number;
3816 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3818 pragma Assert (Ekind (Id) = E_Record_Type
3819 and then Id = Implementation_Base_Type (Id));
3820 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3821 Set_Elist26 (Id, V);
3822 end Set_Dispatch_Table_Wrappers;
3824 procedure Set_DT_Entry_Count (Id : E; V : U) is
3826 pragma Assert (Ekind (Id) = E_Component);
3828 end Set_DT_Entry_Count;
3830 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3832 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3834 end Set_DT_Offset_To_Top_Func;
3836 procedure Set_DT_Position (Id : E; V : U) is
3838 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3840 end Set_DT_Position;
3842 procedure Set_DTC_Entity (Id : E; V : E) is
3844 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3848 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3850 pragma Assert (Ekind (Id) = E_Package);
3851 Set_Flag210 (Id, V);
3852 end Set_Elaborate_Body_Desirable;
3854 procedure Set_Elaboration_Entity (Id : E; V : E) is
3859 Ekind (Id) = E_Package
3861 Is_Generic_Unit (Id));
3863 end Set_Elaboration_Entity;
3865 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3870 Ekind (Id) = E_Package
3872 Is_Generic_Unit (Id));
3873 Set_Flag174 (Id, V);
3874 end Set_Elaboration_Entity_Required;
3876 procedure Set_Encapsulating_State (Id : E; V : E) is
3878 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3880 end Set_Encapsulating_State;
3882 procedure Set_Enclosing_Scope (Id : E; V : E) is
3885 end Set_Enclosing_Scope;
3887 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3889 pragma Assert (Is_Entry (Id));
3890 Set_Flag152 (Id, V);
3891 end Set_Entry_Accepted;
3893 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3896 end Set_Entry_Bodies_Array;
3898 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3901 end Set_Entry_Cancel_Parameter;
3903 procedure Set_Entry_Component (Id : E; V : E) is
3906 end Set_Entry_Component;
3908 procedure Set_Entry_Formal (Id : E; V : E) is
3911 end Set_Entry_Formal;
3913 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3915 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3917 end Set_Entry_Index_Constant;
3919 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3922 end Set_Entry_Parameters_Type;
3924 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3926 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3928 end Set_Enum_Pos_To_Rep;
3930 procedure Set_Enumeration_Pos (Id : E; V : U) is
3932 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3934 end Set_Enumeration_Pos;
3936 procedure Set_Enumeration_Rep (Id : E; V : U) is
3938 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3940 end Set_Enumeration_Rep;
3942 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3944 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3946 end Set_Enumeration_Rep_Expr;
3948 procedure Set_Equivalent_Type (Id : E; V : E) is
3951 (Ekind_In (Id, E_Class_Wide_Type,
3952 E_Class_Wide_Subtype,
3953 E_Access_Protected_Subprogram_Type,
3954 E_Anonymous_Access_Protected_Subprogram_Type,
3955 E_Access_Subprogram_Type,
3958 end Set_Equivalent_Type;
3960 procedure Set_Esize (Id : E; V : U) is
3965 procedure Set_Extra_Accessibility (Id : E; V : E) is
3968 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3970 end Set_Extra_Accessibility;
3972 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3974 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3976 end Set_Extra_Accessibility_Of_Result;
3978 procedure Set_Extra_Constrained (Id : E; V : E) is
3980 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3982 end Set_Extra_Constrained;
3984 procedure Set_Extra_Formal (Id : E; V : E) is
3987 end Set_Extra_Formal;
3989 procedure Set_Extra_Formals (Id : E; V : E) is
3992 (Is_Overloadable (Id)
3993 or else Ekind_In (Id, E_Entry_Family,
3995 E_Subprogram_Type));
3997 end Set_Extra_Formals;
3999 procedure Set_Finalization_Master (Id : E; V : E) is
4001 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4003 end Set_Finalization_Master;
4005 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4007 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4008 Set_Flag158 (Id, V);
4009 end Set_Finalize_Storage_Only;
4011 procedure Set_Finalizer (Id : E; V : E) is
4013 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4017 procedure Set_First_Entity (Id : E; V : E) is
4020 end Set_First_Entity;
4022 procedure Set_First_Exit_Statement (Id : E; V : N) is
4024 pragma Assert (Ekind (Id) = E_Loop);
4026 end Set_First_Exit_Statement;
4028 procedure Set_First_Index (Id : E; V : N) is
4030 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4032 end Set_First_Index;
4034 procedure Set_First_Literal (Id : E; V : E) is
4036 pragma Assert (Is_Enumeration_Type (Id));
4038 end Set_First_Literal;
4040 procedure Set_First_Private_Entity (Id : E; V : E) is
4042 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4043 or else Ekind (Id) in Concurrent_Kind);
4045 end Set_First_Private_Entity;
4047 procedure Set_First_Rep_Item (Id : E; V : N) is
4050 end Set_First_Rep_Item;
4052 procedure Set_Float_Rep (Id : E; V : F) is
4053 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4055 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4058 procedure Set_Freeze_Node (Id : E; V : N) is
4061 end Set_Freeze_Node;
4063 procedure Set_From_Limited_With (Id : E; V : B := True) is
4066 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4067 Set_Flag159 (Id, V);
4068 end Set_From_Limited_With;
4070 procedure Set_Full_View (Id : E; V : E) is
4072 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4076 procedure Set_Generic_Homonym (Id : E; V : E) is
4079 end Set_Generic_Homonym;
4081 procedure Set_Generic_Renamings (Id : E; V : L) is
4083 Set_Elist23 (Id, V);
4084 end Set_Generic_Renamings;
4086 procedure Set_Handler_Records (Id : E; V : S) is
4089 end Set_Handler_Records;
4091 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4093 pragma Assert (Id = Base_Type (Id));
4094 Set_Flag135 (Id, V);
4095 end Set_Has_Aliased_Components;
4097 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4100 end Set_Has_Alignment_Clause;
4102 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4105 end Set_Has_All_Calls_Remote;
4107 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4110 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4111 Set_Flag253 (Id, V);
4112 end Set_Has_Anonymous_Master;
4114 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4116 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4118 end Set_Has_Atomic_Components;
4120 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4123 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4124 Set_Flag139 (Id, V);
4125 end Set_Has_Biased_Representation;
4127 procedure Set_Has_Completion (Id : E; V : B := True) is
4130 end Set_Has_Completion;
4132 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4134 pragma Assert (Is_Type (Id));
4136 end Set_Has_Completion_In_Body;
4138 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4140 pragma Assert (Ekind (Id) = E_Record_Type);
4141 Set_Flag140 (Id, V);
4142 end Set_Has_Complex_Representation;
4144 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4146 pragma Assert (Ekind (Id) = E_Array_Type);
4148 end Set_Has_Component_Size_Clause;
4150 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4152 pragma Assert (Is_Type (Id));
4153 Set_Flag187 (Id, V);
4154 end Set_Has_Constrained_Partial_View;
4156 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4158 Set_Flag181 (Id, V);
4159 end Set_Has_Contiguous_Rep;
4161 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4163 pragma Assert (Id = Base_Type (Id));
4165 end Set_Has_Controlled_Component;
4167 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4170 end Set_Has_Controlling_Result;
4172 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4174 Set_Flag119 (Id, V);
4175 end Set_Has_Convention_Pragma;
4177 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4180 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4181 and then Is_Base_Type (Id));
4183 end Set_Has_Default_Aspect;
4185 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4187 pragma Assert (Is_Type (Id));
4189 end Set_Has_Default_Init_Cond;
4191 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4193 pragma Assert (Nkind (Id) in N_Entity);
4194 Set_Flag200 (Id, V);
4195 end Set_Has_Delayed_Aspects;
4197 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4199 pragma Assert (Nkind (Id) in N_Entity);
4201 end Set_Has_Delayed_Freeze;
4203 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4205 pragma Assert (Nkind (Id) in N_Entity);
4206 Set_Flag261 (Id, V);
4207 end Set_Has_Delayed_Rep_Aspects;
4209 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4211 pragma Assert (Nkind (Id) in N_Entity);
4213 end Set_Has_Discriminants;
4215 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4217 pragma Assert (Ekind (Id) = E_Record_Type
4218 and then Is_Tagged_Type (Id));
4219 Set_Flag220 (Id, V);
4220 end Set_Has_Dispatch_Table;
4222 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4224 pragma Assert (Is_Type (Id));
4225 Set_Flag258 (Id, V);
4226 end Set_Has_Dynamic_Predicate_Aspect;
4228 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4230 pragma Assert (Is_Enumeration_Type (Id));
4232 end Set_Has_Enumeration_Rep_Clause;
4234 procedure Set_Has_Exit (Id : E; V : B := True) is
4239 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4241 Set_Flag175 (Id, V);
4242 end Set_Has_Forward_Instantiation;
4244 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4246 Set_Flag173 (Id, V);
4247 end Set_Has_Fully_Qualified_Name;
4249 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4252 end Set_Has_Gigi_Rep_Item;
4254 procedure Set_Has_Homonym (Id : E; V : B := True) is
4257 end Set_Has_Homonym;
4259 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4261 Set_Flag251 (Id, V);
4262 end Set_Has_Implicit_Dereference;
4264 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4266 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4267 and then Is_Base_Type (Id));
4269 end Set_Has_Independent_Components;
4271 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4273 pragma Assert (Is_Type (Id));
4274 Set_Flag248 (Id, V);
4275 end Set_Has_Inheritable_Invariants;
4277 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4279 pragma Assert (Is_Type (Id));
4280 Set_Flag133 (Id, V);
4281 end Set_Has_Inherited_Default_Init_Cond;
4283 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4285 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4286 Set_Flag219 (Id, V);
4287 end Set_Has_Initial_Value;
4289 procedure Set_Has_Invariants (Id : E; V : B := True) is
4291 pragma Assert (Is_Type (Id));
4292 Set_Flag232 (Id, V);
4293 end Set_Has_Invariants;
4295 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4297 pragma Assert (Ekind (Id) = E_Loop);
4298 Set_Flag260 (Id, V);
4299 end Set_Has_Loop_Entry_Attributes;
4301 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4303 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4305 end Set_Has_Machine_Radix_Clause;
4307 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4310 end Set_Has_Master_Entity;
4312 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4314 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4315 Set_Flag142 (Id, V);
4316 end Set_Has_Missing_Return;
4318 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4320 Set_Flag101 (Id, V);
4321 end Set_Has_Nested_Block_With_Handler;
4323 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4325 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4326 Set_Flag215 (Id, V);
4327 end Set_Has_Up_Level_Access;
4329 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4331 pragma Assert (Id = Base_Type (Id));
4333 end Set_Has_Non_Standard_Rep;
4335 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4337 pragma Assert (Is_Type (Id));
4338 Set_Flag172 (Id, V);
4339 end Set_Has_Object_Size_Clause;
4341 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4343 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4344 Set_Flag110 (Id, V);
4345 end Set_Has_Out_Or_In_Out_Parameter;
4347 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4349 Set_Flag154 (Id, V);
4350 end Set_Has_Per_Object_Constraint;
4352 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4354 pragma Assert (Is_Subprogram (Id));
4355 Set_Flag240 (Id, V);
4356 end Set_Has_Postconditions;
4358 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4360 pragma Assert (Is_Access_Type (Id));
4361 Set_Flag27 (Base_Type (Id), V);
4362 end Set_Has_Pragma_Controlled;
4364 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4366 Set_Flag150 (Id, V);
4367 end Set_Has_Pragma_Elaborate_Body;
4369 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4371 Set_Flag157 (Id, V);
4372 end Set_Has_Pragma_Inline;
4374 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4376 Set_Flag230 (Id, V);
4377 end Set_Has_Pragma_Inline_Always;
4379 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4381 Set_Flag201 (Id, V);
4382 end Set_Has_Pragma_No_Inline;
4384 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4386 pragma Assert (Is_Enumeration_Type (Id));
4387 pragma Assert (Id = Base_Type (Id));
4388 Set_Flag198 (Id, V);
4389 end Set_Has_Pragma_Ordered;
4391 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4393 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4394 pragma Assert (Id = Base_Type (Id));
4395 Set_Flag121 (Id, V);
4396 end Set_Has_Pragma_Pack;
4398 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4400 Set_Flag221 (Id, V);
4401 end Set_Has_Pragma_Preelab_Init;
4403 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4405 Set_Flag203 (Id, V);
4406 end Set_Has_Pragma_Pure;
4408 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4410 Set_Flag179 (Id, V);
4411 end Set_Has_Pragma_Pure_Function;
4413 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4415 Set_Flag169 (Id, V);
4416 end Set_Has_Pragma_Thread_Local_Storage;
4418 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4420 Set_Flag233 (Id, V);
4421 end Set_Has_Pragma_Unmodified;
4423 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4425 Set_Flag180 (Id, V);
4426 end Set_Has_Pragma_Unreferenced;
4428 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4430 pragma Assert (Is_Type (Id));
4431 Set_Flag212 (Id, V);
4432 end Set_Has_Pragma_Unreferenced_Objects;
4434 procedure Set_Has_Predicates (Id : E; V : B := True) is
4436 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4437 Set_Flag250 (Id, V);
4438 end Set_Has_Predicates;
4440 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4442 pragma Assert (Id = Base_Type (Id));
4443 Set_Flag120 (Id, V);
4444 end Set_Has_Primitive_Operations;
4446 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4448 pragma Assert (Is_Type (Id));
4449 Set_Flag151 (Id, V);
4450 end Set_Has_Private_Ancestor;
4452 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4454 Set_Flag155 (Id, V);
4455 end Set_Has_Private_Declaration;
4457 procedure Set_Has_Protected (Id : E; V : B := True) is
4459 Set_Flag271 (Id, V);
4460 end Set_Has_Protected;
4462 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4464 Set_Flag161 (Id, V);
4465 end Set_Has_Qualified_Name;
4467 procedure Set_Has_RACW (Id : E; V : B := True) is
4469 pragma Assert (Ekind (Id) = E_Package);
4470 Set_Flag214 (Id, V);
4473 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4475 pragma Assert (Id = Base_Type (Id));
4477 end Set_Has_Record_Rep_Clause;
4479 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4481 pragma Assert (Is_Subprogram (Id));
4482 Set_Flag143 (Id, V);
4483 end Set_Has_Recursive_Call;
4485 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4487 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4488 Set_Flag267 (Id, V);
4489 end Set_Has_Shift_Operator;
4491 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4494 end Set_Has_Size_Clause;
4496 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4499 end Set_Has_Small_Clause;
4501 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4503 pragma Assert (Id = Base_Type (Id));
4504 Set_Flag100 (Id, V);
4505 end Set_Has_Specified_Layout;
4507 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4509 pragma Assert (Is_Type (Id));
4510 Set_Flag190 (Id, V);
4511 end Set_Has_Specified_Stream_Input;
4513 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4515 pragma Assert (Is_Type (Id));
4516 Set_Flag191 (Id, V);
4517 end Set_Has_Specified_Stream_Output;
4519 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4521 pragma Assert (Is_Type (Id));
4522 Set_Flag192 (Id, V);
4523 end Set_Has_Specified_Stream_Read;
4525 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4527 pragma Assert (Is_Type (Id));
4528 Set_Flag193 (Id, V);
4529 end Set_Has_Specified_Stream_Write;
4531 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4533 Set_Flag211 (Id, V);
4534 end Set_Has_Static_Discriminants;
4536 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4538 pragma Assert (Is_Type (Id));
4539 Set_Flag269 (Id, V);
4540 end Set_Has_Static_Predicate;
4542 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4544 pragma Assert (Is_Type (Id));
4545 Set_Flag259 (Id, V);
4546 end Set_Has_Static_Predicate_Aspect;
4548 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4550 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4551 pragma Assert (Id = Base_Type (Id));
4553 end Set_Has_Storage_Size_Clause;
4555 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4557 pragma Assert (Is_Elementary_Type (Id));
4558 Set_Flag184 (Id, V);
4559 end Set_Has_Stream_Size_Clause;
4561 procedure Set_Has_Task (Id : E; V : B := True) is
4563 pragma Assert (Id = Base_Type (Id));
4567 procedure Set_Has_Thunks (Id : E; V : B := True) is
4569 pragma Assert (Is_Tag (Id));
4570 Set_Flag228 (Id, V);
4573 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4575 pragma Assert (Id = Base_Type (Id));
4576 Set_Flag123 (Id, V);
4577 end Set_Has_Unchecked_Union;
4579 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4581 pragma Assert (Is_Type (Id));
4583 end Set_Has_Unknown_Discriminants;
4585 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4587 pragma Assert (Ekind (Id) = E_Abstract_State);
4588 Set_Flag263 (Id, V);
4589 end Set_Has_Visible_Refinement;
4591 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4593 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4595 end Set_Has_Volatile_Components;
4597 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4599 Set_Flag182 (Id, V);
4600 end Set_Has_Xref_Entry;
4602 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4604 pragma Assert (Ekind (Id) = E_Variable);
4606 end Set_Hiding_Loop_Variable;
4608 procedure Set_Homonym (Id : E; V : E) is
4610 pragma Assert (Id /= V);
4614 procedure Set_Import_Pragma (Id : E; V : E) is
4616 pragma Assert (Is_Subprogram (Id));
4618 end Set_Import_Pragma;
4620 procedure Set_Interface_Alias (Id : E; V : E) is
4624 and then Is_Hidden (Id)
4625 and then (Ekind_In (Id, E_Procedure, E_Function)));
4627 end Set_Interface_Alias;
4629 procedure Set_Interfaces (Id : E; V : L) is
4631 pragma Assert (Is_Record_Type (Id));
4632 Set_Elist25 (Id, V);
4635 procedure Set_In_Package_Body (Id : E; V : B := True) is
4638 end Set_In_Package_Body;
4640 procedure Set_In_Private_Part (Id : E; V : B := True) is
4643 end Set_In_Private_Part;
4645 procedure Set_In_Use (Id : E; V : B := True) is
4647 pragma Assert (Nkind (Id) in N_Entity);
4651 procedure Set_Initialization_Statements (Id : E; V : N) is
4653 -- Tolerate an E_Void entity since this can be called while resolving
4654 -- an aggregate used as the initialization expression for an object
4655 -- declaration, and this occurs before the Ekind for the object is set.
4657 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4659 end Set_Initialization_Statements;
4661 procedure Set_Inner_Instances (Id : E; V : L) is
4663 Set_Elist23 (Id, V);
4664 end Set_Inner_Instances;
4666 procedure Set_Interface_Name (Id : E; V : N) is
4669 end Set_Interface_Name;
4671 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4673 pragma Assert (Is_Overloadable (Id));
4675 end Set_Is_Abstract_Subprogram;
4677 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4679 pragma Assert (Is_Type (Id));
4680 Set_Flag146 (Id, V);
4681 end Set_Is_Abstract_Type;
4683 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4685 pragma Assert (Is_Access_Type (Id));
4686 Set_Flag194 (Id, V);
4687 end Set_Is_Local_Anonymous_Access;
4689 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4691 pragma Assert (Is_Access_Type (Id));
4693 end Set_Is_Access_Constant;
4695 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4697 Set_Flag185 (Id, V);
4698 end Set_Is_Ada_2005_Only;
4700 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4702 Set_Flag199 (Id, V);
4703 end Set_Is_Ada_2012_Only;
4705 procedure Set_Is_Aliased (Id : E; V : B := True) is
4707 pragma Assert (Nkind (Id) in N_Entity);
4711 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4714 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4716 end Set_Is_Asynchronous;
4718 procedure Set_Is_Atomic (Id : E; V : B := True) is
4723 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4725 pragma Assert ((not V)
4726 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4727 Set_Flag122 (Id, V);
4728 end Set_Is_Bit_Packed_Array;
4730 procedure Set_Is_Called (Id : E; V : B := True) is
4732 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4733 Set_Flag102 (Id, V);
4736 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4739 end Set_Is_Character_Type;
4741 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4743 pragma Assert (Is_Formal (Id)
4744 or else Is_Object (Id)
4745 or else Is_Package_Or_Generic_Package (Id)
4746 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4747 or else Is_Type (Id)
4748 or else Ekind (Id) = E_Abstract_State
4749 or else Ekind (Id) = E_Component
4750 or else Ekind (Id) = E_Discriminant
4751 or else Ekind (Id) = E_Exception
4752 or else Ekind (Id) = E_Package_Body
4753 or else Ekind (Id) = E_Subprogram_Body);
4754 Set_Flag277 (Id, V);
4755 end Set_Is_Checked_Ghost_Entity;
4757 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4760 end Set_Is_Child_Unit;
4762 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4765 end Set_Is_Class_Wide_Equivalent_Type;
4767 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4769 Set_Flag149 (Id, V);
4770 end Set_Is_Compilation_Unit;
4772 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4774 pragma Assert (Ekind (Id) = E_Discriminant);
4775 Set_Flag103 (Id, V);
4776 end Set_Is_Completely_Hidden;
4778 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4781 end Set_Is_Concurrent_Record_Type;
4783 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4786 end Set_Is_Constr_Subt_For_U_Nominal;
4788 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4790 Set_Flag141 (Id, V);
4791 end Set_Is_Constr_Subt_For_UN_Aliased;
4793 procedure Set_Is_Constrained (Id : E; V : B := True) is
4795 pragma Assert (Nkind (Id) in N_Entity);
4797 end Set_Is_Constrained;
4799 procedure Set_Is_Constructor (Id : E; V : B := True) is
4802 end Set_Is_Constructor;
4804 procedure Set_Is_Controlled (Id : E; V : B := True) is
4806 pragma Assert (Id = Base_Type (Id));
4808 end Set_Is_Controlled;
4810 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4812 pragma Assert (Is_Formal (Id));
4814 end Set_Is_Controlling_Formal;
4816 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4819 end Set_Is_CPP_Class;
4821 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4823 pragma Assert (Ekind (Id) = E_Procedure);
4824 Set_Flag132 (Id, V);
4825 end Set_Is_Default_Init_Cond_Procedure;
4827 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4829 pragma Assert (Is_Type (Id));
4830 Set_Flag223 (Id, V);
4831 end Set_Is_Descendent_Of_Address;
4833 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4835 Set_Flag176 (Id, V);
4836 end Set_Is_Discrim_SO_Function;
4838 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4840 Set_Flag264 (Id, V);
4841 end Set_Is_Discriminant_Check_Function;
4843 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4845 Set_Flag234 (Id, V);
4846 end Set_Is_Dispatch_Table_Entity;
4848 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4853 Is_Overloadable (Id)
4855 Ekind (Id) = E_Subprogram_Type);
4858 end Set_Is_Dispatching_Operation;
4860 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4862 Set_Flag124 (Id, V);
4863 end Set_Is_Eliminated;
4865 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4868 end Set_Is_Entry_Formal;
4870 procedure Set_Is_Exported (Id : E; V : B := True) is
4873 end Set_Is_Exported;
4875 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4878 end Set_Is_First_Subtype;
4880 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4882 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4883 Set_Flag118 (Id, V);
4884 end Set_Is_For_Access_Subtype;
4886 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4888 Set_Flag111 (Id, V);
4889 end Set_Is_Formal_Subprogram;
4891 procedure Set_Is_Frozen (Id : E; V : B := True) is
4893 pragma Assert (Nkind (Id) in N_Entity);
4897 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4899 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4900 Set_Flag274 (Id, V);
4901 end Set_Is_Generic_Actual_Subprogram;
4903 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4905 pragma Assert (Is_Type (Id));
4907 end Set_Is_Generic_Actual_Type;
4909 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4911 Set_Flag130 (Id, V);
4912 end Set_Is_Generic_Instance;
4914 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4916 pragma Assert (Nkind (Id) in N_Entity);
4918 end Set_Is_Generic_Type;
4920 procedure Set_Is_Hidden (Id : E; V : B := True) is
4925 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
4927 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4929 end Set_Is_Hidden_Non_Overridden_Subpgm;
4931 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4933 Set_Flag171 (Id, V);
4934 end Set_Is_Hidden_Open_Scope;
4936 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
4938 pragma Assert (Is_Formal (Id)
4939 or else Is_Object (Id)
4940 or else Is_Package_Or_Generic_Package (Id)
4941 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4942 or else Is_Type (Id)
4943 or else Ekind (Id) = E_Abstract_State
4944 or else Ekind (Id) = E_Component
4945 or else Ekind (Id) = E_Discriminant
4946 or else Ekind (Id) = E_Exception
4947 or else Ekind (Id) = E_Package_Body
4948 or else Ekind (Id) = E_Subprogram_Body);
4949 Set_Flag278 (Id, V);
4950 end Set_Is_Ignored_Ghost_Entity;
4952 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4954 pragma Assert (Nkind (Id) in N_Entity);
4956 end Set_Is_Immediately_Visible;
4958 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4960 Set_Flag254 (Id, V);
4961 end Set_Is_Implementation_Defined;
4963 procedure Set_Is_Imported (Id : E; V : B := True) is
4966 end Set_Is_Imported;
4968 procedure Set_Is_Independent (Id : E; V : B := True) is
4970 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4971 Set_Flag268 (Id, V);
4972 end Set_Is_Independent;
4974 procedure Set_Is_Inlined (Id : E; V : B := True) is
4979 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4981 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4983 end Set_Is_Inlined_Always;
4985 procedure Set_Is_Interface (Id : E; V : B := True) is
4987 pragma Assert (Is_Record_Type (Id));
4988 Set_Flag186 (Id, V);
4989 end Set_Is_Interface;
4991 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4993 Set_Flag126 (Id, V);
4994 end Set_Is_Instantiated;
4996 procedure Set_Is_Internal (Id : E; V : B := True) is
4998 pragma Assert (Nkind (Id) in N_Entity);
5000 end Set_Is_Internal;
5002 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5004 pragma Assert (Nkind (Id) in N_Entity);
5006 end Set_Is_Interrupt_Handler;
5008 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5011 end Set_Is_Intrinsic_Subprogram;
5013 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5015 pragma Assert (Ekind (Id) = E_Procedure);
5016 Set_Flag257 (Id, V);
5017 end Set_Is_Invariant_Procedure;
5019 procedure Set_Is_Itype (Id : E; V : B := True) is
5024 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5027 end Set_Is_Known_Non_Null;
5029 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5031 Set_Flag204 (Id, V);
5032 end Set_Is_Known_Null;
5034 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5036 Set_Flag170 (Id, V);
5037 end Set_Is_Known_Valid;
5039 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5041 pragma Assert (Is_Type (Id));
5042 Set_Flag106 (Id, V);
5043 end Set_Is_Limited_Composite;
5045 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5047 pragma Assert (Is_Interface (Id));
5048 Set_Flag197 (Id, V);
5049 end Set_Is_Limited_Interface;
5051 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5054 end Set_Is_Limited_Record;
5056 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5058 pragma Assert (Is_Subprogram (Id));
5059 Set_Flag137 (Id, V);
5060 end Set_Is_Machine_Code_Subprogram;
5062 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5064 pragma Assert (Is_Type (Id));
5065 Set_Flag109 (Id, V);
5066 end Set_Is_Non_Static_Subtype;
5068 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5070 pragma Assert (Ekind (Id) = E_Procedure);
5071 Set_Flag178 (Id, V);
5072 end Set_Is_Null_Init_Proc;
5074 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5076 Set_Flag153 (Id, V);
5077 end Set_Is_Obsolescent;
5079 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5081 pragma Assert (Ekind (Id) = E_Out_Parameter);
5082 Set_Flag226 (Id, V);
5083 end Set_Is_Only_Out_Parameter;
5085 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5087 Set_Flag160 (Id, V);
5088 end Set_Is_Package_Body_Entity;
5090 procedure Set_Is_Packed (Id : E; V : B := True) is
5092 pragma Assert (Id = Base_Type (Id));
5096 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5098 Set_Flag138 (Id, V);
5099 end Set_Is_Packed_Array_Impl_Type;
5101 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5103 pragma Assert (Nkind (Id) in N_Entity);
5105 end Set_Is_Potentially_Use_Visible;
5107 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5109 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5110 Set_Flag255 (Id, V);
5111 end Set_Is_Predicate_Function;
5113 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5115 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5116 Set_Flag256 (Id, V);
5117 end Set_Is_Predicate_Function_M;
5119 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5122 end Set_Is_Preelaborated;
5124 procedure Set_Is_Primitive (Id : E; V : B := True) is
5127 (Is_Overloadable (Id)
5128 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5129 Set_Flag218 (Id, V);
5130 end Set_Is_Primitive;
5132 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5134 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5135 Set_Flag195 (Id, V);
5136 end Set_Is_Primitive_Wrapper;
5138 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5140 pragma Assert (Is_Type (Id));
5141 Set_Flag107 (Id, V);
5142 end Set_Is_Private_Composite;
5144 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5147 end Set_Is_Private_Descendant;
5149 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5151 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5152 Set_Flag245 (Id, V);
5153 end Set_Is_Private_Primitive;
5155 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5157 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5158 Set_Flag252 (Id, V);
5159 end Set_Is_Processed_Transient;
5161 procedure Set_Is_Public (Id : E; V : B := True) is
5163 pragma Assert (Nkind (Id) in N_Entity);
5167 procedure Set_Is_Pure (Id : E; V : B := True) is
5172 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5174 pragma Assert (Is_Access_Type (Id));
5175 Set_Flag189 (Id, V);
5176 end Set_Is_Pure_Unit_Access_Type;
5178 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5180 pragma Assert (Is_Type (Id));
5181 Set_Flag244 (Id, V);
5182 end Set_Is_RACW_Stub_Type;
5184 procedure Set_Is_Raised (Id : E; V : B := True) is
5186 pragma Assert (Ekind (Id) = E_Exception);
5187 Set_Flag224 (Id, V);
5190 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5193 end Set_Is_Remote_Call_Interface;
5195 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5198 end Set_Is_Remote_Types;
5200 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5202 Set_Flag112 (Id, V);
5203 end Set_Is_Renaming_Of_Object;
5205 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5207 Set_Flag209 (Id, V);
5208 end Set_Is_Return_Object;
5210 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5212 pragma Assert (Ekind (Id) = E_Variable);
5213 Set_Flag249 (Id, V);
5214 end Set_Is_Safe_To_Reevaluate;
5216 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5219 end Set_Is_Shared_Passive;
5221 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5225 or else Ekind_In (Id, E_Exception,
5230 end Set_Is_Statically_Allocated;
5232 procedure Set_Is_Tag (Id : E; V : B := True) is
5234 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5238 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5241 end Set_Is_Tagged_Type;
5243 procedure Set_Is_Thunk (Id : E; V : B := True) is
5245 pragma Assert (Is_Subprogram (Id));
5246 Set_Flag225 (Id, V);
5249 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5251 Set_Flag235 (Id, V);
5252 end Set_Is_Trivial_Subprogram;
5254 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5256 Set_Flag163 (Id, V);
5257 end Set_Is_True_Constant;
5259 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5261 pragma Assert (Id = Base_Type (Id));
5262 Set_Flag117 (Id, V);
5263 end Set_Is_Unchecked_Union;
5265 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5267 pragma Assert (Ekind (Id) = E_Record_Type);
5268 Set_Flag246 (Id, V);
5269 end Set_Is_Underlying_Record_View;
5271 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5273 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5274 Set_Flag144 (Id, V);
5275 end Set_Is_Unsigned_Type;
5277 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5279 pragma Assert (Ekind (Id) = E_Procedure);
5280 Set_Flag127 (Id, V);
5281 end Set_Is_Valued_Procedure;
5283 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5285 Set_Flag206 (Id, V);
5286 end Set_Is_Visible_Formal;
5288 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5290 Set_Flag116 (Id, V);
5291 end Set_Is_Visible_Lib_Unit;
5293 procedure Set_Is_Volatile (Id : E; V : B := True) is
5295 pragma Assert (Nkind (Id) in N_Entity);
5297 end Set_Is_Volatile;
5299 procedure Set_Itype_Printed (Id : E; V : B := True) is
5301 pragma Assert (Is_Itype (Id));
5302 Set_Flag202 (Id, V);
5303 end Set_Itype_Printed;
5305 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5308 end Set_Kill_Elaboration_Checks;
5310 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5313 end Set_Kill_Range_Checks;
5315 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5317 pragma Assert (Is_Type (Id));
5318 Set_Flag207 (Id, V);
5319 end Set_Known_To_Have_Preelab_Init;
5321 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5323 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5325 end Set_Last_Aggregate_Assignment;
5327 procedure Set_Last_Assignment (Id : E; V : N) is
5329 pragma Assert (Is_Assignable (Id));
5331 end Set_Last_Assignment;
5333 procedure Set_Last_Entity (Id : E; V : E) is
5336 end Set_Last_Entity;
5338 procedure Set_Limited_View (Id : E; V : E) is
5340 pragma Assert (Ekind (Id) = E_Package);
5342 end Set_Limited_View;
5344 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5346 pragma Assert (Is_Type (Id)
5347 or else Ekind_In (Id, E_Constant, E_Variable)
5348 or else Is_Subprogram (Id));
5350 end Set_Linker_Section_Pragma;
5352 procedure Set_Lit_Indexes (Id : E; V : E) is
5354 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5356 end Set_Lit_Indexes;
5358 procedure Set_Lit_Strings (Id : E; V : E) is
5360 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5362 end Set_Lit_Strings;
5364 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5366 pragma Assert (Is_Formal (Id));
5367 Set_Flag205 (Id, V);
5368 end Set_Low_Bound_Tested;
5370 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5372 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5374 end Set_Machine_Radix_10;
5376 procedure Set_Master_Id (Id : E; V : E) is
5378 pragma Assert (Is_Access_Type (Id));
5382 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5384 Set_Flag168 (Id, V);
5385 end Set_Materialize_Entity;
5387 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5389 Set_Flag262 (Id, V);
5390 end Set_May_Inherit_Delayed_Rep_Aspects;
5392 procedure Set_Mechanism (Id : E; V : M) is
5394 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5395 Set_Uint8 (Id, UI_From_Int (V));
5398 procedure Set_Modulus (Id : E; V : U) is
5400 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5404 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5406 pragma Assert (Is_Type (Id));
5407 Set_Flag183 (Id, V);
5408 end Set_Must_Be_On_Byte_Boundary;
5410 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5412 pragma Assert (Is_Type (Id));
5413 Set_Flag208 (Id, V);
5414 end Set_Must_Have_Preelab_Init;
5416 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5418 Set_Flag147 (Id, V);
5419 end Set_Needs_Debug_Info;
5421 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5424 (Is_Overloadable (Id)
5425 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5427 end Set_Needs_No_Actuals;
5429 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5431 Set_Flag115 (Id, V);
5432 end Set_Never_Set_In_Source;
5434 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5437 end Set_Next_Inlined_Subprogram;
5439 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5441 pragma Assert (Is_Discrete_Type (Id));
5442 Set_Flag276 (Id, V);
5443 end Set_No_Dynamic_Predicate_On_Actual;
5445 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5447 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5448 Set_Flag131 (Id, V);
5449 end Set_No_Pool_Assigned;
5451 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5453 pragma Assert (Is_Discrete_Type (Id));
5454 Set_Flag275 (Id, V);
5455 end Set_No_Predicate_On_Actual;
5457 procedure Set_No_Return (Id : E; V : B := True) is
5460 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5461 Set_Flag113 (Id, V);
5464 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5466 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5467 Set_Flag136 (Id, V);
5468 end Set_No_Strict_Aliasing;
5470 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5472 pragma Assert (Is_Tagged_Type (Id));
5474 end Set_No_Tagged_Streams_Pragma;
5476 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5478 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5480 end Set_Non_Binary_Modulus;
5482 procedure Set_Non_Limited_View (Id : E; V : E) is
5485 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5487 end Set_Non_Limited_View;
5489 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5492 (Root_Type (Id) = Standard_Boolean
5493 and then Ekind (Id) = E_Enumeration_Type);
5494 Set_Flag162 (Id, V);
5495 end Set_Nonzero_Is_True;
5497 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5499 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5501 end Set_Normalized_First_Bit;
5503 procedure Set_Normalized_Position (Id : E; V : U) is
5505 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5507 end Set_Normalized_Position;
5509 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5511 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5513 end Set_Normalized_Position_Max;
5515 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5517 pragma Assert (Ekind (Id) = E_Variable);
5518 Set_Flag247 (Id, V);
5519 end Set_OK_To_Rename;
5521 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5524 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5525 Set_Flag239 (Id, V);
5526 end Set_OK_To_Reorder_Components;
5528 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5531 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5532 Set_Flag241 (Id, V);
5533 end Set_Optimize_Alignment_Space;
5535 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5538 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5539 Set_Flag242 (Id, V);
5540 end Set_Optimize_Alignment_Time;
5542 procedure Set_Original_Access_Type (Id : E; V : E) is
5544 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5546 end Set_Original_Access_Type;
5548 procedure Set_Original_Array_Type (Id : E; V : E) is
5550 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5552 end Set_Original_Array_Type;
5554 procedure Set_Original_Record_Component (Id : E; V : E) is
5556 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5558 end Set_Original_Record_Component;
5560 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5562 Set_Flag243 (Id, V);
5563 end Set_Overlays_Constant;
5565 procedure Set_Overridden_Operation (Id : E; V : E) is
5568 end Set_Overridden_Operation;
5570 procedure Set_Package_Instantiation (Id : E; V : N) is
5572 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5574 end Set_Package_Instantiation;
5576 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5578 pragma Assert (Is_Array_Type (Id));
5580 end Set_Packed_Array_Impl_Type;
5582 procedure Set_Parent_Subtype (Id : E; V : E) is
5584 pragma Assert (Ekind (Id) = E_Record_Type);
5586 end Set_Parent_Subtype;
5588 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5590 pragma Assert (Ekind (Id) = E_Abstract_State);
5592 end Set_Part_Of_Constituents;
5594 procedure Set_Postcondition_Proc (Id : E; V : E) is
5596 pragma Assert (Ekind (Id) = E_Procedure);
5598 end Set_Postcondition_Proc;
5600 procedure Set_PPC_Wrapper (Id : E; V : E) is
5602 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5604 end Set_PPC_Wrapper;
5606 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5608 pragma Assert (Is_Tagged_Type (Id));
5609 Set_Elist10 (Id, V);
5610 end Set_Direct_Primitive_Operations;
5612 procedure Set_Prival (Id : E; V : E) is
5614 pragma Assert (Is_Protected_Component (Id));
5618 procedure Set_Prival_Link (Id : E; V : E) is
5620 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5622 end Set_Prival_Link;
5624 procedure Set_Private_Dependents (Id : E; V : L) is
5626 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5627 Set_Elist18 (Id, V);
5628 end Set_Private_Dependents;
5630 procedure Set_Private_View (Id : E; V : N) is
5632 pragma Assert (Is_Private_Type (Id));
5634 end Set_Private_View;
5636 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5638 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5640 end Set_Protected_Body_Subprogram;
5642 procedure Set_Protected_Formal (Id : E; V : E) is
5644 pragma Assert (Is_Formal (Id));
5646 end Set_Protected_Formal;
5648 procedure Set_Protection_Object (Id : E; V : E) is
5650 pragma Assert (Ekind_In (Id, E_Entry,
5655 end Set_Protection_Object;
5657 procedure Set_Reachable (Id : E; V : B := True) is
5662 procedure Set_Referenced (Id : E; V : B := True) is
5664 Set_Flag156 (Id, V);
5667 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5670 end Set_Referenced_As_LHS;
5672 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5674 Set_Flag227 (Id, V);
5675 end Set_Referenced_As_Out_Parameter;
5677 procedure Set_Refinement_Constituents (Id : E; V : L) is
5679 pragma Assert (Ekind (Id) = E_Abstract_State);
5681 end Set_Refinement_Constituents;
5683 procedure Set_Register_Exception_Call (Id : E; V : N) is
5685 pragma Assert (Ekind (Id) = E_Exception);
5687 end Set_Register_Exception_Call;
5689 procedure Set_Related_Array_Object (Id : E; V : E) is
5691 pragma Assert (Is_Array_Type (Id));
5693 end Set_Related_Array_Object;
5695 procedure Set_Related_Expression (Id : E; V : N) is
5697 pragma Assert (Ekind (Id) in Type_Kind
5698 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5700 end Set_Related_Expression;
5702 procedure Set_Related_Instance (Id : E; V : E) is
5704 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5706 end Set_Related_Instance;
5708 procedure Set_Related_Type (Id : E; V : E) is
5710 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5712 end Set_Related_Type;
5714 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5716 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5718 end Set_Relative_Deadline_Variable;
5720 procedure Set_Renamed_Entity (Id : E; V : N) is
5723 end Set_Renamed_Entity;
5725 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5727 pragma Assert (Ekind (Id) = E_Package);
5728 Set_Flag231 (Id, V);
5729 end Set_Renamed_In_Spec;
5731 procedure Set_Renamed_Object (Id : E; V : N) is
5734 end Set_Renamed_Object;
5736 procedure Set_Renaming_Map (Id : E; V : U) is
5739 end Set_Renaming_Map;
5741 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5743 pragma Assert (Is_Overloadable (Id));
5744 Set_Flag213 (Id, V);
5745 end Set_Requires_Overriding;
5747 procedure Set_Return_Present (Id : E; V : B := True) is
5750 end Set_Return_Present;
5752 procedure Set_Return_Applies_To (Id : E; V : N) is
5755 end Set_Return_Applies_To;
5757 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5760 end Set_Returns_By_Ref;
5762 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5764 pragma Assert (Ekind (Id) = E_Function);
5765 Set_Flag134 (Id, V);
5766 end Set_Returns_Limited_View;
5768 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5771 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5772 Set_Flag164 (Id, V);
5773 end Set_Reverse_Bit_Order;
5775 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5779 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5781 end Set_Reverse_Storage_Order;
5783 procedure Set_RM_Size (Id : E; V : U) is
5785 pragma Assert (Is_Type (Id));
5789 procedure Set_Scalar_Range (Id : E; V : N) is
5792 end Set_Scalar_Range;
5794 procedure Set_Scale_Value (Id : E; V : U) is
5797 end Set_Scale_Value;
5799 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5801 pragma Assert (not Is_Record_Type (Id));
5803 end Set_Scope_Depth_Value;
5805 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5807 Set_Flag167 (Id, V);
5808 end Set_Sec_Stack_Needed_For_Return;
5810 procedure Set_Shadow_Entities (Id : E; V : S) is
5812 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5814 end Set_Shadow_Entities;
5816 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5818 pragma Assert (Ekind (Id) = E_Variable);
5820 end Set_Shared_Var_Procs_Instance;
5822 procedure Set_Size_Check_Code (Id : E; V : N) is
5824 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5826 end Set_Size_Check_Code;
5828 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5830 Set_Flag177 (Id, V);
5831 end Set_Size_Depends_On_Discriminant;
5833 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5836 end Set_Size_Known_At_Compile_Time;
5838 procedure Set_Small_Value (Id : E; V : R) is
5840 pragma Assert (Is_Fixed_Point_Type (Id));
5841 Set_Ureal21 (Id, V);
5842 end Set_Small_Value;
5844 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5847 (Ekind_In (Id, E_Generic_Package, -- package variants
5852 end Set_SPARK_Aux_Pragma;
5854 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5857 (Ekind_In (Id, E_Generic_Package, -- package variants
5861 Set_Flag266 (Id, V);
5862 end Set_SPARK_Aux_Pragma_Inherited;
5864 procedure Set_SPARK_Pragma (Id : E; V : N) is
5867 (Ekind_In (Id, E_Function, -- subprogram variants
5869 E_Generic_Procedure,
5873 Ekind_In (Id, E_Generic_Package, -- package variants
5878 end Set_SPARK_Pragma;
5880 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5883 (Ekind_In (Id, E_Function, -- subprogram variants
5885 E_Generic_Procedure,
5889 Ekind_In (Id, E_Generic_Package, -- package variants
5893 Set_Flag265 (Id, V);
5894 end Set_SPARK_Pragma_Inherited;
5896 procedure Set_Spec_Entity (Id : E; V : E) is
5898 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5900 end Set_Spec_Entity;
5902 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5906 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5907 Set_Flag273 (Id, V);
5908 end Set_SSO_Set_High_By_Default;
5910 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5914 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5915 Set_Flag272 (Id, V);
5916 end Set_SSO_Set_Low_By_Default;
5918 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5920 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5922 end Set_Static_Discrete_Predicate;
5924 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5926 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5927 and then Has_Predicates (Id));
5929 end Set_Static_Real_Or_String_Predicate;
5931 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5933 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5935 end Set_Status_Flag_Or_Transient_Decl;
5937 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5939 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5940 pragma Assert (Id = Base_Type (Id));
5942 end Set_Storage_Size_Variable;
5944 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5946 pragma Assert (Ekind (Id) = E_Package);
5948 end Set_Static_Elaboration_Desired;
5950 procedure Set_Static_Initialization (Id : E; V : N) is
5953 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5955 end Set_Static_Initialization;
5957 procedure Set_Stored_Constraint (Id : E; V : L) is
5959 pragma Assert (Nkind (Id) in N_Entity);
5960 Set_Elist23 (Id, V);
5961 end Set_Stored_Constraint;
5963 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5965 pragma Assert (Ekind (Id) = E_Constant);
5966 Set_Flag270 (Id, V);
5967 end Set_Stores_Attribute_Old_Prefix;
5969 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5971 pragma Assert (Id = Base_Type (Id));
5972 Set_Flag145 (Id, V);
5973 end Set_Strict_Alignment;
5975 procedure Set_String_Literal_Length (Id : E; V : U) is
5977 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5979 end Set_String_Literal_Length;
5981 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5983 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5985 end Set_String_Literal_Low_Bound;
5987 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5989 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5991 end Set_Subprograms_For_Type;
5993 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5995 Set_Flag148 (Id, V);
5996 end Set_Suppress_Elaboration_Warnings;
5998 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6000 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6001 Set_Flag105 (Id, V);
6002 end Set_Suppress_Initialization;
6004 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6006 Set_Flag165 (Id, V);
6007 end Set_Suppress_Style_Checks;
6009 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6011 Set_Flag217 (Id, V);
6012 end Set_Suppress_Value_Tracking_On_Call;
6014 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6016 pragma Assert (Ekind (Id) in Task_Kind);
6018 end Set_Task_Body_Procedure;
6020 procedure Set_Thunk_Entity (Id : E; V : E) is
6022 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6023 and then Is_Thunk (Id));
6025 end Set_Thunk_Entity;
6027 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6030 end Set_Treat_As_Volatile;
6032 procedure Set_Underlying_Full_View (Id : E; V : E) is
6034 pragma Assert (Ekind (Id) in Private_Kind);
6036 end Set_Underlying_Full_View;
6038 procedure Set_Underlying_Record_View (Id : E; V : E) is
6040 pragma Assert (Ekind (Id) = E_Record_Type);
6042 end Set_Underlying_Record_View;
6044 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6046 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6047 Set_Flag216 (Id, V);
6048 end Set_Universal_Aliasing;
6050 procedure Set_Unset_Reference (Id : E; V : N) is
6053 end Set_Unset_Reference;
6055 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6057 Set_Flag222 (Id, V);
6058 end Set_Used_As_Generic_Actual;
6060 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6062 pragma Assert (Ekind (Id) = E_Protected_Type);
6063 Set_Flag188 (Id, V);
6064 end Set_Uses_Lock_Free;
6066 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6069 end Set_Uses_Sec_Stack;
6071 procedure Set_Warnings_Off (Id : E; V : B := True) is
6074 end Set_Warnings_Off;
6076 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6078 Set_Flag236 (Id, V);
6079 end Set_Warnings_Off_Used;
6081 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6083 Set_Flag237 (Id, V);
6084 end Set_Warnings_Off_Used_Unmodified;
6086 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6088 Set_Flag238 (Id, V);
6089 end Set_Warnings_Off_Used_Unreferenced;
6091 procedure Set_Was_Hidden (Id : E; V : B := True) is
6093 Set_Flag196 (Id, V);
6096 procedure Set_Wrapped_Entity (Id : E; V : E) is
6098 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6099 and then Is_Primitive_Wrapper (Id));
6101 end Set_Wrapped_Entity;
6103 -----------------------------------
6104 -- Field Initialization Routines --
6105 -----------------------------------
6107 procedure Init_Alignment (Id : E) is
6109 Set_Uint14 (Id, Uint_0);
6112 procedure Init_Alignment (Id : E; V : Int) is
6114 Set_Uint14 (Id, UI_From_Int (V));
6117 procedure Init_Component_Bit_Offset (Id : E) is
6119 Set_Uint11 (Id, No_Uint);
6120 end Init_Component_Bit_Offset;
6122 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6124 Set_Uint11 (Id, UI_From_Int (V));
6125 end Init_Component_Bit_Offset;
6127 procedure Init_Component_Size (Id : E) is
6129 Set_Uint22 (Id, Uint_0);
6130 end Init_Component_Size;
6132 procedure Init_Component_Size (Id : E; V : Int) is
6134 Set_Uint22 (Id, UI_From_Int (V));
6135 end Init_Component_Size;
6137 procedure Init_Digits_Value (Id : E) is
6139 Set_Uint17 (Id, Uint_0);
6140 end Init_Digits_Value;
6142 procedure Init_Digits_Value (Id : E; V : Int) is
6144 Set_Uint17 (Id, UI_From_Int (V));
6145 end Init_Digits_Value;
6147 procedure Init_Esize (Id : E) is
6149 Set_Uint12 (Id, Uint_0);
6152 procedure Init_Esize (Id : E; V : Int) is
6154 Set_Uint12 (Id, UI_From_Int (V));
6157 procedure Init_Normalized_First_Bit (Id : E) is
6159 Set_Uint8 (Id, No_Uint);
6160 end Init_Normalized_First_Bit;
6162 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6164 Set_Uint8 (Id, UI_From_Int (V));
6165 end Init_Normalized_First_Bit;
6167 procedure Init_Normalized_Position (Id : E) is
6169 Set_Uint14 (Id, No_Uint);
6170 end Init_Normalized_Position;
6172 procedure Init_Normalized_Position (Id : E; V : Int) is
6174 Set_Uint14 (Id, UI_From_Int (V));
6175 end Init_Normalized_Position;
6177 procedure Init_Normalized_Position_Max (Id : E) is
6179 Set_Uint10 (Id, No_Uint);
6180 end Init_Normalized_Position_Max;
6182 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6184 Set_Uint10 (Id, UI_From_Int (V));
6185 end Init_Normalized_Position_Max;
6187 procedure Init_RM_Size (Id : E) is
6189 Set_Uint13 (Id, Uint_0);
6192 procedure Init_RM_Size (Id : E; V : Int) is
6194 Set_Uint13 (Id, UI_From_Int (V));
6197 -----------------------------
6198 -- Init_Component_Location --
6199 -----------------------------
6201 procedure Init_Component_Location (Id : E) is
6203 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6204 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6205 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6206 Set_Uint12 (Id, Uint_0); -- Esize
6207 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6208 end Init_Component_Location;
6210 ----------------------------
6211 -- Init_Object_Size_Align --
6212 ----------------------------
6214 procedure Init_Object_Size_Align (Id : E) is
6216 Set_Uint12 (Id, Uint_0); -- Esize
6217 Set_Uint14 (Id, Uint_0); -- Alignment
6218 end Init_Object_Size_Align;
6224 procedure Init_Size (Id : E; V : Int) is
6226 pragma Assert (not Is_Object (Id));
6227 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6228 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6231 ---------------------
6232 -- Init_Size_Align --
6233 ---------------------
6235 procedure Init_Size_Align (Id : E) is
6237 pragma Assert (not Is_Object (Id));
6238 Set_Uint12 (Id, Uint_0); -- Esize
6239 Set_Uint13 (Id, Uint_0); -- RM_Size
6240 Set_Uint14 (Id, Uint_0); -- Alignment
6241 end Init_Size_Align;
6243 ----------------------------------------------
6244 -- Type Representation Attribute Predicates --
6245 ----------------------------------------------
6247 function Known_Alignment (E : Entity_Id) return B is
6249 return Uint14 (E) /= Uint_0
6250 and then Uint14 (E) /= No_Uint;
6251 end Known_Alignment;
6253 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6255 return Uint11 (E) /= No_Uint;
6256 end Known_Component_Bit_Offset;
6258 function Known_Component_Size (E : Entity_Id) return B is
6260 return Uint22 (Base_Type (E)) /= Uint_0
6261 and then Uint22 (Base_Type (E)) /= No_Uint;
6262 end Known_Component_Size;
6264 function Known_Esize (E : Entity_Id) return B is
6266 return Uint12 (E) /= Uint_0
6267 and then Uint12 (E) /= No_Uint;
6270 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6272 return Uint8 (E) /= No_Uint;
6273 end Known_Normalized_First_Bit;
6275 function Known_Normalized_Position (E : Entity_Id) return B is
6277 return Uint14 (E) /= No_Uint;
6278 end Known_Normalized_Position;
6280 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6282 return Uint10 (E) /= No_Uint;
6283 end Known_Normalized_Position_Max;
6285 function Known_RM_Size (E : Entity_Id) return B is
6287 return Uint13 (E) /= No_Uint
6288 and then (Uint13 (E) /= Uint_0
6289 or else Is_Discrete_Type (E)
6290 or else Is_Fixed_Point_Type (E));
6293 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6295 return Uint11 (E) /= No_Uint
6296 and then Uint11 (E) >= Uint_0;
6297 end Known_Static_Component_Bit_Offset;
6299 function Known_Static_Component_Size (E : Entity_Id) return B is
6301 return Uint22 (Base_Type (E)) > Uint_0;
6302 end Known_Static_Component_Size;
6304 function Known_Static_Esize (E : Entity_Id) return B is
6306 return Uint12 (E) > Uint_0
6307 and then not Is_Generic_Type (E);
6308 end Known_Static_Esize;
6310 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6312 return Uint8 (E) /= No_Uint
6313 and then Uint8 (E) >= Uint_0;
6314 end Known_Static_Normalized_First_Bit;
6316 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6318 return Uint14 (E) /= No_Uint
6319 and then Uint14 (E) >= Uint_0;
6320 end Known_Static_Normalized_Position;
6322 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6324 return Uint10 (E) /= No_Uint
6325 and then Uint10 (E) >= Uint_0;
6326 end Known_Static_Normalized_Position_Max;
6328 function Known_Static_RM_Size (E : Entity_Id) return B is
6330 return (Uint13 (E) > Uint_0
6331 or else Is_Discrete_Type (E)
6332 or else Is_Fixed_Point_Type (E))
6333 and then not Is_Generic_Type (E);
6334 end Known_Static_RM_Size;
6336 function Unknown_Alignment (E : Entity_Id) return B is
6338 return Uint14 (E) = Uint_0
6339 or else Uint14 (E) = No_Uint;
6340 end Unknown_Alignment;
6342 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6344 return Uint11 (E) = No_Uint;
6345 end Unknown_Component_Bit_Offset;
6347 function Unknown_Component_Size (E : Entity_Id) return B is
6349 return Uint22 (Base_Type (E)) = Uint_0
6351 Uint22 (Base_Type (E)) = No_Uint;
6352 end Unknown_Component_Size;
6354 function Unknown_Esize (E : Entity_Id) return B is
6356 return Uint12 (E) = No_Uint
6358 Uint12 (E) = Uint_0;
6361 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6363 return Uint8 (E) = No_Uint;
6364 end Unknown_Normalized_First_Bit;
6366 function Unknown_Normalized_Position (E : Entity_Id) return B is
6368 return Uint14 (E) = No_Uint;
6369 end Unknown_Normalized_Position;
6371 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6373 return Uint10 (E) = No_Uint;
6374 end Unknown_Normalized_Position_Max;
6376 function Unknown_RM_Size (E : Entity_Id) return B is
6378 return (Uint13 (E) = Uint_0
6379 and then not Is_Discrete_Type (E)
6380 and then not Is_Fixed_Point_Type (E))
6381 or else Uint13 (E) = No_Uint;
6382 end Unknown_RM_Size;
6384 --------------------
6385 -- Address_Clause --
6386 --------------------
6388 function Address_Clause (Id : E) return N is
6390 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6397 function Aft_Value (Id : E) return U is
6399 Delta_Val : Ureal := Delta_Value (Id);
6401 while Delta_Val < Ureal_Tenth loop
6402 Delta_Val := Delta_Val * Ureal_10;
6403 Result := Result + 1;
6406 return UI_From_Int (Result);
6409 ----------------------
6410 -- Alignment_Clause --
6411 ----------------------
6413 function Alignment_Clause (Id : E) return N is
6415 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6416 end Alignment_Clause;
6422 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6424 if Last_Entity (V) = Empty then
6425 Set_First_Entity (Id => V, V => Id);
6427 Set_Next_Entity (Last_Entity (V), Id);
6430 Set_Next_Entity (Id, Empty);
6432 Set_Last_Entity (Id => V, V => Id);
6439 function Base_Type (Id : E) return E is
6441 if Is_Base_Type (Id) then
6444 pragma Assert (Is_Type (Id));
6449 -------------------------
6450 -- Component_Alignment --
6451 -------------------------
6453 -- Component Alignment is encoded using two flags, Flag128/129 as
6454 -- follows. Note that both flags False = Align_Default, so that the
6455 -- default initialization of flags to False initializes component
6456 -- alignment to the default value as required.
6458 -- Flag128 Flag129 Value
6459 -- ------- ------- -----
6460 -- False False Calign_Default
6461 -- False True Calign_Component_Size
6462 -- True False Calign_Component_Size_4
6463 -- True True Calign_Storage_Unit
6465 function Component_Alignment (Id : E) return C is
6466 BT : constant Node_Id := Base_Type (Id);
6469 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6471 if Flag128 (BT) then
6472 if Flag129 (BT) then
6473 return Calign_Storage_Unit;
6475 return Calign_Component_Size_4;
6479 if Flag129 (BT) then
6480 return Calign_Component_Size;
6482 return Calign_Default;
6485 end Component_Alignment;
6487 ----------------------
6488 -- Declaration_Node --
6489 ----------------------
6491 function Declaration_Node (Id : E) return N is
6495 if Ekind (Id) = E_Incomplete_Type
6496 and then Present (Full_View (Id))
6498 P := Parent (Full_View (Id));
6504 if Nkind (P) /= N_Selected_Component
6505 and then Nkind (P) /= N_Expanded_Name
6507 not (Nkind (P) = N_Defining_Program_Unit_Name
6508 and then Is_Child_Unit (Id))
6515 end Declaration_Node;
6517 ---------------------------------
6518 -- Default_Init_Cond_Procedure --
6519 ---------------------------------
6521 function Default_Init_Cond_Procedure (Id : E) return E is
6527 and then (Has_Default_Init_Cond (Id)
6528 or Has_Inherited_Default_Init_Cond (Id)));
6530 S := Subprograms_For_Type (Id);
6531 while Present (S) loop
6532 if Is_Default_Init_Cond_Procedure (S) then
6536 S := Subprograms_For_Type (S);
6540 end Default_Init_Cond_Procedure;
6542 ---------------------
6543 -- Designated_Type --
6544 ---------------------
6546 function Designated_Type (Id : E) return E is
6550 Desig_Type := Directly_Designated_Type (Id);
6552 if Ekind (Desig_Type) = E_Incomplete_Type
6553 and then Present (Full_View (Desig_Type))
6555 return Full_View (Desig_Type);
6557 elsif Is_Class_Wide_Type (Desig_Type)
6558 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6559 and then Present (Full_View (Etype (Desig_Type)))
6560 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6562 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6567 end Designated_Type;
6569 ----------------------
6570 -- Entry_Index_Type --
6571 ----------------------
6573 function Entry_Index_Type (Id : E) return N is
6575 pragma Assert (Ekind (Id) = E_Entry_Family);
6576 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6577 end Entry_Index_Type;
6579 ---------------------
6580 -- First_Component --
6581 ---------------------
6583 function First_Component (Id : E) return E is
6588 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6590 Comp_Id := First_Entity (Id);
6591 while Present (Comp_Id) loop
6592 exit when Ekind (Comp_Id) = E_Component;
6593 Comp_Id := Next_Entity (Comp_Id);
6597 end First_Component;
6599 -------------------------------------
6600 -- First_Component_Or_Discriminant --
6601 -------------------------------------
6603 function First_Component_Or_Discriminant (Id : E) return E is
6608 (Is_Record_Type (Id)
6609 or else Is_Incomplete_Or_Private_Type (Id)
6610 or else Has_Discriminants (Id));
6612 Comp_Id := First_Entity (Id);
6613 while Present (Comp_Id) loop
6614 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6615 Comp_Id := Next_Entity (Comp_Id);
6619 end First_Component_Or_Discriminant;
6625 function First_Formal (Id : E) return E is
6630 (Is_Overloadable (Id)
6631 or else Ekind_In (Id, E_Entry_Family,
6633 E_Subprogram_Type));
6635 if Ekind (Id) = E_Enumeration_Literal then
6639 Formal := First_Entity (Id);
6641 if Present (Formal) and then Is_Formal (Formal) then
6649 ------------------------------
6650 -- First_Formal_With_Extras --
6651 ------------------------------
6653 function First_Formal_With_Extras (Id : E) return E is
6658 (Is_Overloadable (Id)
6659 or else Ekind_In (Id, E_Entry_Family,
6661 E_Subprogram_Type));
6663 if Ekind (Id) = E_Enumeration_Literal then
6667 Formal := First_Entity (Id);
6669 if Present (Formal) and then Is_Formal (Formal) then
6672 return Extra_Formals (Id); -- Empty if no extra formals
6675 end First_Formal_With_Extras;
6677 -------------------------------------
6678 -- Get_Attribute_Definition_Clause --
6679 -------------------------------------
6681 function Get_Attribute_Definition_Clause
6683 Id : Attribute_Id) return Node_Id
6688 N := First_Rep_Item (E);
6689 while Present (N) loop
6690 if Nkind (N) = N_Attribute_Definition_Clause
6691 and then Get_Attribute_Id (Chars (N)) = Id
6700 end Get_Attribute_Definition_Clause;
6706 function Get_Full_View (T : Entity_Id) return Entity_Id is
6708 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6709 return Full_View (T);
6711 elsif Is_Class_Wide_Type (T)
6712 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6713 and then Present (Full_View (Root_Type (T)))
6715 return Class_Wide_Type (Full_View (Root_Type (T)));
6726 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6727 Is_CDG : constant Boolean :=
6728 Id = Pragma_Abstract_State or else
6729 Id = Pragma_Async_Readers or else
6730 Id = Pragma_Async_Writers or else
6731 Id = Pragma_Depends or else
6732 Id = Pragma_Effective_Reads or else
6733 Id = Pragma_Effective_Writes or else
6734 Id = Pragma_Extensions_Visible or else
6735 Id = Pragma_Global or else
6736 Id = Pragma_Initial_Condition or else
6737 Id = Pragma_Initializes or else
6738 Id = Pragma_Part_Of or else
6739 Id = Pragma_Refined_Depends or else
6740 Id = Pragma_Refined_Global or else
6741 Id = Pragma_Refined_State;
6742 Is_CTC : constant Boolean :=
6743 Id = Pragma_Contract_Cases or else
6744 Id = Pragma_Test_Case;
6745 Is_PPC : constant Boolean :=
6746 Id = Pragma_Precondition or else
6747 Id = Pragma_Postcondition or else
6748 Id = Pragma_Refined_Post;
6750 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6756 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6757 -- extracted from their specialized list.
6760 Items := Contract (E);
6766 Item := Classifications (Items);
6769 Item := Contract_Test_Cases (Items);
6772 Item := Pre_Post_Conditions (Items);
6778 Item := First_Rep_Item (E);
6781 while Present (Item) loop
6782 if Nkind (Item) = N_Pragma
6783 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6787 -- All nodes in N_Contract are chained using Next_Pragma
6789 elsif In_Contract then
6790 Item := Next_Pragma (Item);
6795 Next_Rep_Item (Item);
6802 --------------------------------------
6803 -- Get_Record_Representation_Clause --
6804 --------------------------------------
6806 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6810 N := First_Rep_Item (E);
6811 while Present (N) loop
6812 if Nkind (N) = N_Record_Representation_Clause then
6820 end Get_Record_Representation_Clause;
6822 ------------------------
6823 -- Has_Attach_Handler --
6824 ------------------------
6826 function Has_Attach_Handler (Id : E) return B is
6830 pragma Assert (Is_Protected_Type (Id));
6832 Ritem := First_Rep_Item (Id);
6833 while Present (Ritem) loop
6834 if Nkind (Ritem) = N_Pragma
6835 and then Pragma_Name (Ritem) = Name_Attach_Handler
6839 Next_Rep_Item (Ritem);
6844 end Has_Attach_Handler;
6850 function Has_Entries (Id : E) return B is
6854 pragma Assert (Is_Concurrent_Type (Id));
6856 Ent := First_Entity (Id);
6857 while Present (Ent) loop
6858 if Is_Entry (Ent) then
6862 Ent := Next_Entity (Ent);
6868 ----------------------------
6869 -- Has_Foreign_Convention --
6870 ----------------------------
6872 function Has_Foreign_Convention (Id : E) return B is
6874 -- While regular Intrinsics such as the Standard operators fit in the
6875 -- "Ada" convention, those with an Interface_Name materialize GCC
6876 -- builtin imports for which Ada special treatments shouldn't apply.
6878 return Convention (Id) in Foreign_Convention
6879 or else (Convention (Id) = Convention_Intrinsic
6880 and then Present (Interface_Name (Id)));
6881 end Has_Foreign_Convention;
6883 ---------------------------
6884 -- Has_Interrupt_Handler --
6885 ---------------------------
6887 function Has_Interrupt_Handler (Id : E) return B is
6891 pragma Assert (Is_Protected_Type (Id));
6893 Ritem := First_Rep_Item (Id);
6894 while Present (Ritem) loop
6895 if Nkind (Ritem) = N_Pragma
6896 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6900 Next_Rep_Item (Ritem);
6905 end Has_Interrupt_Handler;
6907 -----------------------------
6908 -- Has_Non_Null_Refinement --
6909 -----------------------------
6911 function Has_Non_Null_Refinement (Id : E) return B is
6913 -- "Refinement" is a concept applicable only to abstract states
6915 pragma Assert (Ekind (Id) = E_Abstract_State);
6917 if Has_Visible_Refinement (Id) then
6918 pragma Assert (Present (Refinement_Constituents (Id)));
6920 -- For a refinement to be non-null, the first constituent must be
6921 -- anything other than null.
6924 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6928 end Has_Non_Null_Refinement;
6930 -----------------------------
6931 -- Has_Null_Abstract_State --
6932 -----------------------------
6934 function Has_Null_Abstract_State (Id : E) return B is
6936 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6939 Present (Abstract_States (Id))
6940 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6941 end Has_Null_Abstract_State;
6943 -------------------------
6944 -- Has_Null_Refinement --
6945 -------------------------
6947 function Has_Null_Refinement (Id : E) return B is
6949 -- "Refinement" is a concept applicable only to abstract states
6951 pragma Assert (Ekind (Id) = E_Abstract_State);
6953 if Has_Visible_Refinement (Id) then
6954 pragma Assert (Present (Refinement_Constituents (Id)));
6956 -- For a refinement to be null, the state's sole constituent must be
6960 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6964 end Has_Null_Refinement;
6966 --------------------
6967 -- Has_Unmodified --
6968 --------------------
6970 function Has_Unmodified (E : Entity_Id) return Boolean is
6972 if Has_Pragma_Unmodified (E) then
6974 elsif Warnings_Off (E) then
6975 Set_Warnings_Off_Used_Unmodified (E);
6982 ---------------------
6983 -- Has_Unreferenced --
6984 ---------------------
6986 function Has_Unreferenced (E : Entity_Id) return Boolean is
6988 if Has_Pragma_Unreferenced (E) then
6990 elsif Warnings_Off (E) then
6991 Set_Warnings_Off_Used_Unreferenced (E);
6996 end Has_Unreferenced;
6998 ----------------------
6999 -- Has_Warnings_Off --
7000 ----------------------
7002 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7004 if Warnings_Off (E) then
7005 Set_Warnings_Off_Used (E);
7010 end Has_Warnings_Off;
7012 ------------------------------
7013 -- Implementation_Base_Type --
7014 ------------------------------
7016 function Implementation_Base_Type (Id : E) return E is
7021 Bastyp := Base_Type (Id);
7023 if Is_Incomplete_Or_Private_Type (Bastyp) then
7024 Imptyp := Underlying_Type (Bastyp);
7026 -- If we have an implementation type, then just return it,
7027 -- otherwise we return the Base_Type anyway. This can only
7028 -- happen in error situations and should avoid some error bombs.
7030 if Present (Imptyp) then
7031 return Base_Type (Imptyp);
7039 end Implementation_Base_Type;
7041 -------------------------
7042 -- Invariant_Procedure --
7043 -------------------------
7045 function Invariant_Procedure (Id : E) return E is
7049 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7051 if No (Subprograms_For_Type (Id)) then
7055 S := Subprograms_For_Type (Id);
7056 while Present (S) loop
7057 if Is_Invariant_Procedure (S) then
7060 S := Subprograms_For_Type (S);
7066 end Invariant_Procedure;
7072 -- Global flag table allowing rapid computation of this function
7074 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7075 (E_Enumeration_Subtype |
7077 E_Signed_Integer_Subtype |
7078 E_Modular_Integer_Subtype |
7079 E_Floating_Point_Subtype |
7080 E_Ordinary_Fixed_Point_Subtype |
7081 E_Decimal_Fixed_Point_Subtype |
7086 E_Record_Subtype_With_Private |
7087 E_Limited_Private_Subtype |
7089 E_Protected_Subtype |
7091 E_String_Literal_Subtype |
7092 E_Class_Wide_Subtype => False,
7095 function Is_Base_Type (Id : E) return Boolean is
7097 return Entity_Is_Base_Type (Ekind (Id));
7100 ---------------------
7101 -- Is_Boolean_Type --
7102 ---------------------
7104 function Is_Boolean_Type (Id : E) return B is
7106 return Root_Type (Id) = Standard_Boolean;
7107 end Is_Boolean_Type;
7109 ------------------------
7110 -- Is_Constant_Object --
7111 ------------------------
7113 function Is_Constant_Object (Id : E) return B is
7114 K : constant Entity_Kind := Ekind (Id);
7117 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7118 end Is_Constant_Object;
7120 --------------------
7121 -- Is_Discriminal --
7122 --------------------
7124 function Is_Discriminal (Id : E) return B is
7126 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7127 and then Present (Discriminal_Link (Id)));
7130 ----------------------
7131 -- Is_Dynamic_Scope --
7132 ----------------------
7134 function Is_Dynamic_Scope (Id : E) return B is
7137 Ekind (Id) = E_Block
7139 Ekind (Id) = E_Function
7141 Ekind (Id) = E_Procedure
7143 Ekind (Id) = E_Subprogram_Body
7145 Ekind (Id) = E_Task_Type
7147 (Ekind (Id) = E_Limited_Private_Type
7148 and then Present (Full_View (Id))
7149 and then Ekind (Full_View (Id)) = E_Task_Type)
7151 Ekind (Id) = E_Entry
7153 Ekind (Id) = E_Entry_Family
7155 Ekind (Id) = E_Return_Statement;
7156 end Is_Dynamic_Scope;
7158 --------------------
7159 -- Is_Entity_Name --
7160 --------------------
7162 function Is_Entity_Name (N : Node_Id) return Boolean is
7163 Kind : constant Node_Kind := Nkind (N);
7166 -- Identifiers, operator symbols, expanded names are entity names
7168 return Kind = N_Identifier
7169 or else Kind = N_Operator_Symbol
7170 or else Kind = N_Expanded_Name
7172 -- Attribute references are entity names if they refer to an entity.
7173 -- Note that we don't do this by testing for the presence of the
7174 -- Entity field in the N_Attribute_Reference node, since it may not
7175 -- have been set yet.
7177 or else (Kind = N_Attribute_Reference
7178 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7181 -----------------------
7182 -- Is_External_State --
7183 -----------------------
7185 function Is_External_State (Id : E) return B is
7188 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7189 end Is_External_State;
7195 function Is_Finalizer (Id : E) return B is
7197 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7204 function Is_Null_State (Id : E) return B is
7207 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7210 ---------------------
7211 -- Is_Packed_Array --
7212 ---------------------
7214 function Is_Packed_Array (Id : E) return B is
7216 return Is_Array_Type (Id) and then Is_Packed (Id);
7217 end Is_Packed_Array;
7219 -----------------------------------
7220 -- Is_Package_Or_Generic_Package --
7221 -----------------------------------
7223 function Is_Package_Or_Generic_Package (Id : E) return B is
7225 return Ekind_In (Id, E_Generic_Package, E_Package);
7226 end Is_Package_Or_Generic_Package;
7232 function Is_Prival (Id : E) return B is
7234 return (Ekind_In (Id, E_Constant, E_Variable)
7235 and then Present (Prival_Link (Id)));
7238 ----------------------------
7239 -- Is_Protected_Component --
7240 ----------------------------
7242 function Is_Protected_Component (Id : E) return B is
7244 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7245 end Is_Protected_Component;
7247 ----------------------------
7248 -- Is_Protected_Interface --
7249 ----------------------------
7251 function Is_Protected_Interface (Id : E) return B is
7252 Typ : constant Entity_Id := Base_Type (Id);
7254 if not Is_Interface (Typ) then
7256 elsif Is_Class_Wide_Type (Typ) then
7257 return Is_Protected_Interface (Etype (Typ));
7259 return Protected_Present (Type_Definition (Parent (Typ)));
7261 end Is_Protected_Interface;
7263 ------------------------------
7264 -- Is_Protected_Record_Type --
7265 ------------------------------
7267 function Is_Protected_Record_Type (Id : E) return B is
7270 Is_Concurrent_Record_Type (Id)
7271 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7272 end Is_Protected_Record_Type;
7274 --------------------------------
7275 -- Is_Standard_Character_Type --
7276 --------------------------------
7278 function Is_Standard_Character_Type (Id : E) return B is
7280 if Is_Type (Id) then
7282 R : constant Entity_Id := Root_Type (Id);
7285 R = Standard_Character
7287 R = Standard_Wide_Character
7289 R = Standard_Wide_Wide_Character;
7295 end Is_Standard_Character_Type;
7297 -----------------------------
7298 -- Is_Standard_String_Type --
7299 -----------------------------
7301 function Is_Standard_String_Type (Id : E) return B is
7303 if Is_Type (Id) then
7305 R : constant Entity_Id := Root_Type (Id);
7310 R = Standard_Wide_String
7312 R = Standard_Wide_Wide_String;
7318 end Is_Standard_String_Type;
7320 --------------------
7321 -- Is_String_Type --
7322 --------------------
7324 function Is_String_Type (Id : E) return B is
7326 return Is_Array_Type (Id)
7327 and then Id /= Any_Composite
7328 and then Number_Dimensions (Id) = 1
7329 and then Is_Character_Type (Component_Type (Id));
7332 -------------------------------
7333 -- Is_Synchronized_Interface --
7334 -------------------------------
7336 function Is_Synchronized_Interface (Id : E) return B is
7337 Typ : constant Entity_Id := Base_Type (Id);
7340 if not Is_Interface (Typ) then
7343 elsif Is_Class_Wide_Type (Typ) then
7344 return Is_Synchronized_Interface (Etype (Typ));
7347 return Protected_Present (Type_Definition (Parent (Typ)))
7348 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7349 or else Task_Present (Type_Definition (Parent (Typ)));
7351 end Is_Synchronized_Interface;
7353 -----------------------
7354 -- Is_Task_Interface --
7355 -----------------------
7357 function Is_Task_Interface (Id : E) return B is
7358 Typ : constant Entity_Id := Base_Type (Id);
7360 if not Is_Interface (Typ) then
7362 elsif Is_Class_Wide_Type (Typ) then
7363 return Is_Task_Interface (Etype (Typ));
7365 return Task_Present (Type_Definition (Parent (Typ)));
7367 end Is_Task_Interface;
7369 -------------------------
7370 -- Is_Task_Record_Type --
7371 -------------------------
7373 function Is_Task_Record_Type (Id : E) return B is
7376 Is_Concurrent_Record_Type (Id)
7377 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7378 end Is_Task_Record_Type;
7380 ------------------------
7381 -- Is_Wrapper_Package --
7382 ------------------------
7384 function Is_Wrapper_Package (Id : E) return B is
7386 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7387 end Is_Wrapper_Package;
7393 function Last_Formal (Id : E) return E is
7398 (Is_Overloadable (Id)
7399 or else Ekind_In (Id, E_Entry_Family,
7401 E_Subprogram_Type));
7403 if Ekind (Id) = E_Enumeration_Literal then
7407 Formal := First_Formal (Id);
7409 if Present (Formal) then
7410 while Present (Next_Formal (Formal)) loop
7411 Formal := Next_Formal (Formal);
7419 function Model_Emin_Value (Id : E) return Uint is
7421 return Machine_Emin_Value (Id);
7422 end Model_Emin_Value;
7424 -------------------------
7425 -- Model_Epsilon_Value --
7426 -------------------------
7428 function Model_Epsilon_Value (Id : E) return Ureal is
7429 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7431 return Radix ** (1 - Model_Mantissa_Value (Id));
7432 end Model_Epsilon_Value;
7434 --------------------------
7435 -- Model_Mantissa_Value --
7436 --------------------------
7438 function Model_Mantissa_Value (Id : E) return Uint is
7440 return Machine_Mantissa_Value (Id);
7441 end Model_Mantissa_Value;
7443 -----------------------
7444 -- Model_Small_Value --
7445 -----------------------
7447 function Model_Small_Value (Id : E) return Ureal is
7448 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7450 return Radix ** (Model_Emin_Value (Id) - 1);
7451 end Model_Small_Value;
7453 ------------------------
7454 -- Machine_Emax_Value --
7455 ------------------------
7457 function Machine_Emax_Value (Id : E) return Uint is
7458 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7461 case Float_Rep (Id) is
7464 when 1 .. 6 => return Uint_128;
7465 when 7 .. 15 => return 2**10;
7466 when 16 .. 33 => return 2**14;
7467 when others => return No_Uint;
7471 return Uint_2 ** Uint_7 - Uint_1;
7473 end Machine_Emax_Value;
7475 ------------------------
7476 -- Machine_Emin_Value --
7477 ------------------------
7479 function Machine_Emin_Value (Id : E) return Uint is
7481 case Float_Rep (Id) is
7482 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7483 when AAMP => return -Machine_Emax_Value (Id);
7485 end Machine_Emin_Value;
7487 ----------------------------
7488 -- Machine_Mantissa_Value --
7489 ----------------------------
7491 function Machine_Mantissa_Value (Id : E) return Uint is
7492 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7495 case Float_Rep (Id) is
7498 when 1 .. 6 => return Uint_24;
7499 when 7 .. 15 => return UI_From_Int (53);
7500 when 16 .. 18 => return Uint_64;
7501 when 19 .. 33 => return UI_From_Int (113);
7502 when others => return No_Uint;
7507 when 1 .. 6 => return Uint_24;
7508 when 7 .. 9 => return UI_From_Int (40);
7509 when others => return No_Uint;
7512 end Machine_Mantissa_Value;
7514 -------------------------
7515 -- Machine_Radix_Value --
7516 -------------------------
7518 function Machine_Radix_Value (Id : E) return U is
7520 case Float_Rep (Id) is
7521 when IEEE_Binary | AAMP =>
7524 end Machine_Radix_Value;
7526 --------------------
7527 -- Next_Component --
7528 --------------------
7530 function Next_Component (Id : E) return E is
7534 Comp_Id := Next_Entity (Id);
7535 while Present (Comp_Id) loop
7536 exit when Ekind (Comp_Id) = E_Component;
7537 Comp_Id := Next_Entity (Comp_Id);
7543 ------------------------------------
7544 -- Next_Component_Or_Discriminant --
7545 ------------------------------------
7547 function Next_Component_Or_Discriminant (Id : E) return E is
7551 Comp_Id := Next_Entity (Id);
7552 while Present (Comp_Id) loop
7553 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7554 Comp_Id := Next_Entity (Comp_Id);
7558 end Next_Component_Or_Discriminant;
7560 -----------------------
7561 -- Next_Discriminant --
7562 -----------------------
7564 -- This function actually implements both Next_Discriminant and
7565 -- Next_Stored_Discriminant by making sure that the Discriminant
7566 -- returned is of the same variety as Id.
7568 function Next_Discriminant (Id : E) return E is
7570 -- Derived Tagged types with private extensions look like this...
7572 -- E_Discriminant d1
7573 -- E_Discriminant d2
7575 -- E_Discriminant d1
7576 -- E_Discriminant d2
7579 -- so it is critical not to go past the leading discriminants
7584 pragma Assert (Ekind (Id) = E_Discriminant);
7587 D := Next_Entity (D);
7589 or else (Ekind (D) /= E_Discriminant
7590 and then not Is_Itype (D))
7595 exit when Ekind (D) = E_Discriminant
7596 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7600 end Next_Discriminant;
7606 function Next_Formal (Id : E) return E is
7610 -- Follow the chain of declared entities as long as the kind of the
7611 -- entity corresponds to a formal parameter. Skip internal entities
7612 -- that may have been created for implicit subtypes, in the process
7613 -- of analyzing default expressions.
7617 P := Next_Entity (P);
7619 if No (P) or else Is_Formal (P) then
7621 elsif not Is_Internal (P) then
7627 -----------------------------
7628 -- Next_Formal_With_Extras --
7629 -----------------------------
7631 function Next_Formal_With_Extras (Id : E) return E is
7633 if Present (Extra_Formal (Id)) then
7634 return Extra_Formal (Id);
7636 return Next_Formal (Id);
7638 end Next_Formal_With_Extras;
7644 function Next_Index (Id : Node_Id) return Node_Id is
7653 function Next_Literal (Id : E) return E is
7655 pragma Assert (Nkind (Id) in N_Entity);
7659 ------------------------------
7660 -- Next_Stored_Discriminant --
7661 ------------------------------
7663 function Next_Stored_Discriminant (Id : E) return E is
7665 -- See comment in Next_Discriminant
7667 return Next_Discriminant (Id);
7668 end Next_Stored_Discriminant;
7670 -----------------------
7671 -- Number_Dimensions --
7672 -----------------------
7674 function Number_Dimensions (Id : E) return Pos is
7679 if Ekind (Id) = E_String_Literal_Subtype then
7684 T := First_Index (Id);
7685 while Present (T) loop
7692 end Number_Dimensions;
7694 --------------------
7695 -- Number_Entries --
7696 --------------------
7698 function Number_Entries (Id : E) return Nat is
7703 pragma Assert (Is_Concurrent_Type (Id));
7706 Ent := First_Entity (Id);
7707 while Present (Ent) loop
7708 if Is_Entry (Ent) then
7712 Ent := Next_Entity (Ent);
7718 --------------------
7719 -- Number_Formals --
7720 --------------------
7722 function Number_Formals (Id : E) return Pos is
7728 Formal := First_Formal (Id);
7729 while Present (Formal) loop
7731 Formal := Next_Formal (Formal);
7737 --------------------
7738 -- Parameter_Mode --
7739 --------------------
7741 function Parameter_Mode (Id : E) return Formal_Kind is
7746 ------------------------
7747 -- Predicate_Function --
7748 ------------------------
7750 function Predicate_Function (Id : E) return E is
7755 pragma Assert (Is_Type (Id));
7757 -- If type is private and has a completion, predicate may be defined
7758 -- on the full view.
7760 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7761 T := Full_View (Id);
7766 if No (Subprograms_For_Type (T)) then
7770 S := Subprograms_For_Type (T);
7771 while Present (S) loop
7772 if Is_Predicate_Function (S) then
7775 S := Subprograms_For_Type (S);
7781 end Predicate_Function;
7783 --------------------------
7784 -- Predicate_Function_M --
7785 --------------------------
7787 function Predicate_Function_M (Id : E) return E is
7792 pragma Assert (Is_Type (Id));
7794 -- If type is private and has a completion, predicate may be defined
7795 -- on the full view.
7797 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7798 T := Full_View (Id);
7803 if No (Subprograms_For_Type (T)) then
7807 S := Subprograms_For_Type (T);
7808 while Present (S) loop
7809 if Is_Predicate_Function_M (S) then
7812 S := Subprograms_For_Type (S);
7818 end Predicate_Function_M;
7820 -------------------------
7821 -- Present_In_Rep_Item --
7822 -------------------------
7824 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7828 Ritem := First_Rep_Item (E);
7830 while Present (Ritem) loop
7835 Next_Rep_Item (Ritem);
7839 end Present_In_Rep_Item;
7841 --------------------------
7842 -- Primitive_Operations --
7843 --------------------------
7845 function Primitive_Operations (Id : E) return L is
7847 if Is_Concurrent_Type (Id) then
7848 if Present (Corresponding_Record_Type (Id)) then
7849 return Direct_Primitive_Operations
7850 (Corresponding_Record_Type (Id));
7852 -- If expansion is disabled the corresponding record type is absent,
7853 -- but if the type has ancestors it may have primitive operations.
7855 elsif Is_Tagged_Type (Id) then
7856 return Direct_Primitive_Operations (Id);
7862 return Direct_Primitive_Operations (Id);
7864 end Primitive_Operations;
7866 ---------------------
7867 -- Record_Rep_Item --
7868 ---------------------
7870 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7872 Set_Next_Rep_Item (N, First_Rep_Item (E));
7873 Set_First_Rep_Item (E, N);
7874 end Record_Rep_Item;
7880 function Root_Type (Id : E) return E is
7884 pragma Assert (Nkind (Id) in N_Entity);
7886 T := Base_Type (Id);
7888 if Ekind (T) = E_Class_Wide_Type then
7900 -- Following test catches some error cases resulting from
7903 elsif No (Etyp) then
7904 Check_Error_Detected;
7907 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7910 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7916 -- Return if there is a circularity in the inheritance chain. This
7917 -- happens in some error situations and we do not want to get
7918 -- stuck in this loop.
7920 if T = Base_Type (Id) then
7927 ---------------------
7928 -- Safe_Emax_Value --
7929 ---------------------
7931 function Safe_Emax_Value (Id : E) return Uint is
7933 return Machine_Emax_Value (Id);
7934 end Safe_Emax_Value;
7936 ----------------------
7937 -- Safe_First_Value --
7938 ----------------------
7940 function Safe_First_Value (Id : E) return Ureal is
7942 return -Safe_Last_Value (Id);
7943 end Safe_First_Value;
7945 ---------------------
7946 -- Safe_Last_Value --
7947 ---------------------
7949 function Safe_Last_Value (Id : E) return Ureal is
7950 Radix : constant Uint := Machine_Radix_Value (Id);
7951 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7952 Emax : constant Uint := Safe_Emax_Value (Id);
7953 Significand : constant Uint := Radix ** Mantissa - 1;
7954 Exponent : constant Uint := Emax - Mantissa;
7960 (Num => Significand * 2 ** (Exponent mod 4),
7961 Den => -Exponent / 4,
7966 (Num => Significand,
7970 end Safe_Last_Value;
7976 function Scope_Depth (Id : E) return Uint is
7981 while Is_Record_Type (Scop) loop
7982 Scop := Scope (Scop);
7985 return Scope_Depth_Value (Scop);
7988 ---------------------
7989 -- Scope_Depth_Set --
7990 ---------------------
7992 function Scope_Depth_Set (Id : E) return B is
7994 return not Is_Record_Type (Id)
7995 and then Field22 (Id) /= Union_Id (Empty);
7996 end Scope_Depth_Set;
7998 -----------------------------
7999 -- Set_Component_Alignment --
8000 -----------------------------
8002 -- Component Alignment is encoded using two flags, Flag128/129 as
8003 -- follows. Note that both flags False = Align_Default, so that the
8004 -- default initialization of flags to False initializes component
8005 -- alignment to the default value as required.
8007 -- Flag128 Flag129 Value
8008 -- ------- ------- -----
8009 -- False False Calign_Default
8010 -- False True Calign_Component_Size
8011 -- True False Calign_Component_Size_4
8012 -- True True Calign_Storage_Unit
8014 procedure Set_Component_Alignment (Id : E; V : C) is
8016 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8017 and then Is_Base_Type (Id));
8020 when Calign_Default =>
8021 Set_Flag128 (Id, False);
8022 Set_Flag129 (Id, False);
8024 when Calign_Component_Size =>
8025 Set_Flag128 (Id, False);
8026 Set_Flag129 (Id, True);
8028 when Calign_Component_Size_4 =>
8029 Set_Flag128 (Id, True);
8030 Set_Flag129 (Id, False);
8032 when Calign_Storage_Unit =>
8033 Set_Flag128 (Id, True);
8034 Set_Flag129 (Id, True);
8036 end Set_Component_Alignment;
8038 -------------------------------------
8039 -- Set_Default_Init_Cond_Procedure --
8040 -------------------------------------
8042 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8047 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8049 Has_Inherited_Default_Init_Cond (Id)));
8051 S := Subprograms_For_Type (Id);
8052 Set_Subprograms_For_Type (Id, V);
8053 Set_Subprograms_For_Type (V, S);
8055 -- Check for a duplicate procedure
8057 while Present (S) loop
8058 if Is_Default_Init_Cond_Procedure (S) then
8059 raise Program_Error;
8062 S := Subprograms_For_Type (S);
8064 end Set_Default_Init_Cond_Procedure;
8066 -----------------------------
8067 -- Set_Invariant_Procedure --
8068 -----------------------------
8070 procedure Set_Invariant_Procedure (Id : E; V : E) is
8074 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8076 S := Subprograms_For_Type (Id);
8077 Set_Subprograms_For_Type (Id, V);
8078 Set_Subprograms_For_Type (V, S);
8080 -- Check for duplicate entry
8082 while Present (S) loop
8083 if Is_Invariant_Procedure (S) then
8084 raise Program_Error;
8086 S := Subprograms_For_Type (S);
8089 end Set_Invariant_Procedure;
8091 ----------------------------
8092 -- Set_Predicate_Function --
8093 ----------------------------
8095 procedure Set_Predicate_Function (Id : E; V : E) is
8099 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8101 S := Subprograms_For_Type (Id);
8102 Set_Subprograms_For_Type (Id, V);
8103 Set_Subprograms_For_Type (V, S);
8105 while Present (S) loop
8106 if Is_Predicate_Function (S) then
8107 raise Program_Error;
8109 S := Subprograms_For_Type (S);
8112 end Set_Predicate_Function;
8114 ------------------------------
8115 -- Set_Predicate_Function_M --
8116 ------------------------------
8118 procedure Set_Predicate_Function_M (Id : E; V : E) is
8122 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8124 S := Subprograms_For_Type (Id);
8125 Set_Subprograms_For_Type (Id, V);
8126 Set_Subprograms_For_Type (V, S);
8128 -- Check for duplicates
8130 while Present (S) loop
8131 if Is_Predicate_Function_M (S) then
8132 raise Program_Error;
8134 S := Subprograms_For_Type (S);
8137 end Set_Predicate_Function_M;
8143 function Size_Clause (Id : E) return N is
8145 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8148 ------------------------
8149 -- Stream_Size_Clause --
8150 ------------------------
8152 function Stream_Size_Clause (Id : E) return N is
8154 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8155 end Stream_Size_Clause;
8161 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8167 Kind := E_Access_Subtype;
8171 Kind := E_Array_Subtype;
8173 when E_Class_Wide_Type |
8174 E_Class_Wide_Subtype =>
8175 Kind := E_Class_Wide_Subtype;
8177 when E_Decimal_Fixed_Point_Type |
8178 E_Decimal_Fixed_Point_Subtype =>
8179 Kind := E_Decimal_Fixed_Point_Subtype;
8181 when E_Ordinary_Fixed_Point_Type |
8182 E_Ordinary_Fixed_Point_Subtype =>
8183 Kind := E_Ordinary_Fixed_Point_Subtype;
8185 when E_Private_Type |
8186 E_Private_Subtype =>
8187 Kind := E_Private_Subtype;
8189 when E_Limited_Private_Type |
8190 E_Limited_Private_Subtype =>
8191 Kind := E_Limited_Private_Subtype;
8193 when E_Record_Type_With_Private |
8194 E_Record_Subtype_With_Private =>
8195 Kind := E_Record_Subtype_With_Private;
8197 when E_Record_Type |
8199 Kind := E_Record_Subtype;
8201 when Enumeration_Kind =>
8202 Kind := E_Enumeration_Subtype;
8205 Kind := E_Floating_Point_Subtype;
8207 when Signed_Integer_Kind =>
8208 Kind := E_Signed_Integer_Subtype;
8210 when Modular_Integer_Kind =>
8211 Kind := E_Modular_Integer_Subtype;
8213 when Protected_Kind =>
8214 Kind := E_Protected_Subtype;
8217 Kind := E_Task_Subtype;
8221 raise Program_Error;
8227 ---------------------
8228 -- Type_High_Bound --
8229 ---------------------
8231 function Type_High_Bound (Id : E) return Node_Id is
8232 Rng : constant Node_Id := Scalar_Range (Id);
8234 if Nkind (Rng) = N_Subtype_Indication then
8235 return High_Bound (Range_Expression (Constraint (Rng)));
8237 return High_Bound (Rng);
8239 end Type_High_Bound;
8241 --------------------
8242 -- Type_Low_Bound --
8243 --------------------
8245 function Type_Low_Bound (Id : E) return Node_Id is
8246 Rng : constant Node_Id := Scalar_Range (Id);
8248 if Nkind (Rng) = N_Subtype_Indication then
8249 return Low_Bound (Range_Expression (Constraint (Rng)));
8251 return Low_Bound (Rng);
8255 ---------------------
8256 -- Underlying_Type --
8257 ---------------------
8259 function Underlying_Type (Id : E) return E is
8261 -- For record_with_private the underlying type is always the direct
8262 -- full view. Never try to take the full view of the parent it
8263 -- doesn't make sense.
8265 if Ekind (Id) = E_Record_Type_With_Private then
8266 return Full_View (Id);
8268 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8270 -- If we have an incomplete or private type with a full view,
8271 -- then we return the Underlying_Type of this full view.
8273 if Present (Full_View (Id)) then
8274 if Id = Full_View (Id) then
8276 -- Previous error in declaration
8281 return Underlying_Type (Full_View (Id));
8284 -- If we have a private type with an underlying full view, then we
8285 -- return the Underlying_Type of this underlying full view.
8287 elsif Ekind (Id) in Private_Kind
8288 and then Present (Underlying_Full_View (Id))
8290 return Underlying_Type (Underlying_Full_View (Id));
8292 -- If we have an incomplete entity that comes from the limited
8293 -- view then we return the Underlying_Type of its non-limited
8296 elsif From_Limited_With (Id)
8297 and then Present (Non_Limited_View (Id))
8299 return Underlying_Type (Non_Limited_View (Id));
8301 -- Otherwise check for the case where we have a derived type or
8302 -- subtype, and if so get the Underlying_Type of the parent type.
8304 elsif Etype (Id) /= Id then
8305 return Underlying_Type (Etype (Id));
8307 -- Otherwise we have an incomplete or private type that has
8308 -- no full view, which means that we have not encountered the
8309 -- completion, so return Empty to indicate the underlying type
8310 -- is not yet known.
8316 -- For non-incomplete, non-private types, return the type itself Also
8317 -- for entities that are not types at all return the entity itself.
8322 end Underlying_Type;
8324 ------------------------
8325 -- Write_Entity_Flags --
8326 ------------------------
8328 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8330 procedure W (Flag_Name : String; Flag : Boolean);
8331 -- Write out given flag if it is set
8337 procedure W (Flag_Name : String; Flag : Boolean) is
8341 Write_Str (Flag_Name);
8342 Write_Str (" = True");
8347 -- Start of processing for Write_Entity_Flags
8350 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8351 and then Is_Base_Type (Id)
8354 Write_Str ("Component_Alignment = ");
8356 case Component_Alignment (Id) is
8357 when Calign_Default =>
8358 Write_Str ("Calign_Default");
8360 when Calign_Component_Size =>
8361 Write_Str ("Calign_Component_Size");
8363 when Calign_Component_Size_4 =>
8364 Write_Str ("Calign_Component_Size_4");
8366 when Calign_Storage_Unit =>
8367 Write_Str ("Calign_Storage_Unit");
8373 W ("Address_Taken", Flag104 (Id));
8374 W ("Body_Needed_For_SAL", Flag40 (Id));
8375 W ("C_Pass_By_Copy", Flag125 (Id));
8376 W ("Can_Never_Be_Null", Flag38 (Id));
8377 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8378 W ("Debug_Info_Off", Flag166 (Id));
8379 W ("Default_Expressions_Processed", Flag108 (Id));
8380 W ("Delay_Cleanups", Flag114 (Id));
8381 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8382 W ("Depends_On_Private", Flag14 (Id));
8383 W ("Discard_Names", Flag88 (Id));
8384 W ("Elaboration_Entity_Required", Flag174 (Id));
8385 W ("Elaborate_Body_Desirable", Flag210 (Id));
8386 W ("Entry_Accepted", Flag152 (Id));
8387 W ("Can_Use_Internal_Rep", Flag229 (Id));
8388 W ("Finalize_Storage_Only", Flag158 (Id));
8389 W ("From_Limited_With", Flag159 (Id));
8390 W ("Has_Aliased_Components", Flag135 (Id));
8391 W ("Has_Alignment_Clause", Flag46 (Id));
8392 W ("Has_All_Calls_Remote", Flag79 (Id));
8393 W ("Has_Anonymous_Master", Flag253 (Id));
8394 W ("Has_Atomic_Components", Flag86 (Id));
8395 W ("Has_Biased_Representation", Flag139 (Id));
8396 W ("Has_Completion", Flag26 (Id));
8397 W ("Has_Completion_In_Body", Flag71 (Id));
8398 W ("Has_Complex_Representation", Flag140 (Id));
8399 W ("Has_Component_Size_Clause", Flag68 (Id));
8400 W ("Has_Contiguous_Rep", Flag181 (Id));
8401 W ("Has_Controlled_Component", Flag43 (Id));
8402 W ("Has_Controlling_Result", Flag98 (Id));
8403 W ("Has_Convention_Pragma", Flag119 (Id));
8404 W ("Has_Default_Aspect", Flag39 (Id));
8405 W ("Has_Default_Init_Cond", Flag3 (Id));
8406 W ("Has_Delayed_Aspects", Flag200 (Id));
8407 W ("Has_Delayed_Freeze", Flag18 (Id));
8408 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8409 W ("Has_Discriminants", Flag5 (Id));
8410 W ("Has_Dispatch_Table", Flag220 (Id));
8411 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8412 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8413 W ("Has_Exit", Flag47 (Id));
8414 W ("Has_Forward_Instantiation", Flag175 (Id));
8415 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8416 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8417 W ("Has_Homonym", Flag56 (Id));
8418 W ("Has_Implicit_Dereference", Flag251 (Id));
8419 W ("Has_Independent_Components", Flag34 (Id));
8420 W ("Has_Inheritable_Invariants", Flag248 (Id));
8421 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8422 W ("Has_Initial_Value", Flag219 (Id));
8423 W ("Has_Invariants", Flag232 (Id));
8424 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8425 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8426 W ("Has_Master_Entity", Flag21 (Id));
8427 W ("Has_Missing_Return", Flag142 (Id));
8428 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8429 W ("Has_Non_Standard_Rep", Flag75 (Id));
8430 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8431 W ("Has_Object_Size_Clause", Flag172 (Id));
8432 W ("Has_Per_Object_Constraint", Flag154 (Id));
8433 W ("Has_Postconditions", Flag240 (Id));
8434 W ("Has_Pragma_Controlled", Flag27 (Id));
8435 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8436 W ("Has_Pragma_Inline", Flag157 (Id));
8437 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8438 W ("Has_Pragma_No_Inline", Flag201 (Id));
8439 W ("Has_Pragma_Ordered", Flag198 (Id));
8440 W ("Has_Pragma_Pack", Flag121 (Id));
8441 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8442 W ("Has_Pragma_Pure", Flag203 (Id));
8443 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8444 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8445 W ("Has_Pragma_Unmodified", Flag233 (Id));
8446 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8447 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8448 W ("Has_Predicates", Flag250 (Id));
8449 W ("Has_Primitive_Operations", Flag120 (Id));
8450 W ("Has_Private_Ancestor", Flag151 (Id));
8451 W ("Has_Private_Declaration", Flag155 (Id));
8452 W ("Has_Protected", Flag271 (Id));
8453 W ("Has_Qualified_Name", Flag161 (Id));
8454 W ("Has_RACW", Flag214 (Id));
8455 W ("Has_Record_Rep_Clause", Flag65 (Id));
8456 W ("Has_Recursive_Call", Flag143 (Id));
8457 W ("Has_Shift_Operator", Flag267 (Id));
8458 W ("Has_Size_Clause", Flag29 (Id));
8459 W ("Has_Small_Clause", Flag67 (Id));
8460 W ("Has_Specified_Layout", Flag100 (Id));
8461 W ("Has_Specified_Stream_Input", Flag190 (Id));
8462 W ("Has_Specified_Stream_Output", Flag191 (Id));
8463 W ("Has_Specified_Stream_Read", Flag192 (Id));
8464 W ("Has_Specified_Stream_Write", Flag193 (Id));
8465 W ("Has_Static_Discriminants", Flag211 (Id));
8466 W ("Has_Static_Predicate", Flag269 (Id));
8467 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8468 W ("Has_Storage_Size_Clause", Flag23 (Id));
8469 W ("Has_Stream_Size_Clause", Flag184 (Id));
8470 W ("Has_Task", Flag30 (Id));
8471 W ("Has_Thunks", Flag228 (Id));
8472 W ("Has_Unchecked_Union", Flag123 (Id));
8473 W ("Has_Unknown_Discriminants", Flag72 (Id));
8474 W ("Has_Up_Level_Access", Flag215 (Id));
8475 W ("Has_Visible_Refinement", Flag263 (Id));
8476 W ("Has_Volatile_Components", Flag87 (Id));
8477 W ("Has_Xref_Entry", Flag182 (Id));
8478 W ("In_Package_Body", Flag48 (Id));
8479 W ("In_Private_Part", Flag45 (Id));
8480 W ("In_Use", Flag8 (Id));
8481 W ("Is_Abstract_Subprogram", Flag19 (Id));
8482 W ("Is_Abstract_Type", Flag146 (Id));
8483 W ("Is_Access_Constant", Flag69 (Id));
8484 W ("Is_Ada_2005_Only", Flag185 (Id));
8485 W ("Is_Ada_2012_Only", Flag199 (Id));
8486 W ("Is_Aliased", Flag15 (Id));
8487 W ("Is_Asynchronous", Flag81 (Id));
8488 W ("Is_Atomic", Flag85 (Id));
8489 W ("Is_Bit_Packed_Array", Flag122 (Id));
8490 W ("Is_CPP_Class", Flag74 (Id));
8491 W ("Is_Called", Flag102 (Id));
8492 W ("Is_Character_Type", Flag63 (Id));
8493 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8494 W ("Is_Child_Unit", Flag73 (Id));
8495 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8496 W ("Is_Compilation_Unit", Flag149 (Id));
8497 W ("Is_Completely_Hidden", Flag103 (Id));
8498 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8499 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8500 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8501 W ("Is_Constrained", Flag12 (Id));
8502 W ("Is_Constructor", Flag76 (Id));
8503 W ("Is_Controlled", Flag42 (Id));
8504 W ("Is_Controlling_Formal", Flag97 (Id));
8505 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8506 W ("Is_Descendent_Of_Address", Flag223 (Id));
8507 W ("Is_Discrim_SO_Function", Flag176 (Id));
8508 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8509 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8510 W ("Is_Dispatching_Operation", Flag6 (Id));
8511 W ("Is_Eliminated", Flag124 (Id));
8512 W ("Is_Entry_Formal", Flag52 (Id));
8513 W ("Is_Exported", Flag99 (Id));
8514 W ("Is_First_Subtype", Flag70 (Id));
8515 W ("Is_For_Access_Subtype", Flag118 (Id));
8516 W ("Is_Formal_Subprogram", Flag111 (Id));
8517 W ("Is_Frozen", Flag4 (Id));
8518 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8519 W ("Is_Generic_Actual_Type", Flag94 (Id));
8520 W ("Is_Generic_Instance", Flag130 (Id));
8521 W ("Is_Generic_Type", Flag13 (Id));
8522 W ("Is_Hidden", Flag57 (Id));
8523 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8524 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8525 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8526 W ("Is_Immediately_Visible", Flag7 (Id));
8527 W ("Is_Implementation_Defined", Flag254 (Id));
8528 W ("Is_Imported", Flag24 (Id));
8529 W ("Is_Independent", Flag268 (Id));
8530 W ("Is_Inlined", Flag11 (Id));
8531 W ("Is_Inlined_Always", Flag1 (Id));
8532 W ("Is_Instantiated", Flag126 (Id));
8533 W ("Is_Interface", Flag186 (Id));
8534 W ("Is_Internal", Flag17 (Id));
8535 W ("Is_Interrupt_Handler", Flag89 (Id));
8536 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8537 W ("Is_Invariant_Procedure", Flag257 (Id));
8538 W ("Is_Itype", Flag91 (Id));
8539 W ("Is_Known_Non_Null", Flag37 (Id));
8540 W ("Is_Known_Null", Flag204 (Id));
8541 W ("Is_Known_Valid", Flag170 (Id));
8542 W ("Is_Limited_Composite", Flag106 (Id));
8543 W ("Is_Limited_Interface", Flag197 (Id));
8544 W ("Is_Limited_Record", Flag25 (Id));
8545 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8546 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8547 W ("Is_Non_Static_Subtype", Flag109 (Id));
8548 W ("Is_Null_Init_Proc", Flag178 (Id));
8549 W ("Is_Obsolescent", Flag153 (Id));
8550 W ("Is_Only_Out_Parameter", Flag226 (Id));
8551 W ("Is_Package_Body_Entity", Flag160 (Id));
8552 W ("Is_Packed", Flag51 (Id));
8553 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8554 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8555 W ("Is_Predicate_Function", Flag255 (Id));
8556 W ("Is_Predicate_Function_M", Flag256 (Id));
8557 W ("Is_Preelaborated", Flag59 (Id));
8558 W ("Is_Primitive", Flag218 (Id));
8559 W ("Is_Primitive_Wrapper", Flag195 (Id));
8560 W ("Is_Private_Composite", Flag107 (Id));
8561 W ("Is_Private_Descendant", Flag53 (Id));
8562 W ("Is_Private_Primitive", Flag245 (Id));
8563 W ("Is_Processed_Transient", Flag252 (Id));
8564 W ("Is_Public", Flag10 (Id));
8565 W ("Is_Pure", Flag44 (Id));
8566 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8567 W ("Is_RACW_Stub_Type", Flag244 (Id));
8568 W ("Is_Raised", Flag224 (Id));
8569 W ("Is_Remote_Call_Interface", Flag62 (Id));
8570 W ("Is_Remote_Types", Flag61 (Id));
8571 W ("Is_Renaming_Of_Object", Flag112 (Id));
8572 W ("Is_Return_Object", Flag209 (Id));
8573 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8574 W ("Is_Shared_Passive", Flag60 (Id));
8575 W ("Is_Statically_Allocated", Flag28 (Id));
8576 W ("Is_Tag", Flag78 (Id));
8577 W ("Is_Tagged_Type", Flag55 (Id));
8578 W ("Is_Thunk", Flag225 (Id));
8579 W ("Is_Trivial_Subprogram", Flag235 (Id));
8580 W ("Is_True_Constant", Flag163 (Id));
8581 W ("Is_Unchecked_Union", Flag117 (Id));
8582 W ("Is_Underlying_Record_View", Flag246 (Id));
8583 W ("Is_Unsigned_Type", Flag144 (Id));
8584 W ("Is_Valued_Procedure", Flag127 (Id));
8585 W ("Is_Visible_Formal", Flag206 (Id));
8586 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8587 W ("Is_Volatile", Flag16 (Id));
8588 W ("Itype_Printed", Flag202 (Id));
8589 W ("Kill_Elaboration_Checks", Flag32 (Id));
8590 W ("Kill_Range_Checks", Flag33 (Id));
8591 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8592 W ("Low_Bound_Tested", Flag205 (Id));
8593 W ("Machine_Radix_10", Flag84 (Id));
8594 W ("Materialize_Entity", Flag168 (Id));
8595 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8596 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8597 W ("Must_Have_Preelab_Init", Flag208 (Id));
8598 W ("Needs_Debug_Info", Flag147 (Id));
8599 W ("Needs_No_Actuals", Flag22 (Id));
8600 W ("Never_Set_In_Source", Flag115 (Id));
8601 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8602 W ("No_Pool_Assigned", Flag131 (Id));
8603 W ("No_Predicate_On_actual", Flag275 (Id));
8604 W ("No_Return", Flag113 (Id));
8605 W ("No_Strict_Aliasing", Flag136 (Id));
8606 W ("Non_Binary_Modulus", Flag58 (Id));
8607 W ("Nonzero_Is_True", Flag162 (Id));
8608 W ("OK_To_Rename", Flag247 (Id));
8609 W ("OK_To_Reorder_Components", Flag239 (Id));
8610 W ("Optimize_Alignment_Space", Flag241 (Id));
8611 W ("Optimize_Alignment_Time", Flag242 (Id));
8612 W ("Overlays_Constant", Flag243 (Id));
8613 W ("Reachable", Flag49 (Id));
8614 W ("Referenced", Flag156 (Id));
8615 W ("Referenced_As_LHS", Flag36 (Id));
8616 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8617 W ("Renamed_In_Spec", Flag231 (Id));
8618 W ("Requires_Overriding", Flag213 (Id));
8619 W ("Return_Present", Flag54 (Id));
8620 W ("Returns_By_Ref", Flag90 (Id));
8621 W ("Returns_Limited_View", Flag134 (Id));
8622 W ("Reverse_Bit_Order", Flag164 (Id));
8623 W ("Reverse_Storage_Order", Flag93 (Id));
8624 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8625 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8626 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8627 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8628 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8629 W ("SSO_Set_High_By_Default", Flag273 (Id));
8630 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8631 W ("Static_Elaboration_Desired", Flag77 (Id));
8632 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8633 W ("Strict_Alignment", Flag145 (Id));
8634 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8635 W ("Suppress_Initialization", Flag105 (Id));
8636 W ("Suppress_Style_Checks", Flag165 (Id));
8637 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8638 W ("Treat_As_Volatile", Flag41 (Id));
8639 W ("Universal_Aliasing", Flag216 (Id));
8640 W ("Used_As_Generic_Actual", Flag222 (Id));
8641 W ("Uses_Sec_Stack", Flag95 (Id));
8642 W ("Warnings_Off", Flag96 (Id));
8643 W ("Warnings_Off_Used", Flag236 (Id));
8644 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8645 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8646 W ("Was_Hidden", Flag196 (Id));
8647 end Write_Entity_Flags;
8649 -----------------------
8650 -- Write_Entity_Info --
8651 -----------------------
8653 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8655 procedure Write_Attribute (Which : String; Nam : E);
8656 -- Write attribute value with given string name
8658 procedure Write_Kind (Id : Entity_Id);
8659 -- Write Ekind field of entity
8661 ---------------------
8662 -- Write_Attribute --
8663 ---------------------
8665 procedure Write_Attribute (Which : String; Nam : E) is
8669 Write_Int (Int (Nam));
8671 Write_Name (Chars (Nam));
8673 end Write_Attribute;
8679 procedure Write_Kind (Id : Entity_Id) is
8680 K : constant String := Entity_Kind'Image (Ekind (Id));
8684 Write_Str (" Kind ");
8686 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8687 Write_Str ("TAGGED ");
8690 Write_Str (K (3 .. K'Length));
8693 if Is_Type (Id) and then Depends_On_Private (Id) then
8694 Write_Str ("Depends_On_Private ");
8698 -- Start of processing for Write_Entity_Info
8702 Write_Attribute ("Name ", Id);
8703 Write_Int (Int (Id));
8707 Write_Attribute (" Type ", Etype (Id));
8709 Write_Attribute (" Scope ", Scope (Id));
8714 when Discrete_Kind =>
8715 Write_Str ("Bounds: Id = ");
8717 if Present (Scalar_Range (Id)) then
8718 Write_Int (Int (Type_Low_Bound (Id)));
8719 Write_Str (" .. Id = ");
8720 Write_Int (Int (Type_High_Bound (Id)));
8722 Write_Str ("Empty");
8733 (" Component Type ", Component_Type (Id));
8736 Write_Str (" Indexes ");
8738 Index := First_Index (Id);
8739 while Present (Index) loop
8740 Write_Attribute (" ", Etype (Index));
8741 Index := Next_Index (Index);
8749 (" Directly Designated Type ",
8750 Directly_Designated_Type (Id));
8753 when Overloadable_Kind =>
8754 if Present (Homonym (Id)) then
8755 Write_Str (" Homonym ");
8756 Write_Name (Chars (Homonym (Id)));
8758 Write_Int (Int (Homonym (Id)));
8765 if Ekind (Scope (Id)) in Record_Kind then
8767 " Original_Record_Component ",
8768 Original_Record_Component (Id));
8769 Write_Int (Int (Original_Record_Component (Id)));
8773 when others => null;
8775 end Write_Entity_Info;
8777 -----------------------
8778 -- Write_Field6_Name --
8779 -----------------------
8781 procedure Write_Field6_Name (Id : Entity_Id) is
8782 pragma Warnings (Off, Id);
8784 Write_Str ("First_Rep_Item");
8785 end Write_Field6_Name;
8787 -----------------------
8788 -- Write_Field7_Name --
8789 -----------------------
8791 procedure Write_Field7_Name (Id : Entity_Id) is
8792 pragma Warnings (Off, Id);
8794 Write_Str ("Freeze_Node");
8795 end Write_Field7_Name;
8797 -----------------------
8798 -- Write_Field8_Name --
8799 -----------------------
8801 procedure Write_Field8_Name (Id : Entity_Id) is
8805 Write_Str ("Associated_Node_For_Itype");
8808 Write_Str ("Dependent_Instances");
8811 Write_Str ("First_Exit_Statement");
8814 Write_Str ("Hiding_Loop_Variable");
8818 E_Subprogram_Body =>
8819 Write_Str ("Mechanism");
8823 Write_Str ("Normalized_First_Bit");
8826 Write_Str ("Postcondition_Proc");
8828 when E_Abstract_State =>
8829 Write_Str ("Refinement_Constituents");
8831 when E_Return_Statement =>
8832 Write_Str ("Return_Applies_To");
8835 Write_Str ("Field8??");
8837 end Write_Field8_Name;
8839 -----------------------
8840 -- Write_Field9_Name --
8841 -----------------------
8843 procedure Write_Field9_Name (Id : Entity_Id) is
8847 Write_Str ("Class_Wide_Type");
8850 Write_Str ("Current_Value");
8852 when E_Abstract_State =>
8853 Write_Str ("Part_Of_Constituents");
8856 E_Generic_Function |
8858 E_Generic_Procedure |
8861 Write_Str ("Renaming_Map");
8864 Write_Str ("Field9??");
8866 end Write_Field9_Name;
8868 ------------------------
8869 -- Write_Field10_Name --
8870 ------------------------
8872 procedure Write_Field10_Name (Id : Entity_Id) is
8875 when E_Abstract_State |
8877 Write_Str ("Encapsulating_State");
8879 when Class_Wide_Kind |
8885 Write_Str ("Direct_Primitive_Operations");
8888 Write_Str ("Float_Rep");
8890 when E_In_Parameter |
8892 Write_Str ("Discriminal_Link");
8898 Write_Str ("Handler_Records");
8902 Write_Str ("Normalized_Position_Max");
8905 Write_Str ("Field10??");
8907 end Write_Field10_Name;
8909 ------------------------
8910 -- Write_Field11_Name --
8911 ------------------------
8913 procedure Write_Field11_Name (Id : Entity_Id) is
8917 Write_Str ("Block_Node");
8921 Write_Str ("Component_Bit_Offset");
8924 Write_Str ("Entry_Component");
8926 when E_Enumeration_Literal =>
8927 Write_Str ("Enumeration_Pos");
8931 Write_Str ("Full_View");
8933 when E_Generic_Package =>
8934 Write_Str ("Generic_Homonym");
8940 Write_Str ("Protected_Body_Subprogram");
8943 Write_Str ("Field11??");
8945 end Write_Field11_Name;
8947 ------------------------
8948 -- Write_Field12_Name --
8949 ------------------------
8951 procedure Write_Field12_Name (Id : Entity_Id) is
8955 Write_Str ("Associated_Formal_Package");
8958 Write_Str ("Barrier_Function");
8960 when E_Enumeration_Literal =>
8961 Write_Str ("Enumeration_Rep");
8969 E_In_Out_Parameter |
8973 Write_Str ("Esize");
8977 Write_Str ("Next_Inlined_Subprogram");
8980 Write_Str ("Field12??");
8982 end Write_Field12_Name;
8984 ------------------------
8985 -- Write_Field13_Name --
8986 ------------------------
8988 procedure Write_Field13_Name (Id : Entity_Id) is
8993 Write_Str ("Component_Clause");
8996 Write_Str ("Elaboration_Entity");
9000 Generic_Unit_Kind =>
9001 Write_Str ("Elaboration_Entity");
9005 Write_Str ("Extra_Accessibility");
9008 Write_Str ("RM_Size");
9011 Write_Str ("Field13??");
9013 end Write_Field13_Name;
9015 -----------------------
9016 -- Write_Field14_Name --
9017 -----------------------
9019 procedure Write_Field14_Name (Id : Entity_Id) is
9028 Write_Str ("Alignment");
9032 Write_Str ("Normalized_Position");
9035 E_Generic_Package =>
9036 Write_Str ("Shadow_Entities");
9039 Write_Str ("Field14??");
9041 end Write_Field14_Name;
9043 ------------------------
9044 -- Write_Field15_Name --
9045 ------------------------
9047 procedure Write_Field15_Name (Id : Entity_Id) is
9050 when E_Discriminant =>
9051 Write_Str ("Discriminant_Number");
9054 Write_Str ("DT_Entry_Count");
9058 Write_Str ("DT_Position");
9060 when E_Protected_Type =>
9061 Write_Str ("Entry_Bodies_Array");
9064 Write_Str ("Entry_Parameters_Type");
9067 Write_Str ("Extra_Formal");
9069 when Enumeration_Kind =>
9070 Write_Str ("Lit_Indexes");
9074 Write_Str ("Related_Instance");
9076 when Decimal_Fixed_Point_Kind =>
9077 Write_Str ("Scale_Value");
9081 Write_Str ("Status_Flag_Or_Transient_Decl");
9085 Write_Str ("Storage_Size_Variable");
9087 when E_String_Literal_Subtype =>
9088 Write_Str ("String_Literal_Low_Bound");
9091 Write_Str ("Field15??");
9093 end Write_Field15_Name;
9095 ------------------------
9096 -- Write_Field16_Name --
9097 ------------------------
9099 procedure Write_Field16_Name (Id : Entity_Id) is
9102 when E_Record_Type |
9103 E_Record_Type_With_Private =>
9104 Write_Str ("Access_Disp_Table");
9106 when E_Abstract_State =>
9107 Write_Str ("Body_References");
9109 when E_Record_Subtype |
9110 E_Class_Wide_Subtype =>
9111 Write_Str ("Cloned_Subtype");
9115 Write_Str ("DTC_Entity");
9118 Write_Str ("Entry_Formal");
9123 Write_Str ("First_Private_Entity");
9125 when Enumeration_Kind =>
9126 Write_Str ("Lit_Strings");
9128 when E_String_Literal_Subtype =>
9129 Write_Str ("String_Literal_Length");
9133 Write_Str ("Unset_Reference");
9136 Write_Str ("Field16??");
9138 end Write_Field16_Name;
9140 ------------------------
9141 -- Write_Field17_Name --
9142 ------------------------
9144 procedure Write_Field17_Name (Id : Entity_Id) is
9149 E_Generic_In_Out_Parameter |
9151 Write_Str ("Actual_Subtype");
9154 Write_Str ("Digits_Value");
9156 when E_Discriminant =>
9157 Write_Str ("Discriminal");
9166 E_Generic_Function |
9168 E_Generic_Procedure |
9176 E_Return_Statement |
9178 E_Subprogram_Type =>
9179 Write_Str ("First_Entity");
9182 Write_Str ("First_Index");
9184 when Enumeration_Kind =>
9185 Write_Str ("First_Literal");
9188 Write_Str ("Master_Id");
9190 when Modular_Integer_Kind =>
9191 Write_Str ("Modulus");
9193 when E_Abstract_State |
9194 E_Incomplete_Type =>
9195 Write_Str ("Non_Limited_View");
9197 when E_Incomplete_Subtype =>
9198 if From_Limited_With (Id) then
9199 Write_Str ("Non_Limited_View");
9203 Write_Str ("Prival");
9206 Write_Str ("Field17??");
9208 end Write_Field17_Name;
9210 ------------------------
9211 -- Write_Field18_Name --
9212 ------------------------
9214 procedure Write_Field18_Name (Id : Entity_Id) is
9217 when E_Enumeration_Literal |
9221 Write_Str ("Alias");
9223 when E_Record_Type =>
9224 Write_Str ("Corresponding_Concurrent_Type");
9226 when E_Subprogram_Body =>
9227 Write_Str ("Corresponding_Protected_Entry");
9229 when Concurrent_Kind =>
9230 Write_Str ("Corresponding_Record_Type");
9235 Write_Str ("Enclosing_Scope");
9237 when E_Entry_Index_Parameter =>
9238 Write_Str ("Entry_Index_Constant");
9240 when E_Class_Wide_Subtype |
9241 E_Access_Protected_Subprogram_Type |
9242 E_Anonymous_Access_Protected_Subprogram_Type |
9243 E_Access_Subprogram_Type |
9245 Write_Str ("Equivalent_Type");
9247 when Fixed_Point_Kind =>
9248 Write_Str ("Delta_Value");
9250 when Incomplete_Or_Private_Kind |
9252 Write_Str ("Private_Dependents");
9255 Write_Str ("Renamed_Object");
9259 E_Generic_Function |
9260 E_Generic_Procedure |
9261 E_Generic_Package =>
9262 Write_Str ("Renamed_Entity");
9265 Write_Str ("Field18??");
9267 end Write_Field18_Name;
9269 -----------------------
9270 -- Write_Field19_Name --
9271 -----------------------
9273 procedure Write_Field19_Name (Id : Entity_Id) is
9277 E_Generic_Package =>
9278 Write_Str ("Body_Entity");
9280 when E_Discriminant =>
9281 Write_Str ("Corresponding_Discriminant");
9284 Write_Str ("Default_Aspect_Value");
9286 when E_Array_Type =>
9287 Write_Str ("Default_Component_Value");
9289 when E_Record_Type =>
9290 Write_Str ("Parent_Subtype");
9294 Write_Str ("Size_Check_Code");
9296 when E_Package_Body |
9298 Write_Str ("Spec_Entity");
9300 when Private_Kind =>
9301 Write_Str ("Underlying_Full_View");
9303 when E_Function | E_Operator | E_Subprogram_Type =>
9304 Write_Str ("Extra_Accessibility_Of_Result");
9307 Write_Str ("Field19??");
9309 end Write_Field19_Name;
9311 -----------------------
9312 -- Write_Field20_Name --
9313 -----------------------
9315 procedure Write_Field20_Name (Id : Entity_Id) is
9319 Write_Str ("Component_Type");
9321 when E_In_Parameter |
9322 E_Generic_In_Parameter =>
9323 Write_Str ("Default_Value");
9326 Write_Str ("Directly_Designated_Type");
9329 Write_Str ("Discriminant_Checking_Func");
9331 when E_Discriminant =>
9332 Write_Str ("Discriminant_Default_Value");
9341 E_Generic_Function |
9343 E_Generic_Procedure |
9351 E_Return_Statement |
9353 E_Subprogram_Type =>
9354 Write_Str ("Last_Entity");
9358 Write_Str ("Prival_Link");
9361 Write_Str ("Scalar_Range");
9364 Write_Str ("Register_Exception_Call");
9367 Write_Str ("Field20??");
9369 end Write_Field20_Name;
9371 -----------------------
9372 -- Write_Field21_Name --
9373 -----------------------
9375 procedure Write_Field21_Name (Id : Entity_Id) is
9379 Write_Str ("Accept_Address");
9381 when E_In_Parameter =>
9382 Write_Str ("Default_Expr_Function");
9384 when Concurrent_Kind |
9385 Incomplete_Or_Private_Kind |
9389 Write_Str ("Discriminant_Constraint");
9394 E_Generic_Function |
9396 E_Generic_Procedure |
9398 Write_Str ("Interface_Name");
9401 Modular_Integer_Kind =>
9402 Write_Str ("Original_Array_Type");
9404 when Fixed_Point_Kind =>
9405 Write_Str ("Small_Value");
9408 Write_Str ("Field21??");
9410 end Write_Field21_Name;
9412 -----------------------
9413 -- Write_Field22_Name --
9414 -----------------------
9416 procedure Write_Field22_Name (Id : Entity_Id) is
9420 Write_Str ("Associated_Storage_Pool");
9423 Write_Str ("Component_Size");
9425 when E_Record_Type =>
9426 Write_Str ("Corresponding_Remote_Type");
9430 Write_Str ("Original_Record_Component");
9432 when E_Enumeration_Literal =>
9433 Write_Str ("Enumeration_Rep_Expr");
9435 when E_Record_Type_With_Private |
9436 E_Record_Subtype_With_Private |
9439 E_Limited_Private_Type |
9440 E_Limited_Private_Subtype =>
9441 Write_Str ("Private_View");
9444 Write_Str ("Protected_Formal");
9454 E_Generic_Function |
9455 E_Generic_Procedure |
9458 E_Return_Statement |
9461 Write_Str ("Scope_Depth_Value");
9464 Write_Str ("Shared_Var_Procs_Instance");
9467 Write_Str ("Field22??");
9469 end Write_Field22_Name;
9471 ------------------------
9472 -- Write_Field23_Name --
9473 ------------------------
9475 procedure Write_Field23_Name (Id : Entity_Id) is
9478 when E_Discriminant =>
9479 Write_Str ("CR_Discriminant");
9482 Write_Str ("Entry_Cancel_Parameter");
9484 when E_Enumeration_Type =>
9485 Write_Str ("Enum_Pos_To_Rep");
9489 Write_Str ("Extra_Constrained");
9492 Write_Str ("Finalization_Master");
9494 when E_Generic_Function |
9496 E_Generic_Procedure =>
9497 Write_Str ("Inner_Instances");
9500 Write_Str ("Packed_Array_Impl_Type");
9503 Write_Str ("Protection_Object");
9505 when Concurrent_Kind |
9506 Incomplete_Or_Private_Kind |
9510 Write_Str ("Stored_Constraint");
9514 if Present (Scope (Id))
9515 and then Is_Protected_Type (Scope (Id))
9517 Write_Str ("Protection_Object");
9519 Write_Str ("Generic_Renamings");
9523 if Is_Generic_Instance (Id) then
9524 Write_Str ("Generic_Renamings");
9526 Write_Str ("Limited_View");
9530 Write_Str ("Field23??");
9532 end Write_Field23_Name;
9534 ------------------------
9535 -- Write_Field24_Name --
9536 ------------------------
9538 procedure Write_Field24_Name (Id : Entity_Id) is
9544 Write_Str ("Related_Expression");
9547 Write_Str ("Field24???");
9549 end Write_Field24_Name;
9551 ------------------------
9552 -- Write_Field25_Name --
9553 ------------------------
9555 procedure Write_Field25_Name (Id : Entity_Id) is
9558 when E_Generic_Package |
9560 Write_Str ("Abstract_States");
9563 Write_Str ("Debug_Renaming_Link");
9566 Write_Str ("DT_Offset_To_Top_Func");
9570 Write_Str ("Interface_Alias");
9572 when E_Record_Type |
9574 E_Record_Type_With_Private |
9575 E_Record_Subtype_With_Private =>
9576 Write_Str ("Interfaces");
9580 Write_Str ("Related_Array_Object");
9583 Write_Str ("Task_Body_Procedure");
9587 Write_Str ("PPC_Wrapper");
9589 when Discrete_Kind =>
9590 Write_Str ("Static_Discrete_Predicate");
9593 Write_Str ("Static_Real_Or_String_Predicate");
9596 Write_Str ("Field25??");
9598 end Write_Field25_Name;
9600 ------------------------
9601 -- Write_Field26_Name --
9602 ------------------------
9604 procedure Write_Field26_Name (Id : Entity_Id) is
9607 when E_Record_Type |
9608 E_Record_Type_With_Private =>
9609 Write_Str ("Dispatch_Table_Wrappers");
9611 when E_In_Out_Parameter |
9614 Write_Str ("Last_Assignment");
9616 when E_Access_Subprogram_Type =>
9617 Write_Str ("Original_Access_Type");
9619 when E_Generic_Package |
9621 Write_Str ("Package_Instantiation");
9625 Write_Str ("Related_Type");
9628 Write_Str ("Relative_Deadline_Variable");
9632 Write_Str ("Overridden_Operation");
9635 Write_Str ("Field26??");
9637 end Write_Field26_Name;
9639 ------------------------
9640 -- Write_Field27_Name --
9641 ------------------------
9643 procedure Write_Field27_Name (Id : Entity_Id) is
9648 Write_Str ("Current_Use_Clause");
9653 Write_Str ("Related_Type");
9657 Write_Str ("Wrapped_Entity");
9660 Write_Str ("Field27??");
9662 end Write_Field27_Name;
9664 ------------------------
9665 -- Write_Field28_Name --
9666 ------------------------
9668 procedure Write_Field28_Name (Id : Entity_Id) is
9676 E_Subprogram_Type =>
9677 Write_Str ("Extra_Formals");
9681 Write_Str ("Finalizer");
9685 Write_Str ("Initialization_Statements");
9687 when E_Record_Type =>
9688 Write_Str ("Underlying_Record_View");
9691 Write_Str ("Field28??");
9693 end Write_Field28_Name;
9695 ------------------------
9696 -- Write_Field29_Name --
9697 ------------------------
9699 procedure Write_Field29_Name (Id : Entity_Id) is
9704 Write_Str ("BIP_Initialization_Call");
9707 Write_Str ("Subprograms_For_Type");
9710 Write_Str ("Field29??");
9712 end Write_Field29_Name;
9714 ------------------------
9715 -- Write_Field30_Name --
9716 ------------------------
9718 procedure Write_Field30_Name (Id : Entity_Id) is
9722 Write_Str ("Corresponding_Equality");
9726 Write_Str ("Last_Aggregate_Assignment");
9729 Write_Str ("Static_Initialization");
9732 Write_Str ("Field30??");
9734 end Write_Field30_Name;
9736 ------------------------
9737 -- Write_Field31_Name --
9738 ------------------------
9740 procedure Write_Field31_Name (Id : Entity_Id) is
9745 Write_Str ("Thunk_Entity");
9748 Write_Str ("Derived_Type_Link");
9751 Write_Str ("Field31??");
9753 end Write_Field31_Name;
9755 ------------------------
9756 -- Write_Field32_Name --
9757 ------------------------
9759 procedure Write_Field32_Name (Id : Entity_Id) is
9763 E_Generic_Function |
9765 E_Generic_Procedure |
9769 E_Subprogram_Body =>
9770 Write_Str ("SPARK_Pragma");
9773 Write_Str ("No_Tagged_Streams_Pragma");
9776 Write_Str ("Field32??");
9778 end Write_Field32_Name;
9780 ------------------------
9781 -- Write_Field33_Name --
9782 ------------------------
9784 procedure Write_Field33_Name (Id : Entity_Id) is
9787 when E_Generic_Package |
9790 Write_Str ("SPARK_Aux_Pragma");
9796 Write_Str ("Linker_Section_Pragma");
9799 Write_Str ("Field33??");
9801 end Write_Field33_Name;
9803 ------------------------
9804 -- Write_Field34_Name --
9805 ------------------------
9807 procedure Write_Field34_Name (Id : Entity_Id) is
9817 Generic_Subprogram_Kind |
9819 Write_Str ("Contract");
9822 Write_Str ("Field34??");
9824 end Write_Field34_Name;
9826 ------------------------
9827 -- Write_Field35_Name --
9828 ------------------------
9830 procedure Write_Field35_Name (Id : Entity_Id) is
9833 when Subprogram_Kind =>
9834 Write_Str ("Import_Pragma");
9836 Write_Str ("Field35??");
9838 end Write_Field35_Name;
9840 -------------------------
9841 -- Iterator Procedures --
9842 -------------------------
9844 procedure Proc_Next_Component (N : in out Node_Id) is
9846 N := Next_Component (N);
9847 end Proc_Next_Component;
9849 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9851 N := Next_Entity (N);
9852 while Present (N) loop
9853 exit when Ekind_In (N, E_Component, E_Discriminant);
9854 N := Next_Entity (N);
9856 end Proc_Next_Component_Or_Discriminant;
9858 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9860 N := Next_Discriminant (N);
9861 end Proc_Next_Discriminant;
9863 procedure Proc_Next_Formal (N : in out Node_Id) is
9865 N := Next_Formal (N);
9866 end Proc_Next_Formal;
9868 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9870 N := Next_Formal_With_Extras (N);
9871 end Proc_Next_Formal_With_Extras;
9873 procedure Proc_Next_Index (N : in out Node_Id) is
9875 N := Next_Index (N);
9876 end Proc_Next_Index;
9878 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9880 N := Next_Inlined_Subprogram (N);
9881 end Proc_Next_Inlined_Subprogram;
9883 procedure Proc_Next_Literal (N : in out Node_Id) is
9885 N := Next_Literal (N);
9886 end Proc_Next_Literal;
9888 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9890 N := Next_Stored_Discriminant (N);
9891 end Proc_Next_Stored_Discriminant;