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 return Flag268 (Id);
2123 function Is_Inlined (Id : E) return B is
2128 function Is_Inlined_Always (Id : E) return B is
2130 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2132 end Is_Inlined_Always;
2134 function Is_Interface (Id : E) return B is
2136 return Flag186 (Id);
2139 function Is_Instantiated (Id : E) return B is
2141 return Flag126 (Id);
2142 end Is_Instantiated;
2144 function Is_Internal (Id : E) return B is
2146 pragma Assert (Nkind (Id) in N_Entity);
2150 function Is_Interrupt_Handler (Id : E) return B is
2152 pragma Assert (Nkind (Id) in N_Entity);
2154 end Is_Interrupt_Handler;
2156 function Is_Intrinsic_Subprogram (Id : E) return B is
2159 end Is_Intrinsic_Subprogram;
2161 function Is_Invariant_Procedure (Id : E) return B is
2163 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2164 return Flag257 (Id);
2165 end Is_Invariant_Procedure;
2167 function Is_Itype (Id : E) return B is
2172 function Is_Known_Non_Null (Id : E) return B is
2175 end Is_Known_Non_Null;
2177 function Is_Known_Null (Id : E) return B is
2179 return Flag204 (Id);
2182 function Is_Known_Valid (Id : E) return B is
2184 return Flag170 (Id);
2187 function Is_Limited_Composite (Id : E) return B is
2189 return Flag106 (Id);
2190 end Is_Limited_Composite;
2192 function Is_Limited_Interface (Id : E) return B is
2194 return Flag197 (Id);
2195 end Is_Limited_Interface;
2197 function Is_Limited_Record (Id : E) return B is
2200 end Is_Limited_Record;
2202 function Is_Machine_Code_Subprogram (Id : E) return B is
2204 pragma Assert (Is_Subprogram (Id));
2205 return Flag137 (Id);
2206 end Is_Machine_Code_Subprogram;
2208 function Is_Non_Static_Subtype (Id : E) return B is
2210 pragma Assert (Is_Type (Id));
2211 return Flag109 (Id);
2212 end Is_Non_Static_Subtype;
2214 function Is_Null_Init_Proc (Id : E) return B is
2216 pragma Assert (Ekind (Id) = E_Procedure);
2217 return Flag178 (Id);
2218 end Is_Null_Init_Proc;
2220 function Is_Obsolescent (Id : E) return B is
2222 return Flag153 (Id);
2225 function Is_Only_Out_Parameter (Id : E) return B is
2227 pragma Assert (Is_Formal (Id));
2228 return Flag226 (Id);
2229 end Is_Only_Out_Parameter;
2231 function Is_Package_Body_Entity (Id : E) return B is
2233 return Flag160 (Id);
2234 end Is_Package_Body_Entity;
2236 function Is_Packed (Id : E) return B is
2238 return Flag51 (Implementation_Base_Type (Id));
2241 function Is_Packed_Array_Impl_Type (Id : E) return B is
2243 return Flag138 (Id);
2244 end Is_Packed_Array_Impl_Type;
2246 function Is_Potentially_Use_Visible (Id : E) return B is
2248 pragma Assert (Nkind (Id) in N_Entity);
2250 end Is_Potentially_Use_Visible;
2252 function Is_Predicate_Function (Id : E) return B is
2254 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2255 return Flag255 (Id);
2256 end Is_Predicate_Function;
2258 function Is_Predicate_Function_M (Id : E) return B is
2260 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2261 return Flag256 (Id);
2262 end Is_Predicate_Function_M;
2264 function Is_Preelaborated (Id : E) return B is
2267 end Is_Preelaborated;
2269 function Is_Primitive (Id : E) return B is
2272 (Is_Overloadable (Id)
2273 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2274 return Flag218 (Id);
2277 function Is_Primitive_Wrapper (Id : E) return B is
2279 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2280 return Flag195 (Id);
2281 end Is_Primitive_Wrapper;
2283 function Is_Private_Composite (Id : E) return B is
2285 pragma Assert (Is_Type (Id));
2286 return Flag107 (Id);
2287 end Is_Private_Composite;
2289 function Is_Private_Descendant (Id : E) return B is
2292 end Is_Private_Descendant;
2294 function Is_Private_Primitive (Id : E) return B is
2296 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2297 return Flag245 (Id);
2298 end Is_Private_Primitive;
2300 function Is_Processed_Transient (Id : E) return B is
2302 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2303 return Flag252 (Id);
2304 end Is_Processed_Transient;
2306 function Is_Public (Id : E) return B is
2308 pragma Assert (Nkind (Id) in N_Entity);
2312 function Is_Pure (Id : E) return B is
2317 function Is_Pure_Unit_Access_Type (Id : E) return B is
2319 pragma Assert (Is_Access_Type (Id));
2320 return Flag189 (Id);
2321 end Is_Pure_Unit_Access_Type;
2323 function Is_RACW_Stub_Type (Id : E) return B is
2325 pragma Assert (Is_Type (Id));
2326 return Flag244 (Id);
2327 end Is_RACW_Stub_Type;
2329 function Is_Raised (Id : E) return B is
2331 pragma Assert (Ekind (Id) = E_Exception);
2332 return Flag224 (Id);
2335 function Is_Remote_Call_Interface (Id : E) return B is
2338 end Is_Remote_Call_Interface;
2340 function Is_Remote_Types (Id : E) return B is
2343 end Is_Remote_Types;
2345 function Is_Renaming_Of_Object (Id : E) return B is
2347 return Flag112 (Id);
2348 end Is_Renaming_Of_Object;
2350 function Is_Return_Object (Id : E) return B is
2352 return Flag209 (Id);
2353 end Is_Return_Object;
2355 function Is_Safe_To_Reevaluate (Id : E) return B is
2357 return Flag249 (Id);
2358 end Is_Safe_To_Reevaluate;
2360 function Is_Shared_Passive (Id : E) return B is
2363 end Is_Shared_Passive;
2365 function Is_Statically_Allocated (Id : E) return B is
2368 end Is_Statically_Allocated;
2370 function Is_Tag (Id : E) return B is
2372 pragma Assert (Nkind (Id) in N_Entity);
2376 function Is_Tagged_Type (Id : E) return B is
2381 function Is_Thunk (Id : E) return B is
2383 return Flag225 (Id);
2386 function Is_Trivial_Subprogram (Id : E) return B is
2388 return Flag235 (Id);
2389 end Is_Trivial_Subprogram;
2391 function Is_True_Constant (Id : E) return B is
2393 return Flag163 (Id);
2394 end Is_True_Constant;
2396 function Is_Unchecked_Union (Id : E) return B is
2398 return Flag117 (Implementation_Base_Type (Id));
2399 end Is_Unchecked_Union;
2401 function Is_Underlying_Record_View (Id : E) return B is
2403 return Flag246 (Id);
2404 end Is_Underlying_Record_View;
2406 function Is_Unsigned_Type (Id : E) return B is
2408 pragma Assert (Is_Type (Id));
2409 return Flag144 (Id);
2410 end Is_Unsigned_Type;
2412 function Is_Valued_Procedure (Id : E) return B is
2414 pragma Assert (Ekind (Id) = E_Procedure);
2415 return Flag127 (Id);
2416 end Is_Valued_Procedure;
2418 function Is_Visible_Formal (Id : E) return B is
2420 return Flag206 (Id);
2421 end Is_Visible_Formal;
2423 function Is_Visible_Lib_Unit (Id : E) return B is
2425 return Flag116 (Id);
2426 end Is_Visible_Lib_Unit;
2428 function Is_Volatile (Id : E) return B is
2430 pragma Assert (Nkind (Id) in N_Entity);
2432 if Is_Type (Id) then
2433 return Flag16 (Base_Type (Id));
2439 function Itype_Printed (Id : E) return B is
2441 pragma Assert (Is_Itype (Id));
2442 return Flag202 (Id);
2445 function Kill_Elaboration_Checks (Id : E) return B is
2448 end Kill_Elaboration_Checks;
2450 function Kill_Range_Checks (Id : E) return B is
2453 end Kill_Range_Checks;
2455 function Known_To_Have_Preelab_Init (Id : E) return B is
2457 pragma Assert (Is_Type (Id));
2458 return Flag207 (Id);
2459 end Known_To_Have_Preelab_Init;
2461 function Last_Aggregate_Assignment (Id : E) return N is
2463 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2465 end Last_Aggregate_Assignment;
2467 function Last_Assignment (Id : E) return N is
2469 pragma Assert (Is_Assignable (Id));
2471 end Last_Assignment;
2473 function Last_Entity (Id : E) return E is
2478 function Limited_View (Id : E) return E is
2480 pragma Assert (Ekind (Id) = E_Package);
2484 function Linker_Section_Pragma (Id : E) return N is
2487 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2489 end Linker_Section_Pragma;
2491 function Lit_Indexes (Id : E) return E is
2493 pragma Assert (Is_Enumeration_Type (Id));
2497 function Lit_Strings (Id : E) return E is
2499 pragma Assert (Is_Enumeration_Type (Id));
2503 function Low_Bound_Tested (Id : E) return B is
2505 return Flag205 (Id);
2506 end Low_Bound_Tested;
2508 function Machine_Radix_10 (Id : E) return B is
2510 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2512 end Machine_Radix_10;
2514 function Master_Id (Id : E) return E is
2516 pragma Assert (Is_Access_Type (Id));
2520 function Materialize_Entity (Id : E) return B is
2522 return Flag168 (Id);
2523 end Materialize_Entity;
2525 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2527 return Flag262 (Id);
2528 end May_Inherit_Delayed_Rep_Aspects;
2530 function Mechanism (Id : E) return M is
2532 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2533 return UI_To_Int (Uint8 (Id));
2536 function Modulus (Id : E) return Uint is
2538 pragma Assert (Is_Modular_Integer_Type (Id));
2539 return Uint17 (Base_Type (Id));
2542 function Must_Be_On_Byte_Boundary (Id : E) return B is
2544 pragma Assert (Is_Type (Id));
2545 return Flag183 (Id);
2546 end Must_Be_On_Byte_Boundary;
2548 function Must_Have_Preelab_Init (Id : E) return B is
2550 pragma Assert (Is_Type (Id));
2551 return Flag208 (Id);
2552 end Must_Have_Preelab_Init;
2554 function Needs_Debug_Info (Id : E) return B is
2556 return Flag147 (Id);
2557 end Needs_Debug_Info;
2559 function Needs_No_Actuals (Id : E) return B is
2562 (Is_Overloadable (Id)
2563 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2565 end Needs_No_Actuals;
2567 function Never_Set_In_Source (Id : E) return B is
2569 return Flag115 (Id);
2570 end Never_Set_In_Source;
2572 function Next_Inlined_Subprogram (Id : E) return E is
2575 end Next_Inlined_Subprogram;
2577 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2579 pragma Assert (Is_Discrete_Type (Id));
2580 return Flag276 (Id);
2581 end No_Dynamic_Predicate_On_Actual;
2583 function No_Pool_Assigned (Id : E) return B is
2585 pragma Assert (Is_Access_Type (Id));
2586 return Flag131 (Root_Type (Id));
2587 end No_Pool_Assigned;
2589 function No_Predicate_On_Actual (Id : E) return Boolean is
2591 pragma Assert (Is_Discrete_Type (Id));
2592 return Flag275 (Id);
2593 end No_Predicate_On_Actual;
2595 function No_Return (Id : E) return B is
2597 return Flag113 (Id);
2600 function No_Strict_Aliasing (Id : E) return B is
2602 pragma Assert (Is_Access_Type (Id));
2603 return Flag136 (Base_Type (Id));
2604 end No_Strict_Aliasing;
2606 function No_Tagged_Streams_Pragma (Id : E) return N is
2608 pragma Assert (Is_Tagged_Type (Id));
2610 end No_Tagged_Streams_Pragma;
2612 function Non_Binary_Modulus (Id : E) return B is
2614 pragma Assert (Is_Type (Id));
2615 return Flag58 (Base_Type (Id));
2616 end Non_Binary_Modulus;
2618 function Non_Limited_View (Id : E) return E is
2621 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2623 end Non_Limited_View;
2625 function Nonzero_Is_True (Id : E) return B is
2627 pragma Assert (Root_Type (Id) = Standard_Boolean);
2628 return Flag162 (Base_Type (Id));
2629 end Nonzero_Is_True;
2631 function Normalized_First_Bit (Id : E) return U is
2633 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2635 end Normalized_First_Bit;
2637 function Normalized_Position (Id : E) return U is
2639 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2641 end Normalized_Position;
2643 function Normalized_Position_Max (Id : E) return U is
2645 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2647 end Normalized_Position_Max;
2649 function OK_To_Rename (Id : E) return B is
2651 pragma Assert (Ekind (Id) = E_Variable);
2652 return Flag247 (Id);
2655 function OK_To_Reorder_Components (Id : E) return B is
2657 pragma Assert (Is_Record_Type (Id));
2658 return Flag239 (Base_Type (Id));
2659 end OK_To_Reorder_Components;
2661 function Optimize_Alignment_Space (Id : E) return B is
2664 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2665 return Flag241 (Id);
2666 end Optimize_Alignment_Space;
2668 function Optimize_Alignment_Time (Id : E) return B is
2671 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2672 return Flag242 (Id);
2673 end Optimize_Alignment_Time;
2675 function Original_Access_Type (Id : E) return E is
2677 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2679 end Original_Access_Type;
2681 function Original_Array_Type (Id : E) return E is
2683 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2685 end Original_Array_Type;
2687 function Original_Record_Component (Id : E) return E is
2689 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2691 end Original_Record_Component;
2693 function Overlays_Constant (Id : E) return B is
2695 return Flag243 (Id);
2696 end Overlays_Constant;
2698 function Overridden_Operation (Id : E) return E is
2701 end Overridden_Operation;
2703 function Package_Instantiation (Id : E) return N is
2705 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2707 end Package_Instantiation;
2709 function Packed_Array_Impl_Type (Id : E) return E is
2711 pragma Assert (Is_Array_Type (Id));
2713 end Packed_Array_Impl_Type;
2715 function Parent_Subtype (Id : E) return E is
2717 pragma Assert (Is_Record_Type (Id));
2718 return Node19 (Base_Type (Id));
2721 function Part_Of_Constituents (Id : E) return L is
2723 pragma Assert (Ekind (Id) = E_Abstract_State);
2725 end Part_Of_Constituents;
2727 function Postcondition_Proc (Id : E) return E is
2729 pragma Assert (Ekind (Id) = E_Procedure);
2731 end Postcondition_Proc;
2733 function PPC_Wrapper (Id : E) return E is
2735 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2739 function Prival (Id : E) return E is
2741 pragma Assert (Is_Protected_Component (Id));
2745 function Prival_Link (Id : E) return E is
2747 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2751 function Private_Dependents (Id : E) return L is
2753 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2754 return Elist18 (Id);
2755 end Private_Dependents;
2757 function Private_View (Id : E) return N is
2759 pragma Assert (Is_Private_Type (Id));
2763 function Protected_Body_Subprogram (Id : E) return E is
2765 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2767 end Protected_Body_Subprogram;
2769 function Protected_Formal (Id : E) return E is
2771 pragma Assert (Is_Formal (Id));
2773 end Protected_Formal;
2775 function Protection_Object (Id : E) return E is
2778 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2780 end Protection_Object;
2782 function Reachable (Id : E) return B is
2787 function Referenced (Id : E) return B is
2789 return Flag156 (Id);
2792 function Referenced_As_LHS (Id : E) return B is
2795 end Referenced_As_LHS;
2797 function Referenced_As_Out_Parameter (Id : E) return B is
2799 return Flag227 (Id);
2800 end Referenced_As_Out_Parameter;
2802 function Refinement_Constituents (Id : E) return L is
2804 pragma Assert (Ekind (Id) = E_Abstract_State);
2806 end Refinement_Constituents;
2808 function Register_Exception_Call (Id : E) return N is
2810 pragma Assert (Ekind (Id) = E_Exception);
2812 end Register_Exception_Call;
2814 function Related_Array_Object (Id : E) return E is
2816 pragma Assert (Is_Array_Type (Id));
2818 end Related_Array_Object;
2820 function Related_Expression (Id : E) return N is
2822 pragma Assert (Ekind (Id) in Type_Kind
2823 or else Ekind_In (Id, E_Constant, E_Variable));
2825 end Related_Expression;
2827 function Related_Instance (Id : E) return E is
2829 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2831 end Related_Instance;
2833 function Related_Type (Id : E) return E is
2835 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2839 function Relative_Deadline_Variable (Id : E) return E is
2841 pragma Assert (Is_Task_Type (Id));
2842 return Node26 (Implementation_Base_Type (Id));
2843 end Relative_Deadline_Variable;
2845 function Renamed_Entity (Id : E) return N is
2850 function Renamed_In_Spec (Id : E) return B is
2852 pragma Assert (Ekind (Id) = E_Package);
2853 return Flag231 (Id);
2854 end Renamed_In_Spec;
2856 function Renamed_Object (Id : E) return N is
2861 function Renaming_Map (Id : E) return U is
2866 function Requires_Overriding (Id : E) return B is
2868 pragma Assert (Is_Overloadable (Id));
2869 return Flag213 (Id);
2870 end Requires_Overriding;
2872 function Return_Present (Id : E) return B is
2877 function Return_Applies_To (Id : E) return N is
2880 end Return_Applies_To;
2882 function Returns_By_Ref (Id : E) return B is
2887 function Returns_Limited_View (Id : E) return B is
2889 pragma Assert (Ekind (Id) = E_Function);
2890 return Flag134 (Id);
2891 end Returns_Limited_View;
2893 function Reverse_Bit_Order (Id : E) return B is
2895 pragma Assert (Is_Record_Type (Id));
2896 return Flag164 (Base_Type (Id));
2897 end Reverse_Bit_Order;
2899 function Reverse_Storage_Order (Id : E) return B is
2901 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2902 return Flag93 (Base_Type (Id));
2903 end Reverse_Storage_Order;
2905 function RM_Size (Id : E) return U is
2907 pragma Assert (Is_Type (Id));
2911 function Scalar_Range (Id : E) return N is
2916 function Scale_Value (Id : E) return U is
2921 function Scope_Depth_Value (Id : E) return U is
2924 end Scope_Depth_Value;
2926 function Sec_Stack_Needed_For_Return (Id : E) return B is
2928 return Flag167 (Id);
2929 end Sec_Stack_Needed_For_Return;
2931 function Shadow_Entities (Id : E) return S is
2933 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2935 end Shadow_Entities;
2937 function Shared_Var_Procs_Instance (Id : E) return E is
2939 pragma Assert (Ekind (Id) = E_Variable);
2941 end Shared_Var_Procs_Instance;
2943 function Size_Check_Code (Id : E) return N is
2945 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2947 end Size_Check_Code;
2949 function Size_Depends_On_Discriminant (Id : E) return B is
2951 return Flag177 (Id);
2952 end Size_Depends_On_Discriminant;
2954 function Size_Known_At_Compile_Time (Id : E) return B is
2957 end Size_Known_At_Compile_Time;
2959 function Small_Value (Id : E) return R is
2961 pragma Assert (Is_Fixed_Point_Type (Id));
2962 return Ureal21 (Id);
2965 function SPARK_Aux_Pragma (Id : E) return N is
2968 (Ekind_In (Id, E_Generic_Package, -- package variants
2972 end SPARK_Aux_Pragma;
2974 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2977 (Ekind_In (Id, E_Generic_Package, -- package variants
2980 return Flag266 (Id);
2981 end SPARK_Aux_Pragma_Inherited;
2983 function SPARK_Pragma (Id : E) return N is
2986 (Ekind_In (Id, E_Function, -- subprogram variants
2988 E_Generic_Procedure,
2992 Ekind_In (Id, E_Generic_Package, -- package variants
2998 function SPARK_Pragma_Inherited (Id : E) return B is
3001 (Ekind_In (Id, E_Function, -- subprogram variants
3003 E_Generic_Procedure,
3007 Ekind_In (Id, E_Generic_Package, -- package variants
3010 return Flag265 (Id);
3011 end SPARK_Pragma_Inherited;
3013 function Spec_Entity (Id : E) return E is
3015 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3019 function SSO_Set_High_By_Default (Id : E) return B is
3021 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3022 return Flag273 (Base_Type (Id));
3023 end SSO_Set_High_By_Default;
3025 function SSO_Set_Low_By_Default (Id : E) return B is
3027 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3028 return Flag272 (Base_Type (Id));
3029 end SSO_Set_Low_By_Default;
3031 function Static_Discrete_Predicate (Id : E) return S is
3033 pragma Assert (Is_Discrete_Type (Id));
3035 end Static_Discrete_Predicate;
3037 function Static_Real_Or_String_Predicate (Id : E) return N is
3039 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3041 end Static_Real_Or_String_Predicate;
3043 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3045 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3047 end Status_Flag_Or_Transient_Decl;
3049 function Storage_Size_Variable (Id : E) return E is
3051 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3052 return Node15 (Implementation_Base_Type (Id));
3053 end Storage_Size_Variable;
3055 function Static_Elaboration_Desired (Id : E) return B is
3057 pragma Assert (Ekind (Id) = E_Package);
3059 end Static_Elaboration_Desired;
3061 function Static_Initialization (Id : E) return N is
3064 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3066 end Static_Initialization;
3068 function Stored_Constraint (Id : E) return L is
3071 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3072 return Elist23 (Id);
3073 end Stored_Constraint;
3075 function Stores_Attribute_Old_Prefix (Id : E) return B is
3077 return Flag270 (Id);
3078 end Stores_Attribute_Old_Prefix;
3080 function Strict_Alignment (Id : E) return B is
3082 return Flag145 (Implementation_Base_Type (Id));
3083 end Strict_Alignment;
3085 function String_Literal_Length (Id : E) return U is
3088 end String_Literal_Length;
3090 function String_Literal_Low_Bound (Id : E) return N is
3093 end String_Literal_Low_Bound;
3095 function Subprograms_For_Type (Id : E) return E is
3097 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3099 end Subprograms_For_Type;
3101 function Suppress_Elaboration_Warnings (Id : E) return B is
3103 return Flag148 (Id);
3104 end Suppress_Elaboration_Warnings;
3106 function Suppress_Initialization (Id : E) return B is
3108 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3109 return Flag105 (Id);
3110 end Suppress_Initialization;
3112 function Suppress_Style_Checks (Id : E) return B is
3114 return Flag165 (Id);
3115 end Suppress_Style_Checks;
3117 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3119 return Flag217 (Id);
3120 end Suppress_Value_Tracking_On_Call;
3122 function Task_Body_Procedure (Id : E) return N is
3124 pragma Assert (Ekind (Id) in Task_Kind);
3126 end Task_Body_Procedure;
3128 function Thunk_Entity (Id : E) return E is
3130 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3131 and then Is_Thunk (Id));
3135 function Treat_As_Volatile (Id : E) return B is
3138 end Treat_As_Volatile;
3140 function Underlying_Full_View (Id : E) return E is
3142 pragma Assert (Ekind (Id) in Private_Kind);
3144 end Underlying_Full_View;
3146 function Underlying_Record_View (Id : E) return E is
3149 end Underlying_Record_View;
3151 function Universal_Aliasing (Id : E) return B is
3153 pragma Assert (Is_Type (Id));
3154 return Flag216 (Implementation_Base_Type (Id));
3155 end Universal_Aliasing;
3157 function Unset_Reference (Id : E) return N is
3160 end Unset_Reference;
3162 function Used_As_Generic_Actual (Id : E) return B is
3164 return Flag222 (Id);
3165 end Used_As_Generic_Actual;
3167 function Uses_Lock_Free (Id : E) return B is
3169 pragma Assert (Is_Protected_Type (Id));
3170 return Flag188 (Id);
3173 function Uses_Sec_Stack (Id : E) return B is
3178 function Warnings_Off (Id : E) return B is
3183 function Warnings_Off_Used (Id : E) return B is
3185 return Flag236 (Id);
3186 end Warnings_Off_Used;
3188 function Warnings_Off_Used_Unmodified (Id : E) return B is
3190 return Flag237 (Id);
3191 end Warnings_Off_Used_Unmodified;
3193 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3195 return Flag238 (Id);
3196 end Warnings_Off_Used_Unreferenced;
3198 function Wrapped_Entity (Id : E) return E is
3200 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3201 and then Is_Primitive_Wrapper (Id));
3205 function Was_Hidden (Id : E) return B is
3207 return Flag196 (Id);
3210 ------------------------------
3211 -- Classification Functions --
3212 ------------------------------
3214 function Is_Access_Type (Id : E) return B is
3216 return Ekind (Id) in Access_Kind;
3219 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3221 return Ekind (Id) in Access_Protected_Kind;
3222 end Is_Access_Protected_Subprogram_Type;
3224 function Is_Access_Subprogram_Type (Id : E) return B is
3226 return Ekind (Id) in Access_Subprogram_Kind;
3227 end Is_Access_Subprogram_Type;
3229 function Is_Aggregate_Type (Id : E) return B is
3231 return Ekind (Id) in Aggregate_Kind;
3232 end Is_Aggregate_Type;
3234 function Is_Array_Type (Id : E) return B is
3236 return Ekind (Id) in Array_Kind;
3239 function Is_Assignable (Id : E) return B is
3241 return Ekind (Id) in Assignable_Kind;
3244 function Is_Class_Wide_Type (Id : E) return B is
3246 return Ekind (Id) in Class_Wide_Kind;
3247 end Is_Class_Wide_Type;
3249 function Is_Composite_Type (Id : E) return B is
3251 return Ekind (Id) in Composite_Kind;
3252 end Is_Composite_Type;
3254 function Is_Concurrent_Body (Id : E) return B is
3256 return Ekind (Id) in
3257 Concurrent_Body_Kind;
3258 end Is_Concurrent_Body;
3260 function Is_Concurrent_Record_Type (Id : E) return B is
3263 end Is_Concurrent_Record_Type;
3265 function Is_Concurrent_Type (Id : E) return B is
3267 return Ekind (Id) in Concurrent_Kind;
3268 end Is_Concurrent_Type;
3270 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3272 return Ekind (Id) in
3273 Decimal_Fixed_Point_Kind;
3274 end Is_Decimal_Fixed_Point_Type;
3276 function Is_Digits_Type (Id : E) return B is
3278 return Ekind (Id) in Digits_Kind;
3281 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3283 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3284 end Is_Discrete_Or_Fixed_Point_Type;
3286 function Is_Discrete_Type (Id : E) return B is
3288 return Ekind (Id) in Discrete_Kind;
3289 end Is_Discrete_Type;
3291 function Is_Elementary_Type (Id : E) return B is
3293 return Ekind (Id) in Elementary_Kind;
3294 end Is_Elementary_Type;
3296 function Is_Entry (Id : E) return B is
3298 return Ekind (Id) in Entry_Kind;
3301 function Is_Enumeration_Type (Id : E) return B is
3303 return Ekind (Id) in
3305 end Is_Enumeration_Type;
3307 function Is_Fixed_Point_Type (Id : E) return B is
3309 return Ekind (Id) in
3311 end Is_Fixed_Point_Type;
3313 function Is_Floating_Point_Type (Id : E) return B is
3315 return Ekind (Id) in Float_Kind;
3316 end Is_Floating_Point_Type;
3318 function Is_Formal (Id : E) return B is
3320 return Ekind (Id) in Formal_Kind;
3323 function Is_Formal_Object (Id : E) return B is
3325 return Ekind (Id) in Formal_Object_Kind;
3326 end Is_Formal_Object;
3328 function Is_Generic_Subprogram (Id : E) return B is
3330 return Ekind (Id) in Generic_Subprogram_Kind;
3331 end Is_Generic_Subprogram;
3333 function Is_Generic_Unit (Id : E) return B is
3335 return Ekind (Id) in Generic_Unit_Kind;
3336 end Is_Generic_Unit;
3338 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3340 return Ekind (Id) in
3341 Incomplete_Or_Private_Kind;
3342 end Is_Incomplete_Or_Private_Type;
3344 function Is_Incomplete_Type (Id : E) return B is
3346 return Ekind (Id) in
3348 end Is_Incomplete_Type;
3350 function Is_Integer_Type (Id : E) return B is
3352 return Ekind (Id) in Integer_Kind;
3353 end Is_Integer_Type;
3355 function Is_Modular_Integer_Type (Id : E) return B is
3357 return Ekind (Id) in
3358 Modular_Integer_Kind;
3359 end Is_Modular_Integer_Type;
3361 function Is_Named_Number (Id : E) return B is
3363 return Ekind (Id) in Named_Kind;
3364 end Is_Named_Number;
3366 function Is_Numeric_Type (Id : E) return B is
3368 return Ekind (Id) in Numeric_Kind;
3369 end Is_Numeric_Type;
3371 function Is_Object (Id : E) return B is
3373 return Ekind (Id) in Object_Kind;
3376 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3378 return Ekind (Id) in
3379 Ordinary_Fixed_Point_Kind;
3380 end Is_Ordinary_Fixed_Point_Type;
3382 function Is_Overloadable (Id : E) return B is
3384 return Ekind (Id) in Overloadable_Kind;
3385 end Is_Overloadable;
3387 function Is_Private_Type (Id : E) return B is
3389 return Ekind (Id) in Private_Kind;
3390 end Is_Private_Type;
3392 function Is_Protected_Type (Id : E) return B is
3394 return Ekind (Id) in Protected_Kind;
3395 end Is_Protected_Type;
3397 function Is_Real_Type (Id : E) return B is
3399 return Ekind (Id) in Real_Kind;
3402 function Is_Record_Type (Id : E) return B is
3404 return Ekind (Id) in Record_Kind;
3407 function Is_Scalar_Type (Id : E) return B is
3409 return Ekind (Id) in Scalar_Kind;
3412 function Is_Signed_Integer_Type (Id : E) return B is
3414 return Ekind (Id) in Signed_Integer_Kind;
3415 end Is_Signed_Integer_Type;
3417 function Is_Subprogram (Id : E) return B is
3419 return Ekind (Id) in Subprogram_Kind;
3422 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3424 return Ekind (Id) in Subprogram_Kind
3426 Ekind (Id) in Generic_Subprogram_Kind;
3427 end Is_Subprogram_Or_Generic_Subprogram;
3429 function Is_Task_Type (Id : E) return B is
3431 return Ekind (Id) in Task_Kind;
3434 function Is_Type (Id : E) return B is
3436 return Ekind (Id) in Type_Kind;
3439 ------------------------------
3440 -- Attribute Set Procedures --
3441 ------------------------------
3443 -- Note: in many of these set procedures an "obvious" assertion is missing.
3444 -- The reason for this is that in many cases, a field is set before the
3445 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3446 -- it is possible to add assertions that specifically include the E_Void
3447 -- possibility, but in some cases, we just omit the assertions.
3449 procedure Set_Abstract_States (Id : E; V : L) is
3451 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3452 Set_Elist25 (Id, V);
3453 end Set_Abstract_States;
3455 procedure Set_Accept_Address (Id : E; V : L) is
3457 Set_Elist21 (Id, V);
3458 end Set_Accept_Address;
3460 procedure Set_Access_Disp_Table (Id : E; V : L) is
3462 pragma Assert (Ekind (Id) = E_Record_Type
3463 and then Id = Implementation_Base_Type (Id));
3464 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3465 Set_Elist16 (Id, V);
3466 end Set_Access_Disp_Table;
3468 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3471 end Set_Associated_Formal_Package;
3473 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3476 end Set_Associated_Node_For_Itype;
3478 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3480 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3482 end Set_Associated_Storage_Pool;
3484 procedure Set_Actual_Subtype (Id : E; V : E) is
3487 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3488 or else Is_Formal (Id));
3490 end Set_Actual_Subtype;
3492 procedure Set_Address_Taken (Id : E; V : B := True) is
3494 Set_Flag104 (Id, V);
3495 end Set_Address_Taken;
3497 procedure Set_Alias (Id : E; V : E) is
3500 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3504 procedure Set_Alignment (Id : E; V : U) is
3506 pragma Assert (Is_Type (Id)
3507 or else Is_Formal (Id)
3508 or else Ekind_In (Id, E_Loop_Parameter,
3515 procedure Set_Barrier_Function (Id : E; V : N) is
3517 pragma Assert (Is_Entry (Id));
3519 end Set_Barrier_Function;
3521 procedure Set_Block_Node (Id : E; V : N) is
3523 pragma Assert (Ekind (Id) = E_Block);
3527 procedure Set_Body_Entity (Id : E; V : E) is
3529 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3531 end Set_Body_Entity;
3533 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3536 (Ekind (Id) = E_Package
3537 or else Is_Subprogram (Id)
3538 or else Is_Generic_Unit (Id));
3540 end Set_Body_Needed_For_SAL;
3542 procedure Set_Body_References (Id : E; V : L) is
3544 pragma Assert (Ekind (Id) = E_Abstract_State);
3545 Set_Elist16 (Id, V);
3546 end Set_Body_References;
3548 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3550 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3552 end Set_BIP_Initialization_Call;
3554 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3556 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3557 Set_Flag125 (Id, V);
3558 end Set_C_Pass_By_Copy;
3560 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3563 end Set_Can_Never_Be_Null;
3565 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3568 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3569 Set_Flag229 (Id, V);
3570 end Set_Can_Use_Internal_Rep;
3572 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3575 end Set_Checks_May_Be_Suppressed;
3577 procedure Set_Class_Wide_Type (Id : E; V : E) is
3579 pragma Assert (Is_Type (Id));
3581 end Set_Class_Wide_Type;
3583 procedure Set_Cloned_Subtype (Id : E; V : E) is
3585 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3587 end Set_Cloned_Subtype;
3589 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3591 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3593 end Set_Component_Bit_Offset;
3595 procedure Set_Component_Clause (Id : E; V : N) is
3597 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3599 end Set_Component_Clause;
3601 procedure Set_Component_Size (Id : E; V : U) is
3603 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3605 end Set_Component_Size;
3607 procedure Set_Component_Type (Id : E; V : E) is
3609 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3611 end Set_Component_Type;
3613 procedure Set_Contract (Id : E; V : N) is
3616 (Ekind_In (Id, E_Entry,
3624 or else Is_Subprogram_Or_Generic_Subprogram (Id));
3628 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3631 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3633 end Set_Corresponding_Concurrent_Type;
3635 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3637 pragma Assert (Ekind (Id) = E_Discriminant);
3639 end Set_Corresponding_Discriminant;
3641 procedure Set_Corresponding_Equality (Id : E; V : E) is
3644 (Ekind (Id) = E_Function
3645 and then not Comes_From_Source (Id)
3646 and then Chars (Id) = Name_Op_Ne);
3648 end Set_Corresponding_Equality;
3650 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3652 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3654 end Set_Corresponding_Protected_Entry;
3656 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3658 pragma Assert (Is_Concurrent_Type (Id));
3660 end Set_Corresponding_Record_Type;
3662 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3665 end Set_Corresponding_Remote_Type;
3667 procedure Set_Current_Use_Clause (Id : E; V : E) is
3669 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3671 end Set_Current_Use_Clause;
3673 procedure Set_Current_Value (Id : E; V : N) is
3675 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3677 end Set_Current_Value;
3679 procedure Set_CR_Discriminant (Id : E; V : E) is
3682 end Set_CR_Discriminant;
3684 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3686 Set_Flag166 (Id, V);
3687 end Set_Debug_Info_Off;
3689 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3692 end Set_Debug_Renaming_Link;
3694 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3696 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3698 end Set_Default_Aspect_Component_Value;
3700 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3702 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3704 end Set_Default_Aspect_Value;
3706 procedure Set_Default_Expr_Function (Id : E; V : E) is
3708 pragma Assert (Is_Formal (Id));
3710 end Set_Default_Expr_Function;
3712 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3714 Set_Flag108 (Id, V);
3715 end Set_Default_Expressions_Processed;
3717 procedure Set_Default_Value (Id : E; V : N) is
3719 pragma Assert (Is_Formal (Id));
3721 end Set_Default_Value;
3723 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3727 or else Is_Task_Type (Id)
3728 or else Ekind (Id) = E_Block);
3729 Set_Flag114 (Id, V);
3730 end Set_Delay_Cleanups;
3732 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3735 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3738 end Set_Delay_Subprogram_Descriptors;
3740 procedure Set_Delta_Value (Id : E; V : R) is
3742 pragma Assert (Is_Fixed_Point_Type (Id));
3743 Set_Ureal18 (Id, V);
3744 end Set_Delta_Value;
3746 procedure Set_Dependent_Instances (Id : E; V : L) is
3748 pragma Assert (Is_Generic_Instance (Id));
3750 end Set_Dependent_Instances;
3752 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3754 pragma Assert (Nkind (Id) in N_Entity);
3756 end Set_Depends_On_Private;
3758 procedure Set_Derived_Type_Link (Id : E; V : E) is
3760 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3762 end Set_Derived_Type_Link;
3764 procedure Set_Digits_Value (Id : E; V : U) is
3767 (Is_Floating_Point_Type (Id)
3768 or else Is_Decimal_Fixed_Point_Type (Id));
3770 end Set_Digits_Value;
3772 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3775 end Set_Directly_Designated_Type;
3777 procedure Set_Discard_Names (Id : E; V : B := True) is
3780 end Set_Discard_Names;
3782 procedure Set_Discriminal (Id : E; V : E) is
3784 pragma Assert (Ekind (Id) = E_Discriminant);
3786 end Set_Discriminal;
3788 procedure Set_Discriminal_Link (Id : E; V : E) is
3791 end Set_Discriminal_Link;
3793 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3795 pragma Assert (Ekind (Id) = E_Component);
3797 end Set_Discriminant_Checking_Func;
3799 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3801 pragma Assert (Nkind (Id) in N_Entity);
3802 Set_Elist21 (Id, V);
3803 end Set_Discriminant_Constraint;
3805 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3808 end Set_Discriminant_Default_Value;
3810 procedure Set_Discriminant_Number (Id : E; V : U) is
3813 end Set_Discriminant_Number;
3815 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3817 pragma Assert (Ekind (Id) = E_Record_Type
3818 and then Id = Implementation_Base_Type (Id));
3819 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3820 Set_Elist26 (Id, V);
3821 end Set_Dispatch_Table_Wrappers;
3823 procedure Set_DT_Entry_Count (Id : E; V : U) is
3825 pragma Assert (Ekind (Id) = E_Component);
3827 end Set_DT_Entry_Count;
3829 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3831 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3833 end Set_DT_Offset_To_Top_Func;
3835 procedure Set_DT_Position (Id : E; V : U) is
3837 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3839 end Set_DT_Position;
3841 procedure Set_DTC_Entity (Id : E; V : E) is
3843 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3847 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3849 pragma Assert (Ekind (Id) = E_Package);
3850 Set_Flag210 (Id, V);
3851 end Set_Elaborate_Body_Desirable;
3853 procedure Set_Elaboration_Entity (Id : E; V : E) is
3858 Ekind (Id) = E_Package
3860 Is_Generic_Unit (Id));
3862 end Set_Elaboration_Entity;
3864 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3869 Ekind (Id) = E_Package
3871 Is_Generic_Unit (Id));
3872 Set_Flag174 (Id, V);
3873 end Set_Elaboration_Entity_Required;
3875 procedure Set_Encapsulating_State (Id : E; V : E) is
3877 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3879 end Set_Encapsulating_State;
3881 procedure Set_Enclosing_Scope (Id : E; V : E) is
3884 end Set_Enclosing_Scope;
3886 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3888 pragma Assert (Is_Entry (Id));
3889 Set_Flag152 (Id, V);
3890 end Set_Entry_Accepted;
3892 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3895 end Set_Entry_Bodies_Array;
3897 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3900 end Set_Entry_Cancel_Parameter;
3902 procedure Set_Entry_Component (Id : E; V : E) is
3905 end Set_Entry_Component;
3907 procedure Set_Entry_Formal (Id : E; V : E) is
3910 end Set_Entry_Formal;
3912 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3914 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3916 end Set_Entry_Index_Constant;
3918 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3921 end Set_Entry_Parameters_Type;
3923 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3925 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3927 end Set_Enum_Pos_To_Rep;
3929 procedure Set_Enumeration_Pos (Id : E; V : U) is
3931 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3933 end Set_Enumeration_Pos;
3935 procedure Set_Enumeration_Rep (Id : E; V : U) is
3937 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3939 end Set_Enumeration_Rep;
3941 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3943 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3945 end Set_Enumeration_Rep_Expr;
3947 procedure Set_Equivalent_Type (Id : E; V : E) is
3950 (Ekind_In (Id, E_Class_Wide_Type,
3951 E_Class_Wide_Subtype,
3952 E_Access_Protected_Subprogram_Type,
3953 E_Anonymous_Access_Protected_Subprogram_Type,
3954 E_Access_Subprogram_Type,
3957 end Set_Equivalent_Type;
3959 procedure Set_Esize (Id : E; V : U) is
3964 procedure Set_Extra_Accessibility (Id : E; V : E) is
3967 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3969 end Set_Extra_Accessibility;
3971 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3973 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3975 end Set_Extra_Accessibility_Of_Result;
3977 procedure Set_Extra_Constrained (Id : E; V : E) is
3979 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3981 end Set_Extra_Constrained;
3983 procedure Set_Extra_Formal (Id : E; V : E) is
3986 end Set_Extra_Formal;
3988 procedure Set_Extra_Formals (Id : E; V : E) is
3991 (Is_Overloadable (Id)
3992 or else Ekind_In (Id, E_Entry_Family,
3994 E_Subprogram_Type));
3996 end Set_Extra_Formals;
3998 procedure Set_Finalization_Master (Id : E; V : E) is
4000 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4002 end Set_Finalization_Master;
4004 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4006 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4007 Set_Flag158 (Id, V);
4008 end Set_Finalize_Storage_Only;
4010 procedure Set_Finalizer (Id : E; V : E) is
4012 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4016 procedure Set_First_Entity (Id : E; V : E) is
4019 end Set_First_Entity;
4021 procedure Set_First_Exit_Statement (Id : E; V : N) is
4023 pragma Assert (Ekind (Id) = E_Loop);
4025 end Set_First_Exit_Statement;
4027 procedure Set_First_Index (Id : E; V : N) is
4029 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4031 end Set_First_Index;
4033 procedure Set_First_Literal (Id : E; V : E) is
4035 pragma Assert (Is_Enumeration_Type (Id));
4037 end Set_First_Literal;
4039 procedure Set_First_Private_Entity (Id : E; V : E) is
4041 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4042 or else Ekind (Id) in Concurrent_Kind);
4044 end Set_First_Private_Entity;
4046 procedure Set_First_Rep_Item (Id : E; V : N) is
4049 end Set_First_Rep_Item;
4051 procedure Set_Float_Rep (Id : E; V : F) is
4052 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4054 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4057 procedure Set_Freeze_Node (Id : E; V : N) is
4060 end Set_Freeze_Node;
4062 procedure Set_From_Limited_With (Id : E; V : B := True) is
4065 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4066 Set_Flag159 (Id, V);
4067 end Set_From_Limited_With;
4069 procedure Set_Full_View (Id : E; V : E) is
4071 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4075 procedure Set_Generic_Homonym (Id : E; V : E) is
4078 end Set_Generic_Homonym;
4080 procedure Set_Generic_Renamings (Id : E; V : L) is
4082 Set_Elist23 (Id, V);
4083 end Set_Generic_Renamings;
4085 procedure Set_Handler_Records (Id : E; V : S) is
4088 end Set_Handler_Records;
4090 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4092 pragma Assert (Id = Base_Type (Id));
4093 Set_Flag135 (Id, V);
4094 end Set_Has_Aliased_Components;
4096 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4099 end Set_Has_Alignment_Clause;
4101 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4104 end Set_Has_All_Calls_Remote;
4106 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4109 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4110 Set_Flag253 (Id, V);
4111 end Set_Has_Anonymous_Master;
4113 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4115 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4117 end Set_Has_Atomic_Components;
4119 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4122 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4123 Set_Flag139 (Id, V);
4124 end Set_Has_Biased_Representation;
4126 procedure Set_Has_Completion (Id : E; V : B := True) is
4129 end Set_Has_Completion;
4131 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4133 pragma Assert (Is_Type (Id));
4135 end Set_Has_Completion_In_Body;
4137 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4139 pragma Assert (Ekind (Id) = E_Record_Type);
4140 Set_Flag140 (Id, V);
4141 end Set_Has_Complex_Representation;
4143 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4145 pragma Assert (Ekind (Id) = E_Array_Type);
4147 end Set_Has_Component_Size_Clause;
4149 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4151 pragma Assert (Is_Type (Id));
4152 Set_Flag187 (Id, V);
4153 end Set_Has_Constrained_Partial_View;
4155 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4157 Set_Flag181 (Id, V);
4158 end Set_Has_Contiguous_Rep;
4160 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4162 pragma Assert (Id = Base_Type (Id));
4164 end Set_Has_Controlled_Component;
4166 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4169 end Set_Has_Controlling_Result;
4171 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4173 Set_Flag119 (Id, V);
4174 end Set_Has_Convention_Pragma;
4176 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4179 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4180 and then Is_Base_Type (Id));
4182 end Set_Has_Default_Aspect;
4184 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4186 pragma Assert (Is_Type (Id));
4188 end Set_Has_Default_Init_Cond;
4190 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4192 pragma Assert (Nkind (Id) in N_Entity);
4193 Set_Flag200 (Id, V);
4194 end Set_Has_Delayed_Aspects;
4196 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4198 pragma Assert (Nkind (Id) in N_Entity);
4200 end Set_Has_Delayed_Freeze;
4202 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4204 pragma Assert (Nkind (Id) in N_Entity);
4205 Set_Flag261 (Id, V);
4206 end Set_Has_Delayed_Rep_Aspects;
4208 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4210 pragma Assert (Nkind (Id) in N_Entity);
4212 end Set_Has_Discriminants;
4214 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4216 pragma Assert (Ekind (Id) = E_Record_Type
4217 and then Is_Tagged_Type (Id));
4218 Set_Flag220 (Id, V);
4219 end Set_Has_Dispatch_Table;
4221 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4223 pragma Assert (Is_Type (Id));
4224 Set_Flag258 (Id, V);
4225 end Set_Has_Dynamic_Predicate_Aspect;
4227 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4229 pragma Assert (Is_Enumeration_Type (Id));
4231 end Set_Has_Enumeration_Rep_Clause;
4233 procedure Set_Has_Exit (Id : E; V : B := True) is
4238 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4240 Set_Flag175 (Id, V);
4241 end Set_Has_Forward_Instantiation;
4243 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4245 Set_Flag173 (Id, V);
4246 end Set_Has_Fully_Qualified_Name;
4248 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4251 end Set_Has_Gigi_Rep_Item;
4253 procedure Set_Has_Homonym (Id : E; V : B := True) is
4256 end Set_Has_Homonym;
4258 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4260 Set_Flag251 (Id, V);
4261 end Set_Has_Implicit_Dereference;
4263 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4265 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4266 and then Is_Base_Type (Id));
4268 end Set_Has_Independent_Components;
4270 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4272 pragma Assert (Is_Type (Id));
4273 Set_Flag248 (Id, V);
4274 end Set_Has_Inheritable_Invariants;
4276 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4278 pragma Assert (Is_Type (Id));
4279 Set_Flag133 (Id, V);
4280 end Set_Has_Inherited_Default_Init_Cond;
4282 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4284 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4285 Set_Flag219 (Id, V);
4286 end Set_Has_Initial_Value;
4288 procedure Set_Has_Invariants (Id : E; V : B := True) is
4290 pragma Assert (Is_Type (Id));
4291 Set_Flag232 (Id, V);
4292 end Set_Has_Invariants;
4294 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4296 pragma Assert (Ekind (Id) = E_Loop);
4297 Set_Flag260 (Id, V);
4298 end Set_Has_Loop_Entry_Attributes;
4300 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4302 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4304 end Set_Has_Machine_Radix_Clause;
4306 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4309 end Set_Has_Master_Entity;
4311 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4313 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4314 Set_Flag142 (Id, V);
4315 end Set_Has_Missing_Return;
4317 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4319 Set_Flag101 (Id, V);
4320 end Set_Has_Nested_Block_With_Handler;
4322 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4324 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4325 Set_Flag215 (Id, V);
4326 end Set_Has_Up_Level_Access;
4328 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4330 pragma Assert (Id = Base_Type (Id));
4332 end Set_Has_Non_Standard_Rep;
4334 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4336 pragma Assert (Is_Type (Id));
4337 Set_Flag172 (Id, V);
4338 end Set_Has_Object_Size_Clause;
4340 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4342 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4343 Set_Flag110 (Id, V);
4344 end Set_Has_Out_Or_In_Out_Parameter;
4346 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4348 Set_Flag154 (Id, V);
4349 end Set_Has_Per_Object_Constraint;
4351 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4353 pragma Assert (Is_Subprogram (Id));
4354 Set_Flag240 (Id, V);
4355 end Set_Has_Postconditions;
4357 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4359 pragma Assert (Is_Access_Type (Id));
4360 Set_Flag27 (Base_Type (Id), V);
4361 end Set_Has_Pragma_Controlled;
4363 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4365 Set_Flag150 (Id, V);
4366 end Set_Has_Pragma_Elaborate_Body;
4368 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4370 Set_Flag157 (Id, V);
4371 end Set_Has_Pragma_Inline;
4373 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4375 Set_Flag230 (Id, V);
4376 end Set_Has_Pragma_Inline_Always;
4378 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4380 Set_Flag201 (Id, V);
4381 end Set_Has_Pragma_No_Inline;
4383 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4385 pragma Assert (Is_Enumeration_Type (Id));
4386 pragma Assert (Id = Base_Type (Id));
4387 Set_Flag198 (Id, V);
4388 end Set_Has_Pragma_Ordered;
4390 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4392 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4393 pragma Assert (Id = Base_Type (Id));
4394 Set_Flag121 (Id, V);
4395 end Set_Has_Pragma_Pack;
4397 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4399 Set_Flag221 (Id, V);
4400 end Set_Has_Pragma_Preelab_Init;
4402 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4404 Set_Flag203 (Id, V);
4405 end Set_Has_Pragma_Pure;
4407 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4409 Set_Flag179 (Id, V);
4410 end Set_Has_Pragma_Pure_Function;
4412 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4414 Set_Flag169 (Id, V);
4415 end Set_Has_Pragma_Thread_Local_Storage;
4417 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4419 Set_Flag233 (Id, V);
4420 end Set_Has_Pragma_Unmodified;
4422 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4424 Set_Flag180 (Id, V);
4425 end Set_Has_Pragma_Unreferenced;
4427 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4429 pragma Assert (Is_Type (Id));
4430 Set_Flag212 (Id, V);
4431 end Set_Has_Pragma_Unreferenced_Objects;
4433 procedure Set_Has_Predicates (Id : E; V : B := True) is
4435 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4436 Set_Flag250 (Id, V);
4437 end Set_Has_Predicates;
4439 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4441 pragma Assert (Id = Base_Type (Id));
4442 Set_Flag120 (Id, V);
4443 end Set_Has_Primitive_Operations;
4445 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4447 pragma Assert (Is_Type (Id));
4448 Set_Flag151 (Id, V);
4449 end Set_Has_Private_Ancestor;
4451 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4453 Set_Flag155 (Id, V);
4454 end Set_Has_Private_Declaration;
4456 procedure Set_Has_Protected (Id : E; V : B := True) is
4458 Set_Flag271 (Id, V);
4459 end Set_Has_Protected;
4461 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4463 Set_Flag161 (Id, V);
4464 end Set_Has_Qualified_Name;
4466 procedure Set_Has_RACW (Id : E; V : B := True) is
4468 pragma Assert (Ekind (Id) = E_Package);
4469 Set_Flag214 (Id, V);
4472 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4474 pragma Assert (Id = Base_Type (Id));
4476 end Set_Has_Record_Rep_Clause;
4478 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4480 pragma Assert (Is_Subprogram (Id));
4481 Set_Flag143 (Id, V);
4482 end Set_Has_Recursive_Call;
4484 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4486 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4487 Set_Flag267 (Id, V);
4488 end Set_Has_Shift_Operator;
4490 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4493 end Set_Has_Size_Clause;
4495 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4498 end Set_Has_Small_Clause;
4500 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4502 pragma Assert (Id = Base_Type (Id));
4503 Set_Flag100 (Id, V);
4504 end Set_Has_Specified_Layout;
4506 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4508 pragma Assert (Is_Type (Id));
4509 Set_Flag190 (Id, V);
4510 end Set_Has_Specified_Stream_Input;
4512 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4514 pragma Assert (Is_Type (Id));
4515 Set_Flag191 (Id, V);
4516 end Set_Has_Specified_Stream_Output;
4518 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4520 pragma Assert (Is_Type (Id));
4521 Set_Flag192 (Id, V);
4522 end Set_Has_Specified_Stream_Read;
4524 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4526 pragma Assert (Is_Type (Id));
4527 Set_Flag193 (Id, V);
4528 end Set_Has_Specified_Stream_Write;
4530 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4532 Set_Flag211 (Id, V);
4533 end Set_Has_Static_Discriminants;
4535 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4537 pragma Assert (Is_Type (Id));
4538 Set_Flag269 (Id, V);
4539 end Set_Has_Static_Predicate;
4541 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4543 pragma Assert (Is_Type (Id));
4544 Set_Flag259 (Id, V);
4545 end Set_Has_Static_Predicate_Aspect;
4547 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4549 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4550 pragma Assert (Id = Base_Type (Id));
4552 end Set_Has_Storage_Size_Clause;
4554 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4556 pragma Assert (Is_Elementary_Type (Id));
4557 Set_Flag184 (Id, V);
4558 end Set_Has_Stream_Size_Clause;
4560 procedure Set_Has_Task (Id : E; V : B := True) is
4562 pragma Assert (Id = Base_Type (Id));
4566 procedure Set_Has_Thunks (Id : E; V : B := True) is
4568 pragma Assert (Is_Tag (Id));
4569 Set_Flag228 (Id, V);
4572 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4574 pragma Assert (Id = Base_Type (Id));
4575 Set_Flag123 (Id, V);
4576 end Set_Has_Unchecked_Union;
4578 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4580 pragma Assert (Is_Type (Id));
4582 end Set_Has_Unknown_Discriminants;
4584 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4586 pragma Assert (Ekind (Id) = E_Abstract_State);
4587 Set_Flag263 (Id, V);
4588 end Set_Has_Visible_Refinement;
4590 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4592 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4594 end Set_Has_Volatile_Components;
4596 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4598 Set_Flag182 (Id, V);
4599 end Set_Has_Xref_Entry;
4601 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4603 pragma Assert (Ekind (Id) = E_Variable);
4605 end Set_Hiding_Loop_Variable;
4607 procedure Set_Homonym (Id : E; V : E) is
4609 pragma Assert (Id /= V);
4613 procedure Set_Import_Pragma (Id : E; V : E) is
4615 pragma Assert (Is_Subprogram (Id));
4617 end Set_Import_Pragma;
4619 procedure Set_Interface_Alias (Id : E; V : E) is
4623 and then Is_Hidden (Id)
4624 and then (Ekind_In (Id, E_Procedure, E_Function)));
4626 end Set_Interface_Alias;
4628 procedure Set_Interfaces (Id : E; V : L) is
4630 pragma Assert (Is_Record_Type (Id));
4631 Set_Elist25 (Id, V);
4634 procedure Set_In_Package_Body (Id : E; V : B := True) is
4637 end Set_In_Package_Body;
4639 procedure Set_In_Private_Part (Id : E; V : B := True) is
4642 end Set_In_Private_Part;
4644 procedure Set_In_Use (Id : E; V : B := True) is
4646 pragma Assert (Nkind (Id) in N_Entity);
4650 procedure Set_Initialization_Statements (Id : E; V : N) is
4652 -- Tolerate an E_Void entity since this can be called while resolving
4653 -- an aggregate used as the initialization expression for an object
4654 -- declaration, and this occurs before the Ekind for the object is set.
4656 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4658 end Set_Initialization_Statements;
4660 procedure Set_Inner_Instances (Id : E; V : L) is
4662 Set_Elist23 (Id, V);
4663 end Set_Inner_Instances;
4665 procedure Set_Interface_Name (Id : E; V : N) is
4668 end Set_Interface_Name;
4670 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4672 pragma Assert (Is_Overloadable (Id));
4674 end Set_Is_Abstract_Subprogram;
4676 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4678 pragma Assert (Is_Type (Id));
4679 Set_Flag146 (Id, V);
4680 end Set_Is_Abstract_Type;
4682 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4684 pragma Assert (Is_Access_Type (Id));
4685 Set_Flag194 (Id, V);
4686 end Set_Is_Local_Anonymous_Access;
4688 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4690 pragma Assert (Is_Access_Type (Id));
4692 end Set_Is_Access_Constant;
4694 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4696 Set_Flag185 (Id, V);
4697 end Set_Is_Ada_2005_Only;
4699 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4701 Set_Flag199 (Id, V);
4702 end Set_Is_Ada_2012_Only;
4704 procedure Set_Is_Aliased (Id : E; V : B := True) is
4706 pragma Assert (Nkind (Id) in N_Entity);
4710 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4713 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4715 end Set_Is_Asynchronous;
4717 procedure Set_Is_Atomic (Id : E; V : B := True) is
4722 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4724 pragma Assert ((not V)
4725 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4726 Set_Flag122 (Id, V);
4727 end Set_Is_Bit_Packed_Array;
4729 procedure Set_Is_Called (Id : E; V : B := True) is
4731 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4732 Set_Flag102 (Id, V);
4735 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4738 end Set_Is_Character_Type;
4740 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
4742 pragma Assert (Is_Formal (Id)
4743 or else Is_Object (Id)
4744 or else Is_Package_Or_Generic_Package (Id)
4745 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4746 or else Is_Type (Id)
4747 or else Ekind (Id) = E_Abstract_State
4748 or else Ekind (Id) = E_Component
4749 or else Ekind (Id) = E_Discriminant
4750 or else Ekind (Id) = E_Exception
4751 or else Ekind (Id) = E_Package_Body
4752 or else Ekind (Id) = E_Subprogram_Body);
4753 Set_Flag277 (Id, V);
4754 end Set_Is_Checked_Ghost_Entity;
4756 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4759 end Set_Is_Child_Unit;
4761 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4764 end Set_Is_Class_Wide_Equivalent_Type;
4766 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4768 Set_Flag149 (Id, V);
4769 end Set_Is_Compilation_Unit;
4771 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4773 pragma Assert (Ekind (Id) = E_Discriminant);
4774 Set_Flag103 (Id, V);
4775 end Set_Is_Completely_Hidden;
4777 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4780 end Set_Is_Concurrent_Record_Type;
4782 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4785 end Set_Is_Constr_Subt_For_U_Nominal;
4787 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4789 Set_Flag141 (Id, V);
4790 end Set_Is_Constr_Subt_For_UN_Aliased;
4792 procedure Set_Is_Constrained (Id : E; V : B := True) is
4794 pragma Assert (Nkind (Id) in N_Entity);
4796 end Set_Is_Constrained;
4798 procedure Set_Is_Constructor (Id : E; V : B := True) is
4801 end Set_Is_Constructor;
4803 procedure Set_Is_Controlled (Id : E; V : B := True) is
4805 pragma Assert (Id = Base_Type (Id));
4807 end Set_Is_Controlled;
4809 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4811 pragma Assert (Is_Formal (Id));
4813 end Set_Is_Controlling_Formal;
4815 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4818 end Set_Is_CPP_Class;
4820 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4822 pragma Assert (Ekind (Id) = E_Procedure);
4823 Set_Flag132 (Id, V);
4824 end Set_Is_Default_Init_Cond_Procedure;
4826 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4828 pragma Assert (Is_Type (Id));
4829 Set_Flag223 (Id, V);
4830 end Set_Is_Descendent_Of_Address;
4832 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4834 Set_Flag176 (Id, V);
4835 end Set_Is_Discrim_SO_Function;
4837 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4839 Set_Flag264 (Id, V);
4840 end Set_Is_Discriminant_Check_Function;
4842 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4844 Set_Flag234 (Id, V);
4845 end Set_Is_Dispatch_Table_Entity;
4847 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4852 Is_Overloadable (Id)
4854 Ekind (Id) = E_Subprogram_Type);
4857 end Set_Is_Dispatching_Operation;
4859 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4861 Set_Flag124 (Id, V);
4862 end Set_Is_Eliminated;
4864 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4867 end Set_Is_Entry_Formal;
4869 procedure Set_Is_Exported (Id : E; V : B := True) is
4872 end Set_Is_Exported;
4874 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4877 end Set_Is_First_Subtype;
4879 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4881 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4882 Set_Flag118 (Id, V);
4883 end Set_Is_For_Access_Subtype;
4885 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4887 Set_Flag111 (Id, V);
4888 end Set_Is_Formal_Subprogram;
4890 procedure Set_Is_Frozen (Id : E; V : B := True) is
4892 pragma Assert (Nkind (Id) in N_Entity);
4896 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4898 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4899 Set_Flag274 (Id, V);
4900 end Set_Is_Generic_Actual_Subprogram;
4902 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4904 pragma Assert (Is_Type (Id));
4906 end Set_Is_Generic_Actual_Type;
4908 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4910 Set_Flag130 (Id, V);
4911 end Set_Is_Generic_Instance;
4913 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4915 pragma Assert (Nkind (Id) in N_Entity);
4917 end Set_Is_Generic_Type;
4919 procedure Set_Is_Hidden (Id : E; V : B := True) is
4924 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
4926 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4928 end Set_Is_Hidden_Non_Overridden_Subpgm;
4930 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4932 Set_Flag171 (Id, V);
4933 end Set_Is_Hidden_Open_Scope;
4935 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
4937 pragma Assert (Is_Formal (Id)
4938 or else Is_Object (Id)
4939 or else Is_Package_Or_Generic_Package (Id)
4940 or else Is_Subprogram_Or_Generic_Subprogram (Id)
4941 or else Is_Type (Id)
4942 or else Ekind (Id) = E_Abstract_State
4943 or else Ekind (Id) = E_Component
4944 or else Ekind (Id) = E_Discriminant
4945 or else Ekind (Id) = E_Exception
4946 or else Ekind (Id) = E_Package_Body
4947 or else Ekind (Id) = E_Subprogram_Body);
4948 Set_Flag278 (Id, V);
4949 end Set_Is_Ignored_Ghost_Entity;
4951 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4953 pragma Assert (Nkind (Id) in N_Entity);
4955 end Set_Is_Immediately_Visible;
4957 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4959 Set_Flag254 (Id, V);
4960 end Set_Is_Implementation_Defined;
4962 procedure Set_Is_Imported (Id : E; V : B := True) is
4965 end Set_Is_Imported;
4967 procedure Set_Is_Independent (Id : E; V : B := True) is
4969 Set_Flag268 (Id, V);
4970 end Set_Is_Independent;
4972 procedure Set_Is_Inlined (Id : E; V : B := True) is
4977 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4979 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4981 end Set_Is_Inlined_Always;
4983 procedure Set_Is_Interface (Id : E; V : B := True) is
4985 pragma Assert (Is_Record_Type (Id));
4986 Set_Flag186 (Id, V);
4987 end Set_Is_Interface;
4989 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4991 Set_Flag126 (Id, V);
4992 end Set_Is_Instantiated;
4994 procedure Set_Is_Internal (Id : E; V : B := True) is
4996 pragma Assert (Nkind (Id) in N_Entity);
4998 end Set_Is_Internal;
5000 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5002 pragma Assert (Nkind (Id) in N_Entity);
5004 end Set_Is_Interrupt_Handler;
5006 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5009 end Set_Is_Intrinsic_Subprogram;
5011 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5013 pragma Assert (Ekind (Id) = E_Procedure);
5014 Set_Flag257 (Id, V);
5015 end Set_Is_Invariant_Procedure;
5017 procedure Set_Is_Itype (Id : E; V : B := True) is
5022 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5025 end Set_Is_Known_Non_Null;
5027 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5029 Set_Flag204 (Id, V);
5030 end Set_Is_Known_Null;
5032 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5034 Set_Flag170 (Id, V);
5035 end Set_Is_Known_Valid;
5037 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5039 pragma Assert (Is_Type (Id));
5040 Set_Flag106 (Id, V);
5041 end Set_Is_Limited_Composite;
5043 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5045 pragma Assert (Is_Interface (Id));
5046 Set_Flag197 (Id, V);
5047 end Set_Is_Limited_Interface;
5049 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5052 end Set_Is_Limited_Record;
5054 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5056 pragma Assert (Is_Subprogram (Id));
5057 Set_Flag137 (Id, V);
5058 end Set_Is_Machine_Code_Subprogram;
5060 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5062 pragma Assert (Is_Type (Id));
5063 Set_Flag109 (Id, V);
5064 end Set_Is_Non_Static_Subtype;
5066 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5068 pragma Assert (Ekind (Id) = E_Procedure);
5069 Set_Flag178 (Id, V);
5070 end Set_Is_Null_Init_Proc;
5072 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5074 Set_Flag153 (Id, V);
5075 end Set_Is_Obsolescent;
5077 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5079 pragma Assert (Ekind (Id) = E_Out_Parameter);
5080 Set_Flag226 (Id, V);
5081 end Set_Is_Only_Out_Parameter;
5083 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5085 Set_Flag160 (Id, V);
5086 end Set_Is_Package_Body_Entity;
5088 procedure Set_Is_Packed (Id : E; V : B := True) is
5090 pragma Assert (Id = Base_Type (Id));
5094 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5096 Set_Flag138 (Id, V);
5097 end Set_Is_Packed_Array_Impl_Type;
5099 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5101 pragma Assert (Nkind (Id) in N_Entity);
5103 end Set_Is_Potentially_Use_Visible;
5105 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5107 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5108 Set_Flag255 (Id, V);
5109 end Set_Is_Predicate_Function;
5111 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5113 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5114 Set_Flag256 (Id, V);
5115 end Set_Is_Predicate_Function_M;
5117 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5120 end Set_Is_Preelaborated;
5122 procedure Set_Is_Primitive (Id : E; V : B := True) is
5125 (Is_Overloadable (Id)
5126 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5127 Set_Flag218 (Id, V);
5128 end Set_Is_Primitive;
5130 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5132 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5133 Set_Flag195 (Id, V);
5134 end Set_Is_Primitive_Wrapper;
5136 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5138 pragma Assert (Is_Type (Id));
5139 Set_Flag107 (Id, V);
5140 end Set_Is_Private_Composite;
5142 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5145 end Set_Is_Private_Descendant;
5147 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5149 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5150 Set_Flag245 (Id, V);
5151 end Set_Is_Private_Primitive;
5153 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5155 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5156 Set_Flag252 (Id, V);
5157 end Set_Is_Processed_Transient;
5159 procedure Set_Is_Public (Id : E; V : B := True) is
5161 pragma Assert (Nkind (Id) in N_Entity);
5165 procedure Set_Is_Pure (Id : E; V : B := True) is
5170 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5172 pragma Assert (Is_Access_Type (Id));
5173 Set_Flag189 (Id, V);
5174 end Set_Is_Pure_Unit_Access_Type;
5176 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5178 pragma Assert (Is_Type (Id));
5179 Set_Flag244 (Id, V);
5180 end Set_Is_RACW_Stub_Type;
5182 procedure Set_Is_Raised (Id : E; V : B := True) is
5184 pragma Assert (Ekind (Id) = E_Exception);
5185 Set_Flag224 (Id, V);
5188 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5191 end Set_Is_Remote_Call_Interface;
5193 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5196 end Set_Is_Remote_Types;
5198 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5200 Set_Flag112 (Id, V);
5201 end Set_Is_Renaming_Of_Object;
5203 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5205 Set_Flag209 (Id, V);
5206 end Set_Is_Return_Object;
5208 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5210 pragma Assert (Ekind (Id) = E_Variable);
5211 Set_Flag249 (Id, V);
5212 end Set_Is_Safe_To_Reevaluate;
5214 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5217 end Set_Is_Shared_Passive;
5219 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5223 or else Ekind_In (Id, E_Exception,
5228 end Set_Is_Statically_Allocated;
5230 procedure Set_Is_Tag (Id : E; V : B := True) is
5232 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5236 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5239 end Set_Is_Tagged_Type;
5241 procedure Set_Is_Thunk (Id : E; V : B := True) is
5243 pragma Assert (Is_Subprogram (Id));
5244 Set_Flag225 (Id, V);
5247 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5249 Set_Flag235 (Id, V);
5250 end Set_Is_Trivial_Subprogram;
5252 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5254 Set_Flag163 (Id, V);
5255 end Set_Is_True_Constant;
5257 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5259 pragma Assert (Id = Base_Type (Id));
5260 Set_Flag117 (Id, V);
5261 end Set_Is_Unchecked_Union;
5263 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5265 pragma Assert (Ekind (Id) = E_Record_Type);
5266 Set_Flag246 (Id, V);
5267 end Set_Is_Underlying_Record_View;
5269 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5271 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5272 Set_Flag144 (Id, V);
5273 end Set_Is_Unsigned_Type;
5275 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5277 pragma Assert (Ekind (Id) = E_Procedure);
5278 Set_Flag127 (Id, V);
5279 end Set_Is_Valued_Procedure;
5281 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5283 Set_Flag206 (Id, V);
5284 end Set_Is_Visible_Formal;
5286 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5288 Set_Flag116 (Id, V);
5289 end Set_Is_Visible_Lib_Unit;
5291 procedure Set_Is_Volatile (Id : E; V : B := True) is
5293 pragma Assert (Nkind (Id) in N_Entity);
5295 end Set_Is_Volatile;
5297 procedure Set_Itype_Printed (Id : E; V : B := True) is
5299 pragma Assert (Is_Itype (Id));
5300 Set_Flag202 (Id, V);
5301 end Set_Itype_Printed;
5303 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5306 end Set_Kill_Elaboration_Checks;
5308 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5311 end Set_Kill_Range_Checks;
5313 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5315 pragma Assert (Is_Type (Id));
5316 Set_Flag207 (Id, V);
5317 end Set_Known_To_Have_Preelab_Init;
5319 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5321 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5323 end Set_Last_Aggregate_Assignment;
5325 procedure Set_Last_Assignment (Id : E; V : N) is
5327 pragma Assert (Is_Assignable (Id));
5329 end Set_Last_Assignment;
5331 procedure Set_Last_Entity (Id : E; V : E) is
5334 end Set_Last_Entity;
5336 procedure Set_Limited_View (Id : E; V : E) is
5338 pragma Assert (Ekind (Id) = E_Package);
5340 end Set_Limited_View;
5342 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5344 pragma Assert (Is_Type (Id)
5345 or else Ekind_In (Id, E_Constant, E_Variable)
5346 or else Is_Subprogram (Id));
5348 end Set_Linker_Section_Pragma;
5350 procedure Set_Lit_Indexes (Id : E; V : E) is
5352 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5354 end Set_Lit_Indexes;
5356 procedure Set_Lit_Strings (Id : E; V : E) is
5358 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5360 end Set_Lit_Strings;
5362 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5364 pragma Assert (Is_Formal (Id));
5365 Set_Flag205 (Id, V);
5366 end Set_Low_Bound_Tested;
5368 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5370 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5372 end Set_Machine_Radix_10;
5374 procedure Set_Master_Id (Id : E; V : E) is
5376 pragma Assert (Is_Access_Type (Id));
5380 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5382 Set_Flag168 (Id, V);
5383 end Set_Materialize_Entity;
5385 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5387 Set_Flag262 (Id, V);
5388 end Set_May_Inherit_Delayed_Rep_Aspects;
5390 procedure Set_Mechanism (Id : E; V : M) is
5392 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5393 Set_Uint8 (Id, UI_From_Int (V));
5396 procedure Set_Modulus (Id : E; V : U) is
5398 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5402 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5404 pragma Assert (Is_Type (Id));
5405 Set_Flag183 (Id, V);
5406 end Set_Must_Be_On_Byte_Boundary;
5408 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5410 pragma Assert (Is_Type (Id));
5411 Set_Flag208 (Id, V);
5412 end Set_Must_Have_Preelab_Init;
5414 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5416 Set_Flag147 (Id, V);
5417 end Set_Needs_Debug_Info;
5419 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5422 (Is_Overloadable (Id)
5423 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5425 end Set_Needs_No_Actuals;
5427 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5429 Set_Flag115 (Id, V);
5430 end Set_Never_Set_In_Source;
5432 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5435 end Set_Next_Inlined_Subprogram;
5437 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5439 pragma Assert (Is_Discrete_Type (Id));
5440 Set_Flag276 (Id, V);
5441 end Set_No_Dynamic_Predicate_On_Actual;
5443 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5445 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5446 Set_Flag131 (Id, V);
5447 end Set_No_Pool_Assigned;
5449 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5451 pragma Assert (Is_Discrete_Type (Id));
5452 Set_Flag275 (Id, V);
5453 end Set_No_Predicate_On_Actual;
5455 procedure Set_No_Return (Id : E; V : B := True) is
5458 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5459 Set_Flag113 (Id, V);
5462 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5464 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5465 Set_Flag136 (Id, V);
5466 end Set_No_Strict_Aliasing;
5468 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5470 pragma Assert (Is_Tagged_Type (Id));
5472 end Set_No_Tagged_Streams_Pragma;
5474 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5476 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5478 end Set_Non_Binary_Modulus;
5480 procedure Set_Non_Limited_View (Id : E; V : E) is
5483 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5485 end Set_Non_Limited_View;
5487 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5490 (Root_Type (Id) = Standard_Boolean
5491 and then Ekind (Id) = E_Enumeration_Type);
5492 Set_Flag162 (Id, V);
5493 end Set_Nonzero_Is_True;
5495 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5497 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5499 end Set_Normalized_First_Bit;
5501 procedure Set_Normalized_Position (Id : E; V : U) is
5503 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5505 end Set_Normalized_Position;
5507 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5509 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5511 end Set_Normalized_Position_Max;
5513 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5515 pragma Assert (Ekind (Id) = E_Variable);
5516 Set_Flag247 (Id, V);
5517 end Set_OK_To_Rename;
5519 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5522 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5523 Set_Flag239 (Id, V);
5524 end Set_OK_To_Reorder_Components;
5526 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5529 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5530 Set_Flag241 (Id, V);
5531 end Set_Optimize_Alignment_Space;
5533 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5536 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5537 Set_Flag242 (Id, V);
5538 end Set_Optimize_Alignment_Time;
5540 procedure Set_Original_Access_Type (Id : E; V : E) is
5542 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5544 end Set_Original_Access_Type;
5546 procedure Set_Original_Array_Type (Id : E; V : E) is
5548 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5550 end Set_Original_Array_Type;
5552 procedure Set_Original_Record_Component (Id : E; V : E) is
5554 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5556 end Set_Original_Record_Component;
5558 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5560 Set_Flag243 (Id, V);
5561 end Set_Overlays_Constant;
5563 procedure Set_Overridden_Operation (Id : E; V : E) is
5566 end Set_Overridden_Operation;
5568 procedure Set_Package_Instantiation (Id : E; V : N) is
5570 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5572 end Set_Package_Instantiation;
5574 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5576 pragma Assert (Is_Array_Type (Id));
5578 end Set_Packed_Array_Impl_Type;
5580 procedure Set_Parent_Subtype (Id : E; V : E) is
5582 pragma Assert (Ekind (Id) = E_Record_Type);
5584 end Set_Parent_Subtype;
5586 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5588 pragma Assert (Ekind (Id) = E_Abstract_State);
5590 end Set_Part_Of_Constituents;
5592 procedure Set_Postcondition_Proc (Id : E; V : E) is
5594 pragma Assert (Ekind (Id) = E_Procedure);
5596 end Set_Postcondition_Proc;
5598 procedure Set_PPC_Wrapper (Id : E; V : E) is
5600 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5602 end Set_PPC_Wrapper;
5604 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5606 pragma Assert (Is_Tagged_Type (Id));
5607 Set_Elist10 (Id, V);
5608 end Set_Direct_Primitive_Operations;
5610 procedure Set_Prival (Id : E; V : E) is
5612 pragma Assert (Is_Protected_Component (Id));
5616 procedure Set_Prival_Link (Id : E; V : E) is
5618 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5620 end Set_Prival_Link;
5622 procedure Set_Private_Dependents (Id : E; V : L) is
5624 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5625 Set_Elist18 (Id, V);
5626 end Set_Private_Dependents;
5628 procedure Set_Private_View (Id : E; V : N) is
5630 pragma Assert (Is_Private_Type (Id));
5632 end Set_Private_View;
5634 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5636 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5638 end Set_Protected_Body_Subprogram;
5640 procedure Set_Protected_Formal (Id : E; V : E) is
5642 pragma Assert (Is_Formal (Id));
5644 end Set_Protected_Formal;
5646 procedure Set_Protection_Object (Id : E; V : E) is
5648 pragma Assert (Ekind_In (Id, E_Entry,
5653 end Set_Protection_Object;
5655 procedure Set_Reachable (Id : E; V : B := True) is
5660 procedure Set_Referenced (Id : E; V : B := True) is
5662 Set_Flag156 (Id, V);
5665 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5668 end Set_Referenced_As_LHS;
5670 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5672 Set_Flag227 (Id, V);
5673 end Set_Referenced_As_Out_Parameter;
5675 procedure Set_Refinement_Constituents (Id : E; V : L) is
5677 pragma Assert (Ekind (Id) = E_Abstract_State);
5679 end Set_Refinement_Constituents;
5681 procedure Set_Register_Exception_Call (Id : E; V : N) is
5683 pragma Assert (Ekind (Id) = E_Exception);
5685 end Set_Register_Exception_Call;
5687 procedure Set_Related_Array_Object (Id : E; V : E) is
5689 pragma Assert (Is_Array_Type (Id));
5691 end Set_Related_Array_Object;
5693 procedure Set_Related_Expression (Id : E; V : N) is
5695 pragma Assert (Ekind (Id) in Type_Kind
5696 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5698 end Set_Related_Expression;
5700 procedure Set_Related_Instance (Id : E; V : E) is
5702 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5704 end Set_Related_Instance;
5706 procedure Set_Related_Type (Id : E; V : E) is
5708 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5710 end Set_Related_Type;
5712 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5714 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5716 end Set_Relative_Deadline_Variable;
5718 procedure Set_Renamed_Entity (Id : E; V : N) is
5721 end Set_Renamed_Entity;
5723 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5725 pragma Assert (Ekind (Id) = E_Package);
5726 Set_Flag231 (Id, V);
5727 end Set_Renamed_In_Spec;
5729 procedure Set_Renamed_Object (Id : E; V : N) is
5732 end Set_Renamed_Object;
5734 procedure Set_Renaming_Map (Id : E; V : U) is
5737 end Set_Renaming_Map;
5739 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5741 pragma Assert (Is_Overloadable (Id));
5742 Set_Flag213 (Id, V);
5743 end Set_Requires_Overriding;
5745 procedure Set_Return_Present (Id : E; V : B := True) is
5748 end Set_Return_Present;
5750 procedure Set_Return_Applies_To (Id : E; V : N) is
5753 end Set_Return_Applies_To;
5755 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5758 end Set_Returns_By_Ref;
5760 procedure Set_Returns_Limited_View (Id : E; V : B := True) is
5762 pragma Assert (Ekind (Id) = E_Function);
5763 Set_Flag134 (Id, V);
5764 end Set_Returns_Limited_View;
5766 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5769 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5770 Set_Flag164 (Id, V);
5771 end Set_Reverse_Bit_Order;
5773 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5777 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5779 end Set_Reverse_Storage_Order;
5781 procedure Set_RM_Size (Id : E; V : U) is
5783 pragma Assert (Is_Type (Id));
5787 procedure Set_Scalar_Range (Id : E; V : N) is
5790 end Set_Scalar_Range;
5792 procedure Set_Scale_Value (Id : E; V : U) is
5795 end Set_Scale_Value;
5797 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5799 pragma Assert (not Is_Record_Type (Id));
5801 end Set_Scope_Depth_Value;
5803 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5805 Set_Flag167 (Id, V);
5806 end Set_Sec_Stack_Needed_For_Return;
5808 procedure Set_Shadow_Entities (Id : E; V : S) is
5810 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5812 end Set_Shadow_Entities;
5814 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5816 pragma Assert (Ekind (Id) = E_Variable);
5818 end Set_Shared_Var_Procs_Instance;
5820 procedure Set_Size_Check_Code (Id : E; V : N) is
5822 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5824 end Set_Size_Check_Code;
5826 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5828 Set_Flag177 (Id, V);
5829 end Set_Size_Depends_On_Discriminant;
5831 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5834 end Set_Size_Known_At_Compile_Time;
5836 procedure Set_Small_Value (Id : E; V : R) is
5838 pragma Assert (Is_Fixed_Point_Type (Id));
5839 Set_Ureal21 (Id, V);
5840 end Set_Small_Value;
5842 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5845 (Ekind_In (Id, E_Generic_Package, -- package variants
5850 end Set_SPARK_Aux_Pragma;
5852 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5855 (Ekind_In (Id, E_Generic_Package, -- package variants
5859 Set_Flag266 (Id, V);
5860 end Set_SPARK_Aux_Pragma_Inherited;
5862 procedure Set_SPARK_Pragma (Id : E; V : N) is
5865 (Ekind_In (Id, E_Function, -- subprogram variants
5867 E_Generic_Procedure,
5871 Ekind_In (Id, E_Generic_Package, -- package variants
5876 end Set_SPARK_Pragma;
5878 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5881 (Ekind_In (Id, E_Function, -- subprogram variants
5883 E_Generic_Procedure,
5887 Ekind_In (Id, E_Generic_Package, -- package variants
5891 Set_Flag265 (Id, V);
5892 end Set_SPARK_Pragma_Inherited;
5894 procedure Set_Spec_Entity (Id : E; V : E) is
5896 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5898 end Set_Spec_Entity;
5900 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5904 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5905 Set_Flag273 (Id, V);
5906 end Set_SSO_Set_High_By_Default;
5908 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5912 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5913 Set_Flag272 (Id, V);
5914 end Set_SSO_Set_Low_By_Default;
5916 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5918 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5920 end Set_Static_Discrete_Predicate;
5922 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5924 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5925 and then Has_Predicates (Id));
5927 end Set_Static_Real_Or_String_Predicate;
5929 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5931 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5933 end Set_Status_Flag_Or_Transient_Decl;
5935 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5937 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5938 pragma Assert (Id = Base_Type (Id));
5940 end Set_Storage_Size_Variable;
5942 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5944 pragma Assert (Ekind (Id) = E_Package);
5946 end Set_Static_Elaboration_Desired;
5948 procedure Set_Static_Initialization (Id : E; V : N) is
5951 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5953 end Set_Static_Initialization;
5955 procedure Set_Stored_Constraint (Id : E; V : L) is
5957 pragma Assert (Nkind (Id) in N_Entity);
5958 Set_Elist23 (Id, V);
5959 end Set_Stored_Constraint;
5961 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5963 pragma Assert (Ekind (Id) = E_Constant);
5964 Set_Flag270 (Id, V);
5965 end Set_Stores_Attribute_Old_Prefix;
5967 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5969 pragma Assert (Id = Base_Type (Id));
5970 Set_Flag145 (Id, V);
5971 end Set_Strict_Alignment;
5973 procedure Set_String_Literal_Length (Id : E; V : U) is
5975 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5977 end Set_String_Literal_Length;
5979 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5981 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5983 end Set_String_Literal_Low_Bound;
5985 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5987 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5989 end Set_Subprograms_For_Type;
5991 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5993 Set_Flag148 (Id, V);
5994 end Set_Suppress_Elaboration_Warnings;
5996 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5998 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
5999 Set_Flag105 (Id, V);
6000 end Set_Suppress_Initialization;
6002 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6004 Set_Flag165 (Id, V);
6005 end Set_Suppress_Style_Checks;
6007 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6009 Set_Flag217 (Id, V);
6010 end Set_Suppress_Value_Tracking_On_Call;
6012 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6014 pragma Assert (Ekind (Id) in Task_Kind);
6016 end Set_Task_Body_Procedure;
6018 procedure Set_Thunk_Entity (Id : E; V : E) is
6020 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6021 and then Is_Thunk (Id));
6023 end Set_Thunk_Entity;
6025 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6028 end Set_Treat_As_Volatile;
6030 procedure Set_Underlying_Full_View (Id : E; V : E) is
6032 pragma Assert (Ekind (Id) in Private_Kind);
6034 end Set_Underlying_Full_View;
6036 procedure Set_Underlying_Record_View (Id : E; V : E) is
6038 pragma Assert (Ekind (Id) = E_Record_Type);
6040 end Set_Underlying_Record_View;
6042 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6044 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6045 Set_Flag216 (Id, V);
6046 end Set_Universal_Aliasing;
6048 procedure Set_Unset_Reference (Id : E; V : N) is
6051 end Set_Unset_Reference;
6053 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6055 Set_Flag222 (Id, V);
6056 end Set_Used_As_Generic_Actual;
6058 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6060 pragma Assert (Ekind (Id) = E_Protected_Type);
6061 Set_Flag188 (Id, V);
6062 end Set_Uses_Lock_Free;
6064 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6067 end Set_Uses_Sec_Stack;
6069 procedure Set_Warnings_Off (Id : E; V : B := True) is
6072 end Set_Warnings_Off;
6074 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6076 Set_Flag236 (Id, V);
6077 end Set_Warnings_Off_Used;
6079 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6081 Set_Flag237 (Id, V);
6082 end Set_Warnings_Off_Used_Unmodified;
6084 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6086 Set_Flag238 (Id, V);
6087 end Set_Warnings_Off_Used_Unreferenced;
6089 procedure Set_Was_Hidden (Id : E; V : B := True) is
6091 Set_Flag196 (Id, V);
6094 procedure Set_Wrapped_Entity (Id : E; V : E) is
6096 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6097 and then Is_Primitive_Wrapper (Id));
6099 end Set_Wrapped_Entity;
6101 -----------------------------------
6102 -- Field Initialization Routines --
6103 -----------------------------------
6105 procedure Init_Alignment (Id : E) is
6107 Set_Uint14 (Id, Uint_0);
6110 procedure Init_Alignment (Id : E; V : Int) is
6112 Set_Uint14 (Id, UI_From_Int (V));
6115 procedure Init_Component_Bit_Offset (Id : E) is
6117 Set_Uint11 (Id, No_Uint);
6118 end Init_Component_Bit_Offset;
6120 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6122 Set_Uint11 (Id, UI_From_Int (V));
6123 end Init_Component_Bit_Offset;
6125 procedure Init_Component_Size (Id : E) is
6127 Set_Uint22 (Id, Uint_0);
6128 end Init_Component_Size;
6130 procedure Init_Component_Size (Id : E; V : Int) is
6132 Set_Uint22 (Id, UI_From_Int (V));
6133 end Init_Component_Size;
6135 procedure Init_Digits_Value (Id : E) is
6137 Set_Uint17 (Id, Uint_0);
6138 end Init_Digits_Value;
6140 procedure Init_Digits_Value (Id : E; V : Int) is
6142 Set_Uint17 (Id, UI_From_Int (V));
6143 end Init_Digits_Value;
6145 procedure Init_Esize (Id : E) is
6147 Set_Uint12 (Id, Uint_0);
6150 procedure Init_Esize (Id : E; V : Int) is
6152 Set_Uint12 (Id, UI_From_Int (V));
6155 procedure Init_Normalized_First_Bit (Id : E) is
6157 Set_Uint8 (Id, No_Uint);
6158 end Init_Normalized_First_Bit;
6160 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6162 Set_Uint8 (Id, UI_From_Int (V));
6163 end Init_Normalized_First_Bit;
6165 procedure Init_Normalized_Position (Id : E) is
6167 Set_Uint14 (Id, No_Uint);
6168 end Init_Normalized_Position;
6170 procedure Init_Normalized_Position (Id : E; V : Int) is
6172 Set_Uint14 (Id, UI_From_Int (V));
6173 end Init_Normalized_Position;
6175 procedure Init_Normalized_Position_Max (Id : E) is
6177 Set_Uint10 (Id, No_Uint);
6178 end Init_Normalized_Position_Max;
6180 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6182 Set_Uint10 (Id, UI_From_Int (V));
6183 end Init_Normalized_Position_Max;
6185 procedure Init_RM_Size (Id : E) is
6187 Set_Uint13 (Id, Uint_0);
6190 procedure Init_RM_Size (Id : E; V : Int) is
6192 Set_Uint13 (Id, UI_From_Int (V));
6195 -----------------------------
6196 -- Init_Component_Location --
6197 -----------------------------
6199 procedure Init_Component_Location (Id : E) is
6201 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6202 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6203 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6204 Set_Uint12 (Id, Uint_0); -- Esize
6205 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6206 end Init_Component_Location;
6208 ----------------------------
6209 -- Init_Object_Size_Align --
6210 ----------------------------
6212 procedure Init_Object_Size_Align (Id : E) is
6214 Set_Uint12 (Id, Uint_0); -- Esize
6215 Set_Uint14 (Id, Uint_0); -- Alignment
6216 end Init_Object_Size_Align;
6222 procedure Init_Size (Id : E; V : Int) is
6224 pragma Assert (not Is_Object (Id));
6225 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6226 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6229 ---------------------
6230 -- Init_Size_Align --
6231 ---------------------
6233 procedure Init_Size_Align (Id : E) is
6235 pragma Assert (not Is_Object (Id));
6236 Set_Uint12 (Id, Uint_0); -- Esize
6237 Set_Uint13 (Id, Uint_0); -- RM_Size
6238 Set_Uint14 (Id, Uint_0); -- Alignment
6239 end Init_Size_Align;
6241 ----------------------------------------------
6242 -- Type Representation Attribute Predicates --
6243 ----------------------------------------------
6245 function Known_Alignment (E : Entity_Id) return B is
6247 return Uint14 (E) /= Uint_0
6248 and then Uint14 (E) /= No_Uint;
6249 end Known_Alignment;
6251 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6253 return Uint11 (E) /= No_Uint;
6254 end Known_Component_Bit_Offset;
6256 function Known_Component_Size (E : Entity_Id) return B is
6258 return Uint22 (Base_Type (E)) /= Uint_0
6259 and then Uint22 (Base_Type (E)) /= No_Uint;
6260 end Known_Component_Size;
6262 function Known_Esize (E : Entity_Id) return B is
6264 return Uint12 (E) /= Uint_0
6265 and then Uint12 (E) /= No_Uint;
6268 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6270 return Uint8 (E) /= No_Uint;
6271 end Known_Normalized_First_Bit;
6273 function Known_Normalized_Position (E : Entity_Id) return B is
6275 return Uint14 (E) /= No_Uint;
6276 end Known_Normalized_Position;
6278 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6280 return Uint10 (E) /= No_Uint;
6281 end Known_Normalized_Position_Max;
6283 function Known_RM_Size (E : Entity_Id) return B is
6285 return Uint13 (E) /= No_Uint
6286 and then (Uint13 (E) /= Uint_0
6287 or else Is_Discrete_Type (E)
6288 or else Is_Fixed_Point_Type (E));
6291 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6293 return Uint11 (E) /= No_Uint
6294 and then Uint11 (E) >= Uint_0;
6295 end Known_Static_Component_Bit_Offset;
6297 function Known_Static_Component_Size (E : Entity_Id) return B is
6299 return Uint22 (Base_Type (E)) > Uint_0;
6300 end Known_Static_Component_Size;
6302 function Known_Static_Esize (E : Entity_Id) return B is
6304 return Uint12 (E) > Uint_0
6305 and then not Is_Generic_Type (E);
6306 end Known_Static_Esize;
6308 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6310 return Uint8 (E) /= No_Uint
6311 and then Uint8 (E) >= Uint_0;
6312 end Known_Static_Normalized_First_Bit;
6314 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6316 return Uint14 (E) /= No_Uint
6317 and then Uint14 (E) >= Uint_0;
6318 end Known_Static_Normalized_Position;
6320 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6322 return Uint10 (E) /= No_Uint
6323 and then Uint10 (E) >= Uint_0;
6324 end Known_Static_Normalized_Position_Max;
6326 function Known_Static_RM_Size (E : Entity_Id) return B is
6328 return (Uint13 (E) > Uint_0
6329 or else Is_Discrete_Type (E)
6330 or else Is_Fixed_Point_Type (E))
6331 and then not Is_Generic_Type (E);
6332 end Known_Static_RM_Size;
6334 function Unknown_Alignment (E : Entity_Id) return B is
6336 return Uint14 (E) = Uint_0
6337 or else Uint14 (E) = No_Uint;
6338 end Unknown_Alignment;
6340 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6342 return Uint11 (E) = No_Uint;
6343 end Unknown_Component_Bit_Offset;
6345 function Unknown_Component_Size (E : Entity_Id) return B is
6347 return Uint22 (Base_Type (E)) = Uint_0
6349 Uint22 (Base_Type (E)) = No_Uint;
6350 end Unknown_Component_Size;
6352 function Unknown_Esize (E : Entity_Id) return B is
6354 return Uint12 (E) = No_Uint
6356 Uint12 (E) = Uint_0;
6359 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6361 return Uint8 (E) = No_Uint;
6362 end Unknown_Normalized_First_Bit;
6364 function Unknown_Normalized_Position (E : Entity_Id) return B is
6366 return Uint14 (E) = No_Uint;
6367 end Unknown_Normalized_Position;
6369 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6371 return Uint10 (E) = No_Uint;
6372 end Unknown_Normalized_Position_Max;
6374 function Unknown_RM_Size (E : Entity_Id) return B is
6376 return (Uint13 (E) = Uint_0
6377 and then not Is_Discrete_Type (E)
6378 and then not Is_Fixed_Point_Type (E))
6379 or else Uint13 (E) = No_Uint;
6380 end Unknown_RM_Size;
6382 --------------------
6383 -- Address_Clause --
6384 --------------------
6386 function Address_Clause (Id : E) return N is
6388 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6395 function Aft_Value (Id : E) return U is
6397 Delta_Val : Ureal := Delta_Value (Id);
6399 while Delta_Val < Ureal_Tenth loop
6400 Delta_Val := Delta_Val * Ureal_10;
6401 Result := Result + 1;
6404 return UI_From_Int (Result);
6407 ----------------------
6408 -- Alignment_Clause --
6409 ----------------------
6411 function Alignment_Clause (Id : E) return N is
6413 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6414 end Alignment_Clause;
6420 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6422 if Last_Entity (V) = Empty then
6423 Set_First_Entity (Id => V, V => Id);
6425 Set_Next_Entity (Last_Entity (V), Id);
6428 Set_Next_Entity (Id, Empty);
6430 Set_Last_Entity (Id => V, V => Id);
6437 function Base_Type (Id : E) return E is
6439 if Is_Base_Type (Id) then
6442 pragma Assert (Is_Type (Id));
6447 -------------------------
6448 -- Component_Alignment --
6449 -------------------------
6451 -- Component Alignment is encoded using two flags, Flag128/129 as
6452 -- follows. Note that both flags False = Align_Default, so that the
6453 -- default initialization of flags to False initializes component
6454 -- alignment to the default value as required.
6456 -- Flag128 Flag129 Value
6457 -- ------- ------- -----
6458 -- False False Calign_Default
6459 -- False True Calign_Component_Size
6460 -- True False Calign_Component_Size_4
6461 -- True True Calign_Storage_Unit
6463 function Component_Alignment (Id : E) return C is
6464 BT : constant Node_Id := Base_Type (Id);
6467 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6469 if Flag128 (BT) then
6470 if Flag129 (BT) then
6471 return Calign_Storage_Unit;
6473 return Calign_Component_Size_4;
6477 if Flag129 (BT) then
6478 return Calign_Component_Size;
6480 return Calign_Default;
6483 end Component_Alignment;
6485 ----------------------
6486 -- Declaration_Node --
6487 ----------------------
6489 function Declaration_Node (Id : E) return N is
6493 if Ekind (Id) = E_Incomplete_Type
6494 and then Present (Full_View (Id))
6496 P := Parent (Full_View (Id));
6502 if Nkind (P) /= N_Selected_Component
6503 and then Nkind (P) /= N_Expanded_Name
6505 not (Nkind (P) = N_Defining_Program_Unit_Name
6506 and then Is_Child_Unit (Id))
6513 end Declaration_Node;
6515 ---------------------------------
6516 -- Default_Init_Cond_Procedure --
6517 ---------------------------------
6519 function Default_Init_Cond_Procedure (Id : E) return E is
6525 and then (Has_Default_Init_Cond (Id)
6526 or Has_Inherited_Default_Init_Cond (Id)));
6528 S := Subprograms_For_Type (Id);
6529 while Present (S) loop
6530 if Is_Default_Init_Cond_Procedure (S) then
6534 S := Subprograms_For_Type (S);
6538 end Default_Init_Cond_Procedure;
6540 ---------------------
6541 -- Designated_Type --
6542 ---------------------
6544 function Designated_Type (Id : E) return E is
6548 Desig_Type := Directly_Designated_Type (Id);
6550 if Ekind (Desig_Type) = E_Incomplete_Type
6551 and then Present (Full_View (Desig_Type))
6553 return Full_View (Desig_Type);
6555 elsif Is_Class_Wide_Type (Desig_Type)
6556 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6557 and then Present (Full_View (Etype (Desig_Type)))
6558 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6560 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6565 end Designated_Type;
6567 ----------------------
6568 -- Entry_Index_Type --
6569 ----------------------
6571 function Entry_Index_Type (Id : E) return N is
6573 pragma Assert (Ekind (Id) = E_Entry_Family);
6574 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6575 end Entry_Index_Type;
6577 ---------------------
6578 -- First_Component --
6579 ---------------------
6581 function First_Component (Id : E) return E is
6586 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6588 Comp_Id := First_Entity (Id);
6589 while Present (Comp_Id) loop
6590 exit when Ekind (Comp_Id) = E_Component;
6591 Comp_Id := Next_Entity (Comp_Id);
6595 end First_Component;
6597 -------------------------------------
6598 -- First_Component_Or_Discriminant --
6599 -------------------------------------
6601 function First_Component_Or_Discriminant (Id : E) return E is
6606 (Is_Record_Type (Id)
6607 or else Is_Incomplete_Or_Private_Type (Id)
6608 or else Has_Discriminants (Id));
6610 Comp_Id := First_Entity (Id);
6611 while Present (Comp_Id) loop
6612 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6613 Comp_Id := Next_Entity (Comp_Id);
6617 end First_Component_Or_Discriminant;
6623 function First_Formal (Id : E) return E is
6628 (Is_Overloadable (Id)
6629 or else Ekind_In (Id, E_Entry_Family,
6631 E_Subprogram_Type));
6633 if Ekind (Id) = E_Enumeration_Literal then
6637 Formal := First_Entity (Id);
6639 if Present (Formal) and then Is_Formal (Formal) then
6647 ------------------------------
6648 -- First_Formal_With_Extras --
6649 ------------------------------
6651 function First_Formal_With_Extras (Id : E) return E is
6656 (Is_Overloadable (Id)
6657 or else Ekind_In (Id, E_Entry_Family,
6659 E_Subprogram_Type));
6661 if Ekind (Id) = E_Enumeration_Literal then
6665 Formal := First_Entity (Id);
6667 if Present (Formal) and then Is_Formal (Formal) then
6670 return Extra_Formals (Id); -- Empty if no extra formals
6673 end First_Formal_With_Extras;
6675 -------------------------------------
6676 -- Get_Attribute_Definition_Clause --
6677 -------------------------------------
6679 function Get_Attribute_Definition_Clause
6681 Id : Attribute_Id) return Node_Id
6686 N := First_Rep_Item (E);
6687 while Present (N) loop
6688 if Nkind (N) = N_Attribute_Definition_Clause
6689 and then Get_Attribute_Id (Chars (N)) = Id
6698 end Get_Attribute_Definition_Clause;
6704 function Get_Full_View (T : Entity_Id) return Entity_Id is
6706 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6707 return Full_View (T);
6709 elsif Is_Class_Wide_Type (T)
6710 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6711 and then Present (Full_View (Root_Type (T)))
6713 return Class_Wide_Type (Full_View (Root_Type (T)));
6724 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6725 Is_CDG : constant Boolean :=
6726 Id = Pragma_Abstract_State or else
6727 Id = Pragma_Async_Readers or else
6728 Id = Pragma_Async_Writers or else
6729 Id = Pragma_Depends or else
6730 Id = Pragma_Effective_Reads or else
6731 Id = Pragma_Effective_Writes or else
6732 Id = Pragma_Extensions_Visible or else
6733 Id = Pragma_Global or else
6734 Id = Pragma_Initial_Condition or else
6735 Id = Pragma_Initializes or else
6736 Id = Pragma_Part_Of or else
6737 Id = Pragma_Refined_Depends or else
6738 Id = Pragma_Refined_Global or else
6739 Id = Pragma_Refined_State;
6740 Is_CTC : constant Boolean :=
6741 Id = Pragma_Contract_Cases or else
6742 Id = Pragma_Test_Case;
6743 Is_PPC : constant Boolean :=
6744 Id = Pragma_Precondition or else
6745 Id = Pragma_Postcondition or else
6746 Id = Pragma_Refined_Post;
6748 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6754 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6755 -- extracted from their specialized list.
6758 Items := Contract (E);
6764 Item := Classifications (Items);
6767 Item := Contract_Test_Cases (Items);
6770 Item := Pre_Post_Conditions (Items);
6776 Item := First_Rep_Item (E);
6779 while Present (Item) loop
6780 if Nkind (Item) = N_Pragma
6781 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6785 -- All nodes in N_Contract are chained using Next_Pragma
6787 elsif In_Contract then
6788 Item := Next_Pragma (Item);
6793 Next_Rep_Item (Item);
6800 --------------------------------------
6801 -- Get_Record_Representation_Clause --
6802 --------------------------------------
6804 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6808 N := First_Rep_Item (E);
6809 while Present (N) loop
6810 if Nkind (N) = N_Record_Representation_Clause then
6818 end Get_Record_Representation_Clause;
6820 ------------------------
6821 -- Has_Attach_Handler --
6822 ------------------------
6824 function Has_Attach_Handler (Id : E) return B is
6828 pragma Assert (Is_Protected_Type (Id));
6830 Ritem := First_Rep_Item (Id);
6831 while Present (Ritem) loop
6832 if Nkind (Ritem) = N_Pragma
6833 and then Pragma_Name (Ritem) = Name_Attach_Handler
6837 Next_Rep_Item (Ritem);
6842 end Has_Attach_Handler;
6848 function Has_Entries (Id : E) return B is
6852 pragma Assert (Is_Concurrent_Type (Id));
6854 Ent := First_Entity (Id);
6855 while Present (Ent) loop
6856 if Is_Entry (Ent) then
6860 Ent := Next_Entity (Ent);
6866 ----------------------------
6867 -- Has_Foreign_Convention --
6868 ----------------------------
6870 function Has_Foreign_Convention (Id : E) return B is
6872 -- While regular Intrinsics such as the Standard operators fit in the
6873 -- "Ada" convention, those with an Interface_Name materialize GCC
6874 -- builtin imports for which Ada special treatments shouldn't apply.
6876 return Convention (Id) in Foreign_Convention
6877 or else (Convention (Id) = Convention_Intrinsic
6878 and then Present (Interface_Name (Id)));
6879 end Has_Foreign_Convention;
6881 ---------------------------
6882 -- Has_Interrupt_Handler --
6883 ---------------------------
6885 function Has_Interrupt_Handler (Id : E) return B is
6889 pragma Assert (Is_Protected_Type (Id));
6891 Ritem := First_Rep_Item (Id);
6892 while Present (Ritem) loop
6893 if Nkind (Ritem) = N_Pragma
6894 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6898 Next_Rep_Item (Ritem);
6903 end Has_Interrupt_Handler;
6905 -----------------------------
6906 -- Has_Non_Null_Refinement --
6907 -----------------------------
6909 function Has_Non_Null_Refinement (Id : E) return B is
6911 -- "Refinement" is a concept applicable only to abstract states
6913 pragma Assert (Ekind (Id) = E_Abstract_State);
6915 if Has_Visible_Refinement (Id) then
6916 pragma Assert (Present (Refinement_Constituents (Id)));
6918 -- For a refinement to be non-null, the first constituent must be
6919 -- anything other than null.
6922 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6926 end Has_Non_Null_Refinement;
6928 -----------------------------
6929 -- Has_Null_Abstract_State --
6930 -----------------------------
6932 function Has_Null_Abstract_State (Id : E) return B is
6934 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6937 Present (Abstract_States (Id))
6938 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6939 end Has_Null_Abstract_State;
6941 -------------------------
6942 -- Has_Null_Refinement --
6943 -------------------------
6945 function Has_Null_Refinement (Id : E) return B is
6947 -- "Refinement" is a concept applicable only to abstract states
6949 pragma Assert (Ekind (Id) = E_Abstract_State);
6951 if Has_Visible_Refinement (Id) then
6952 pragma Assert (Present (Refinement_Constituents (Id)));
6954 -- For a refinement to be null, the state's sole constituent must be
6958 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6962 end Has_Null_Refinement;
6964 --------------------
6965 -- Has_Unmodified --
6966 --------------------
6968 function Has_Unmodified (E : Entity_Id) return Boolean is
6970 if Has_Pragma_Unmodified (E) then
6972 elsif Warnings_Off (E) then
6973 Set_Warnings_Off_Used_Unmodified (E);
6980 ---------------------
6981 -- Has_Unreferenced --
6982 ---------------------
6984 function Has_Unreferenced (E : Entity_Id) return Boolean is
6986 if Has_Pragma_Unreferenced (E) then
6988 elsif Warnings_Off (E) then
6989 Set_Warnings_Off_Used_Unreferenced (E);
6994 end Has_Unreferenced;
6996 ----------------------
6997 -- Has_Warnings_Off --
6998 ----------------------
7000 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7002 if Warnings_Off (E) then
7003 Set_Warnings_Off_Used (E);
7008 end Has_Warnings_Off;
7010 ------------------------------
7011 -- Implementation_Base_Type --
7012 ------------------------------
7014 function Implementation_Base_Type (Id : E) return E is
7019 Bastyp := Base_Type (Id);
7021 if Is_Incomplete_Or_Private_Type (Bastyp) then
7022 Imptyp := Underlying_Type (Bastyp);
7024 -- If we have an implementation type, then just return it,
7025 -- otherwise we return the Base_Type anyway. This can only
7026 -- happen in error situations and should avoid some error bombs.
7028 if Present (Imptyp) then
7029 return Base_Type (Imptyp);
7037 end Implementation_Base_Type;
7039 -------------------------
7040 -- Invariant_Procedure --
7041 -------------------------
7043 function Invariant_Procedure (Id : E) return E is
7047 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7049 if No (Subprograms_For_Type (Id)) then
7053 S := Subprograms_For_Type (Id);
7054 while Present (S) loop
7055 if Is_Invariant_Procedure (S) then
7058 S := Subprograms_For_Type (S);
7064 end Invariant_Procedure;
7070 -- Global flag table allowing rapid computation of this function
7072 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7073 (E_Enumeration_Subtype |
7075 E_Signed_Integer_Subtype |
7076 E_Modular_Integer_Subtype |
7077 E_Floating_Point_Subtype |
7078 E_Ordinary_Fixed_Point_Subtype |
7079 E_Decimal_Fixed_Point_Subtype |
7084 E_Record_Subtype_With_Private |
7085 E_Limited_Private_Subtype |
7087 E_Protected_Subtype |
7089 E_String_Literal_Subtype |
7090 E_Class_Wide_Subtype => False,
7093 function Is_Base_Type (Id : E) return Boolean is
7095 return Entity_Is_Base_Type (Ekind (Id));
7098 ---------------------
7099 -- Is_Boolean_Type --
7100 ---------------------
7102 function Is_Boolean_Type (Id : E) return B is
7104 return Root_Type (Id) = Standard_Boolean;
7105 end Is_Boolean_Type;
7107 ------------------------
7108 -- Is_Constant_Object --
7109 ------------------------
7111 function Is_Constant_Object (Id : E) return B is
7112 K : constant Entity_Kind := Ekind (Id);
7115 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7116 end Is_Constant_Object;
7118 --------------------
7119 -- Is_Discriminal --
7120 --------------------
7122 function Is_Discriminal (Id : E) return B is
7124 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7125 and then Present (Discriminal_Link (Id)));
7128 ----------------------
7129 -- Is_Dynamic_Scope --
7130 ----------------------
7132 function Is_Dynamic_Scope (Id : E) return B is
7135 Ekind (Id) = E_Block
7137 Ekind (Id) = E_Function
7139 Ekind (Id) = E_Procedure
7141 Ekind (Id) = E_Subprogram_Body
7143 Ekind (Id) = E_Task_Type
7145 (Ekind (Id) = E_Limited_Private_Type
7146 and then Present (Full_View (Id))
7147 and then Ekind (Full_View (Id)) = E_Task_Type)
7149 Ekind (Id) = E_Entry
7151 Ekind (Id) = E_Entry_Family
7153 Ekind (Id) = E_Return_Statement;
7154 end Is_Dynamic_Scope;
7156 --------------------
7157 -- Is_Entity_Name --
7158 --------------------
7160 function Is_Entity_Name (N : Node_Id) return Boolean is
7161 Kind : constant Node_Kind := Nkind (N);
7164 -- Identifiers, operator symbols, expanded names are entity names
7166 return Kind = N_Identifier
7167 or else Kind = N_Operator_Symbol
7168 or else Kind = N_Expanded_Name
7170 -- Attribute references are entity names if they refer to an entity.
7171 -- Note that we don't do this by testing for the presence of the
7172 -- Entity field in the N_Attribute_Reference node, since it may not
7173 -- have been set yet.
7175 or else (Kind = N_Attribute_Reference
7176 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7179 -----------------------
7180 -- Is_External_State --
7181 -----------------------
7183 function Is_External_State (Id : E) return B is
7186 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7187 end Is_External_State;
7193 function Is_Finalizer (Id : E) return B is
7195 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7202 function Is_Null_State (Id : E) return B is
7205 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7208 ---------------------
7209 -- Is_Packed_Array --
7210 ---------------------
7212 function Is_Packed_Array (Id : E) return B is
7214 return Is_Array_Type (Id) and then Is_Packed (Id);
7215 end Is_Packed_Array;
7217 -----------------------------------
7218 -- Is_Package_Or_Generic_Package --
7219 -----------------------------------
7221 function Is_Package_Or_Generic_Package (Id : E) return B is
7223 return Ekind_In (Id, E_Generic_Package, E_Package);
7224 end Is_Package_Or_Generic_Package;
7230 function Is_Prival (Id : E) return B is
7232 return (Ekind_In (Id, E_Constant, E_Variable)
7233 and then Present (Prival_Link (Id)));
7236 ----------------------------
7237 -- Is_Protected_Component --
7238 ----------------------------
7240 function Is_Protected_Component (Id : E) return B is
7242 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7243 end Is_Protected_Component;
7245 ----------------------------
7246 -- Is_Protected_Interface --
7247 ----------------------------
7249 function Is_Protected_Interface (Id : E) return B is
7250 Typ : constant Entity_Id := Base_Type (Id);
7252 if not Is_Interface (Typ) then
7254 elsif Is_Class_Wide_Type (Typ) then
7255 return Is_Protected_Interface (Etype (Typ));
7257 return Protected_Present (Type_Definition (Parent (Typ)));
7259 end Is_Protected_Interface;
7261 ------------------------------
7262 -- Is_Protected_Record_Type --
7263 ------------------------------
7265 function Is_Protected_Record_Type (Id : E) return B is
7268 Is_Concurrent_Record_Type (Id)
7269 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7270 end Is_Protected_Record_Type;
7272 --------------------------------
7273 -- Is_Standard_Character_Type --
7274 --------------------------------
7276 function Is_Standard_Character_Type (Id : E) return B is
7278 if Is_Type (Id) then
7280 R : constant Entity_Id := Root_Type (Id);
7283 R = Standard_Character
7285 R = Standard_Wide_Character
7287 R = Standard_Wide_Wide_Character;
7293 end Is_Standard_Character_Type;
7295 -----------------------------
7296 -- Is_Standard_String_Type --
7297 -----------------------------
7299 function Is_Standard_String_Type (Id : E) return B is
7301 if Is_Type (Id) then
7303 R : constant Entity_Id := Root_Type (Id);
7308 R = Standard_Wide_String
7310 R = Standard_Wide_Wide_String;
7316 end Is_Standard_String_Type;
7318 --------------------
7319 -- Is_String_Type --
7320 --------------------
7322 function Is_String_Type (Id : E) return B is
7324 return Is_Array_Type (Id)
7325 and then Id /= Any_Composite
7326 and then Number_Dimensions (Id) = 1
7327 and then Is_Character_Type (Component_Type (Id));
7330 -------------------------------
7331 -- Is_Synchronized_Interface --
7332 -------------------------------
7334 function Is_Synchronized_Interface (Id : E) return B is
7335 Typ : constant Entity_Id := Base_Type (Id);
7338 if not Is_Interface (Typ) then
7341 elsif Is_Class_Wide_Type (Typ) then
7342 return Is_Synchronized_Interface (Etype (Typ));
7345 return Protected_Present (Type_Definition (Parent (Typ)))
7346 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7347 or else Task_Present (Type_Definition (Parent (Typ)));
7349 end Is_Synchronized_Interface;
7351 -----------------------
7352 -- Is_Task_Interface --
7353 -----------------------
7355 function Is_Task_Interface (Id : E) return B is
7356 Typ : constant Entity_Id := Base_Type (Id);
7358 if not Is_Interface (Typ) then
7360 elsif Is_Class_Wide_Type (Typ) then
7361 return Is_Task_Interface (Etype (Typ));
7363 return Task_Present (Type_Definition (Parent (Typ)));
7365 end Is_Task_Interface;
7367 -------------------------
7368 -- Is_Task_Record_Type --
7369 -------------------------
7371 function Is_Task_Record_Type (Id : E) return B is
7374 Is_Concurrent_Record_Type (Id)
7375 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7376 end Is_Task_Record_Type;
7378 ------------------------
7379 -- Is_Wrapper_Package --
7380 ------------------------
7382 function Is_Wrapper_Package (Id : E) return B is
7384 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7385 end Is_Wrapper_Package;
7391 function Last_Formal (Id : E) return E is
7396 (Is_Overloadable (Id)
7397 or else Ekind_In (Id, E_Entry_Family,
7399 E_Subprogram_Type));
7401 if Ekind (Id) = E_Enumeration_Literal then
7405 Formal := First_Formal (Id);
7407 if Present (Formal) then
7408 while Present (Next_Formal (Formal)) loop
7409 Formal := Next_Formal (Formal);
7417 function Model_Emin_Value (Id : E) return Uint is
7419 return Machine_Emin_Value (Id);
7420 end Model_Emin_Value;
7422 -------------------------
7423 -- Model_Epsilon_Value --
7424 -------------------------
7426 function Model_Epsilon_Value (Id : E) return Ureal is
7427 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7429 return Radix ** (1 - Model_Mantissa_Value (Id));
7430 end Model_Epsilon_Value;
7432 --------------------------
7433 -- Model_Mantissa_Value --
7434 --------------------------
7436 function Model_Mantissa_Value (Id : E) return Uint is
7438 return Machine_Mantissa_Value (Id);
7439 end Model_Mantissa_Value;
7441 -----------------------
7442 -- Model_Small_Value --
7443 -----------------------
7445 function Model_Small_Value (Id : E) return Ureal is
7446 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7448 return Radix ** (Model_Emin_Value (Id) - 1);
7449 end Model_Small_Value;
7451 ------------------------
7452 -- Machine_Emax_Value --
7453 ------------------------
7455 function Machine_Emax_Value (Id : E) return Uint is
7456 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7459 case Float_Rep (Id) is
7462 when 1 .. 6 => return Uint_128;
7463 when 7 .. 15 => return 2**10;
7464 when 16 .. 33 => return 2**14;
7465 when others => return No_Uint;
7469 return Uint_2 ** Uint_7 - Uint_1;
7471 end Machine_Emax_Value;
7473 ------------------------
7474 -- Machine_Emin_Value --
7475 ------------------------
7477 function Machine_Emin_Value (Id : E) return Uint is
7479 case Float_Rep (Id) is
7480 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7481 when AAMP => return -Machine_Emax_Value (Id);
7483 end Machine_Emin_Value;
7485 ----------------------------
7486 -- Machine_Mantissa_Value --
7487 ----------------------------
7489 function Machine_Mantissa_Value (Id : E) return Uint is
7490 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7493 case Float_Rep (Id) is
7496 when 1 .. 6 => return Uint_24;
7497 when 7 .. 15 => return UI_From_Int (53);
7498 when 16 .. 18 => return Uint_64;
7499 when 19 .. 33 => return UI_From_Int (113);
7500 when others => return No_Uint;
7505 when 1 .. 6 => return Uint_24;
7506 when 7 .. 9 => return UI_From_Int (40);
7507 when others => return No_Uint;
7510 end Machine_Mantissa_Value;
7512 -------------------------
7513 -- Machine_Radix_Value --
7514 -------------------------
7516 function Machine_Radix_Value (Id : E) return U is
7518 case Float_Rep (Id) is
7519 when IEEE_Binary | AAMP =>
7522 end Machine_Radix_Value;
7524 --------------------
7525 -- Next_Component --
7526 --------------------
7528 function Next_Component (Id : E) return E is
7532 Comp_Id := Next_Entity (Id);
7533 while Present (Comp_Id) loop
7534 exit when Ekind (Comp_Id) = E_Component;
7535 Comp_Id := Next_Entity (Comp_Id);
7541 ------------------------------------
7542 -- Next_Component_Or_Discriminant --
7543 ------------------------------------
7545 function Next_Component_Or_Discriminant (Id : E) return E is
7549 Comp_Id := Next_Entity (Id);
7550 while Present (Comp_Id) loop
7551 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7552 Comp_Id := Next_Entity (Comp_Id);
7556 end Next_Component_Or_Discriminant;
7558 -----------------------
7559 -- Next_Discriminant --
7560 -----------------------
7562 -- This function actually implements both Next_Discriminant and
7563 -- Next_Stored_Discriminant by making sure that the Discriminant
7564 -- returned is of the same variety as Id.
7566 function Next_Discriminant (Id : E) return E is
7568 -- Derived Tagged types with private extensions look like this...
7570 -- E_Discriminant d1
7571 -- E_Discriminant d2
7573 -- E_Discriminant d1
7574 -- E_Discriminant d2
7577 -- so it is critical not to go past the leading discriminants
7582 pragma Assert (Ekind (Id) = E_Discriminant);
7585 D := Next_Entity (D);
7587 or else (Ekind (D) /= E_Discriminant
7588 and then not Is_Itype (D))
7593 exit when Ekind (D) = E_Discriminant
7594 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7598 end Next_Discriminant;
7604 function Next_Formal (Id : E) return E is
7608 -- Follow the chain of declared entities as long as the kind of the
7609 -- entity corresponds to a formal parameter. Skip internal entities
7610 -- that may have been created for implicit subtypes, in the process
7611 -- of analyzing default expressions.
7615 P := Next_Entity (P);
7617 if No (P) or else Is_Formal (P) then
7619 elsif not Is_Internal (P) then
7625 -----------------------------
7626 -- Next_Formal_With_Extras --
7627 -----------------------------
7629 function Next_Formal_With_Extras (Id : E) return E is
7631 if Present (Extra_Formal (Id)) then
7632 return Extra_Formal (Id);
7634 return Next_Formal (Id);
7636 end Next_Formal_With_Extras;
7642 function Next_Index (Id : Node_Id) return Node_Id is
7651 function Next_Literal (Id : E) return E is
7653 pragma Assert (Nkind (Id) in N_Entity);
7657 ------------------------------
7658 -- Next_Stored_Discriminant --
7659 ------------------------------
7661 function Next_Stored_Discriminant (Id : E) return E is
7663 -- See comment in Next_Discriminant
7665 return Next_Discriminant (Id);
7666 end Next_Stored_Discriminant;
7668 -----------------------
7669 -- Number_Dimensions --
7670 -----------------------
7672 function Number_Dimensions (Id : E) return Pos is
7677 if Ekind (Id) = E_String_Literal_Subtype then
7682 T := First_Index (Id);
7683 while Present (T) loop
7690 end Number_Dimensions;
7692 --------------------
7693 -- Number_Entries --
7694 --------------------
7696 function Number_Entries (Id : E) return Nat is
7701 pragma Assert (Is_Concurrent_Type (Id));
7704 Ent := First_Entity (Id);
7705 while Present (Ent) loop
7706 if Is_Entry (Ent) then
7710 Ent := Next_Entity (Ent);
7716 --------------------
7717 -- Number_Formals --
7718 --------------------
7720 function Number_Formals (Id : E) return Pos is
7726 Formal := First_Formal (Id);
7727 while Present (Formal) loop
7729 Formal := Next_Formal (Formal);
7735 --------------------
7736 -- Parameter_Mode --
7737 --------------------
7739 function Parameter_Mode (Id : E) return Formal_Kind is
7744 ------------------------
7745 -- Predicate_Function --
7746 ------------------------
7748 function Predicate_Function (Id : E) return E is
7753 pragma Assert (Is_Type (Id));
7755 -- If type is private and has a completion, predicate may be defined
7756 -- on the full view.
7758 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7759 T := Full_View (Id);
7764 if No (Subprograms_For_Type (T)) then
7768 S := Subprograms_For_Type (T);
7769 while Present (S) loop
7770 if Is_Predicate_Function (S) then
7773 S := Subprograms_For_Type (S);
7779 end Predicate_Function;
7781 --------------------------
7782 -- Predicate_Function_M --
7783 --------------------------
7785 function Predicate_Function_M (Id : E) return E is
7790 pragma Assert (Is_Type (Id));
7792 -- If type is private and has a completion, predicate may be defined
7793 -- on the full view.
7795 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7796 T := Full_View (Id);
7801 if No (Subprograms_For_Type (T)) then
7805 S := Subprograms_For_Type (T);
7806 while Present (S) loop
7807 if Is_Predicate_Function_M (S) then
7810 S := Subprograms_For_Type (S);
7816 end Predicate_Function_M;
7818 -------------------------
7819 -- Present_In_Rep_Item --
7820 -------------------------
7822 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7826 Ritem := First_Rep_Item (E);
7828 while Present (Ritem) loop
7833 Next_Rep_Item (Ritem);
7837 end Present_In_Rep_Item;
7839 --------------------------
7840 -- Primitive_Operations --
7841 --------------------------
7843 function Primitive_Operations (Id : E) return L is
7845 if Is_Concurrent_Type (Id) then
7846 if Present (Corresponding_Record_Type (Id)) then
7847 return Direct_Primitive_Operations
7848 (Corresponding_Record_Type (Id));
7850 -- If expansion is disabled the corresponding record type is absent,
7851 -- but if the type has ancestors it may have primitive operations.
7853 elsif Is_Tagged_Type (Id) then
7854 return Direct_Primitive_Operations (Id);
7860 return Direct_Primitive_Operations (Id);
7862 end Primitive_Operations;
7864 ---------------------
7865 -- Record_Rep_Item --
7866 ---------------------
7868 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7870 Set_Next_Rep_Item (N, First_Rep_Item (E));
7871 Set_First_Rep_Item (E, N);
7872 end Record_Rep_Item;
7878 function Root_Type (Id : E) return E is
7882 pragma Assert (Nkind (Id) in N_Entity);
7884 T := Base_Type (Id);
7886 if Ekind (T) = E_Class_Wide_Type then
7898 -- Following test catches some error cases resulting from
7901 elsif No (Etyp) then
7902 Check_Error_Detected;
7905 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7908 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7914 -- Return if there is a circularity in the inheritance chain. This
7915 -- happens in some error situations and we do not want to get
7916 -- stuck in this loop.
7918 if T = Base_Type (Id) then
7925 ---------------------
7926 -- Safe_Emax_Value --
7927 ---------------------
7929 function Safe_Emax_Value (Id : E) return Uint is
7931 return Machine_Emax_Value (Id);
7932 end Safe_Emax_Value;
7934 ----------------------
7935 -- Safe_First_Value --
7936 ----------------------
7938 function Safe_First_Value (Id : E) return Ureal is
7940 return -Safe_Last_Value (Id);
7941 end Safe_First_Value;
7943 ---------------------
7944 -- Safe_Last_Value --
7945 ---------------------
7947 function Safe_Last_Value (Id : E) return Ureal is
7948 Radix : constant Uint := Machine_Radix_Value (Id);
7949 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7950 Emax : constant Uint := Safe_Emax_Value (Id);
7951 Significand : constant Uint := Radix ** Mantissa - 1;
7952 Exponent : constant Uint := Emax - Mantissa;
7958 (Num => Significand * 2 ** (Exponent mod 4),
7959 Den => -Exponent / 4,
7964 (Num => Significand,
7968 end Safe_Last_Value;
7974 function Scope_Depth (Id : E) return Uint is
7979 while Is_Record_Type (Scop) loop
7980 Scop := Scope (Scop);
7983 return Scope_Depth_Value (Scop);
7986 ---------------------
7987 -- Scope_Depth_Set --
7988 ---------------------
7990 function Scope_Depth_Set (Id : E) return B is
7992 return not Is_Record_Type (Id)
7993 and then Field22 (Id) /= Union_Id (Empty);
7994 end Scope_Depth_Set;
7996 -----------------------------
7997 -- Set_Component_Alignment --
7998 -----------------------------
8000 -- Component Alignment is encoded using two flags, Flag128/129 as
8001 -- follows. Note that both flags False = Align_Default, so that the
8002 -- default initialization of flags to False initializes component
8003 -- alignment to the default value as required.
8005 -- Flag128 Flag129 Value
8006 -- ------- ------- -----
8007 -- False False Calign_Default
8008 -- False True Calign_Component_Size
8009 -- True False Calign_Component_Size_4
8010 -- True True Calign_Storage_Unit
8012 procedure Set_Component_Alignment (Id : E; V : C) is
8014 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8015 and then Is_Base_Type (Id));
8018 when Calign_Default =>
8019 Set_Flag128 (Id, False);
8020 Set_Flag129 (Id, False);
8022 when Calign_Component_Size =>
8023 Set_Flag128 (Id, False);
8024 Set_Flag129 (Id, True);
8026 when Calign_Component_Size_4 =>
8027 Set_Flag128 (Id, True);
8028 Set_Flag129 (Id, False);
8030 when Calign_Storage_Unit =>
8031 Set_Flag128 (Id, True);
8032 Set_Flag129 (Id, True);
8034 end Set_Component_Alignment;
8036 -------------------------------------
8037 -- Set_Default_Init_Cond_Procedure --
8038 -------------------------------------
8040 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8045 (Is_Type (Id) and then (Has_Default_Init_Cond (Id)
8047 Has_Inherited_Default_Init_Cond (Id)));
8049 S := Subprograms_For_Type (Id);
8050 Set_Subprograms_For_Type (Id, V);
8051 Set_Subprograms_For_Type (V, S);
8053 -- Check for a duplicate procedure
8055 while Present (S) loop
8056 if Is_Default_Init_Cond_Procedure (S) then
8057 raise Program_Error;
8060 S := Subprograms_For_Type (S);
8062 end Set_Default_Init_Cond_Procedure;
8064 -----------------------------
8065 -- Set_Invariant_Procedure --
8066 -----------------------------
8068 procedure Set_Invariant_Procedure (Id : E; V : E) is
8072 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8074 S := Subprograms_For_Type (Id);
8075 Set_Subprograms_For_Type (Id, V);
8076 Set_Subprograms_For_Type (V, S);
8078 -- Check for duplicate entry
8080 while Present (S) loop
8081 if Is_Invariant_Procedure (S) then
8082 raise Program_Error;
8084 S := Subprograms_For_Type (S);
8087 end Set_Invariant_Procedure;
8089 ----------------------------
8090 -- Set_Predicate_Function --
8091 ----------------------------
8093 procedure Set_Predicate_Function (Id : E; V : E) is
8097 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8099 S := Subprograms_For_Type (Id);
8100 Set_Subprograms_For_Type (Id, V);
8101 Set_Subprograms_For_Type (V, S);
8103 while Present (S) loop
8104 if Is_Predicate_Function (S) then
8105 raise Program_Error;
8107 S := Subprograms_For_Type (S);
8110 end Set_Predicate_Function;
8112 ------------------------------
8113 -- Set_Predicate_Function_M --
8114 ------------------------------
8116 procedure Set_Predicate_Function_M (Id : E; V : E) is
8120 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8122 S := Subprograms_For_Type (Id);
8123 Set_Subprograms_For_Type (Id, V);
8124 Set_Subprograms_For_Type (V, S);
8126 -- Check for duplicates
8128 while Present (S) loop
8129 if Is_Predicate_Function_M (S) then
8130 raise Program_Error;
8132 S := Subprograms_For_Type (S);
8135 end Set_Predicate_Function_M;
8141 function Size_Clause (Id : E) return N is
8143 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8146 ------------------------
8147 -- Stream_Size_Clause --
8148 ------------------------
8150 function Stream_Size_Clause (Id : E) return N is
8152 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8153 end Stream_Size_Clause;
8159 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8165 Kind := E_Access_Subtype;
8169 Kind := E_Array_Subtype;
8171 when E_Class_Wide_Type |
8172 E_Class_Wide_Subtype =>
8173 Kind := E_Class_Wide_Subtype;
8175 when E_Decimal_Fixed_Point_Type |
8176 E_Decimal_Fixed_Point_Subtype =>
8177 Kind := E_Decimal_Fixed_Point_Subtype;
8179 when E_Ordinary_Fixed_Point_Type |
8180 E_Ordinary_Fixed_Point_Subtype =>
8181 Kind := E_Ordinary_Fixed_Point_Subtype;
8183 when E_Private_Type |
8184 E_Private_Subtype =>
8185 Kind := E_Private_Subtype;
8187 when E_Limited_Private_Type |
8188 E_Limited_Private_Subtype =>
8189 Kind := E_Limited_Private_Subtype;
8191 when E_Record_Type_With_Private |
8192 E_Record_Subtype_With_Private =>
8193 Kind := E_Record_Subtype_With_Private;
8195 when E_Record_Type |
8197 Kind := E_Record_Subtype;
8199 when Enumeration_Kind =>
8200 Kind := E_Enumeration_Subtype;
8203 Kind := E_Floating_Point_Subtype;
8205 when Signed_Integer_Kind =>
8206 Kind := E_Signed_Integer_Subtype;
8208 when Modular_Integer_Kind =>
8209 Kind := E_Modular_Integer_Subtype;
8211 when Protected_Kind =>
8212 Kind := E_Protected_Subtype;
8215 Kind := E_Task_Subtype;
8219 raise Program_Error;
8225 ---------------------
8226 -- Type_High_Bound --
8227 ---------------------
8229 function Type_High_Bound (Id : E) return Node_Id is
8230 Rng : constant Node_Id := Scalar_Range (Id);
8232 if Nkind (Rng) = N_Subtype_Indication then
8233 return High_Bound (Range_Expression (Constraint (Rng)));
8235 return High_Bound (Rng);
8237 end Type_High_Bound;
8239 --------------------
8240 -- Type_Low_Bound --
8241 --------------------
8243 function Type_Low_Bound (Id : E) return Node_Id is
8244 Rng : constant Node_Id := Scalar_Range (Id);
8246 if Nkind (Rng) = N_Subtype_Indication then
8247 return Low_Bound (Range_Expression (Constraint (Rng)));
8249 return Low_Bound (Rng);
8253 ---------------------
8254 -- Underlying_Type --
8255 ---------------------
8257 function Underlying_Type (Id : E) return E is
8259 -- For record_with_private the underlying type is always the direct
8260 -- full view. Never try to take the full view of the parent it
8261 -- doesn't make sense.
8263 if Ekind (Id) = E_Record_Type_With_Private then
8264 return Full_View (Id);
8266 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8268 -- If we have an incomplete or private type with a full view,
8269 -- then we return the Underlying_Type of this full view.
8271 if Present (Full_View (Id)) then
8272 if Id = Full_View (Id) then
8274 -- Previous error in declaration
8279 return Underlying_Type (Full_View (Id));
8282 -- If we have a private type with an underlying full view, then we
8283 -- return the Underlying_Type of this underlying full view.
8285 elsif Ekind (Id) in Private_Kind
8286 and then Present (Underlying_Full_View (Id))
8288 return Underlying_Type (Underlying_Full_View (Id));
8290 -- If we have an incomplete entity that comes from the limited
8291 -- view then we return the Underlying_Type of its non-limited
8294 elsif From_Limited_With (Id)
8295 and then Present (Non_Limited_View (Id))
8297 return Underlying_Type (Non_Limited_View (Id));
8299 -- Otherwise check for the case where we have a derived type or
8300 -- subtype, and if so get the Underlying_Type of the parent type.
8302 elsif Etype (Id) /= Id then
8303 return Underlying_Type (Etype (Id));
8305 -- Otherwise we have an incomplete or private type that has
8306 -- no full view, which means that we have not encountered the
8307 -- completion, so return Empty to indicate the underlying type
8308 -- is not yet known.
8314 -- For non-incomplete, non-private types, return the type itself Also
8315 -- for entities that are not types at all return the entity itself.
8320 end Underlying_Type;
8322 ------------------------
8323 -- Write_Entity_Flags --
8324 ------------------------
8326 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8328 procedure W (Flag_Name : String; Flag : Boolean);
8329 -- Write out given flag if it is set
8335 procedure W (Flag_Name : String; Flag : Boolean) is
8339 Write_Str (Flag_Name);
8340 Write_Str (" = True");
8345 -- Start of processing for Write_Entity_Flags
8348 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8349 and then Is_Base_Type (Id)
8352 Write_Str ("Component_Alignment = ");
8354 case Component_Alignment (Id) is
8355 when Calign_Default =>
8356 Write_Str ("Calign_Default");
8358 when Calign_Component_Size =>
8359 Write_Str ("Calign_Component_Size");
8361 when Calign_Component_Size_4 =>
8362 Write_Str ("Calign_Component_Size_4");
8364 when Calign_Storage_Unit =>
8365 Write_Str ("Calign_Storage_Unit");
8371 W ("Address_Taken", Flag104 (Id));
8372 W ("Body_Needed_For_SAL", Flag40 (Id));
8373 W ("C_Pass_By_Copy", Flag125 (Id));
8374 W ("Can_Never_Be_Null", Flag38 (Id));
8375 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8376 W ("Debug_Info_Off", Flag166 (Id));
8377 W ("Default_Expressions_Processed", Flag108 (Id));
8378 W ("Delay_Cleanups", Flag114 (Id));
8379 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8380 W ("Depends_On_Private", Flag14 (Id));
8381 W ("Discard_Names", Flag88 (Id));
8382 W ("Elaboration_Entity_Required", Flag174 (Id));
8383 W ("Elaborate_Body_Desirable", Flag210 (Id));
8384 W ("Entry_Accepted", Flag152 (Id));
8385 W ("Can_Use_Internal_Rep", Flag229 (Id));
8386 W ("Finalize_Storage_Only", Flag158 (Id));
8387 W ("From_Limited_With", Flag159 (Id));
8388 W ("Has_Aliased_Components", Flag135 (Id));
8389 W ("Has_Alignment_Clause", Flag46 (Id));
8390 W ("Has_All_Calls_Remote", Flag79 (Id));
8391 W ("Has_Anonymous_Master", Flag253 (Id));
8392 W ("Has_Atomic_Components", Flag86 (Id));
8393 W ("Has_Biased_Representation", Flag139 (Id));
8394 W ("Has_Completion", Flag26 (Id));
8395 W ("Has_Completion_In_Body", Flag71 (Id));
8396 W ("Has_Complex_Representation", Flag140 (Id));
8397 W ("Has_Component_Size_Clause", Flag68 (Id));
8398 W ("Has_Contiguous_Rep", Flag181 (Id));
8399 W ("Has_Controlled_Component", Flag43 (Id));
8400 W ("Has_Controlling_Result", Flag98 (Id));
8401 W ("Has_Convention_Pragma", Flag119 (Id));
8402 W ("Has_Default_Aspect", Flag39 (Id));
8403 W ("Has_Default_Init_Cond", Flag3 (Id));
8404 W ("Has_Delayed_Aspects", Flag200 (Id));
8405 W ("Has_Delayed_Freeze", Flag18 (Id));
8406 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8407 W ("Has_Discriminants", Flag5 (Id));
8408 W ("Has_Dispatch_Table", Flag220 (Id));
8409 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8410 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8411 W ("Has_Exit", Flag47 (Id));
8412 W ("Has_Forward_Instantiation", Flag175 (Id));
8413 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8414 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8415 W ("Has_Homonym", Flag56 (Id));
8416 W ("Has_Implicit_Dereference", Flag251 (Id));
8417 W ("Has_Independent_Components", Flag34 (Id));
8418 W ("Has_Inheritable_Invariants", Flag248 (Id));
8419 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8420 W ("Has_Initial_Value", Flag219 (Id));
8421 W ("Has_Invariants", Flag232 (Id));
8422 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8423 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8424 W ("Has_Master_Entity", Flag21 (Id));
8425 W ("Has_Missing_Return", Flag142 (Id));
8426 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8427 W ("Has_Non_Standard_Rep", Flag75 (Id));
8428 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8429 W ("Has_Object_Size_Clause", Flag172 (Id));
8430 W ("Has_Per_Object_Constraint", Flag154 (Id));
8431 W ("Has_Postconditions", Flag240 (Id));
8432 W ("Has_Pragma_Controlled", Flag27 (Id));
8433 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8434 W ("Has_Pragma_Inline", Flag157 (Id));
8435 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8436 W ("Has_Pragma_No_Inline", Flag201 (Id));
8437 W ("Has_Pragma_Ordered", Flag198 (Id));
8438 W ("Has_Pragma_Pack", Flag121 (Id));
8439 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8440 W ("Has_Pragma_Pure", Flag203 (Id));
8441 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8442 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8443 W ("Has_Pragma_Unmodified", Flag233 (Id));
8444 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8445 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8446 W ("Has_Predicates", Flag250 (Id));
8447 W ("Has_Primitive_Operations", Flag120 (Id));
8448 W ("Has_Private_Ancestor", Flag151 (Id));
8449 W ("Has_Private_Declaration", Flag155 (Id));
8450 W ("Has_Protected", Flag271 (Id));
8451 W ("Has_Qualified_Name", Flag161 (Id));
8452 W ("Has_RACW", Flag214 (Id));
8453 W ("Has_Record_Rep_Clause", Flag65 (Id));
8454 W ("Has_Recursive_Call", Flag143 (Id));
8455 W ("Has_Shift_Operator", Flag267 (Id));
8456 W ("Has_Size_Clause", Flag29 (Id));
8457 W ("Has_Small_Clause", Flag67 (Id));
8458 W ("Has_Specified_Layout", Flag100 (Id));
8459 W ("Has_Specified_Stream_Input", Flag190 (Id));
8460 W ("Has_Specified_Stream_Output", Flag191 (Id));
8461 W ("Has_Specified_Stream_Read", Flag192 (Id));
8462 W ("Has_Specified_Stream_Write", Flag193 (Id));
8463 W ("Has_Static_Discriminants", Flag211 (Id));
8464 W ("Has_Static_Predicate", Flag269 (Id));
8465 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8466 W ("Has_Storage_Size_Clause", Flag23 (Id));
8467 W ("Has_Stream_Size_Clause", Flag184 (Id));
8468 W ("Has_Task", Flag30 (Id));
8469 W ("Has_Thunks", Flag228 (Id));
8470 W ("Has_Unchecked_Union", Flag123 (Id));
8471 W ("Has_Unknown_Discriminants", Flag72 (Id));
8472 W ("Has_Up_Level_Access", Flag215 (Id));
8473 W ("Has_Visible_Refinement", Flag263 (Id));
8474 W ("Has_Volatile_Components", Flag87 (Id));
8475 W ("Has_Xref_Entry", Flag182 (Id));
8476 W ("In_Package_Body", Flag48 (Id));
8477 W ("In_Private_Part", Flag45 (Id));
8478 W ("In_Use", Flag8 (Id));
8479 W ("Is_Abstract_Subprogram", Flag19 (Id));
8480 W ("Is_Abstract_Type", Flag146 (Id));
8481 W ("Is_Access_Constant", Flag69 (Id));
8482 W ("Is_Ada_2005_Only", Flag185 (Id));
8483 W ("Is_Ada_2012_Only", Flag199 (Id));
8484 W ("Is_Aliased", Flag15 (Id));
8485 W ("Is_Asynchronous", Flag81 (Id));
8486 W ("Is_Atomic", Flag85 (Id));
8487 W ("Is_Bit_Packed_Array", Flag122 (Id));
8488 W ("Is_CPP_Class", Flag74 (Id));
8489 W ("Is_Called", Flag102 (Id));
8490 W ("Is_Character_Type", Flag63 (Id));
8491 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
8492 W ("Is_Child_Unit", Flag73 (Id));
8493 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8494 W ("Is_Compilation_Unit", Flag149 (Id));
8495 W ("Is_Completely_Hidden", Flag103 (Id));
8496 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8497 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8498 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8499 W ("Is_Constrained", Flag12 (Id));
8500 W ("Is_Constructor", Flag76 (Id));
8501 W ("Is_Controlled", Flag42 (Id));
8502 W ("Is_Controlling_Formal", Flag97 (Id));
8503 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8504 W ("Is_Descendent_Of_Address", Flag223 (Id));
8505 W ("Is_Discrim_SO_Function", Flag176 (Id));
8506 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8507 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8508 W ("Is_Dispatching_Operation", Flag6 (Id));
8509 W ("Is_Eliminated", Flag124 (Id));
8510 W ("Is_Entry_Formal", Flag52 (Id));
8511 W ("Is_Exported", Flag99 (Id));
8512 W ("Is_First_Subtype", Flag70 (Id));
8513 W ("Is_For_Access_Subtype", Flag118 (Id));
8514 W ("Is_Formal_Subprogram", Flag111 (Id));
8515 W ("Is_Frozen", Flag4 (Id));
8516 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8517 W ("Is_Generic_Actual_Type", Flag94 (Id));
8518 W ("Is_Generic_Instance", Flag130 (Id));
8519 W ("Is_Generic_Type", Flag13 (Id));
8520 W ("Is_Hidden", Flag57 (Id));
8521 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8522 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8523 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
8524 W ("Is_Immediately_Visible", Flag7 (Id));
8525 W ("Is_Implementation_Defined", Flag254 (Id));
8526 W ("Is_Imported", Flag24 (Id));
8527 W ("Is_Independent", Flag268 (Id));
8528 W ("Is_Inlined", Flag11 (Id));
8529 W ("Is_Inlined_Always", Flag1 (Id));
8530 W ("Is_Instantiated", Flag126 (Id));
8531 W ("Is_Interface", Flag186 (Id));
8532 W ("Is_Internal", Flag17 (Id));
8533 W ("Is_Interrupt_Handler", Flag89 (Id));
8534 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8535 W ("Is_Invariant_Procedure", Flag257 (Id));
8536 W ("Is_Itype", Flag91 (Id));
8537 W ("Is_Known_Non_Null", Flag37 (Id));
8538 W ("Is_Known_Null", Flag204 (Id));
8539 W ("Is_Known_Valid", Flag170 (Id));
8540 W ("Is_Limited_Composite", Flag106 (Id));
8541 W ("Is_Limited_Interface", Flag197 (Id));
8542 W ("Is_Limited_Record", Flag25 (Id));
8543 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8544 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8545 W ("Is_Non_Static_Subtype", Flag109 (Id));
8546 W ("Is_Null_Init_Proc", Flag178 (Id));
8547 W ("Is_Obsolescent", Flag153 (Id));
8548 W ("Is_Only_Out_Parameter", Flag226 (Id));
8549 W ("Is_Package_Body_Entity", Flag160 (Id));
8550 W ("Is_Packed", Flag51 (Id));
8551 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8552 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8553 W ("Is_Predicate_Function", Flag255 (Id));
8554 W ("Is_Predicate_Function_M", Flag256 (Id));
8555 W ("Is_Preelaborated", Flag59 (Id));
8556 W ("Is_Primitive", Flag218 (Id));
8557 W ("Is_Primitive_Wrapper", Flag195 (Id));
8558 W ("Is_Private_Composite", Flag107 (Id));
8559 W ("Is_Private_Descendant", Flag53 (Id));
8560 W ("Is_Private_Primitive", Flag245 (Id));
8561 W ("Is_Processed_Transient", Flag252 (Id));
8562 W ("Is_Public", Flag10 (Id));
8563 W ("Is_Pure", Flag44 (Id));
8564 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8565 W ("Is_RACW_Stub_Type", Flag244 (Id));
8566 W ("Is_Raised", Flag224 (Id));
8567 W ("Is_Remote_Call_Interface", Flag62 (Id));
8568 W ("Is_Remote_Types", Flag61 (Id));
8569 W ("Is_Renaming_Of_Object", Flag112 (Id));
8570 W ("Is_Return_Object", Flag209 (Id));
8571 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8572 W ("Is_Shared_Passive", Flag60 (Id));
8573 W ("Is_Statically_Allocated", Flag28 (Id));
8574 W ("Is_Tag", Flag78 (Id));
8575 W ("Is_Tagged_Type", Flag55 (Id));
8576 W ("Is_Thunk", Flag225 (Id));
8577 W ("Is_Trivial_Subprogram", Flag235 (Id));
8578 W ("Is_True_Constant", Flag163 (Id));
8579 W ("Is_Unchecked_Union", Flag117 (Id));
8580 W ("Is_Underlying_Record_View", Flag246 (Id));
8581 W ("Is_Unsigned_Type", Flag144 (Id));
8582 W ("Is_Valued_Procedure", Flag127 (Id));
8583 W ("Is_Visible_Formal", Flag206 (Id));
8584 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8585 W ("Is_Volatile", Flag16 (Id));
8586 W ("Itype_Printed", Flag202 (Id));
8587 W ("Kill_Elaboration_Checks", Flag32 (Id));
8588 W ("Kill_Range_Checks", Flag33 (Id));
8589 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8590 W ("Low_Bound_Tested", Flag205 (Id));
8591 W ("Machine_Radix_10", Flag84 (Id));
8592 W ("Materialize_Entity", Flag168 (Id));
8593 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8594 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8595 W ("Must_Have_Preelab_Init", Flag208 (Id));
8596 W ("Needs_Debug_Info", Flag147 (Id));
8597 W ("Needs_No_Actuals", Flag22 (Id));
8598 W ("Never_Set_In_Source", Flag115 (Id));
8599 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8600 W ("No_Pool_Assigned", Flag131 (Id));
8601 W ("No_Predicate_On_actual", Flag275 (Id));
8602 W ("No_Return", Flag113 (Id));
8603 W ("No_Strict_Aliasing", Flag136 (Id));
8604 W ("Non_Binary_Modulus", Flag58 (Id));
8605 W ("Nonzero_Is_True", Flag162 (Id));
8606 W ("OK_To_Rename", Flag247 (Id));
8607 W ("OK_To_Reorder_Components", Flag239 (Id));
8608 W ("Optimize_Alignment_Space", Flag241 (Id));
8609 W ("Optimize_Alignment_Time", Flag242 (Id));
8610 W ("Overlays_Constant", Flag243 (Id));
8611 W ("Reachable", Flag49 (Id));
8612 W ("Referenced", Flag156 (Id));
8613 W ("Referenced_As_LHS", Flag36 (Id));
8614 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8615 W ("Renamed_In_Spec", Flag231 (Id));
8616 W ("Requires_Overriding", Flag213 (Id));
8617 W ("Return_Present", Flag54 (Id));
8618 W ("Returns_By_Ref", Flag90 (Id));
8619 W ("Returns_Limited_View", Flag134 (Id));
8620 W ("Reverse_Bit_Order", Flag164 (Id));
8621 W ("Reverse_Storage_Order", Flag93 (Id));
8622 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8623 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8624 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8625 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8626 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8627 W ("SSO_Set_High_By_Default", Flag273 (Id));
8628 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8629 W ("Static_Elaboration_Desired", Flag77 (Id));
8630 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8631 W ("Strict_Alignment", Flag145 (Id));
8632 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8633 W ("Suppress_Initialization", Flag105 (Id));
8634 W ("Suppress_Style_Checks", Flag165 (Id));
8635 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8636 W ("Treat_As_Volatile", Flag41 (Id));
8637 W ("Universal_Aliasing", Flag216 (Id));
8638 W ("Used_As_Generic_Actual", Flag222 (Id));
8639 W ("Uses_Sec_Stack", Flag95 (Id));
8640 W ("Warnings_Off", Flag96 (Id));
8641 W ("Warnings_Off_Used", Flag236 (Id));
8642 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8643 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8644 W ("Was_Hidden", Flag196 (Id));
8645 end Write_Entity_Flags;
8647 -----------------------
8648 -- Write_Entity_Info --
8649 -----------------------
8651 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8653 procedure Write_Attribute (Which : String; Nam : E);
8654 -- Write attribute value with given string name
8656 procedure Write_Kind (Id : Entity_Id);
8657 -- Write Ekind field of entity
8659 ---------------------
8660 -- Write_Attribute --
8661 ---------------------
8663 procedure Write_Attribute (Which : String; Nam : E) is
8667 Write_Int (Int (Nam));
8669 Write_Name (Chars (Nam));
8671 end Write_Attribute;
8677 procedure Write_Kind (Id : Entity_Id) is
8678 K : constant String := Entity_Kind'Image (Ekind (Id));
8682 Write_Str (" Kind ");
8684 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8685 Write_Str ("TAGGED ");
8688 Write_Str (K (3 .. K'Length));
8691 if Is_Type (Id) and then Depends_On_Private (Id) then
8692 Write_Str ("Depends_On_Private ");
8696 -- Start of processing for Write_Entity_Info
8700 Write_Attribute ("Name ", Id);
8701 Write_Int (Int (Id));
8705 Write_Attribute (" Type ", Etype (Id));
8707 Write_Attribute (" Scope ", Scope (Id));
8712 when Discrete_Kind =>
8713 Write_Str ("Bounds: Id = ");
8715 if Present (Scalar_Range (Id)) then
8716 Write_Int (Int (Type_Low_Bound (Id)));
8717 Write_Str (" .. Id = ");
8718 Write_Int (Int (Type_High_Bound (Id)));
8720 Write_Str ("Empty");
8731 (" Component Type ", Component_Type (Id));
8734 Write_Str (" Indexes ");
8736 Index := First_Index (Id);
8737 while Present (Index) loop
8738 Write_Attribute (" ", Etype (Index));
8739 Index := Next_Index (Index);
8747 (" Directly Designated Type ",
8748 Directly_Designated_Type (Id));
8751 when Overloadable_Kind =>
8752 if Present (Homonym (Id)) then
8753 Write_Str (" Homonym ");
8754 Write_Name (Chars (Homonym (Id)));
8756 Write_Int (Int (Homonym (Id)));
8763 if Ekind (Scope (Id)) in Record_Kind then
8765 " Original_Record_Component ",
8766 Original_Record_Component (Id));
8767 Write_Int (Int (Original_Record_Component (Id)));
8771 when others => null;
8773 end Write_Entity_Info;
8775 -----------------------
8776 -- Write_Field6_Name --
8777 -----------------------
8779 procedure Write_Field6_Name (Id : Entity_Id) is
8780 pragma Warnings (Off, Id);
8782 Write_Str ("First_Rep_Item");
8783 end Write_Field6_Name;
8785 -----------------------
8786 -- Write_Field7_Name --
8787 -----------------------
8789 procedure Write_Field7_Name (Id : Entity_Id) is
8790 pragma Warnings (Off, Id);
8792 Write_Str ("Freeze_Node");
8793 end Write_Field7_Name;
8795 -----------------------
8796 -- Write_Field8_Name --
8797 -----------------------
8799 procedure Write_Field8_Name (Id : Entity_Id) is
8803 Write_Str ("Associated_Node_For_Itype");
8806 Write_Str ("Dependent_Instances");
8809 Write_Str ("First_Exit_Statement");
8812 Write_Str ("Hiding_Loop_Variable");
8816 E_Subprogram_Body =>
8817 Write_Str ("Mechanism");
8821 Write_Str ("Normalized_First_Bit");
8824 Write_Str ("Postcondition_Proc");
8826 when E_Abstract_State =>
8827 Write_Str ("Refinement_Constituents");
8829 when E_Return_Statement =>
8830 Write_Str ("Return_Applies_To");
8833 Write_Str ("Field8??");
8835 end Write_Field8_Name;
8837 -----------------------
8838 -- Write_Field9_Name --
8839 -----------------------
8841 procedure Write_Field9_Name (Id : Entity_Id) is
8845 Write_Str ("Class_Wide_Type");
8848 Write_Str ("Current_Value");
8850 when E_Abstract_State =>
8851 Write_Str ("Part_Of_Constituents");
8854 E_Generic_Function |
8856 E_Generic_Procedure |
8859 Write_Str ("Renaming_Map");
8862 Write_Str ("Field9??");
8864 end Write_Field9_Name;
8866 ------------------------
8867 -- Write_Field10_Name --
8868 ------------------------
8870 procedure Write_Field10_Name (Id : Entity_Id) is
8873 when E_Abstract_State |
8875 Write_Str ("Encapsulating_State");
8877 when Class_Wide_Kind |
8883 Write_Str ("Direct_Primitive_Operations");
8886 Write_Str ("Float_Rep");
8888 when E_In_Parameter |
8890 Write_Str ("Discriminal_Link");
8896 Write_Str ("Handler_Records");
8900 Write_Str ("Normalized_Position_Max");
8903 Write_Str ("Field10??");
8905 end Write_Field10_Name;
8907 ------------------------
8908 -- Write_Field11_Name --
8909 ------------------------
8911 procedure Write_Field11_Name (Id : Entity_Id) is
8915 Write_Str ("Block_Node");
8919 Write_Str ("Component_Bit_Offset");
8922 Write_Str ("Entry_Component");
8924 when E_Enumeration_Literal =>
8925 Write_Str ("Enumeration_Pos");
8929 Write_Str ("Full_View");
8931 when E_Generic_Package =>
8932 Write_Str ("Generic_Homonym");
8938 Write_Str ("Protected_Body_Subprogram");
8941 Write_Str ("Field11??");
8943 end Write_Field11_Name;
8945 ------------------------
8946 -- Write_Field12_Name --
8947 ------------------------
8949 procedure Write_Field12_Name (Id : Entity_Id) is
8953 Write_Str ("Associated_Formal_Package");
8956 Write_Str ("Barrier_Function");
8958 when E_Enumeration_Literal =>
8959 Write_Str ("Enumeration_Rep");
8967 E_In_Out_Parameter |
8971 Write_Str ("Esize");
8975 Write_Str ("Next_Inlined_Subprogram");
8978 Write_Str ("Field12??");
8980 end Write_Field12_Name;
8982 ------------------------
8983 -- Write_Field13_Name --
8984 ------------------------
8986 procedure Write_Field13_Name (Id : Entity_Id) is
8991 Write_Str ("Component_Clause");
8994 Write_Str ("Elaboration_Entity");
8998 Generic_Unit_Kind =>
8999 Write_Str ("Elaboration_Entity");
9003 Write_Str ("Extra_Accessibility");
9006 Write_Str ("RM_Size");
9009 Write_Str ("Field13??");
9011 end Write_Field13_Name;
9013 -----------------------
9014 -- Write_Field14_Name --
9015 -----------------------
9017 procedure Write_Field14_Name (Id : Entity_Id) is
9026 Write_Str ("Alignment");
9030 Write_Str ("Normalized_Position");
9033 E_Generic_Package =>
9034 Write_Str ("Shadow_Entities");
9037 Write_Str ("Field14??");
9039 end Write_Field14_Name;
9041 ------------------------
9042 -- Write_Field15_Name --
9043 ------------------------
9045 procedure Write_Field15_Name (Id : Entity_Id) is
9048 when E_Discriminant =>
9049 Write_Str ("Discriminant_Number");
9052 Write_Str ("DT_Entry_Count");
9056 Write_Str ("DT_Position");
9058 when E_Protected_Type =>
9059 Write_Str ("Entry_Bodies_Array");
9062 Write_Str ("Entry_Parameters_Type");
9065 Write_Str ("Extra_Formal");
9067 when Enumeration_Kind =>
9068 Write_Str ("Lit_Indexes");
9072 Write_Str ("Related_Instance");
9074 when Decimal_Fixed_Point_Kind =>
9075 Write_Str ("Scale_Value");
9079 Write_Str ("Status_Flag_Or_Transient_Decl");
9083 Write_Str ("Storage_Size_Variable");
9085 when E_String_Literal_Subtype =>
9086 Write_Str ("String_Literal_Low_Bound");
9089 Write_Str ("Field15??");
9091 end Write_Field15_Name;
9093 ------------------------
9094 -- Write_Field16_Name --
9095 ------------------------
9097 procedure Write_Field16_Name (Id : Entity_Id) is
9100 when E_Record_Type |
9101 E_Record_Type_With_Private =>
9102 Write_Str ("Access_Disp_Table");
9104 when E_Abstract_State =>
9105 Write_Str ("Body_References");
9107 when E_Record_Subtype |
9108 E_Class_Wide_Subtype =>
9109 Write_Str ("Cloned_Subtype");
9113 Write_Str ("DTC_Entity");
9116 Write_Str ("Entry_Formal");
9121 Write_Str ("First_Private_Entity");
9123 when Enumeration_Kind =>
9124 Write_Str ("Lit_Strings");
9126 when E_String_Literal_Subtype =>
9127 Write_Str ("String_Literal_Length");
9131 Write_Str ("Unset_Reference");
9134 Write_Str ("Field16??");
9136 end Write_Field16_Name;
9138 ------------------------
9139 -- Write_Field17_Name --
9140 ------------------------
9142 procedure Write_Field17_Name (Id : Entity_Id) is
9147 E_Generic_In_Out_Parameter |
9149 Write_Str ("Actual_Subtype");
9152 Write_Str ("Digits_Value");
9154 when E_Discriminant =>
9155 Write_Str ("Discriminal");
9164 E_Generic_Function |
9166 E_Generic_Procedure |
9174 E_Return_Statement |
9176 E_Subprogram_Type =>
9177 Write_Str ("First_Entity");
9180 Write_Str ("First_Index");
9182 when Enumeration_Kind =>
9183 Write_Str ("First_Literal");
9186 Write_Str ("Master_Id");
9188 when Modular_Integer_Kind =>
9189 Write_Str ("Modulus");
9191 when E_Abstract_State |
9192 E_Incomplete_Type =>
9193 Write_Str ("Non_Limited_View");
9195 when E_Incomplete_Subtype =>
9196 if From_Limited_With (Id) then
9197 Write_Str ("Non_Limited_View");
9201 Write_Str ("Prival");
9204 Write_Str ("Field17??");
9206 end Write_Field17_Name;
9208 ------------------------
9209 -- Write_Field18_Name --
9210 ------------------------
9212 procedure Write_Field18_Name (Id : Entity_Id) is
9215 when E_Enumeration_Literal |
9219 Write_Str ("Alias");
9221 when E_Record_Type =>
9222 Write_Str ("Corresponding_Concurrent_Type");
9224 when E_Subprogram_Body =>
9225 Write_Str ("Corresponding_Protected_Entry");
9227 when Concurrent_Kind =>
9228 Write_Str ("Corresponding_Record_Type");
9233 Write_Str ("Enclosing_Scope");
9235 when E_Entry_Index_Parameter =>
9236 Write_Str ("Entry_Index_Constant");
9238 when E_Class_Wide_Subtype |
9239 E_Access_Protected_Subprogram_Type |
9240 E_Anonymous_Access_Protected_Subprogram_Type |
9241 E_Access_Subprogram_Type |
9243 Write_Str ("Equivalent_Type");
9245 when Fixed_Point_Kind =>
9246 Write_Str ("Delta_Value");
9248 when Incomplete_Or_Private_Kind |
9250 Write_Str ("Private_Dependents");
9253 Write_Str ("Renamed_Object");
9257 E_Generic_Function |
9258 E_Generic_Procedure |
9259 E_Generic_Package =>
9260 Write_Str ("Renamed_Entity");
9263 Write_Str ("Field18??");
9265 end Write_Field18_Name;
9267 -----------------------
9268 -- Write_Field19_Name --
9269 -----------------------
9271 procedure Write_Field19_Name (Id : Entity_Id) is
9275 E_Generic_Package =>
9276 Write_Str ("Body_Entity");
9278 when E_Discriminant =>
9279 Write_Str ("Corresponding_Discriminant");
9282 Write_Str ("Default_Aspect_Value");
9284 when E_Array_Type =>
9285 Write_Str ("Default_Component_Value");
9287 when E_Record_Type =>
9288 Write_Str ("Parent_Subtype");
9292 Write_Str ("Size_Check_Code");
9294 when E_Package_Body |
9296 Write_Str ("Spec_Entity");
9298 when Private_Kind =>
9299 Write_Str ("Underlying_Full_View");
9301 when E_Function | E_Operator | E_Subprogram_Type =>
9302 Write_Str ("Extra_Accessibility_Of_Result");
9305 Write_Str ("Field19??");
9307 end Write_Field19_Name;
9309 -----------------------
9310 -- Write_Field20_Name --
9311 -----------------------
9313 procedure Write_Field20_Name (Id : Entity_Id) is
9317 Write_Str ("Component_Type");
9319 when E_In_Parameter |
9320 E_Generic_In_Parameter =>
9321 Write_Str ("Default_Value");
9324 Write_Str ("Directly_Designated_Type");
9327 Write_Str ("Discriminant_Checking_Func");
9329 when E_Discriminant =>
9330 Write_Str ("Discriminant_Default_Value");
9339 E_Generic_Function |
9341 E_Generic_Procedure |
9349 E_Return_Statement |
9351 E_Subprogram_Type =>
9352 Write_Str ("Last_Entity");
9356 Write_Str ("Prival_Link");
9359 Write_Str ("Scalar_Range");
9362 Write_Str ("Register_Exception_Call");
9365 Write_Str ("Field20??");
9367 end Write_Field20_Name;
9369 -----------------------
9370 -- Write_Field21_Name --
9371 -----------------------
9373 procedure Write_Field21_Name (Id : Entity_Id) is
9377 Write_Str ("Accept_Address");
9379 when E_In_Parameter =>
9380 Write_Str ("Default_Expr_Function");
9382 when Concurrent_Kind |
9383 Incomplete_Or_Private_Kind |
9387 Write_Str ("Discriminant_Constraint");
9392 E_Generic_Function |
9394 E_Generic_Procedure |
9396 Write_Str ("Interface_Name");
9399 Modular_Integer_Kind =>
9400 Write_Str ("Original_Array_Type");
9402 when Fixed_Point_Kind =>
9403 Write_Str ("Small_Value");
9406 Write_Str ("Field21??");
9408 end Write_Field21_Name;
9410 -----------------------
9411 -- Write_Field22_Name --
9412 -----------------------
9414 procedure Write_Field22_Name (Id : Entity_Id) is
9418 Write_Str ("Associated_Storage_Pool");
9421 Write_Str ("Component_Size");
9423 when E_Record_Type =>
9424 Write_Str ("Corresponding_Remote_Type");
9428 Write_Str ("Original_Record_Component");
9430 when E_Enumeration_Literal =>
9431 Write_Str ("Enumeration_Rep_Expr");
9433 when E_Record_Type_With_Private |
9434 E_Record_Subtype_With_Private |
9437 E_Limited_Private_Type |
9438 E_Limited_Private_Subtype =>
9439 Write_Str ("Private_View");
9442 Write_Str ("Protected_Formal");
9452 E_Generic_Function |
9453 E_Generic_Procedure |
9456 E_Return_Statement |
9459 Write_Str ("Scope_Depth_Value");
9462 Write_Str ("Shared_Var_Procs_Instance");
9465 Write_Str ("Field22??");
9467 end Write_Field22_Name;
9469 ------------------------
9470 -- Write_Field23_Name --
9471 ------------------------
9473 procedure Write_Field23_Name (Id : Entity_Id) is
9476 when E_Discriminant =>
9477 Write_Str ("CR_Discriminant");
9480 Write_Str ("Entry_Cancel_Parameter");
9482 when E_Enumeration_Type =>
9483 Write_Str ("Enum_Pos_To_Rep");
9487 Write_Str ("Extra_Constrained");
9490 Write_Str ("Finalization_Master");
9492 when E_Generic_Function |
9494 E_Generic_Procedure =>
9495 Write_Str ("Inner_Instances");
9498 Write_Str ("Packed_Array_Impl_Type");
9501 Write_Str ("Protection_Object");
9503 when Concurrent_Kind |
9504 Incomplete_Or_Private_Kind |
9508 Write_Str ("Stored_Constraint");
9512 if Present (Scope (Id))
9513 and then Is_Protected_Type (Scope (Id))
9515 Write_Str ("Protection_Object");
9517 Write_Str ("Generic_Renamings");
9521 if Is_Generic_Instance (Id) then
9522 Write_Str ("Generic_Renamings");
9524 Write_Str ("Limited_View");
9528 Write_Str ("Field23??");
9530 end Write_Field23_Name;
9532 ------------------------
9533 -- Write_Field24_Name --
9534 ------------------------
9536 procedure Write_Field24_Name (Id : Entity_Id) is
9542 Write_Str ("Related_Expression");
9545 Write_Str ("Field24???");
9547 end Write_Field24_Name;
9549 ------------------------
9550 -- Write_Field25_Name --
9551 ------------------------
9553 procedure Write_Field25_Name (Id : Entity_Id) is
9556 when E_Generic_Package |
9558 Write_Str ("Abstract_States");
9561 Write_Str ("Debug_Renaming_Link");
9564 Write_Str ("DT_Offset_To_Top_Func");
9568 Write_Str ("Interface_Alias");
9570 when E_Record_Type |
9572 E_Record_Type_With_Private |
9573 E_Record_Subtype_With_Private =>
9574 Write_Str ("Interfaces");
9578 Write_Str ("Related_Array_Object");
9581 Write_Str ("Task_Body_Procedure");
9585 Write_Str ("PPC_Wrapper");
9587 when Discrete_Kind =>
9588 Write_Str ("Static_Discrete_Predicate");
9591 Write_Str ("Static_Real_Or_String_Predicate");
9594 Write_Str ("Field25??");
9596 end Write_Field25_Name;
9598 ------------------------
9599 -- Write_Field26_Name --
9600 ------------------------
9602 procedure Write_Field26_Name (Id : Entity_Id) is
9605 when E_Record_Type |
9606 E_Record_Type_With_Private =>
9607 Write_Str ("Dispatch_Table_Wrappers");
9609 when E_In_Out_Parameter |
9612 Write_Str ("Last_Assignment");
9614 when E_Access_Subprogram_Type =>
9615 Write_Str ("Original_Access_Type");
9617 when E_Generic_Package |
9619 Write_Str ("Package_Instantiation");
9623 Write_Str ("Related_Type");
9626 Write_Str ("Relative_Deadline_Variable");
9630 Write_Str ("Overridden_Operation");
9633 Write_Str ("Field26??");
9635 end Write_Field26_Name;
9637 ------------------------
9638 -- Write_Field27_Name --
9639 ------------------------
9641 procedure Write_Field27_Name (Id : Entity_Id) is
9646 Write_Str ("Current_Use_Clause");
9651 Write_Str ("Related_Type");
9655 Write_Str ("Wrapped_Entity");
9658 Write_Str ("Field27??");
9660 end Write_Field27_Name;
9662 ------------------------
9663 -- Write_Field28_Name --
9664 ------------------------
9666 procedure Write_Field28_Name (Id : Entity_Id) is
9674 E_Subprogram_Type =>
9675 Write_Str ("Extra_Formals");
9679 Write_Str ("Finalizer");
9683 Write_Str ("Initialization_Statements");
9685 when E_Record_Type =>
9686 Write_Str ("Underlying_Record_View");
9689 Write_Str ("Field28??");
9691 end Write_Field28_Name;
9693 ------------------------
9694 -- Write_Field29_Name --
9695 ------------------------
9697 procedure Write_Field29_Name (Id : Entity_Id) is
9702 Write_Str ("BIP_Initialization_Call");
9705 Write_Str ("Subprograms_For_Type");
9708 Write_Str ("Field29??");
9710 end Write_Field29_Name;
9712 ------------------------
9713 -- Write_Field30_Name --
9714 ------------------------
9716 procedure Write_Field30_Name (Id : Entity_Id) is
9720 Write_Str ("Corresponding_Equality");
9724 Write_Str ("Last_Aggregate_Assignment");
9727 Write_Str ("Static_Initialization");
9730 Write_Str ("Field30??");
9732 end Write_Field30_Name;
9734 ------------------------
9735 -- Write_Field31_Name --
9736 ------------------------
9738 procedure Write_Field31_Name (Id : Entity_Id) is
9743 Write_Str ("Thunk_Entity");
9746 Write_Str ("Derived_Type_Link");
9749 Write_Str ("Field31??");
9751 end Write_Field31_Name;
9753 ------------------------
9754 -- Write_Field32_Name --
9755 ------------------------
9757 procedure Write_Field32_Name (Id : Entity_Id) is
9761 E_Generic_Function |
9763 E_Generic_Procedure |
9767 E_Subprogram_Body =>
9768 Write_Str ("SPARK_Pragma");
9771 Write_Str ("No_Tagged_Streams_Pragma");
9774 Write_Str ("Field32??");
9776 end Write_Field32_Name;
9778 ------------------------
9779 -- Write_Field33_Name --
9780 ------------------------
9782 procedure Write_Field33_Name (Id : Entity_Id) is
9785 when E_Generic_Package |
9788 Write_Str ("SPARK_Aux_Pragma");
9794 Write_Str ("Linker_Section_Pragma");
9797 Write_Str ("Field33??");
9799 end Write_Field33_Name;
9801 ------------------------
9802 -- Write_Field34_Name --
9803 ------------------------
9805 procedure Write_Field34_Name (Id : Entity_Id) is
9815 Generic_Subprogram_Kind |
9817 Write_Str ("Contract");
9820 Write_Str ("Field34??");
9822 end Write_Field34_Name;
9824 ------------------------
9825 -- Write_Field35_Name --
9826 ------------------------
9828 procedure Write_Field35_Name (Id : Entity_Id) is
9831 when Subprogram_Kind =>
9832 Write_Str ("Import_Pragma");
9834 Write_Str ("Field35??");
9836 end Write_Field35_Name;
9838 -------------------------
9839 -- Iterator Procedures --
9840 -------------------------
9842 procedure Proc_Next_Component (N : in out Node_Id) is
9844 N := Next_Component (N);
9845 end Proc_Next_Component;
9847 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9849 N := Next_Entity (N);
9850 while Present (N) loop
9851 exit when Ekind_In (N, E_Component, E_Discriminant);
9852 N := Next_Entity (N);
9854 end Proc_Next_Component_Or_Discriminant;
9856 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9858 N := Next_Discriminant (N);
9859 end Proc_Next_Discriminant;
9861 procedure Proc_Next_Formal (N : in out Node_Id) is
9863 N := Next_Formal (N);
9864 end Proc_Next_Formal;
9866 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9868 N := Next_Formal_With_Extras (N);
9869 end Proc_Next_Formal_With_Extras;
9871 procedure Proc_Next_Index (N : in out Node_Id) is
9873 N := Next_Index (N);
9874 end Proc_Next_Index;
9876 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9878 N := Next_Inlined_Subprogram (N);
9879 end Proc_Next_Inlined_Subprogram;
9881 procedure Proc_Next_Literal (N : in out Node_Id) is
9883 N := Next_Literal (N);
9884 end Proc_Next_Literal;
9886 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9888 N := Next_Stored_Discriminant (N);
9889 end Proc_Next_Stored_Discriminant;