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
255 -- Linker_Section_Pragma Node33
256 -- SPARK_Aux_Pragma Node33
260 -- Import_Pragma Node35
262 ---------------------------------------------
263 -- Usage of Flags in Defining Entity Nodes --
264 ---------------------------------------------
266 -- All flags are unique, there is no overlaying, so each flag is physically
267 -- present in every entity. However, for many of the flags, it only makes
268 -- sense for them to be set true for certain subsets of entity kinds. See
269 -- the spec of Einfo for further details.
271 -- Is_Inlined_Always Flag1
272 -- Is_Hidden_Non_Overridden_Subpgm Flag2
273 -- Has_Default_Init_Cond Flag3
275 -- Has_Discriminants Flag5
276 -- Is_Dispatching_Operation Flag6
277 -- Is_Immediately_Visible Flag7
279 -- Is_Potentially_Use_Visible Flag9
283 -- Is_Constrained Flag12
284 -- Is_Generic_Type Flag13
285 -- Depends_On_Private Flag14
287 -- Is_Volatile Flag16
288 -- Is_Internal Flag17
289 -- Has_Delayed_Freeze Flag18
290 -- Is_Abstract_Subprogram Flag19
291 -- Is_Concurrent_Record_Type Flag20
293 -- Has_Master_Entity Flag21
294 -- Needs_No_Actuals Flag22
295 -- Has_Storage_Size_Clause Flag23
296 -- Is_Imported Flag24
297 -- Is_Limited_Record Flag25
298 -- Has_Completion Flag26
299 -- Has_Pragma_Controlled Flag27
300 -- Is_Statically_Allocated Flag28
301 -- Has_Size_Clause Flag29
304 -- Checks_May_Be_Suppressed Flag31
305 -- Kill_Elaboration_Checks Flag32
306 -- Kill_Range_Checks Flag33
307 -- Has_Independent_Components Flag34
308 -- Is_Class_Wide_Equivalent_Type Flag35
309 -- Referenced_As_LHS Flag36
310 -- Is_Known_Non_Null Flag37
311 -- Can_Never_Be_Null Flag38
312 -- Has_Default_Aspect Flag39
313 -- Body_Needed_For_SAL Flag40
315 -- Treat_As_Volatile Flag41
316 -- Is_Controlled Flag42
317 -- Has_Controlled_Component Flag43
319 -- In_Private_Part Flag45
320 -- Has_Alignment_Clause Flag46
322 -- In_Package_Body Flag48
324 -- Delay_Subprogram_Descriptors Flag50
327 -- Is_Entry_Formal Flag52
328 -- Is_Private_Descendant Flag53
329 -- Return_Present Flag54
330 -- Is_Tagged_Type Flag55
331 -- Has_Homonym Flag56
333 -- Non_Binary_Modulus Flag58
334 -- Is_Preelaborated Flag59
335 -- Is_Shared_Passive Flag60
337 -- Is_Remote_Types Flag61
338 -- Is_Remote_Call_Interface Flag62
339 -- Is_Character_Type Flag63
340 -- Is_Intrinsic_Subprogram Flag64
341 -- Has_Record_Rep_Clause Flag65
342 -- Has_Enumeration_Rep_Clause Flag66
343 -- Has_Small_Clause Flag67
344 -- Has_Component_Size_Clause Flag68
345 -- Is_Access_Constant Flag69
346 -- Is_First_Subtype Flag70
348 -- Has_Completion_In_Body Flag71
349 -- Has_Unknown_Discriminants Flag72
350 -- Is_Child_Unit Flag73
351 -- Is_CPP_Class Flag74
352 -- Has_Non_Standard_Rep Flag75
353 -- Is_Constructor Flag76
354 -- Static_Elaboration_Desired Flag77
356 -- Has_All_Calls_Remote Flag79
357 -- Is_Constr_Subt_For_U_Nominal Flag80
359 -- Is_Asynchronous Flag81
360 -- Has_Gigi_Rep_Item Flag82
361 -- Has_Machine_Radix_Clause Flag83
362 -- Machine_Radix_10 Flag84
364 -- Has_Atomic_Components Flag86
365 -- Has_Volatile_Components Flag87
366 -- Discard_Names Flag88
367 -- Is_Interrupt_Handler Flag89
368 -- Returns_By_Ref Flag90
371 -- Size_Known_At_Compile_Time Flag92
372 -- Reverse_Storage_Order Flag93
373 -- Is_Generic_Actual_Type Flag94
374 -- Uses_Sec_Stack Flag95
375 -- Warnings_Off Flag96
376 -- Is_Controlling_Formal Flag97
377 -- Has_Controlling_Result Flag98
378 -- Is_Exported Flag99
379 -- Has_Specified_Layout Flag100
381 -- Has_Nested_Block_With_Handler Flag101
383 -- Is_Completely_Hidden Flag103
384 -- Address_Taken Flag104
385 -- Suppress_Initialization Flag105
386 -- Is_Limited_Composite Flag106
387 -- Is_Private_Composite Flag107
388 -- Default_Expressions_Processed Flag108
389 -- Is_Non_Static_Subtype Flag109
390 -- Has_Out_Or_In_Out_Parameter Flag110
392 -- Is_Formal_Subprogram Flag111
393 -- Is_Renaming_Of_Object Flag112
395 -- Delay_Cleanups Flag114
396 -- Never_Set_In_Source Flag115
397 -- Is_Visible_Lib_Unit Flag116
398 -- Is_Unchecked_Union Flag117
399 -- Is_For_Access_Subtype Flag118
400 -- Has_Convention_Pragma Flag119
401 -- Has_Primitive_Operations Flag120
403 -- Has_Pragma_Pack Flag121
404 -- Is_Bit_Packed_Array Flag122
405 -- Has_Unchecked_Union Flag123
406 -- Is_Eliminated Flag124
407 -- C_Pass_By_Copy Flag125
408 -- Is_Instantiated Flag126
409 -- Is_Valued_Procedure Flag127
410 -- (used for Component_Alignment) Flag128
411 -- (used for Component_Alignment) Flag129
412 -- Is_Generic_Instance Flag130
414 -- No_Pool_Assigned Flag131
415 -- Is_Default_Init_Cond_Procedure Flag132
416 -- Has_Inherited_Default_Init_Cond Flag133
417 -- Has_Aliased_Components Flag135
418 -- No_Strict_Aliasing Flag136
419 -- Is_Machine_Code_Subprogram Flag137
420 -- Is_Packed_Array_Impl_Type Flag138
421 -- Has_Biased_Representation Flag139
422 -- Has_Complex_Representation Flag140
424 -- Is_Constr_Subt_For_UN_Aliased Flag141
425 -- Has_Missing_Return Flag142
426 -- Has_Recursive_Call Flag143
427 -- Is_Unsigned_Type Flag144
428 -- Strict_Alignment Flag145
429 -- Is_Abstract_Type Flag146
430 -- Needs_Debug_Info Flag147
431 -- Suppress_Elaboration_Warnings Flag148
432 -- Is_Compilation_Unit Flag149
433 -- Has_Pragma_Elaborate_Body Flag150
435 -- Has_Private_Ancestor Flag151
436 -- Entry_Accepted Flag152
437 -- Is_Obsolescent Flag153
438 -- Has_Per_Object_Constraint Flag154
439 -- Has_Private_Declaration Flag155
440 -- Referenced Flag156
441 -- Has_Pragma_Inline Flag157
442 -- Finalize_Storage_Only Flag158
443 -- From_Limited_With Flag159
444 -- Is_Package_Body_Entity Flag160
446 -- Has_Qualified_Name Flag161
447 -- Nonzero_Is_True Flag162
448 -- Is_True_Constant Flag163
449 -- Reverse_Bit_Order Flag164
450 -- Suppress_Style_Checks Flag165
451 -- Debug_Info_Off Flag166
452 -- Sec_Stack_Needed_For_Return Flag167
453 -- Materialize_Entity Flag168
454 -- Has_Pragma_Thread_Local_Storage Flag169
455 -- Is_Known_Valid Flag170
457 -- Is_Hidden_Open_Scope Flag171
458 -- Has_Object_Size_Clause Flag172
459 -- Has_Fully_Qualified_Name Flag173
460 -- Elaboration_Entity_Required Flag174
461 -- Has_Forward_Instantiation Flag175
462 -- Is_Discrim_SO_Function Flag176
463 -- Size_Depends_On_Discriminant Flag177
464 -- Is_Null_Init_Proc Flag178
465 -- Has_Pragma_Pure_Function Flag179
466 -- Has_Pragma_Unreferenced Flag180
468 -- Has_Contiguous_Rep Flag181
469 -- Has_Xref_Entry Flag182
470 -- Must_Be_On_Byte_Boundary Flag183
471 -- Has_Stream_Size_Clause Flag184
472 -- Is_Ada_2005_Only Flag185
473 -- Is_Interface Flag186
474 -- Has_Constrained_Partial_View Flag187
475 -- Uses_Lock_Free Flag188
476 -- Is_Pure_Unit_Access_Type Flag189
477 -- Has_Specified_Stream_Input Flag190
479 -- Has_Specified_Stream_Output Flag191
480 -- Has_Specified_Stream_Read Flag192
481 -- Has_Specified_Stream_Write Flag193
482 -- Is_Local_Anonymous_Access Flag194
483 -- Is_Primitive_Wrapper Flag195
484 -- Was_Hidden Flag196
485 -- Is_Limited_Interface Flag197
486 -- Has_Pragma_Ordered Flag198
487 -- Is_Ada_2012_Only Flag199
489 -- Has_Delayed_Aspects Flag200
490 -- Has_Pragma_No_Inline Flag201
491 -- Itype_Printed Flag202
492 -- Has_Pragma_Pure Flag203
493 -- Is_Known_Null Flag204
494 -- Low_Bound_Tested Flag205
495 -- Is_Visible_Formal Flag206
496 -- Known_To_Have_Preelab_Init Flag207
497 -- Must_Have_Preelab_Init Flag208
498 -- Is_Return_Object Flag209
499 -- Elaborate_Body_Desirable Flag210
501 -- Has_Static_Discriminants Flag211
502 -- Has_Pragma_Unreferenced_Objects Flag212
503 -- Requires_Overriding Flag213
505 -- Has_Up_Level_Access Flag215
506 -- Universal_Aliasing Flag216
507 -- Suppress_Value_Tracking_On_Call Flag217
508 -- Is_Primitive Flag218
509 -- Has_Initial_Value Flag219
510 -- Has_Dispatch_Table Flag220
512 -- Has_Pragma_Preelab_Init Flag221
513 -- Used_As_Generic_Actual Flag222
514 -- Is_Descendent_Of_Address Flag223
517 -- Is_Only_Out_Parameter Flag226
518 -- Referenced_As_Out_Parameter Flag227
519 -- Has_Thunks Flag228
520 -- Can_Use_Internal_Rep Flag229
521 -- Has_Pragma_Inline_Always Flag230
523 -- Renamed_In_Spec Flag231
524 -- Has_Invariants Flag232
525 -- Has_Pragma_Unmodified Flag233
526 -- Is_Dispatch_Table_Entity Flag234
527 -- Is_Trivial_Subprogram Flag235
528 -- Warnings_Off_Used Flag236
529 -- Warnings_Off_Used_Unmodified Flag237
530 -- Warnings_Off_Used_Unreferenced Flag238
531 -- OK_To_Reorder_Components Flag239
532 -- Has_Postconditions Flag240
534 -- Optimize_Alignment_Space Flag241
535 -- Optimize_Alignment_Time Flag242
536 -- Overlays_Constant Flag243
537 -- Is_RACW_Stub_Type Flag244
538 -- Is_Private_Primitive Flag245
539 -- Is_Underlying_Record_View Flag246
540 -- OK_To_Rename Flag247
541 -- Has_Inheritable_Invariants Flag248
542 -- Is_Safe_To_Reevaluate Flag249
543 -- Has_Predicates Flag250
545 -- Has_Implicit_Dereference Flag251
546 -- Is_Processed_Transient Flag252
547 -- Has_Anonymous_Master Flag253
548 -- Is_Implementation_Defined Flag254
549 -- Is_Predicate_Function Flag255
550 -- Is_Predicate_Function_M Flag256
551 -- Is_Invariant_Procedure Flag257
552 -- Has_Dynamic_Predicate_Aspect Flag258
553 -- Has_Static_Predicate_Aspect Flag259
554 -- Has_Loop_Entry_Attributes Flag260
556 -- Has_Delayed_Rep_Aspects Flag261
557 -- May_Inherit_Delayed_Rep_Aspects Flag262
558 -- Has_Visible_Refinement Flag263
559 -- Is_Discriminant_Check_Function Flag264
560 -- SPARK_Pragma_Inherited Flag265
561 -- SPARK_Aux_Pragma_Inherited Flag266
562 -- Has_Shift_Operator Flag267
563 -- Is_Independent Flag268
564 -- Has_Static_Predicate Flag269
565 -- Stores_Attribute_Old_Prefix Flag270
567 -- (Has_Protected) Flag271
568 -- (SSO_Set_Low_By_Default) Flag272
569 -- (SSO_Set_High_By_Default) Flag273
571 -- Is_Generic_Actual_Subprogram Flag274
572 -- No_Predicate_On_Actual Flag275
573 -- No_Dynamic_Predicate_On_Actual Flag276
591 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
593 -----------------------
594 -- Local subprograms --
595 -----------------------
598 (State_Id : Entity_Id;
599 Option_Nam : Name_Id) return Boolean;
600 -- Determine whether abstract state State_Id has particular option denoted
601 -- by the name Option_Nam.
607 function Float_Rep (Id : E) return F is
608 pragma Assert (Is_Floating_Point_Type (Id));
610 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
618 (State_Id : Entity_Id;
619 Option_Nam : Name_Id) return Boolean
621 Decl : constant Node_Id := Parent (State_Id);
626 pragma Assert (Ekind (State_Id) = E_Abstract_State);
628 -- The declaration of abstract states with options appear as an
629 -- extension aggregate. If this is not the case, the option is not
632 if Nkind (Decl) /= N_Extension_Aggregate then
638 Opt := First (Expressions (Decl));
639 while Present (Opt) loop
641 -- Currently the only simple option allowed is External
643 if Nkind (Opt) = N_Identifier
644 and then Chars (Opt) = Name_External
645 and then Chars (Opt) = Option_Nam
653 -- Complex options with various specifiers
655 Opt := First (Component_Associations (Decl));
656 while Present (Opt) loop
657 Opt_Nam := First (Choices (Opt));
659 if Nkind (Opt_Nam) = N_Identifier
660 and then Chars (Opt_Nam) = Option_Nam
671 --------------------------------
672 -- Attribute Access Functions --
673 --------------------------------
675 function Abstract_States (Id : E) return L is
677 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
681 function Accept_Address (Id : E) return L is
686 function Access_Disp_Table (Id : E) return L is
688 pragma Assert (Ekind_In (Id, E_Record_Type,
690 return Elist16 (Implementation_Base_Type (Id));
691 end Access_Disp_Table;
693 function Actual_Subtype (Id : E) return E is
696 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
697 or else Is_Formal (Id));
701 function Address_Taken (Id : E) return B is
706 function Alias (Id : E) return E is
709 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
713 function Alignment (Id : E) return U is
715 pragma Assert (Is_Type (Id)
716 or else Is_Formal (Id)
717 or else Ekind_In (Id, E_Loop_Parameter,
724 function Associated_Formal_Package (Id : E) return E is
726 pragma Assert (Ekind (Id) = E_Package);
728 end Associated_Formal_Package;
730 function Associated_Node_For_Itype (Id : E) return N is
733 end Associated_Node_For_Itype;
735 function Associated_Storage_Pool (Id : E) return E is
737 pragma Assert (Is_Access_Type (Id));
738 return Node22 (Root_Type (Id));
739 end Associated_Storage_Pool;
741 function Barrier_Function (Id : E) return N is
743 pragma Assert (Is_Entry (Id));
745 end Barrier_Function;
747 function Block_Node (Id : E) return N is
749 pragma Assert (Ekind (Id) = E_Block);
753 function Body_Entity (Id : E) return E is
755 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
759 function Body_Needed_For_SAL (Id : E) return B is
762 (Ekind (Id) = E_Package
763 or else Is_Subprogram (Id)
764 or else Is_Generic_Unit (Id));
766 end Body_Needed_For_SAL;
768 function Body_References (Id : E) return L is
770 pragma Assert (Ekind (Id) = E_Abstract_State);
774 function BIP_Initialization_Call (Id : E) return N is
776 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
778 end BIP_Initialization_Call;
780 function C_Pass_By_Copy (Id : E) return B is
782 pragma Assert (Is_Record_Type (Id));
783 return Flag125 (Implementation_Base_Type (Id));
786 function Can_Never_Be_Null (Id : E) return B is
789 end Can_Never_Be_Null;
791 function Checks_May_Be_Suppressed (Id : E) return B is
794 end Checks_May_Be_Suppressed;
796 function Class_Wide_Type (Id : E) return E is
798 pragma Assert (Is_Type (Id));
802 function Cloned_Subtype (Id : E) return E is
804 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
808 function Component_Bit_Offset (Id : E) return U is
810 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
812 end Component_Bit_Offset;
814 function Component_Clause (Id : E) return N is
816 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
818 end Component_Clause;
820 function Component_Size (Id : E) return U is
822 pragma Assert (Is_Array_Type (Id));
823 return Uint22 (Implementation_Base_Type (Id));
826 function Component_Type (Id : E) return E is
828 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
829 return Node20 (Implementation_Base_Type (Id));
832 function Corresponding_Concurrent_Type (Id : E) return E is
834 pragma Assert (Ekind (Id) = E_Record_Type);
836 end Corresponding_Concurrent_Type;
838 function Corresponding_Discriminant (Id : E) return E is
840 pragma Assert (Ekind (Id) = E_Discriminant);
842 end Corresponding_Discriminant;
844 function Corresponding_Equality (Id : E) return E is
847 (Ekind (Id) = E_Function
848 and then not Comes_From_Source (Id)
849 and then Chars (Id) = Name_Op_Ne);
851 end Corresponding_Equality;
853 function Corresponding_Protected_Entry (Id : E) return E is
855 pragma Assert (Ekind (Id) = E_Subprogram_Body);
857 end Corresponding_Protected_Entry;
859 function Corresponding_Record_Type (Id : E) return E is
861 pragma Assert (Is_Concurrent_Type (Id));
863 end Corresponding_Record_Type;
865 function Corresponding_Remote_Type (Id : E) return E is
868 end Corresponding_Remote_Type;
870 function Current_Use_Clause (Id : E) return E is
872 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
874 end Current_Use_Clause;
876 function Current_Value (Id : E) return N is
878 pragma Assert (Ekind (Id) in Object_Kind);
882 function CR_Discriminant (Id : E) return E is
887 function Debug_Info_Off (Id : E) return B is
892 function Debug_Renaming_Link (Id : E) return E is
895 end Debug_Renaming_Link;
897 function Default_Aspect_Component_Value (Id : E) return N is
899 pragma Assert (Is_Array_Type (Id));
900 return Node19 (Base_Type (Id));
901 end Default_Aspect_Component_Value;
903 function Default_Aspect_Value (Id : E) return N is
905 pragma Assert (Is_Scalar_Type (Id));
906 return Node19 (Base_Type (Id));
907 end Default_Aspect_Value;
909 function Default_Expr_Function (Id : E) return E is
911 pragma Assert (Is_Formal (Id));
913 end Default_Expr_Function;
915 function Default_Expressions_Processed (Id : E) return B is
918 end Default_Expressions_Processed;
920 function Default_Value (Id : E) return N is
922 pragma Assert (Is_Formal (Id));
926 function Delay_Cleanups (Id : E) return B is
931 function Delay_Subprogram_Descriptors (Id : E) return B is
934 end Delay_Subprogram_Descriptors;
936 function Delta_Value (Id : E) return R is
938 pragma Assert (Is_Fixed_Point_Type (Id));
942 function Dependent_Instances (Id : E) return L is
944 pragma Assert (Is_Generic_Instance (Id));
946 end Dependent_Instances;
948 function Depends_On_Private (Id : E) return B is
950 pragma Assert (Nkind (Id) in N_Entity);
952 end Depends_On_Private;
954 function Derived_Type_Link (Id : E) return E is
956 pragma Assert (Is_Type (Id));
957 return Node31 (Base_Type (Id));
958 end Derived_Type_Link;
960 function Digits_Value (Id : E) return U is
963 (Is_Floating_Point_Type (Id)
964 or else Is_Decimal_Fixed_Point_Type (Id));
968 function Direct_Primitive_Operations (Id : E) return L is
970 pragma Assert (Is_Tagged_Type (Id));
972 end Direct_Primitive_Operations;
974 function Directly_Designated_Type (Id : E) return E is
976 pragma Assert (Is_Access_Type (Id));
978 end Directly_Designated_Type;
980 function Discard_Names (Id : E) return B is
985 function Discriminal (Id : E) return E is
987 pragma Assert (Ekind (Id) = E_Discriminant);
991 function Discriminal_Link (Id : E) return N is
994 end Discriminal_Link;
996 function Discriminant_Checking_Func (Id : E) return E is
998 pragma Assert (Ekind (Id) = E_Component);
1000 end Discriminant_Checking_Func;
1002 function Discriminant_Constraint (Id : E) return L is
1004 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1005 return Elist21 (Id);
1006 end Discriminant_Constraint;
1008 function Discriminant_Default_Value (Id : E) return N is
1010 pragma Assert (Ekind (Id) = E_Discriminant);
1012 end Discriminant_Default_Value;
1014 function Discriminant_Number (Id : E) return U is
1016 pragma Assert (Ekind (Id) = E_Discriminant);
1018 end Discriminant_Number;
1020 function Dispatch_Table_Wrappers (Id : E) return L is
1022 pragma Assert (Ekind_In (Id, E_Record_Type,
1024 return Elist26 (Implementation_Base_Type (Id));
1025 end Dispatch_Table_Wrappers;
1027 function DT_Entry_Count (Id : E) return U is
1029 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1033 function DT_Offset_To_Top_Func (Id : E) return E is
1035 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1037 end DT_Offset_To_Top_Func;
1039 function DT_Position (Id : E) return U is
1041 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1042 and then Present (DTC_Entity (Id)));
1046 function DTC_Entity (Id : E) return E is
1048 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1052 function Elaborate_Body_Desirable (Id : E) return B is
1054 pragma Assert (Ekind (Id) = E_Package);
1055 return Flag210 (Id);
1056 end Elaborate_Body_Desirable;
1058 function Elaboration_Entity (Id : E) return E is
1063 Ekind (Id) = E_Package
1065 Is_Generic_Unit (Id));
1067 end Elaboration_Entity;
1069 function Elaboration_Entity_Required (Id : E) return B is
1074 Ekind (Id) = E_Package
1076 Is_Generic_Unit (Id));
1077 return Flag174 (Id);
1078 end Elaboration_Entity_Required;
1080 function Encapsulating_State (Id : E) return N is
1082 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1084 end Encapsulating_State;
1086 function Enclosing_Scope (Id : E) return E is
1089 end Enclosing_Scope;
1091 function Entry_Accepted (Id : E) return B is
1093 pragma Assert (Is_Entry (Id));
1094 return Flag152 (Id);
1097 function Entry_Bodies_Array (Id : E) return E is
1100 end Entry_Bodies_Array;
1102 function Entry_Cancel_Parameter (Id : E) return E is
1105 end Entry_Cancel_Parameter;
1107 function Entry_Component (Id : E) return E is
1110 end Entry_Component;
1112 function Entry_Formal (Id : E) return E is
1117 function Entry_Index_Constant (Id : E) return N is
1119 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1121 end Entry_Index_Constant;
1123 function Contract (Id : E) return N is
1126 (Ekind_In (Id, E_Entry,
1133 or else Is_Generic_Subprogram (Id)
1134 or else Is_Subprogram (Id));
1138 function Entry_Parameters_Type (Id : E) return E is
1141 end Entry_Parameters_Type;
1143 function Enum_Pos_To_Rep (Id : E) return E is
1145 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1147 end Enum_Pos_To_Rep;
1149 function Enumeration_Pos (Id : E) return Uint is
1151 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1153 end Enumeration_Pos;
1155 function Enumeration_Rep (Id : E) return U is
1157 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1159 end Enumeration_Rep;
1161 function Enumeration_Rep_Expr (Id : E) return N is
1163 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1165 end Enumeration_Rep_Expr;
1167 function Equivalent_Type (Id : E) return E is
1170 (Ekind_In (Id, E_Class_Wide_Type,
1171 E_Class_Wide_Subtype,
1172 E_Access_Subprogram_Type,
1173 E_Access_Protected_Subprogram_Type,
1174 E_Anonymous_Access_Protected_Subprogram_Type,
1175 E_Access_Subprogram_Type,
1178 end Equivalent_Type;
1180 function Esize (Id : E) return Uint is
1185 function Extra_Accessibility (Id : E) return E is
1188 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1190 end Extra_Accessibility;
1192 function Extra_Accessibility_Of_Result (Id : E) return E is
1194 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1196 end Extra_Accessibility_Of_Result;
1198 function Extra_Constrained (Id : E) return E is
1200 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1202 end Extra_Constrained;
1204 function Extra_Formal (Id : E) return E is
1209 function Extra_Formals (Id : E) return E is
1212 (Is_Overloadable (Id)
1213 or else Ekind_In (Id, E_Entry_Family,
1215 E_Subprogram_Type));
1219 function Can_Use_Internal_Rep (Id : E) return B is
1221 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1222 return Flag229 (Base_Type (Id));
1223 end Can_Use_Internal_Rep;
1225 function Finalization_Master (Id : E) return E is
1227 pragma Assert (Is_Access_Type (Id));
1228 return Node23 (Root_Type (Id));
1229 end Finalization_Master;
1231 function Finalize_Storage_Only (Id : E) return B is
1233 pragma Assert (Is_Type (Id));
1234 return Flag158 (Base_Type (Id));
1235 end Finalize_Storage_Only;
1237 function Finalizer (Id : E) return E is
1239 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1243 function First_Entity (Id : E) return E is
1248 function First_Exit_Statement (Id : E) return N is
1250 pragma Assert (Ekind (Id) = E_Loop);
1252 end First_Exit_Statement;
1254 function First_Index (Id : E) return N is
1256 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1260 function First_Literal (Id : E) return E is
1262 pragma Assert (Is_Enumeration_Type (Id));
1266 function First_Private_Entity (Id : E) return E is
1268 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1269 or else Ekind (Id) in Concurrent_Kind);
1271 end First_Private_Entity;
1273 function First_Rep_Item (Id : E) return E is
1278 function Freeze_Node (Id : E) return N is
1283 function From_Limited_With (Id : E) return B is
1285 return Flag159 (Id);
1286 end From_Limited_With;
1288 function Full_View (Id : E) return E is
1290 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1294 function Generic_Homonym (Id : E) return E is
1296 pragma Assert (Ekind (Id) = E_Generic_Package);
1298 end Generic_Homonym;
1300 function Generic_Renamings (Id : E) return L is
1302 return Elist23 (Id);
1303 end Generic_Renamings;
1305 function Handler_Records (Id : E) return S is
1308 end Handler_Records;
1310 function Has_Aliased_Components (Id : E) return B is
1312 return Flag135 (Implementation_Base_Type (Id));
1313 end Has_Aliased_Components;
1315 function Has_Alignment_Clause (Id : E) return B is
1318 end Has_Alignment_Clause;
1320 function Has_All_Calls_Remote (Id : E) return B is
1323 end Has_All_Calls_Remote;
1325 function Has_Anonymous_Master (Id : E) return B is
1328 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1329 return Flag253 (Id);
1330 end Has_Anonymous_Master;
1332 function Has_Atomic_Components (Id : E) return B is
1334 return Flag86 (Implementation_Base_Type (Id));
1335 end Has_Atomic_Components;
1337 function Has_Biased_Representation (Id : E) return B is
1339 return Flag139 (Id);
1340 end Has_Biased_Representation;
1342 function Has_Completion (Id : E) return B is
1347 function Has_Completion_In_Body (Id : E) return B is
1349 pragma Assert (Is_Type (Id));
1351 end Has_Completion_In_Body;
1353 function Has_Complex_Representation (Id : E) return B is
1355 pragma Assert (Is_Type (Id));
1356 return Flag140 (Implementation_Base_Type (Id));
1357 end Has_Complex_Representation;
1359 function Has_Component_Size_Clause (Id : E) return B is
1361 pragma Assert (Is_Array_Type (Id));
1362 return Flag68 (Implementation_Base_Type (Id));
1363 end Has_Component_Size_Clause;
1365 function Has_Constrained_Partial_View (Id : E) return B is
1367 pragma Assert (Is_Type (Id));
1368 return Flag187 (Id);
1369 end Has_Constrained_Partial_View;
1371 function Has_Controlled_Component (Id : E) return B is
1373 return Flag43 (Base_Type (Id));
1374 end Has_Controlled_Component;
1376 function Has_Contiguous_Rep (Id : E) return B is
1378 return Flag181 (Id);
1379 end Has_Contiguous_Rep;
1381 function Has_Controlling_Result (Id : E) return B is
1384 end Has_Controlling_Result;
1386 function Has_Convention_Pragma (Id : E) return B is
1388 return Flag119 (Id);
1389 end Has_Convention_Pragma;
1391 function Has_Default_Aspect (Id : E) return B is
1393 return Flag39 (Base_Type (Id));
1394 end Has_Default_Aspect;
1396 function Has_Default_Init_Cond (Id : E) return B is
1399 end Has_Default_Init_Cond;
1401 function Has_Delayed_Aspects (Id : E) return B is
1403 pragma Assert (Nkind (Id) in N_Entity);
1404 return Flag200 (Id);
1405 end Has_Delayed_Aspects;
1407 function Has_Delayed_Freeze (Id : E) return B is
1409 pragma Assert (Nkind (Id) in N_Entity);
1411 end Has_Delayed_Freeze;
1413 function Has_Delayed_Rep_Aspects (Id : E) return B is
1415 pragma Assert (Nkind (Id) in N_Entity);
1416 return Flag261 (Id);
1417 end Has_Delayed_Rep_Aspects;
1419 function Has_Discriminants (Id : E) return B is
1421 pragma Assert (Nkind (Id) in N_Entity);
1423 end Has_Discriminants;
1425 function Has_Dispatch_Table (Id : E) return B is
1427 pragma Assert (Is_Tagged_Type (Id));
1428 return Flag220 (Id);
1429 end Has_Dispatch_Table;
1431 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1433 pragma Assert (Is_Type (Id));
1434 return Flag258 (Id);
1435 end Has_Dynamic_Predicate_Aspect;
1437 function Has_Enumeration_Rep_Clause (Id : E) return B is
1439 pragma Assert (Is_Enumeration_Type (Id));
1441 end Has_Enumeration_Rep_Clause;
1443 function Has_Exit (Id : E) return B is
1448 function Has_Forward_Instantiation (Id : E) return B is
1450 return Flag175 (Id);
1451 end Has_Forward_Instantiation;
1453 function Has_Fully_Qualified_Name (Id : E) return B is
1455 return Flag173 (Id);
1456 end Has_Fully_Qualified_Name;
1458 function Has_Gigi_Rep_Item (Id : E) return B is
1461 end Has_Gigi_Rep_Item;
1463 function Has_Homonym (Id : E) return B is
1468 function Has_Implicit_Dereference (Id : E) return B is
1470 return Flag251 (Id);
1471 end Has_Implicit_Dereference;
1473 function Has_Independent_Components (Id : E) return B is
1475 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1476 return Flag34 (Base_Type (Id));
1477 end Has_Independent_Components;
1479 function Has_Inheritable_Invariants (Id : E) return B is
1481 pragma Assert (Is_Type (Id));
1482 return Flag248 (Id);
1483 end Has_Inheritable_Invariants;
1485 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1487 pragma Assert (Is_Type (Id));
1488 return Flag133 (Id);
1489 end Has_Inherited_Default_Init_Cond;
1491 function Has_Initial_Value (Id : E) return B is
1493 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1494 return Flag219 (Id);
1495 end Has_Initial_Value;
1497 function Has_Invariants (Id : E) return B is
1499 pragma Assert (Is_Type (Id));
1500 return Flag232 (Id);
1503 function Has_Loop_Entry_Attributes (Id : E) return B is
1505 pragma Assert (Ekind (Id) = E_Loop);
1506 return Flag260 (Id);
1507 end Has_Loop_Entry_Attributes;
1509 function Has_Machine_Radix_Clause (Id : E) return B is
1511 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1513 end Has_Machine_Radix_Clause;
1515 function Has_Master_Entity (Id : E) return B is
1518 end Has_Master_Entity;
1520 function Has_Missing_Return (Id : E) return B is
1522 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1523 return Flag142 (Id);
1524 end Has_Missing_Return;
1526 function Has_Nested_Block_With_Handler (Id : E) return B is
1528 return Flag101 (Id);
1529 end Has_Nested_Block_With_Handler;
1531 function Has_Non_Standard_Rep (Id : E) return B is
1533 return Flag75 (Implementation_Base_Type (Id));
1534 end Has_Non_Standard_Rep;
1536 function Has_Object_Size_Clause (Id : E) return B is
1538 pragma Assert (Is_Type (Id));
1539 return Flag172 (Id);
1540 end Has_Object_Size_Clause;
1542 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1544 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1545 return Flag110 (Id);
1546 end Has_Out_Or_In_Out_Parameter;
1548 function Has_Per_Object_Constraint (Id : E) return B is
1550 return Flag154 (Id);
1551 end Has_Per_Object_Constraint;
1553 function Has_Postconditions (Id : E) return B is
1555 pragma Assert (Is_Subprogram (Id));
1556 return Flag240 (Id);
1557 end Has_Postconditions;
1559 function Has_Pragma_Controlled (Id : E) return B is
1561 pragma Assert (Is_Access_Type (Id));
1562 return Flag27 (Implementation_Base_Type (Id));
1563 end Has_Pragma_Controlled;
1565 function Has_Pragma_Elaborate_Body (Id : E) return B is
1567 return Flag150 (Id);
1568 end Has_Pragma_Elaborate_Body;
1570 function Has_Pragma_Inline (Id : E) return B is
1572 return Flag157 (Id);
1573 end Has_Pragma_Inline;
1575 function Has_Pragma_Inline_Always (Id : E) return B is
1577 return Flag230 (Id);
1578 end Has_Pragma_Inline_Always;
1580 function Has_Pragma_No_Inline (Id : E) return B is
1582 return Flag201 (Id);
1583 end Has_Pragma_No_Inline;
1585 function Has_Pragma_Ordered (Id : E) return B is
1587 pragma Assert (Is_Enumeration_Type (Id));
1588 return Flag198 (Implementation_Base_Type (Id));
1589 end Has_Pragma_Ordered;
1591 function Has_Pragma_Pack (Id : E) return B is
1593 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1594 return Flag121 (Implementation_Base_Type (Id));
1595 end Has_Pragma_Pack;
1597 function Has_Pragma_Preelab_Init (Id : E) return B is
1599 return Flag221 (Id);
1600 end Has_Pragma_Preelab_Init;
1602 function Has_Pragma_Pure (Id : E) return B is
1604 return Flag203 (Id);
1605 end Has_Pragma_Pure;
1607 function Has_Pragma_Pure_Function (Id : E) return B is
1609 return Flag179 (Id);
1610 end Has_Pragma_Pure_Function;
1612 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1614 return Flag169 (Id);
1615 end Has_Pragma_Thread_Local_Storage;
1617 function Has_Pragma_Unmodified (Id : E) return B is
1619 return Flag233 (Id);
1620 end Has_Pragma_Unmodified;
1622 function Has_Pragma_Unreferenced (Id : E) return B is
1624 return Flag180 (Id);
1625 end Has_Pragma_Unreferenced;
1627 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1629 pragma Assert (Is_Type (Id));
1630 return Flag212 (Id);
1631 end Has_Pragma_Unreferenced_Objects;
1633 function Has_Predicates (Id : E) return B is
1635 pragma Assert (Is_Type (Id));
1636 return Flag250 (Id);
1639 function Has_Primitive_Operations (Id : E) return B is
1641 pragma Assert (Is_Type (Id));
1642 return Flag120 (Base_Type (Id));
1643 end Has_Primitive_Operations;
1645 function Has_Private_Ancestor (Id : E) return B is
1647 return Flag151 (Id);
1648 end Has_Private_Ancestor;
1650 function Has_Private_Declaration (Id : E) return B is
1652 return Flag155 (Id);
1653 end Has_Private_Declaration;
1655 function Has_Protected (Id : E) return B is
1657 return Flag271 (Base_Type (Id));
1660 function Has_Qualified_Name (Id : E) return B is
1662 return Flag161 (Id);
1663 end Has_Qualified_Name;
1665 function Has_RACW (Id : E) return B is
1667 pragma Assert (Ekind (Id) = E_Package);
1668 return Flag214 (Id);
1671 function Has_Record_Rep_Clause (Id : E) return B is
1673 pragma Assert (Is_Record_Type (Id));
1674 return Flag65 (Implementation_Base_Type (Id));
1675 end Has_Record_Rep_Clause;
1677 function Has_Recursive_Call (Id : E) return B is
1679 pragma Assert (Is_Subprogram (Id));
1680 return Flag143 (Id);
1681 end Has_Recursive_Call;
1683 function Has_Shift_Operator (Id : E) return B is
1685 pragma Assert (Is_Integer_Type (Id));
1686 return Flag267 (Base_Type (Id));
1687 end Has_Shift_Operator;
1689 function Has_Size_Clause (Id : E) return B is
1692 end Has_Size_Clause;
1694 function Has_Small_Clause (Id : E) return B is
1697 end Has_Small_Clause;
1699 function Has_Specified_Layout (Id : E) return B is
1701 pragma Assert (Is_Type (Id));
1702 return Flag100 (Implementation_Base_Type (Id));
1703 end Has_Specified_Layout;
1705 function Has_Specified_Stream_Input (Id : E) return B is
1707 pragma Assert (Is_Type (Id));
1708 return Flag190 (Id);
1709 end Has_Specified_Stream_Input;
1711 function Has_Specified_Stream_Output (Id : E) return B is
1713 pragma Assert (Is_Type (Id));
1714 return Flag191 (Id);
1715 end Has_Specified_Stream_Output;
1717 function Has_Specified_Stream_Read (Id : E) return B is
1719 pragma Assert (Is_Type (Id));
1720 return Flag192 (Id);
1721 end Has_Specified_Stream_Read;
1723 function Has_Specified_Stream_Write (Id : E) return B is
1725 pragma Assert (Is_Type (Id));
1726 return Flag193 (Id);
1727 end Has_Specified_Stream_Write;
1729 function Has_Static_Discriminants (Id : E) return B is
1731 pragma Assert (Is_Type (Id));
1732 return Flag211 (Id);
1733 end Has_Static_Discriminants;
1735 function Has_Static_Predicate (Id : E) return B is
1737 pragma Assert (Is_Type (Id));
1738 return Flag269 (Id);
1739 end Has_Static_Predicate;
1741 function Has_Static_Predicate_Aspect (Id : E) return B is
1743 pragma Assert (Is_Type (Id));
1744 return Flag259 (Id);
1745 end Has_Static_Predicate_Aspect;
1747 function Has_Storage_Size_Clause (Id : E) return B is
1749 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1750 return Flag23 (Implementation_Base_Type (Id));
1751 end Has_Storage_Size_Clause;
1753 function Has_Stream_Size_Clause (Id : E) return B is
1755 return Flag184 (Id);
1756 end Has_Stream_Size_Clause;
1758 function Has_Task (Id : E) return B is
1760 return Flag30 (Base_Type (Id));
1763 function Has_Thunks (Id : E) return B is
1765 return Flag228 (Id);
1768 function Has_Unchecked_Union (Id : E) return B is
1770 return Flag123 (Base_Type (Id));
1771 end Has_Unchecked_Union;
1773 function Has_Unknown_Discriminants (Id : E) return B is
1775 pragma Assert (Is_Type (Id));
1777 end Has_Unknown_Discriminants;
1779 function Has_Up_Level_Access (Id : E) return B is
1782 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1783 return Flag215 (Id);
1784 end Has_Up_Level_Access;
1786 function Has_Visible_Refinement (Id : E) return B is
1788 pragma Assert (Ekind (Id) = E_Abstract_State);
1789 return Flag263 (Id);
1790 end Has_Visible_Refinement;
1792 function Has_Volatile_Components (Id : E) return B is
1794 return Flag87 (Implementation_Base_Type (Id));
1795 end Has_Volatile_Components;
1797 function Has_Xref_Entry (Id : E) return B is
1799 return Flag182 (Id);
1802 function Hiding_Loop_Variable (Id : E) return E is
1804 pragma Assert (Ekind (Id) = E_Variable);
1806 end Hiding_Loop_Variable;
1808 function Homonym (Id : E) return E is
1813 function Import_Pragma (Id : E) return E is
1815 pragma Assert (Is_Subprogram (Id));
1819 function Interface_Alias (Id : E) return E is
1821 pragma Assert (Is_Subprogram (Id));
1823 end Interface_Alias;
1825 function Interfaces (Id : E) return L is
1827 pragma Assert (Is_Record_Type (Id));
1828 return Elist25 (Id);
1831 function In_Package_Body (Id : E) return B is
1834 end In_Package_Body;
1836 function In_Private_Part (Id : E) return B is
1839 end In_Private_Part;
1841 function In_Use (Id : E) return B is
1843 pragma Assert (Nkind (Id) in N_Entity);
1847 function Initialization_Statements (Id : E) return N is
1849 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1851 end Initialization_Statements;
1853 function Inner_Instances (Id : E) return L is
1855 return Elist23 (Id);
1856 end Inner_Instances;
1858 function Interface_Name (Id : E) return N is
1863 function Is_Abstract_Subprogram (Id : E) return B is
1865 pragma Assert (Is_Overloadable (Id));
1867 end Is_Abstract_Subprogram;
1869 function Is_Abstract_Type (Id : E) return B is
1871 pragma Assert (Is_Type (Id));
1872 return Flag146 (Id);
1873 end Is_Abstract_Type;
1875 function Is_Local_Anonymous_Access (Id : E) return B is
1877 pragma Assert (Is_Access_Type (Id));
1878 return Flag194 (Id);
1879 end Is_Local_Anonymous_Access;
1881 function Is_Access_Constant (Id : E) return B is
1883 pragma Assert (Is_Access_Type (Id));
1885 end Is_Access_Constant;
1887 function Is_Ada_2005_Only (Id : E) return B is
1889 return Flag185 (Id);
1890 end Is_Ada_2005_Only;
1892 function Is_Ada_2012_Only (Id : E) return B is
1894 return Flag199 (Id);
1895 end Is_Ada_2012_Only;
1897 function Is_Aliased (Id : E) return B is
1899 pragma Assert (Nkind (Id) in N_Entity);
1903 function Is_Asynchronous (Id : E) return B is
1905 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1907 end Is_Asynchronous;
1909 function Is_Atomic (Id : E) return B is
1914 function Is_Bit_Packed_Array (Id : E) return B is
1916 return Flag122 (Implementation_Base_Type (Id));
1917 end Is_Bit_Packed_Array;
1919 function Is_Called (Id : E) return B is
1921 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1922 return Flag102 (Id);
1925 function Is_Character_Type (Id : E) return B is
1928 end Is_Character_Type;
1930 function Is_Child_Unit (Id : E) return B is
1935 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1938 end Is_Class_Wide_Equivalent_Type;
1940 function Is_Compilation_Unit (Id : E) return B is
1942 return Flag149 (Id);
1943 end Is_Compilation_Unit;
1945 function Is_Completely_Hidden (Id : E) return B is
1947 pragma Assert (Ekind (Id) = E_Discriminant);
1948 return Flag103 (Id);
1949 end Is_Completely_Hidden;
1951 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1954 end Is_Constr_Subt_For_U_Nominal;
1956 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1958 return Flag141 (Id);
1959 end Is_Constr_Subt_For_UN_Aliased;
1961 function Is_Constrained (Id : E) return B is
1963 pragma Assert (Nkind (Id) in N_Entity);
1967 function Is_Constructor (Id : E) return B is
1972 function Is_Controlled (Id : E) return B is
1974 return Flag42 (Base_Type (Id));
1977 function Is_Controlling_Formal (Id : E) return B is
1979 pragma Assert (Is_Formal (Id));
1981 end Is_Controlling_Formal;
1983 function Is_CPP_Class (Id : E) return B is
1988 function Is_Default_Init_Cond_Procedure (Id : E) return B is
1990 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1991 return Flag132 (Id);
1992 end Is_Default_Init_Cond_Procedure;
1994 function Is_Descendent_Of_Address (Id : E) return B is
1996 return Flag223 (Id);
1997 end Is_Descendent_Of_Address;
1999 function Is_Discrim_SO_Function (Id : E) return B is
2001 return Flag176 (Id);
2002 end Is_Discrim_SO_Function;
2004 function Is_Discriminant_Check_Function (Id : E) return B is
2006 return Flag264 (Id);
2007 end Is_Discriminant_Check_Function;
2009 function Is_Dispatch_Table_Entity (Id : E) return B is
2011 return Flag234 (Id);
2012 end Is_Dispatch_Table_Entity;
2014 function Is_Dispatching_Operation (Id : E) return B is
2016 pragma Assert (Nkind (Id) in N_Entity);
2018 end Is_Dispatching_Operation;
2020 function Is_Eliminated (Id : E) return B is
2022 return Flag124 (Id);
2025 function Is_Entry_Formal (Id : E) return B is
2028 end Is_Entry_Formal;
2030 function Is_Exported (Id : E) return B is
2035 function Is_First_Subtype (Id : E) return B is
2038 end Is_First_Subtype;
2040 function Is_For_Access_Subtype (Id : E) return B is
2042 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2043 return Flag118 (Id);
2044 end Is_For_Access_Subtype;
2046 function Is_Formal_Subprogram (Id : E) return B is
2048 return Flag111 (Id);
2049 end Is_Formal_Subprogram;
2051 function Is_Frozen (Id : E) return B is
2056 function Is_Generic_Actual_Subprogram (Id : E) return B is
2058 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2059 return Flag274 (Id);
2060 end Is_Generic_Actual_Subprogram;
2062 function Is_Generic_Actual_Type (Id : E) return B is
2064 pragma Assert (Is_Type (Id));
2066 end Is_Generic_Actual_Type;
2068 function Is_Generic_Instance (Id : E) return B is
2070 return Flag130 (Id);
2071 end Is_Generic_Instance;
2073 function Is_Generic_Type (Id : E) return B is
2075 pragma Assert (Nkind (Id) in N_Entity);
2077 end Is_Generic_Type;
2079 function Is_Hidden (Id : E) return B is
2084 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2087 end Is_Hidden_Non_Overridden_Subpgm;
2089 function Is_Hidden_Open_Scope (Id : E) return B is
2091 return Flag171 (Id);
2092 end Is_Hidden_Open_Scope;
2094 function Is_Immediately_Visible (Id : E) return B is
2096 pragma Assert (Nkind (Id) in N_Entity);
2098 end Is_Immediately_Visible;
2100 function Is_Implementation_Defined (Id : E) return B is
2102 return Flag254 (Id);
2103 end Is_Implementation_Defined;
2105 function Is_Imported (Id : E) return B is
2110 function Is_Independent (Id : E) return B is
2112 pragma Assert (Ekind (Id) = E_Component);
2113 return Flag268 (Id);
2116 function Is_Inlined (Id : E) return B is
2121 function Is_Inlined_Always (Id : E) return B is
2123 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2125 end Is_Inlined_Always;
2127 function Is_Interface (Id : E) return B is
2129 return Flag186 (Id);
2132 function Is_Instantiated (Id : E) return B is
2134 return Flag126 (Id);
2135 end Is_Instantiated;
2137 function Is_Internal (Id : E) return B is
2139 pragma Assert (Nkind (Id) in N_Entity);
2143 function Is_Interrupt_Handler (Id : E) return B is
2145 pragma Assert (Nkind (Id) in N_Entity);
2147 end Is_Interrupt_Handler;
2149 function Is_Intrinsic_Subprogram (Id : E) return B is
2152 end Is_Intrinsic_Subprogram;
2154 function Is_Invariant_Procedure (Id : E) return B is
2156 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2157 return Flag257 (Id);
2158 end Is_Invariant_Procedure;
2160 function Is_Itype (Id : E) return B is
2165 function Is_Known_Non_Null (Id : E) return B is
2168 end Is_Known_Non_Null;
2170 function Is_Known_Null (Id : E) return B is
2172 return Flag204 (Id);
2175 function Is_Known_Valid (Id : E) return B is
2177 return Flag170 (Id);
2180 function Is_Limited_Composite (Id : E) return B is
2182 return Flag106 (Id);
2183 end Is_Limited_Composite;
2185 function Is_Limited_Interface (Id : E) return B is
2187 return Flag197 (Id);
2188 end Is_Limited_Interface;
2190 function Is_Limited_Record (Id : E) return B is
2193 end Is_Limited_Record;
2195 function Is_Machine_Code_Subprogram (Id : E) return B is
2197 pragma Assert (Is_Subprogram (Id));
2198 return Flag137 (Id);
2199 end Is_Machine_Code_Subprogram;
2201 function Is_Non_Static_Subtype (Id : E) return B is
2203 pragma Assert (Is_Type (Id));
2204 return Flag109 (Id);
2205 end Is_Non_Static_Subtype;
2207 function Is_Null_Init_Proc (Id : E) return B is
2209 pragma Assert (Ekind (Id) = E_Procedure);
2210 return Flag178 (Id);
2211 end Is_Null_Init_Proc;
2213 function Is_Obsolescent (Id : E) return B is
2215 return Flag153 (Id);
2218 function Is_Only_Out_Parameter (Id : E) return B is
2220 pragma Assert (Is_Formal (Id));
2221 return Flag226 (Id);
2222 end Is_Only_Out_Parameter;
2224 function Is_Package_Body_Entity (Id : E) return B is
2226 return Flag160 (Id);
2227 end Is_Package_Body_Entity;
2229 function Is_Packed (Id : E) return B is
2231 return Flag51 (Implementation_Base_Type (Id));
2234 function Is_Packed_Array_Impl_Type (Id : E) return B is
2236 return Flag138 (Id);
2237 end Is_Packed_Array_Impl_Type;
2239 function Is_Potentially_Use_Visible (Id : E) return B is
2241 pragma Assert (Nkind (Id) in N_Entity);
2243 end Is_Potentially_Use_Visible;
2245 function Is_Predicate_Function (Id : E) return B is
2247 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2248 return Flag255 (Id);
2249 end Is_Predicate_Function;
2251 function Is_Predicate_Function_M (Id : E) return B is
2253 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2254 return Flag256 (Id);
2255 end Is_Predicate_Function_M;
2257 function Is_Preelaborated (Id : E) return B is
2260 end Is_Preelaborated;
2262 function Is_Primitive (Id : E) return B is
2265 (Is_Overloadable (Id)
2266 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2267 return Flag218 (Id);
2270 function Is_Primitive_Wrapper (Id : E) return B is
2272 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2273 return Flag195 (Id);
2274 end Is_Primitive_Wrapper;
2276 function Is_Private_Composite (Id : E) return B is
2278 pragma Assert (Is_Type (Id));
2279 return Flag107 (Id);
2280 end Is_Private_Composite;
2282 function Is_Private_Descendant (Id : E) return B is
2285 end Is_Private_Descendant;
2287 function Is_Private_Primitive (Id : E) return B is
2289 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2290 return Flag245 (Id);
2291 end Is_Private_Primitive;
2293 function Is_Processed_Transient (Id : E) return B is
2295 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2296 return Flag252 (Id);
2297 end Is_Processed_Transient;
2299 function Is_Public (Id : E) return B is
2301 pragma Assert (Nkind (Id) in N_Entity);
2305 function Is_Pure (Id : E) return B is
2310 function Is_Pure_Unit_Access_Type (Id : E) return B is
2312 pragma Assert (Is_Access_Type (Id));
2313 return Flag189 (Id);
2314 end Is_Pure_Unit_Access_Type;
2316 function Is_RACW_Stub_Type (Id : E) return B is
2318 pragma Assert (Is_Type (Id));
2319 return Flag244 (Id);
2320 end Is_RACW_Stub_Type;
2322 function Is_Raised (Id : E) return B is
2324 pragma Assert (Ekind (Id) = E_Exception);
2325 return Flag224 (Id);
2328 function Is_Remote_Call_Interface (Id : E) return B is
2331 end Is_Remote_Call_Interface;
2333 function Is_Remote_Types (Id : E) return B is
2336 end Is_Remote_Types;
2338 function Is_Renaming_Of_Object (Id : E) return B is
2340 return Flag112 (Id);
2341 end Is_Renaming_Of_Object;
2343 function Is_Return_Object (Id : E) return B is
2345 return Flag209 (Id);
2346 end Is_Return_Object;
2348 function Is_Safe_To_Reevaluate (Id : E) return B is
2350 return Flag249 (Id);
2351 end Is_Safe_To_Reevaluate;
2353 function Is_Shared_Passive (Id : E) return B is
2356 end Is_Shared_Passive;
2358 function Is_Statically_Allocated (Id : E) return B is
2361 end Is_Statically_Allocated;
2363 function Is_Tag (Id : E) return B is
2365 pragma Assert (Nkind (Id) in N_Entity);
2369 function Is_Tagged_Type (Id : E) return B is
2374 function Is_Thunk (Id : E) return B is
2376 return Flag225 (Id);
2379 function Is_Trivial_Subprogram (Id : E) return B is
2381 return Flag235 (Id);
2382 end Is_Trivial_Subprogram;
2384 function Is_True_Constant (Id : E) return B is
2386 return Flag163 (Id);
2387 end Is_True_Constant;
2389 function Is_Unchecked_Union (Id : E) return B is
2391 return Flag117 (Implementation_Base_Type (Id));
2392 end Is_Unchecked_Union;
2394 function Is_Underlying_Record_View (Id : E) return B is
2396 return Flag246 (Id);
2397 end Is_Underlying_Record_View;
2399 function Is_Unsigned_Type (Id : E) return B is
2401 pragma Assert (Is_Type (Id));
2402 return Flag144 (Id);
2403 end Is_Unsigned_Type;
2405 function Is_Valued_Procedure (Id : E) return B is
2407 pragma Assert (Ekind (Id) = E_Procedure);
2408 return Flag127 (Id);
2409 end Is_Valued_Procedure;
2411 function Is_Visible_Formal (Id : E) return B is
2413 return Flag206 (Id);
2414 end Is_Visible_Formal;
2416 function Is_Visible_Lib_Unit (Id : E) return B is
2418 return Flag116 (Id);
2419 end Is_Visible_Lib_Unit;
2421 function Is_Volatile (Id : E) return B is
2423 pragma Assert (Nkind (Id) in N_Entity);
2425 if Is_Type (Id) then
2426 return Flag16 (Base_Type (Id));
2432 function Itype_Printed (Id : E) return B is
2434 pragma Assert (Is_Itype (Id));
2435 return Flag202 (Id);
2438 function Kill_Elaboration_Checks (Id : E) return B is
2441 end Kill_Elaboration_Checks;
2443 function Kill_Range_Checks (Id : E) return B is
2446 end Kill_Range_Checks;
2448 function Known_To_Have_Preelab_Init (Id : E) return B is
2450 pragma Assert (Is_Type (Id));
2451 return Flag207 (Id);
2452 end Known_To_Have_Preelab_Init;
2454 function Last_Aggregate_Assignment (Id : E) return N is
2456 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2458 end Last_Aggregate_Assignment;
2460 function Last_Assignment (Id : E) return N is
2462 pragma Assert (Is_Assignable (Id));
2464 end Last_Assignment;
2466 function Last_Entity (Id : E) return E is
2471 function Limited_View (Id : E) return E is
2473 pragma Assert (Ekind (Id) = E_Package);
2477 function Linker_Section_Pragma (Id : E) return N is
2480 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2482 end Linker_Section_Pragma;
2484 function Lit_Indexes (Id : E) return E is
2486 pragma Assert (Is_Enumeration_Type (Id));
2490 function Lit_Strings (Id : E) return E is
2492 pragma Assert (Is_Enumeration_Type (Id));
2496 function Low_Bound_Tested (Id : E) return B is
2498 return Flag205 (Id);
2499 end Low_Bound_Tested;
2501 function Machine_Radix_10 (Id : E) return B is
2503 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2505 end Machine_Radix_10;
2507 function Master_Id (Id : E) return E is
2509 pragma Assert (Is_Access_Type (Id));
2513 function Materialize_Entity (Id : E) return B is
2515 return Flag168 (Id);
2516 end Materialize_Entity;
2518 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2520 return Flag262 (Id);
2521 end May_Inherit_Delayed_Rep_Aspects;
2523 function Mechanism (Id : E) return M is
2525 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2526 return UI_To_Int (Uint8 (Id));
2529 function Modulus (Id : E) return Uint is
2531 pragma Assert (Is_Modular_Integer_Type (Id));
2532 return Uint17 (Base_Type (Id));
2535 function Must_Be_On_Byte_Boundary (Id : E) return B is
2537 pragma Assert (Is_Type (Id));
2538 return Flag183 (Id);
2539 end Must_Be_On_Byte_Boundary;
2541 function Must_Have_Preelab_Init (Id : E) return B is
2543 pragma Assert (Is_Type (Id));
2544 return Flag208 (Id);
2545 end Must_Have_Preelab_Init;
2547 function Needs_Debug_Info (Id : E) return B is
2549 return Flag147 (Id);
2550 end Needs_Debug_Info;
2552 function Needs_No_Actuals (Id : E) return B is
2555 (Is_Overloadable (Id)
2556 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2558 end Needs_No_Actuals;
2560 function Never_Set_In_Source (Id : E) return B is
2562 return Flag115 (Id);
2563 end Never_Set_In_Source;
2565 function Next_Inlined_Subprogram (Id : E) return E is
2568 end Next_Inlined_Subprogram;
2570 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2572 pragma Assert (Is_Discrete_Type (Id));
2573 return Flag276 (Id);
2574 end No_Dynamic_Predicate_On_Actual;
2576 function No_Pool_Assigned (Id : E) return B is
2578 pragma Assert (Is_Access_Type (Id));
2579 return Flag131 (Root_Type (Id));
2580 end No_Pool_Assigned;
2582 function No_Predicate_On_Actual (Id : E) return Boolean is
2584 pragma Assert (Is_Discrete_Type (Id));
2585 return Flag275 (Id);
2586 end No_Predicate_On_Actual;
2588 function No_Return (Id : E) return B is
2590 return Flag113 (Id);
2593 function No_Strict_Aliasing (Id : E) return B is
2595 pragma Assert (Is_Access_Type (Id));
2596 return Flag136 (Base_Type (Id));
2597 end No_Strict_Aliasing;
2599 function Non_Binary_Modulus (Id : E) return B is
2601 pragma Assert (Is_Type (Id));
2602 return Flag58 (Base_Type (Id));
2603 end Non_Binary_Modulus;
2605 function Non_Limited_View (Id : E) return E is
2608 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2610 end Non_Limited_View;
2612 function Nonzero_Is_True (Id : E) return B is
2614 pragma Assert (Root_Type (Id) = Standard_Boolean);
2615 return Flag162 (Base_Type (Id));
2616 end Nonzero_Is_True;
2618 function Normalized_First_Bit (Id : E) return U is
2620 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2622 end Normalized_First_Bit;
2624 function Normalized_Position (Id : E) return U is
2626 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2628 end Normalized_Position;
2630 function Normalized_Position_Max (Id : E) return U is
2632 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2634 end Normalized_Position_Max;
2636 function OK_To_Rename (Id : E) return B is
2638 pragma Assert (Ekind (Id) = E_Variable);
2639 return Flag247 (Id);
2642 function OK_To_Reorder_Components (Id : E) return B is
2644 pragma Assert (Is_Record_Type (Id));
2645 return Flag239 (Base_Type (Id));
2646 end OK_To_Reorder_Components;
2648 function Optimize_Alignment_Space (Id : E) return B is
2651 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2652 return Flag241 (Id);
2653 end Optimize_Alignment_Space;
2655 function Optimize_Alignment_Time (Id : E) return B is
2658 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2659 return Flag242 (Id);
2660 end Optimize_Alignment_Time;
2662 function Original_Access_Type (Id : E) return E is
2664 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2666 end Original_Access_Type;
2668 function Original_Array_Type (Id : E) return E is
2670 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2672 end Original_Array_Type;
2674 function Original_Record_Component (Id : E) return E is
2676 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2678 end Original_Record_Component;
2680 function Overlays_Constant (Id : E) return B is
2682 return Flag243 (Id);
2683 end Overlays_Constant;
2685 function Overridden_Operation (Id : E) return E is
2688 end Overridden_Operation;
2690 function Package_Instantiation (Id : E) return N is
2692 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2694 end Package_Instantiation;
2696 function Packed_Array_Impl_Type (Id : E) return E is
2698 pragma Assert (Is_Array_Type (Id));
2700 end Packed_Array_Impl_Type;
2702 function Parent_Subtype (Id : E) return E is
2704 pragma Assert (Is_Record_Type (Id));
2705 return Node19 (Base_Type (Id));
2708 function Part_Of_Constituents (Id : E) return L is
2710 pragma Assert (Ekind (Id) = E_Abstract_State);
2712 end Part_Of_Constituents;
2714 function Postcondition_Proc (Id : E) return E is
2716 pragma Assert (Ekind (Id) = E_Procedure);
2718 end Postcondition_Proc;
2720 function PPC_Wrapper (Id : E) return E is
2722 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2726 function Prival (Id : E) return E is
2728 pragma Assert (Is_Protected_Component (Id));
2732 function Prival_Link (Id : E) return E is
2734 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2738 function Private_Dependents (Id : E) return L is
2740 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2741 return Elist18 (Id);
2742 end Private_Dependents;
2744 function Private_View (Id : E) return N is
2746 pragma Assert (Is_Private_Type (Id));
2750 function Protected_Body_Subprogram (Id : E) return E is
2752 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2754 end Protected_Body_Subprogram;
2756 function Protected_Formal (Id : E) return E is
2758 pragma Assert (Is_Formal (Id));
2760 end Protected_Formal;
2762 function Protection_Object (Id : E) return E is
2765 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2767 end Protection_Object;
2769 function Reachable (Id : E) return B is
2774 function Referenced (Id : E) return B is
2776 return Flag156 (Id);
2779 function Referenced_As_LHS (Id : E) return B is
2782 end Referenced_As_LHS;
2784 function Referenced_As_Out_Parameter (Id : E) return B is
2786 return Flag227 (Id);
2787 end Referenced_As_Out_Parameter;
2789 function Refinement_Constituents (Id : E) return L is
2791 pragma Assert (Ekind (Id) = E_Abstract_State);
2793 end Refinement_Constituents;
2795 function Register_Exception_Call (Id : E) return N is
2797 pragma Assert (Ekind (Id) = E_Exception);
2799 end Register_Exception_Call;
2801 function Related_Array_Object (Id : E) return E is
2803 pragma Assert (Is_Array_Type (Id));
2805 end Related_Array_Object;
2807 function Related_Expression (Id : E) return N is
2809 pragma Assert (Ekind (Id) in Type_Kind
2810 or else Ekind_In (Id, E_Constant, E_Variable));
2812 end Related_Expression;
2814 function Related_Instance (Id : E) return E is
2816 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2818 end Related_Instance;
2820 function Related_Type (Id : E) return E is
2822 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2826 function Relative_Deadline_Variable (Id : E) return E is
2828 pragma Assert (Is_Task_Type (Id));
2829 return Node26 (Implementation_Base_Type (Id));
2830 end Relative_Deadline_Variable;
2832 function Renamed_Entity (Id : E) return N is
2837 function Renamed_In_Spec (Id : E) return B is
2839 pragma Assert (Ekind (Id) = E_Package);
2840 return Flag231 (Id);
2841 end Renamed_In_Spec;
2843 function Renamed_Object (Id : E) return N is
2848 function Renaming_Map (Id : E) return U is
2853 function Requires_Overriding (Id : E) return B is
2855 pragma Assert (Is_Overloadable (Id));
2856 return Flag213 (Id);
2857 end Requires_Overriding;
2859 function Return_Present (Id : E) return B is
2864 function Return_Applies_To (Id : E) return N is
2867 end Return_Applies_To;
2869 function Returns_By_Ref (Id : E) return B is
2874 function Reverse_Bit_Order (Id : E) return B is
2876 pragma Assert (Is_Record_Type (Id));
2877 return Flag164 (Base_Type (Id));
2878 end Reverse_Bit_Order;
2880 function Reverse_Storage_Order (Id : E) return B is
2882 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2883 return Flag93 (Base_Type (Id));
2884 end Reverse_Storage_Order;
2886 function RM_Size (Id : E) return U is
2888 pragma Assert (Is_Type (Id));
2892 function Scalar_Range (Id : E) return N is
2897 function Scale_Value (Id : E) return U is
2902 function Scope_Depth_Value (Id : E) return U is
2905 end Scope_Depth_Value;
2907 function Sec_Stack_Needed_For_Return (Id : E) return B is
2909 return Flag167 (Id);
2910 end Sec_Stack_Needed_For_Return;
2912 function Shadow_Entities (Id : E) return S is
2914 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2916 end Shadow_Entities;
2918 function Shared_Var_Procs_Instance (Id : E) return E is
2920 pragma Assert (Ekind (Id) = E_Variable);
2922 end Shared_Var_Procs_Instance;
2924 function Size_Check_Code (Id : E) return N is
2926 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2928 end Size_Check_Code;
2930 function Size_Depends_On_Discriminant (Id : E) return B is
2932 return Flag177 (Id);
2933 end Size_Depends_On_Discriminant;
2935 function Size_Known_At_Compile_Time (Id : E) return B is
2938 end Size_Known_At_Compile_Time;
2940 function Small_Value (Id : E) return R is
2942 pragma Assert (Is_Fixed_Point_Type (Id));
2943 return Ureal21 (Id);
2946 function SPARK_Aux_Pragma (Id : E) return N is
2949 (Ekind_In (Id, E_Generic_Package, -- package variants
2953 end SPARK_Aux_Pragma;
2955 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2958 (Ekind_In (Id, E_Generic_Package, -- package variants
2961 return Flag266 (Id);
2962 end SPARK_Aux_Pragma_Inherited;
2964 function SPARK_Pragma (Id : E) return N is
2967 (Ekind_In (Id, E_Function, -- subprogram variants
2969 E_Generic_Procedure,
2973 Ekind_In (Id, E_Generic_Package, -- package variants
2979 function SPARK_Pragma_Inherited (Id : E) return B is
2982 (Ekind_In (Id, E_Function, -- subprogram variants
2984 E_Generic_Procedure,
2988 Ekind_In (Id, E_Generic_Package, -- package variants
2991 return Flag265 (Id);
2992 end SPARK_Pragma_Inherited;
2994 function Spec_Entity (Id : E) return E is
2996 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3000 function SSO_Set_High_By_Default (Id : E) return B is
3002 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3003 return Flag273 (Base_Type (Id));
3004 end SSO_Set_High_By_Default;
3006 function SSO_Set_Low_By_Default (Id : E) return B is
3008 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3009 return Flag272 (Base_Type (Id));
3010 end SSO_Set_Low_By_Default;
3012 function Static_Discrete_Predicate (Id : E) return S is
3014 pragma Assert (Is_Discrete_Type (Id));
3016 end Static_Discrete_Predicate;
3018 function Static_Real_Or_String_Predicate (Id : E) return N is
3020 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3022 end Static_Real_Or_String_Predicate;
3024 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3026 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3028 end Status_Flag_Or_Transient_Decl;
3030 function Storage_Size_Variable (Id : E) return E is
3032 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3033 return Node15 (Implementation_Base_Type (Id));
3034 end Storage_Size_Variable;
3036 function Static_Elaboration_Desired (Id : E) return B is
3038 pragma Assert (Ekind (Id) = E_Package);
3040 end Static_Elaboration_Desired;
3042 function Static_Initialization (Id : E) return N is
3045 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3047 end Static_Initialization;
3049 function Stored_Constraint (Id : E) return L is
3052 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3053 return Elist23 (Id);
3054 end Stored_Constraint;
3056 function Stores_Attribute_Old_Prefix (Id : E) return B is
3058 return Flag270 (Id);
3059 end Stores_Attribute_Old_Prefix;
3061 function Strict_Alignment (Id : E) return B is
3063 return Flag145 (Implementation_Base_Type (Id));
3064 end Strict_Alignment;
3066 function String_Literal_Length (Id : E) return U is
3069 end String_Literal_Length;
3071 function String_Literal_Low_Bound (Id : E) return N is
3074 end String_Literal_Low_Bound;
3076 function Subprograms_For_Type (Id : E) return E is
3078 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3080 end Subprograms_For_Type;
3082 function Suppress_Elaboration_Warnings (Id : E) return B is
3084 return Flag148 (Id);
3085 end Suppress_Elaboration_Warnings;
3087 function Suppress_Initialization (Id : E) return B is
3089 pragma Assert (Is_Type (Id));
3090 return Flag105 (Id);
3091 end Suppress_Initialization;
3093 function Suppress_Style_Checks (Id : E) return B is
3095 return Flag165 (Id);
3096 end Suppress_Style_Checks;
3098 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3100 return Flag217 (Id);
3101 end Suppress_Value_Tracking_On_Call;
3103 function Task_Body_Procedure (Id : E) return N is
3105 pragma Assert (Ekind (Id) in Task_Kind);
3107 end Task_Body_Procedure;
3109 function Thunk_Entity (Id : E) return E is
3111 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3112 and then Is_Thunk (Id));
3116 function Treat_As_Volatile (Id : E) return B is
3119 end Treat_As_Volatile;
3121 function Underlying_Full_View (Id : E) return E is
3123 pragma Assert (Ekind (Id) in Private_Kind);
3125 end Underlying_Full_View;
3127 function Underlying_Record_View (Id : E) return E is
3130 end Underlying_Record_View;
3132 function Universal_Aliasing (Id : E) return B is
3134 pragma Assert (Is_Type (Id));
3135 return Flag216 (Implementation_Base_Type (Id));
3136 end Universal_Aliasing;
3138 function Unset_Reference (Id : E) return N is
3141 end Unset_Reference;
3143 function Used_As_Generic_Actual (Id : E) return B is
3145 return Flag222 (Id);
3146 end Used_As_Generic_Actual;
3148 function Uses_Lock_Free (Id : E) return B is
3150 pragma Assert (Is_Protected_Type (Id));
3151 return Flag188 (Id);
3154 function Uses_Sec_Stack (Id : E) return B is
3159 function Warnings_Off (Id : E) return B is
3164 function Warnings_Off_Used (Id : E) return B is
3166 return Flag236 (Id);
3167 end Warnings_Off_Used;
3169 function Warnings_Off_Used_Unmodified (Id : E) return B is
3171 return Flag237 (Id);
3172 end Warnings_Off_Used_Unmodified;
3174 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3176 return Flag238 (Id);
3177 end Warnings_Off_Used_Unreferenced;
3179 function Wrapped_Entity (Id : E) return E is
3181 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3182 and then Is_Primitive_Wrapper (Id));
3186 function Was_Hidden (Id : E) return B is
3188 return Flag196 (Id);
3191 ------------------------------
3192 -- Classification Functions --
3193 ------------------------------
3195 function Is_Access_Type (Id : E) return B is
3197 return Ekind (Id) in Access_Kind;
3200 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3202 return Ekind (Id) in Access_Protected_Kind;
3203 end Is_Access_Protected_Subprogram_Type;
3205 function Is_Access_Subprogram_Type (Id : E) return B is
3207 return Ekind (Id) in Access_Subprogram_Kind;
3208 end Is_Access_Subprogram_Type;
3210 function Is_Aggregate_Type (Id : E) return B is
3212 return Ekind (Id) in Aggregate_Kind;
3213 end Is_Aggregate_Type;
3215 function Is_Array_Type (Id : E) return B is
3217 return Ekind (Id) in Array_Kind;
3220 function Is_Assignable (Id : E) return B is
3222 return Ekind (Id) in Assignable_Kind;
3225 function Is_Class_Wide_Type (Id : E) return B is
3227 return Ekind (Id) in Class_Wide_Kind;
3228 end Is_Class_Wide_Type;
3230 function Is_Composite_Type (Id : E) return B is
3232 return Ekind (Id) in Composite_Kind;
3233 end Is_Composite_Type;
3235 function Is_Concurrent_Body (Id : E) return B is
3237 return Ekind (Id) in
3238 Concurrent_Body_Kind;
3239 end Is_Concurrent_Body;
3241 function Is_Concurrent_Record_Type (Id : E) return B is
3244 end Is_Concurrent_Record_Type;
3246 function Is_Concurrent_Type (Id : E) return B is
3248 return Ekind (Id) in Concurrent_Kind;
3249 end Is_Concurrent_Type;
3251 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3253 return Ekind (Id) in
3254 Decimal_Fixed_Point_Kind;
3255 end Is_Decimal_Fixed_Point_Type;
3257 function Is_Digits_Type (Id : E) return B is
3259 return Ekind (Id) in Digits_Kind;
3262 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3264 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3265 end Is_Discrete_Or_Fixed_Point_Type;
3267 function Is_Discrete_Type (Id : E) return B is
3269 return Ekind (Id) in Discrete_Kind;
3270 end Is_Discrete_Type;
3272 function Is_Elementary_Type (Id : E) return B is
3274 return Ekind (Id) in Elementary_Kind;
3275 end Is_Elementary_Type;
3277 function Is_Entry (Id : E) return B is
3279 return Ekind (Id) in Entry_Kind;
3282 function Is_Enumeration_Type (Id : E) return B is
3284 return Ekind (Id) in
3286 end Is_Enumeration_Type;
3288 function Is_Fixed_Point_Type (Id : E) return B is
3290 return Ekind (Id) in
3292 end Is_Fixed_Point_Type;
3294 function Is_Floating_Point_Type (Id : E) return B is
3296 return Ekind (Id) in Float_Kind;
3297 end Is_Floating_Point_Type;
3299 function Is_Formal (Id : E) return B is
3301 return Ekind (Id) in Formal_Kind;
3304 function Is_Formal_Object (Id : E) return B is
3306 return Ekind (Id) in Formal_Object_Kind;
3307 end Is_Formal_Object;
3309 function Is_Generic_Subprogram (Id : E) return B is
3311 return Ekind (Id) in Generic_Subprogram_Kind;
3312 end Is_Generic_Subprogram;
3314 function Is_Generic_Unit (Id : E) return B is
3316 return Ekind (Id) in Generic_Unit_Kind;
3317 end Is_Generic_Unit;
3319 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3321 return Ekind (Id) in
3322 Incomplete_Or_Private_Kind;
3323 end Is_Incomplete_Or_Private_Type;
3325 function Is_Incomplete_Type (Id : E) return B is
3327 return Ekind (Id) in
3329 end Is_Incomplete_Type;
3331 function Is_Integer_Type (Id : E) return B is
3333 return Ekind (Id) in Integer_Kind;
3334 end Is_Integer_Type;
3336 function Is_Modular_Integer_Type (Id : E) return B is
3338 return Ekind (Id) in
3339 Modular_Integer_Kind;
3340 end Is_Modular_Integer_Type;
3342 function Is_Named_Number (Id : E) return B is
3344 return Ekind (Id) in Named_Kind;
3345 end Is_Named_Number;
3347 function Is_Numeric_Type (Id : E) return B is
3349 return Ekind (Id) in Numeric_Kind;
3350 end Is_Numeric_Type;
3352 function Is_Object (Id : E) return B is
3354 return Ekind (Id) in Object_Kind;
3357 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3359 return Ekind (Id) in
3360 Ordinary_Fixed_Point_Kind;
3361 end Is_Ordinary_Fixed_Point_Type;
3363 function Is_Overloadable (Id : E) return B is
3365 return Ekind (Id) in Overloadable_Kind;
3366 end Is_Overloadable;
3368 function Is_Private_Type (Id : E) return B is
3370 return Ekind (Id) in Private_Kind;
3371 end Is_Private_Type;
3373 function Is_Protected_Type (Id : E) return B is
3375 return Ekind (Id) in Protected_Kind;
3376 end Is_Protected_Type;
3378 function Is_Real_Type (Id : E) return B is
3380 return Ekind (Id) in Real_Kind;
3383 function Is_Record_Type (Id : E) return B is
3385 return Ekind (Id) in Record_Kind;
3388 function Is_Scalar_Type (Id : E) return B is
3390 return Ekind (Id) in Scalar_Kind;
3393 function Is_Signed_Integer_Type (Id : E) return B is
3395 return Ekind (Id) in Signed_Integer_Kind;
3396 end Is_Signed_Integer_Type;
3398 function Is_Subprogram (Id : E) return B is
3400 return Ekind (Id) in Subprogram_Kind;
3403 function Is_Task_Type (Id : E) return B is
3405 return Ekind (Id) in Task_Kind;
3408 function Is_Type (Id : E) return B is
3410 return Ekind (Id) in Type_Kind;
3413 ------------------------------
3414 -- Attribute Set Procedures --
3415 ------------------------------
3417 -- Note: in many of these set procedures an "obvious" assertion is missing.
3418 -- The reason for this is that in many cases, a field is set before the
3419 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3420 -- it is possible to add assertions that specifically include the E_Void
3421 -- possibility, but in some cases, we just omit the assertions.
3423 procedure Set_Abstract_States (Id : E; V : L) is
3425 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3426 Set_Elist25 (Id, V);
3427 end Set_Abstract_States;
3429 procedure Set_Accept_Address (Id : E; V : L) is
3431 Set_Elist21 (Id, V);
3432 end Set_Accept_Address;
3434 procedure Set_Access_Disp_Table (Id : E; V : L) is
3436 pragma Assert (Ekind (Id) = E_Record_Type
3437 and then Id = Implementation_Base_Type (Id));
3438 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3439 Set_Elist16 (Id, V);
3440 end Set_Access_Disp_Table;
3442 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3445 end Set_Associated_Formal_Package;
3447 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3450 end Set_Associated_Node_For_Itype;
3452 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3454 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3456 end Set_Associated_Storage_Pool;
3458 procedure Set_Actual_Subtype (Id : E; V : E) is
3461 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3462 or else Is_Formal (Id));
3464 end Set_Actual_Subtype;
3466 procedure Set_Address_Taken (Id : E; V : B := True) is
3468 Set_Flag104 (Id, V);
3469 end Set_Address_Taken;
3471 procedure Set_Alias (Id : E; V : E) is
3474 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3478 procedure Set_Alignment (Id : E; V : U) is
3480 pragma Assert (Is_Type (Id)
3481 or else Is_Formal (Id)
3482 or else Ekind_In (Id, E_Loop_Parameter,
3489 procedure Set_Barrier_Function (Id : E; V : N) is
3491 pragma Assert (Is_Entry (Id));
3493 end Set_Barrier_Function;
3495 procedure Set_Block_Node (Id : E; V : N) is
3497 pragma Assert (Ekind (Id) = E_Block);
3501 procedure Set_Body_Entity (Id : E; V : E) is
3503 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3505 end Set_Body_Entity;
3507 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3510 (Ekind (Id) = E_Package
3511 or else Is_Subprogram (Id)
3512 or else Is_Generic_Unit (Id));
3514 end Set_Body_Needed_For_SAL;
3516 procedure Set_Body_References (Id : E; V : L) is
3518 pragma Assert (Ekind (Id) = E_Abstract_State);
3519 Set_Elist16 (Id, V);
3520 end Set_Body_References;
3522 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3524 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3526 end Set_BIP_Initialization_Call;
3528 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3530 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3531 Set_Flag125 (Id, V);
3532 end Set_C_Pass_By_Copy;
3534 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3537 end Set_Can_Never_Be_Null;
3539 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3542 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3543 Set_Flag229 (Id, V);
3544 end Set_Can_Use_Internal_Rep;
3546 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3549 end Set_Checks_May_Be_Suppressed;
3551 procedure Set_Class_Wide_Type (Id : E; V : E) is
3553 pragma Assert (Is_Type (Id));
3555 end Set_Class_Wide_Type;
3557 procedure Set_Cloned_Subtype (Id : E; V : E) is
3559 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3561 end Set_Cloned_Subtype;
3563 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3565 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3567 end Set_Component_Bit_Offset;
3569 procedure Set_Component_Clause (Id : E; V : N) is
3571 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3573 end Set_Component_Clause;
3575 procedure Set_Component_Size (Id : E; V : U) is
3577 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3579 end Set_Component_Size;
3581 procedure Set_Component_Type (Id : E; V : E) is
3583 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3585 end Set_Component_Type;
3587 procedure Set_Contract (Id : E; V : N) is
3590 (Ekind_In (Id, E_Entry,
3598 or else Is_Generic_Subprogram (Id)
3599 or else Is_Subprogram (Id));
3603 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3606 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3608 end Set_Corresponding_Concurrent_Type;
3610 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3612 pragma Assert (Ekind (Id) = E_Discriminant);
3614 end Set_Corresponding_Discriminant;
3616 procedure Set_Corresponding_Equality (Id : E; V : E) is
3619 (Ekind (Id) = E_Function
3620 and then not Comes_From_Source (Id)
3621 and then Chars (Id) = Name_Op_Ne);
3623 end Set_Corresponding_Equality;
3625 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3627 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3629 end Set_Corresponding_Protected_Entry;
3631 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3633 pragma Assert (Is_Concurrent_Type (Id));
3635 end Set_Corresponding_Record_Type;
3637 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3640 end Set_Corresponding_Remote_Type;
3642 procedure Set_Current_Use_Clause (Id : E; V : E) is
3644 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3646 end Set_Current_Use_Clause;
3648 procedure Set_Current_Value (Id : E; V : N) is
3650 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3652 end Set_Current_Value;
3654 procedure Set_CR_Discriminant (Id : E; V : E) is
3657 end Set_CR_Discriminant;
3659 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3661 Set_Flag166 (Id, V);
3662 end Set_Debug_Info_Off;
3664 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3667 end Set_Debug_Renaming_Link;
3669 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3671 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3673 end Set_Default_Aspect_Component_Value;
3675 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3677 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3679 end Set_Default_Aspect_Value;
3681 procedure Set_Default_Expr_Function (Id : E; V : E) is
3683 pragma Assert (Is_Formal (Id));
3685 end Set_Default_Expr_Function;
3687 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3689 Set_Flag108 (Id, V);
3690 end Set_Default_Expressions_Processed;
3692 procedure Set_Default_Value (Id : E; V : N) is
3694 pragma Assert (Is_Formal (Id));
3696 end Set_Default_Value;
3698 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3702 or else Is_Task_Type (Id)
3703 or else Ekind (Id) = E_Block);
3704 Set_Flag114 (Id, V);
3705 end Set_Delay_Cleanups;
3707 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3710 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3713 end Set_Delay_Subprogram_Descriptors;
3715 procedure Set_Delta_Value (Id : E; V : R) is
3717 pragma Assert (Is_Fixed_Point_Type (Id));
3718 Set_Ureal18 (Id, V);
3719 end Set_Delta_Value;
3721 procedure Set_Dependent_Instances (Id : E; V : L) is
3723 pragma Assert (Is_Generic_Instance (Id));
3725 end Set_Dependent_Instances;
3727 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3729 pragma Assert (Nkind (Id) in N_Entity);
3731 end Set_Depends_On_Private;
3733 procedure Set_Derived_Type_Link (Id : E; V : E) is
3735 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3737 end Set_Derived_Type_Link;
3739 procedure Set_Digits_Value (Id : E; V : U) is
3742 (Is_Floating_Point_Type (Id)
3743 or else Is_Decimal_Fixed_Point_Type (Id));
3745 end Set_Digits_Value;
3747 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3750 end Set_Directly_Designated_Type;
3752 procedure Set_Discard_Names (Id : E; V : B := True) is
3755 end Set_Discard_Names;
3757 procedure Set_Discriminal (Id : E; V : E) is
3759 pragma Assert (Ekind (Id) = E_Discriminant);
3761 end Set_Discriminal;
3763 procedure Set_Discriminal_Link (Id : E; V : E) is
3766 end Set_Discriminal_Link;
3768 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3770 pragma Assert (Ekind (Id) = E_Component);
3772 end Set_Discriminant_Checking_Func;
3774 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3776 pragma Assert (Nkind (Id) in N_Entity);
3777 Set_Elist21 (Id, V);
3778 end Set_Discriminant_Constraint;
3780 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3783 end Set_Discriminant_Default_Value;
3785 procedure Set_Discriminant_Number (Id : E; V : U) is
3788 end Set_Discriminant_Number;
3790 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3792 pragma Assert (Ekind (Id) = E_Record_Type
3793 and then Id = Implementation_Base_Type (Id));
3794 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3795 Set_Elist26 (Id, V);
3796 end Set_Dispatch_Table_Wrappers;
3798 procedure Set_DT_Entry_Count (Id : E; V : U) is
3800 pragma Assert (Ekind (Id) = E_Component);
3802 end Set_DT_Entry_Count;
3804 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3806 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3808 end Set_DT_Offset_To_Top_Func;
3810 procedure Set_DT_Position (Id : E; V : U) is
3812 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3814 end Set_DT_Position;
3816 procedure Set_DTC_Entity (Id : E; V : E) is
3818 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3822 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3824 pragma Assert (Ekind (Id) = E_Package);
3825 Set_Flag210 (Id, V);
3826 end Set_Elaborate_Body_Desirable;
3828 procedure Set_Elaboration_Entity (Id : E; V : E) is
3833 Ekind (Id) = E_Package
3835 Is_Generic_Unit (Id));
3837 end Set_Elaboration_Entity;
3839 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3844 Ekind (Id) = E_Package
3846 Is_Generic_Unit (Id));
3847 Set_Flag174 (Id, V);
3848 end Set_Elaboration_Entity_Required;
3850 procedure Set_Encapsulating_State (Id : E; V : E) is
3852 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3854 end Set_Encapsulating_State;
3856 procedure Set_Enclosing_Scope (Id : E; V : E) is
3859 end Set_Enclosing_Scope;
3861 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3863 pragma Assert (Is_Entry (Id));
3864 Set_Flag152 (Id, V);
3865 end Set_Entry_Accepted;
3867 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3870 end Set_Entry_Bodies_Array;
3872 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3875 end Set_Entry_Cancel_Parameter;
3877 procedure Set_Entry_Component (Id : E; V : E) is
3880 end Set_Entry_Component;
3882 procedure Set_Entry_Formal (Id : E; V : E) is
3885 end Set_Entry_Formal;
3887 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3889 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3891 end Set_Entry_Index_Constant;
3893 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3896 end Set_Entry_Parameters_Type;
3898 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3900 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3902 end Set_Enum_Pos_To_Rep;
3904 procedure Set_Enumeration_Pos (Id : E; V : U) is
3906 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3908 end Set_Enumeration_Pos;
3910 procedure Set_Enumeration_Rep (Id : E; V : U) is
3912 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3914 end Set_Enumeration_Rep;
3916 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3918 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3920 end Set_Enumeration_Rep_Expr;
3922 procedure Set_Equivalent_Type (Id : E; V : E) is
3925 (Ekind_In (Id, E_Class_Wide_Type,
3926 E_Class_Wide_Subtype,
3927 E_Access_Protected_Subprogram_Type,
3928 E_Anonymous_Access_Protected_Subprogram_Type,
3929 E_Access_Subprogram_Type,
3932 end Set_Equivalent_Type;
3934 procedure Set_Esize (Id : E; V : U) is
3939 procedure Set_Extra_Accessibility (Id : E; V : E) is
3942 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3944 end Set_Extra_Accessibility;
3946 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3948 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3950 end Set_Extra_Accessibility_Of_Result;
3952 procedure Set_Extra_Constrained (Id : E; V : E) is
3954 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3956 end Set_Extra_Constrained;
3958 procedure Set_Extra_Formal (Id : E; V : E) is
3961 end Set_Extra_Formal;
3963 procedure Set_Extra_Formals (Id : E; V : E) is
3966 (Is_Overloadable (Id)
3967 or else Ekind_In (Id, E_Entry_Family,
3969 E_Subprogram_Type));
3971 end Set_Extra_Formals;
3973 procedure Set_Finalization_Master (Id : E; V : E) is
3975 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3977 end Set_Finalization_Master;
3979 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3981 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3982 Set_Flag158 (Id, V);
3983 end Set_Finalize_Storage_Only;
3985 procedure Set_Finalizer (Id : E; V : E) is
3987 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3991 procedure Set_First_Entity (Id : E; V : E) is
3994 end Set_First_Entity;
3996 procedure Set_First_Exit_Statement (Id : E; V : N) is
3998 pragma Assert (Ekind (Id) = E_Loop);
4000 end Set_First_Exit_Statement;
4002 procedure Set_First_Index (Id : E; V : N) is
4004 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
4006 end Set_First_Index;
4008 procedure Set_First_Literal (Id : E; V : E) is
4010 pragma Assert (Is_Enumeration_Type (Id));
4012 end Set_First_Literal;
4014 procedure Set_First_Private_Entity (Id : E; V : E) is
4016 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4017 or else Ekind (Id) in Concurrent_Kind);
4019 end Set_First_Private_Entity;
4021 procedure Set_First_Rep_Item (Id : E; V : N) is
4024 end Set_First_Rep_Item;
4026 procedure Set_Float_Rep (Id : E; V : F) is
4027 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4029 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4032 procedure Set_Freeze_Node (Id : E; V : N) is
4035 end Set_Freeze_Node;
4037 procedure Set_From_Limited_With (Id : E; V : B := True) is
4040 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4041 Set_Flag159 (Id, V);
4042 end Set_From_Limited_With;
4044 procedure Set_Full_View (Id : E; V : E) is
4046 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4050 procedure Set_Generic_Homonym (Id : E; V : E) is
4053 end Set_Generic_Homonym;
4055 procedure Set_Generic_Renamings (Id : E; V : L) is
4057 Set_Elist23 (Id, V);
4058 end Set_Generic_Renamings;
4060 procedure Set_Handler_Records (Id : E; V : S) is
4063 end Set_Handler_Records;
4065 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4067 pragma Assert (Id = Base_Type (Id));
4068 Set_Flag135 (Id, V);
4069 end Set_Has_Aliased_Components;
4071 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4074 end Set_Has_Alignment_Clause;
4076 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4079 end Set_Has_All_Calls_Remote;
4081 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4084 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4085 Set_Flag253 (Id, V);
4086 end Set_Has_Anonymous_Master;
4088 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4090 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4092 end Set_Has_Atomic_Components;
4094 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4097 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4098 Set_Flag139 (Id, V);
4099 end Set_Has_Biased_Representation;
4101 procedure Set_Has_Completion (Id : E; V : B := True) is
4104 end Set_Has_Completion;
4106 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4108 pragma Assert (Is_Type (Id));
4110 end Set_Has_Completion_In_Body;
4112 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4114 pragma Assert (Ekind (Id) = E_Record_Type);
4115 Set_Flag140 (Id, V);
4116 end Set_Has_Complex_Representation;
4118 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4120 pragma Assert (Ekind (Id) = E_Array_Type);
4122 end Set_Has_Component_Size_Clause;
4124 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4126 pragma Assert (Is_Type (Id));
4127 Set_Flag187 (Id, V);
4128 end Set_Has_Constrained_Partial_View;
4130 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4132 Set_Flag181 (Id, V);
4133 end Set_Has_Contiguous_Rep;
4135 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4137 pragma Assert (Id = Base_Type (Id));
4139 end Set_Has_Controlled_Component;
4141 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4144 end Set_Has_Controlling_Result;
4146 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4148 Set_Flag119 (Id, V);
4149 end Set_Has_Convention_Pragma;
4151 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4154 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4155 and then Is_Base_Type (Id));
4157 end Set_Has_Default_Aspect;
4159 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4161 pragma Assert (Is_Type (Id));
4163 end Set_Has_Default_Init_Cond;
4165 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4167 pragma Assert (Nkind (Id) in N_Entity);
4168 Set_Flag200 (Id, V);
4169 end Set_Has_Delayed_Aspects;
4171 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4173 pragma Assert (Nkind (Id) in N_Entity);
4175 end Set_Has_Delayed_Freeze;
4177 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4179 pragma Assert (Nkind (Id) in N_Entity);
4180 Set_Flag261 (Id, V);
4181 end Set_Has_Delayed_Rep_Aspects;
4183 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4185 pragma Assert (Nkind (Id) in N_Entity);
4187 end Set_Has_Discriminants;
4189 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4191 pragma Assert (Ekind (Id) = E_Record_Type
4192 and then Is_Tagged_Type (Id));
4193 Set_Flag220 (Id, V);
4194 end Set_Has_Dispatch_Table;
4196 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4198 pragma Assert (Is_Type (Id));
4199 Set_Flag258 (Id, V);
4200 end Set_Has_Dynamic_Predicate_Aspect;
4202 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4204 pragma Assert (Is_Enumeration_Type (Id));
4206 end Set_Has_Enumeration_Rep_Clause;
4208 procedure Set_Has_Exit (Id : E; V : B := True) is
4213 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4215 Set_Flag175 (Id, V);
4216 end Set_Has_Forward_Instantiation;
4218 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4220 Set_Flag173 (Id, V);
4221 end Set_Has_Fully_Qualified_Name;
4223 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4226 end Set_Has_Gigi_Rep_Item;
4228 procedure Set_Has_Homonym (Id : E; V : B := True) is
4231 end Set_Has_Homonym;
4233 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4235 Set_Flag251 (Id, V);
4236 end Set_Has_Implicit_Dereference;
4238 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4240 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4241 and then Is_Base_Type (Id));
4243 end Set_Has_Independent_Components;
4245 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4247 pragma Assert (Is_Type (Id));
4248 Set_Flag248 (Id, V);
4249 end Set_Has_Inheritable_Invariants;
4251 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4253 pragma Assert (Is_Type (Id));
4254 Set_Flag133 (Id, V);
4255 end Set_Has_Inherited_Default_Init_Cond;
4257 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4259 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4260 Set_Flag219 (Id, V);
4261 end Set_Has_Initial_Value;
4263 procedure Set_Has_Invariants (Id : E; V : B := True) is
4265 pragma Assert (Is_Type (Id));
4266 Set_Flag232 (Id, V);
4267 end Set_Has_Invariants;
4269 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4271 pragma Assert (Ekind (Id) = E_Loop);
4272 Set_Flag260 (Id, V);
4273 end Set_Has_Loop_Entry_Attributes;
4275 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4277 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4279 end Set_Has_Machine_Radix_Clause;
4281 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4284 end Set_Has_Master_Entity;
4286 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4288 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4289 Set_Flag142 (Id, V);
4290 end Set_Has_Missing_Return;
4292 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4294 Set_Flag101 (Id, V);
4295 end Set_Has_Nested_Block_With_Handler;
4297 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4299 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4300 Set_Flag215 (Id, V);
4301 end Set_Has_Up_Level_Access;
4303 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4305 pragma Assert (Id = Base_Type (Id));
4307 end Set_Has_Non_Standard_Rep;
4309 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4311 pragma Assert (Is_Type (Id));
4312 Set_Flag172 (Id, V);
4313 end Set_Has_Object_Size_Clause;
4315 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4317 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4318 Set_Flag110 (Id, V);
4319 end Set_Has_Out_Or_In_Out_Parameter;
4321 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4323 Set_Flag154 (Id, V);
4324 end Set_Has_Per_Object_Constraint;
4326 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4328 pragma Assert (Is_Subprogram (Id));
4329 Set_Flag240 (Id, V);
4330 end Set_Has_Postconditions;
4332 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4334 pragma Assert (Is_Access_Type (Id));
4335 Set_Flag27 (Base_Type (Id), V);
4336 end Set_Has_Pragma_Controlled;
4338 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4340 Set_Flag150 (Id, V);
4341 end Set_Has_Pragma_Elaborate_Body;
4343 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4345 Set_Flag157 (Id, V);
4346 end Set_Has_Pragma_Inline;
4348 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4350 Set_Flag230 (Id, V);
4351 end Set_Has_Pragma_Inline_Always;
4353 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4355 Set_Flag201 (Id, V);
4356 end Set_Has_Pragma_No_Inline;
4358 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4360 pragma Assert (Is_Enumeration_Type (Id));
4361 pragma Assert (Id = Base_Type (Id));
4362 Set_Flag198 (Id, V);
4363 end Set_Has_Pragma_Ordered;
4365 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4367 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4368 pragma Assert (Id = Base_Type (Id));
4369 Set_Flag121 (Id, V);
4370 end Set_Has_Pragma_Pack;
4372 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4374 Set_Flag221 (Id, V);
4375 end Set_Has_Pragma_Preelab_Init;
4377 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4379 Set_Flag203 (Id, V);
4380 end Set_Has_Pragma_Pure;
4382 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4384 Set_Flag179 (Id, V);
4385 end Set_Has_Pragma_Pure_Function;
4387 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4389 Set_Flag169 (Id, V);
4390 end Set_Has_Pragma_Thread_Local_Storage;
4392 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4394 Set_Flag233 (Id, V);
4395 end Set_Has_Pragma_Unmodified;
4397 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4399 Set_Flag180 (Id, V);
4400 end Set_Has_Pragma_Unreferenced;
4402 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4404 pragma Assert (Is_Type (Id));
4405 Set_Flag212 (Id, V);
4406 end Set_Has_Pragma_Unreferenced_Objects;
4408 procedure Set_Has_Predicates (Id : E; V : B := True) is
4410 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4411 Set_Flag250 (Id, V);
4412 end Set_Has_Predicates;
4414 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4416 pragma Assert (Id = Base_Type (Id));
4417 Set_Flag120 (Id, V);
4418 end Set_Has_Primitive_Operations;
4420 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4422 pragma Assert (Is_Type (Id));
4423 Set_Flag151 (Id, V);
4424 end Set_Has_Private_Ancestor;
4426 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4428 Set_Flag155 (Id, V);
4429 end Set_Has_Private_Declaration;
4431 procedure Set_Has_Protected (Id : E; V : B := True) is
4433 Set_Flag271 (Id, V);
4434 end Set_Has_Protected;
4436 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4438 Set_Flag161 (Id, V);
4439 end Set_Has_Qualified_Name;
4441 procedure Set_Has_RACW (Id : E; V : B := True) is
4443 pragma Assert (Ekind (Id) = E_Package);
4444 Set_Flag214 (Id, V);
4447 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4449 pragma Assert (Id = Base_Type (Id));
4451 end Set_Has_Record_Rep_Clause;
4453 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4455 pragma Assert (Is_Subprogram (Id));
4456 Set_Flag143 (Id, V);
4457 end Set_Has_Recursive_Call;
4459 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4461 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4462 Set_Flag267 (Id, V);
4463 end Set_Has_Shift_Operator;
4465 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4468 end Set_Has_Size_Clause;
4470 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4473 end Set_Has_Small_Clause;
4475 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4477 pragma Assert (Id = Base_Type (Id));
4478 Set_Flag100 (Id, V);
4479 end Set_Has_Specified_Layout;
4481 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4483 pragma Assert (Is_Type (Id));
4484 Set_Flag190 (Id, V);
4485 end Set_Has_Specified_Stream_Input;
4487 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4489 pragma Assert (Is_Type (Id));
4490 Set_Flag191 (Id, V);
4491 end Set_Has_Specified_Stream_Output;
4493 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4495 pragma Assert (Is_Type (Id));
4496 Set_Flag192 (Id, V);
4497 end Set_Has_Specified_Stream_Read;
4499 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4501 pragma Assert (Is_Type (Id));
4502 Set_Flag193 (Id, V);
4503 end Set_Has_Specified_Stream_Write;
4505 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4507 Set_Flag211 (Id, V);
4508 end Set_Has_Static_Discriminants;
4510 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4512 pragma Assert (Is_Type (Id));
4513 Set_Flag269 (Id, V);
4514 end Set_Has_Static_Predicate;
4516 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4518 pragma Assert (Is_Type (Id));
4519 Set_Flag259 (Id, V);
4520 end Set_Has_Static_Predicate_Aspect;
4522 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4524 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4525 pragma Assert (Id = Base_Type (Id));
4527 end Set_Has_Storage_Size_Clause;
4529 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4531 pragma Assert (Is_Elementary_Type (Id));
4532 Set_Flag184 (Id, V);
4533 end Set_Has_Stream_Size_Clause;
4535 procedure Set_Has_Task (Id : E; V : B := True) is
4537 pragma Assert (Id = Base_Type (Id));
4541 procedure Set_Has_Thunks (Id : E; V : B := True) is
4543 pragma Assert (Is_Tag (Id));
4544 Set_Flag228 (Id, V);
4547 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4549 pragma Assert (Id = Base_Type (Id));
4550 Set_Flag123 (Id, V);
4551 end Set_Has_Unchecked_Union;
4553 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4555 pragma Assert (Is_Type (Id));
4557 end Set_Has_Unknown_Discriminants;
4559 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4561 pragma Assert (Ekind (Id) = E_Abstract_State);
4562 Set_Flag263 (Id, V);
4563 end Set_Has_Visible_Refinement;
4565 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4567 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4569 end Set_Has_Volatile_Components;
4571 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4573 Set_Flag182 (Id, V);
4574 end Set_Has_Xref_Entry;
4576 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4578 pragma Assert (Ekind (Id) = E_Variable);
4580 end Set_Hiding_Loop_Variable;
4582 procedure Set_Homonym (Id : E; V : E) is
4584 pragma Assert (Id /= V);
4588 procedure Set_Import_Pragma (Id : E; V : E) is
4590 pragma Assert (Is_Subprogram (Id));
4592 end Set_Import_Pragma;
4594 procedure Set_Interface_Alias (Id : E; V : E) is
4598 and then Is_Hidden (Id)
4599 and then (Ekind_In (Id, E_Procedure, E_Function)));
4601 end Set_Interface_Alias;
4603 procedure Set_Interfaces (Id : E; V : L) is
4605 pragma Assert (Is_Record_Type (Id));
4606 Set_Elist25 (Id, V);
4609 procedure Set_In_Package_Body (Id : E; V : B := True) is
4612 end Set_In_Package_Body;
4614 procedure Set_In_Private_Part (Id : E; V : B := True) is
4617 end Set_In_Private_Part;
4619 procedure Set_In_Use (Id : E; V : B := True) is
4621 pragma Assert (Nkind (Id) in N_Entity);
4625 procedure Set_Initialization_Statements (Id : E; V : N) is
4627 -- Tolerate an E_Void entity since this can be called while resolving
4628 -- an aggregate used as the initialization expression for an object
4629 -- declaration, and this occurs before the Ekind for the object is set.
4631 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4633 end Set_Initialization_Statements;
4635 procedure Set_Inner_Instances (Id : E; V : L) is
4637 Set_Elist23 (Id, V);
4638 end Set_Inner_Instances;
4640 procedure Set_Interface_Name (Id : E; V : N) is
4643 end Set_Interface_Name;
4645 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4647 pragma Assert (Is_Overloadable (Id));
4649 end Set_Is_Abstract_Subprogram;
4651 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4653 pragma Assert (Is_Type (Id));
4654 Set_Flag146 (Id, V);
4655 end Set_Is_Abstract_Type;
4657 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4659 pragma Assert (Is_Access_Type (Id));
4660 Set_Flag194 (Id, V);
4661 end Set_Is_Local_Anonymous_Access;
4663 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4665 pragma Assert (Is_Access_Type (Id));
4667 end Set_Is_Access_Constant;
4669 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4671 Set_Flag185 (Id, V);
4672 end Set_Is_Ada_2005_Only;
4674 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4676 Set_Flag199 (Id, V);
4677 end Set_Is_Ada_2012_Only;
4679 procedure Set_Is_Aliased (Id : E; V : B := True) is
4681 pragma Assert (Nkind (Id) in N_Entity);
4685 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4688 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4690 end Set_Is_Asynchronous;
4692 procedure Set_Is_Atomic (Id : E; V : B := True) is
4697 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4699 pragma Assert ((not V)
4700 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4701 Set_Flag122 (Id, V);
4702 end Set_Is_Bit_Packed_Array;
4704 procedure Set_Is_Called (Id : E; V : B := True) is
4706 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4707 Set_Flag102 (Id, V);
4710 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4713 end Set_Is_Character_Type;
4715 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4718 end Set_Is_Child_Unit;
4720 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4723 end Set_Is_Class_Wide_Equivalent_Type;
4725 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4727 Set_Flag149 (Id, V);
4728 end Set_Is_Compilation_Unit;
4730 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4732 pragma Assert (Ekind (Id) = E_Discriminant);
4733 Set_Flag103 (Id, V);
4734 end Set_Is_Completely_Hidden;
4736 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4739 end Set_Is_Concurrent_Record_Type;
4741 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4744 end Set_Is_Constr_Subt_For_U_Nominal;
4746 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4748 Set_Flag141 (Id, V);
4749 end Set_Is_Constr_Subt_For_UN_Aliased;
4751 procedure Set_Is_Constrained (Id : E; V : B := True) is
4753 pragma Assert (Nkind (Id) in N_Entity);
4755 end Set_Is_Constrained;
4757 procedure Set_Is_Constructor (Id : E; V : B := True) is
4760 end Set_Is_Constructor;
4762 procedure Set_Is_Controlled (Id : E; V : B := True) is
4764 pragma Assert (Id = Base_Type (Id));
4766 end Set_Is_Controlled;
4768 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4770 pragma Assert (Is_Formal (Id));
4772 end Set_Is_Controlling_Formal;
4774 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4777 end Set_Is_CPP_Class;
4779 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
4781 pragma Assert (Ekind (Id) = E_Procedure);
4782 Set_Flag132 (Id, V);
4783 end Set_Is_Default_Init_Cond_Procedure;
4785 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4787 pragma Assert (Is_Type (Id));
4788 Set_Flag223 (Id, V);
4789 end Set_Is_Descendent_Of_Address;
4791 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4793 Set_Flag176 (Id, V);
4794 end Set_Is_Discrim_SO_Function;
4796 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4798 Set_Flag264 (Id, V);
4799 end Set_Is_Discriminant_Check_Function;
4801 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4803 Set_Flag234 (Id, V);
4804 end Set_Is_Dispatch_Table_Entity;
4806 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4811 Is_Overloadable (Id)
4813 Ekind (Id) = E_Subprogram_Type);
4816 end Set_Is_Dispatching_Operation;
4818 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4820 Set_Flag124 (Id, V);
4821 end Set_Is_Eliminated;
4823 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4826 end Set_Is_Entry_Formal;
4828 procedure Set_Is_Exported (Id : E; V : B := True) is
4831 end Set_Is_Exported;
4833 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4836 end Set_Is_First_Subtype;
4838 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4840 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4841 Set_Flag118 (Id, V);
4842 end Set_Is_For_Access_Subtype;
4844 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4846 Set_Flag111 (Id, V);
4847 end Set_Is_Formal_Subprogram;
4849 procedure Set_Is_Frozen (Id : E; V : B := True) is
4851 pragma Assert (Nkind (Id) in N_Entity);
4855 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
4857 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4858 Set_Flag274 (Id, V);
4859 end Set_Is_Generic_Actual_Subprogram;
4861 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4863 pragma Assert (Is_Type (Id));
4865 end Set_Is_Generic_Actual_Type;
4867 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4869 Set_Flag130 (Id, V);
4870 end Set_Is_Generic_Instance;
4872 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4874 pragma Assert (Nkind (Id) in N_Entity);
4876 end Set_Is_Generic_Type;
4878 procedure Set_Is_Hidden (Id : E; V : B := True) is
4883 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
4885 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4887 end Set_Is_Hidden_Non_Overridden_Subpgm;
4889 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4891 Set_Flag171 (Id, V);
4892 end Set_Is_Hidden_Open_Scope;
4894 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4896 pragma Assert (Nkind (Id) in N_Entity);
4898 end Set_Is_Immediately_Visible;
4900 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4902 Set_Flag254 (Id, V);
4903 end Set_Is_Implementation_Defined;
4905 procedure Set_Is_Imported (Id : E; V : B := True) is
4908 end Set_Is_Imported;
4910 procedure Set_Is_Independent (Id : E; V : B := True) is
4912 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4913 Set_Flag268 (Id, V);
4914 end Set_Is_Independent;
4916 procedure Set_Is_Inlined (Id : E; V : B := True) is
4921 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
4923 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4925 end Set_Is_Inlined_Always;
4927 procedure Set_Is_Interface (Id : E; V : B := True) is
4929 pragma Assert (Is_Record_Type (Id));
4930 Set_Flag186 (Id, V);
4931 end Set_Is_Interface;
4933 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4935 Set_Flag126 (Id, V);
4936 end Set_Is_Instantiated;
4938 procedure Set_Is_Internal (Id : E; V : B := True) is
4940 pragma Assert (Nkind (Id) in N_Entity);
4942 end Set_Is_Internal;
4944 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4946 pragma Assert (Nkind (Id) in N_Entity);
4948 end Set_Is_Interrupt_Handler;
4950 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4953 end Set_Is_Intrinsic_Subprogram;
4955 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4957 pragma Assert (Ekind (Id) = E_Procedure);
4958 Set_Flag257 (Id, V);
4959 end Set_Is_Invariant_Procedure;
4961 procedure Set_Is_Itype (Id : E; V : B := True) is
4966 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4969 end Set_Is_Known_Non_Null;
4971 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4973 Set_Flag204 (Id, V);
4974 end Set_Is_Known_Null;
4976 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4978 Set_Flag170 (Id, V);
4979 end Set_Is_Known_Valid;
4981 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4983 pragma Assert (Is_Type (Id));
4984 Set_Flag106 (Id, V);
4985 end Set_Is_Limited_Composite;
4987 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4989 pragma Assert (Is_Interface (Id));
4990 Set_Flag197 (Id, V);
4991 end Set_Is_Limited_Interface;
4993 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4996 end Set_Is_Limited_Record;
4998 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5000 pragma Assert (Is_Subprogram (Id));
5001 Set_Flag137 (Id, V);
5002 end Set_Is_Machine_Code_Subprogram;
5004 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5006 pragma Assert (Is_Type (Id));
5007 Set_Flag109 (Id, V);
5008 end Set_Is_Non_Static_Subtype;
5010 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5012 pragma Assert (Ekind (Id) = E_Procedure);
5013 Set_Flag178 (Id, V);
5014 end Set_Is_Null_Init_Proc;
5016 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5018 Set_Flag153 (Id, V);
5019 end Set_Is_Obsolescent;
5021 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5023 pragma Assert (Ekind (Id) = E_Out_Parameter);
5024 Set_Flag226 (Id, V);
5025 end Set_Is_Only_Out_Parameter;
5027 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5029 Set_Flag160 (Id, V);
5030 end Set_Is_Package_Body_Entity;
5032 procedure Set_Is_Packed (Id : E; V : B := True) is
5034 pragma Assert (Id = Base_Type (Id));
5038 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5040 Set_Flag138 (Id, V);
5041 end Set_Is_Packed_Array_Impl_Type;
5043 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5045 pragma Assert (Nkind (Id) in N_Entity);
5047 end Set_Is_Potentially_Use_Visible;
5049 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5051 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5052 Set_Flag255 (Id, V);
5053 end Set_Is_Predicate_Function;
5055 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5057 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5058 Set_Flag256 (Id, V);
5059 end Set_Is_Predicate_Function_M;
5061 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5064 end Set_Is_Preelaborated;
5066 procedure Set_Is_Primitive (Id : E; V : B := True) is
5069 (Is_Overloadable (Id)
5070 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5071 Set_Flag218 (Id, V);
5072 end Set_Is_Primitive;
5074 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5076 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5077 Set_Flag195 (Id, V);
5078 end Set_Is_Primitive_Wrapper;
5080 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5082 pragma Assert (Is_Type (Id));
5083 Set_Flag107 (Id, V);
5084 end Set_Is_Private_Composite;
5086 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5089 end Set_Is_Private_Descendant;
5091 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5093 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5094 Set_Flag245 (Id, V);
5095 end Set_Is_Private_Primitive;
5097 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5099 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5100 Set_Flag252 (Id, V);
5101 end Set_Is_Processed_Transient;
5103 procedure Set_Is_Public (Id : E; V : B := True) is
5105 pragma Assert (Nkind (Id) in N_Entity);
5109 procedure Set_Is_Pure (Id : E; V : B := True) is
5114 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5116 pragma Assert (Is_Access_Type (Id));
5117 Set_Flag189 (Id, V);
5118 end Set_Is_Pure_Unit_Access_Type;
5120 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5122 pragma Assert (Is_Type (Id));
5123 Set_Flag244 (Id, V);
5124 end Set_Is_RACW_Stub_Type;
5126 procedure Set_Is_Raised (Id : E; V : B := True) is
5128 pragma Assert (Ekind (Id) = E_Exception);
5129 Set_Flag224 (Id, V);
5132 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5135 end Set_Is_Remote_Call_Interface;
5137 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5140 end Set_Is_Remote_Types;
5142 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5144 Set_Flag112 (Id, V);
5145 end Set_Is_Renaming_Of_Object;
5147 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5149 Set_Flag209 (Id, V);
5150 end Set_Is_Return_Object;
5152 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5154 pragma Assert (Ekind (Id) = E_Variable);
5155 Set_Flag249 (Id, V);
5156 end Set_Is_Safe_To_Reevaluate;
5158 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5161 end Set_Is_Shared_Passive;
5163 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5167 or else Ekind_In (Id, E_Exception,
5172 end Set_Is_Statically_Allocated;
5174 procedure Set_Is_Tag (Id : E; V : B := True) is
5176 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5180 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5183 end Set_Is_Tagged_Type;
5185 procedure Set_Is_Thunk (Id : E; V : B := True) is
5187 pragma Assert (Is_Subprogram (Id));
5188 Set_Flag225 (Id, V);
5191 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5193 Set_Flag235 (Id, V);
5194 end Set_Is_Trivial_Subprogram;
5196 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5198 Set_Flag163 (Id, V);
5199 end Set_Is_True_Constant;
5201 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5203 pragma Assert (Id = Base_Type (Id));
5204 Set_Flag117 (Id, V);
5205 end Set_Is_Unchecked_Union;
5207 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5209 pragma Assert (Ekind (Id) = E_Record_Type);
5210 Set_Flag246 (Id, V);
5211 end Set_Is_Underlying_Record_View;
5213 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5215 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5216 Set_Flag144 (Id, V);
5217 end Set_Is_Unsigned_Type;
5219 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5221 pragma Assert (Ekind (Id) = E_Procedure);
5222 Set_Flag127 (Id, V);
5223 end Set_Is_Valued_Procedure;
5225 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5227 Set_Flag206 (Id, V);
5228 end Set_Is_Visible_Formal;
5230 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5232 Set_Flag116 (Id, V);
5233 end Set_Is_Visible_Lib_Unit;
5235 procedure Set_Is_Volatile (Id : E; V : B := True) is
5237 pragma Assert (Nkind (Id) in N_Entity);
5239 end Set_Is_Volatile;
5241 procedure Set_Itype_Printed (Id : E; V : B := True) is
5243 pragma Assert (Is_Itype (Id));
5244 Set_Flag202 (Id, V);
5245 end Set_Itype_Printed;
5247 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5250 end Set_Kill_Elaboration_Checks;
5252 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5255 end Set_Kill_Range_Checks;
5257 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5259 pragma Assert (Is_Type (Id));
5260 Set_Flag207 (Id, V);
5261 end Set_Known_To_Have_Preelab_Init;
5263 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5265 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5267 end Set_Last_Aggregate_Assignment;
5269 procedure Set_Last_Assignment (Id : E; V : N) is
5271 pragma Assert (Is_Assignable (Id));
5273 end Set_Last_Assignment;
5275 procedure Set_Last_Entity (Id : E; V : E) is
5278 end Set_Last_Entity;
5280 procedure Set_Limited_View (Id : E; V : E) is
5282 pragma Assert (Ekind (Id) = E_Package);
5284 end Set_Limited_View;
5286 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5288 pragma Assert (Is_Type (Id)
5289 or else Ekind_In (Id, E_Constant, E_Variable)
5290 or else Is_Subprogram (Id));
5292 end Set_Linker_Section_Pragma;
5294 procedure Set_Lit_Indexes (Id : E; V : E) is
5296 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5298 end Set_Lit_Indexes;
5300 procedure Set_Lit_Strings (Id : E; V : E) is
5302 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5304 end Set_Lit_Strings;
5306 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5308 pragma Assert (Is_Formal (Id));
5309 Set_Flag205 (Id, V);
5310 end Set_Low_Bound_Tested;
5312 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5314 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5316 end Set_Machine_Radix_10;
5318 procedure Set_Master_Id (Id : E; V : E) is
5320 pragma Assert (Is_Access_Type (Id));
5324 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5326 Set_Flag168 (Id, V);
5327 end Set_Materialize_Entity;
5329 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5331 Set_Flag262 (Id, V);
5332 end Set_May_Inherit_Delayed_Rep_Aspects;
5334 procedure Set_Mechanism (Id : E; V : M) is
5336 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5337 Set_Uint8 (Id, UI_From_Int (V));
5340 procedure Set_Modulus (Id : E; V : U) is
5342 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5346 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5348 pragma Assert (Is_Type (Id));
5349 Set_Flag183 (Id, V);
5350 end Set_Must_Be_On_Byte_Boundary;
5352 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5354 pragma Assert (Is_Type (Id));
5355 Set_Flag208 (Id, V);
5356 end Set_Must_Have_Preelab_Init;
5358 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5360 Set_Flag147 (Id, V);
5361 end Set_Needs_Debug_Info;
5363 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5366 (Is_Overloadable (Id)
5367 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5369 end Set_Needs_No_Actuals;
5371 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5373 Set_Flag115 (Id, V);
5374 end Set_Never_Set_In_Source;
5376 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5379 end Set_Next_Inlined_Subprogram;
5381 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5383 pragma Assert (Is_Discrete_Type (Id));
5384 Set_Flag276 (Id, V);
5385 end Set_No_Dynamic_Predicate_On_Actual;
5387 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5389 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5390 Set_Flag131 (Id, V);
5391 end Set_No_Pool_Assigned;
5393 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5395 pragma Assert (Is_Discrete_Type (Id));
5396 Set_Flag275 (Id, V);
5397 end Set_No_Predicate_On_Actual;
5399 procedure Set_No_Return (Id : E; V : B := True) is
5402 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5403 Set_Flag113 (Id, V);
5406 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5408 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5409 Set_Flag136 (Id, V);
5410 end Set_No_Strict_Aliasing;
5412 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5414 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5416 end Set_Non_Binary_Modulus;
5418 procedure Set_Non_Limited_View (Id : E; V : E) is
5421 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5423 end Set_Non_Limited_View;
5425 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5428 (Root_Type (Id) = Standard_Boolean
5429 and then Ekind (Id) = E_Enumeration_Type);
5430 Set_Flag162 (Id, V);
5431 end Set_Nonzero_Is_True;
5433 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5435 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5437 end Set_Normalized_First_Bit;
5439 procedure Set_Normalized_Position (Id : E; V : U) is
5441 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5443 end Set_Normalized_Position;
5445 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5447 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5449 end Set_Normalized_Position_Max;
5451 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5453 pragma Assert (Ekind (Id) = E_Variable);
5454 Set_Flag247 (Id, V);
5455 end Set_OK_To_Rename;
5457 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5460 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5461 Set_Flag239 (Id, V);
5462 end Set_OK_To_Reorder_Components;
5464 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5467 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5468 Set_Flag241 (Id, V);
5469 end Set_Optimize_Alignment_Space;
5471 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5474 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5475 Set_Flag242 (Id, V);
5476 end Set_Optimize_Alignment_Time;
5478 procedure Set_Original_Access_Type (Id : E; V : E) is
5480 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5482 end Set_Original_Access_Type;
5484 procedure Set_Original_Array_Type (Id : E; V : E) is
5486 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5488 end Set_Original_Array_Type;
5490 procedure Set_Original_Record_Component (Id : E; V : E) is
5492 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5494 end Set_Original_Record_Component;
5496 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5498 Set_Flag243 (Id, V);
5499 end Set_Overlays_Constant;
5501 procedure Set_Overridden_Operation (Id : E; V : E) is
5504 end Set_Overridden_Operation;
5506 procedure Set_Package_Instantiation (Id : E; V : N) is
5508 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5510 end Set_Package_Instantiation;
5512 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5514 pragma Assert (Is_Array_Type (Id));
5516 end Set_Packed_Array_Impl_Type;
5518 procedure Set_Parent_Subtype (Id : E; V : E) is
5520 pragma Assert (Ekind (Id) = E_Record_Type);
5522 end Set_Parent_Subtype;
5524 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5526 pragma Assert (Ekind (Id) = E_Abstract_State);
5528 end Set_Part_Of_Constituents;
5530 procedure Set_Postcondition_Proc (Id : E; V : E) is
5532 pragma Assert (Ekind (Id) = E_Procedure);
5534 end Set_Postcondition_Proc;
5536 procedure Set_PPC_Wrapper (Id : E; V : E) is
5538 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5540 end Set_PPC_Wrapper;
5542 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5544 pragma Assert (Is_Tagged_Type (Id));
5545 Set_Elist10 (Id, V);
5546 end Set_Direct_Primitive_Operations;
5548 procedure Set_Prival (Id : E; V : E) is
5550 pragma Assert (Is_Protected_Component (Id));
5554 procedure Set_Prival_Link (Id : E; V : E) is
5556 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5558 end Set_Prival_Link;
5560 procedure Set_Private_Dependents (Id : E; V : L) is
5562 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5563 Set_Elist18 (Id, V);
5564 end Set_Private_Dependents;
5566 procedure Set_Private_View (Id : E; V : N) is
5568 pragma Assert (Is_Private_Type (Id));
5570 end Set_Private_View;
5572 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5574 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5576 end Set_Protected_Body_Subprogram;
5578 procedure Set_Protected_Formal (Id : E; V : E) is
5580 pragma Assert (Is_Formal (Id));
5582 end Set_Protected_Formal;
5584 procedure Set_Protection_Object (Id : E; V : E) is
5586 pragma Assert (Ekind_In (Id, E_Entry,
5591 end Set_Protection_Object;
5593 procedure Set_Reachable (Id : E; V : B := True) is
5598 procedure Set_Referenced (Id : E; V : B := True) is
5600 Set_Flag156 (Id, V);
5603 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5606 end Set_Referenced_As_LHS;
5608 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5610 Set_Flag227 (Id, V);
5611 end Set_Referenced_As_Out_Parameter;
5613 procedure Set_Refinement_Constituents (Id : E; V : L) is
5615 pragma Assert (Ekind (Id) = E_Abstract_State);
5617 end Set_Refinement_Constituents;
5619 procedure Set_Register_Exception_Call (Id : E; V : N) is
5621 pragma Assert (Ekind (Id) = E_Exception);
5623 end Set_Register_Exception_Call;
5625 procedure Set_Related_Array_Object (Id : E; V : E) is
5627 pragma Assert (Is_Array_Type (Id));
5629 end Set_Related_Array_Object;
5631 procedure Set_Related_Expression (Id : E; V : N) is
5633 pragma Assert (Ekind (Id) in Type_Kind
5634 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5636 end Set_Related_Expression;
5638 procedure Set_Related_Instance (Id : E; V : E) is
5640 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5642 end Set_Related_Instance;
5644 procedure Set_Related_Type (Id : E; V : E) is
5646 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5648 end Set_Related_Type;
5650 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5652 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5654 end Set_Relative_Deadline_Variable;
5656 procedure Set_Renamed_Entity (Id : E; V : N) is
5659 end Set_Renamed_Entity;
5661 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5663 pragma Assert (Ekind (Id) = E_Package);
5664 Set_Flag231 (Id, V);
5665 end Set_Renamed_In_Spec;
5667 procedure Set_Renamed_Object (Id : E; V : N) is
5670 end Set_Renamed_Object;
5672 procedure Set_Renaming_Map (Id : E; V : U) is
5675 end Set_Renaming_Map;
5677 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5679 pragma Assert (Is_Overloadable (Id));
5680 Set_Flag213 (Id, V);
5681 end Set_Requires_Overriding;
5683 procedure Set_Return_Present (Id : E; V : B := True) is
5686 end Set_Return_Present;
5688 procedure Set_Return_Applies_To (Id : E; V : N) is
5691 end Set_Return_Applies_To;
5693 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5696 end Set_Returns_By_Ref;
5698 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5701 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5702 Set_Flag164 (Id, V);
5703 end Set_Reverse_Bit_Order;
5705 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5709 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5711 end Set_Reverse_Storage_Order;
5713 procedure Set_RM_Size (Id : E; V : U) is
5715 pragma Assert (Is_Type (Id));
5719 procedure Set_Scalar_Range (Id : E; V : N) is
5722 end Set_Scalar_Range;
5724 procedure Set_Scale_Value (Id : E; V : U) is
5727 end Set_Scale_Value;
5729 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5731 pragma Assert (not Is_Record_Type (Id));
5733 end Set_Scope_Depth_Value;
5735 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5737 Set_Flag167 (Id, V);
5738 end Set_Sec_Stack_Needed_For_Return;
5740 procedure Set_Shadow_Entities (Id : E; V : S) is
5742 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5744 end Set_Shadow_Entities;
5746 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5748 pragma Assert (Ekind (Id) = E_Variable);
5750 end Set_Shared_Var_Procs_Instance;
5752 procedure Set_Size_Check_Code (Id : E; V : N) is
5754 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5756 end Set_Size_Check_Code;
5758 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5760 Set_Flag177 (Id, V);
5761 end Set_Size_Depends_On_Discriminant;
5763 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5766 end Set_Size_Known_At_Compile_Time;
5768 procedure Set_Small_Value (Id : E; V : R) is
5770 pragma Assert (Is_Fixed_Point_Type (Id));
5771 Set_Ureal21 (Id, V);
5772 end Set_Small_Value;
5774 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5777 (Ekind_In (Id, E_Generic_Package, -- package variants
5782 end Set_SPARK_Aux_Pragma;
5784 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5787 (Ekind_In (Id, E_Generic_Package, -- package variants
5791 Set_Flag266 (Id, V);
5792 end Set_SPARK_Aux_Pragma_Inherited;
5794 procedure Set_SPARK_Pragma (Id : E; V : N) is
5797 (Ekind_In (Id, E_Function, -- subprogram variants
5799 E_Generic_Procedure,
5803 Ekind_In (Id, E_Generic_Package, -- package variants
5808 end Set_SPARK_Pragma;
5810 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5813 (Ekind_In (Id, E_Function, -- subprogram variants
5815 E_Generic_Procedure,
5819 Ekind_In (Id, E_Generic_Package, -- package variants
5823 Set_Flag265 (Id, V);
5824 end Set_SPARK_Pragma_Inherited;
5826 procedure Set_Spec_Entity (Id : E; V : E) is
5828 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5830 end Set_Spec_Entity;
5832 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
5836 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5837 Set_Flag273 (Id, V);
5838 end Set_SSO_Set_High_By_Default;
5840 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
5844 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5845 Set_Flag272 (Id, V);
5846 end Set_SSO_Set_Low_By_Default;
5848 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
5850 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5852 end Set_Static_Discrete_Predicate;
5854 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
5856 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
5857 and then Has_Predicates (Id));
5859 end Set_Static_Real_Or_String_Predicate;
5861 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5863 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5865 end Set_Status_Flag_Or_Transient_Decl;
5867 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5869 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5870 pragma Assert (Id = Base_Type (Id));
5872 end Set_Storage_Size_Variable;
5874 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5876 pragma Assert (Ekind (Id) = E_Package);
5878 end Set_Static_Elaboration_Desired;
5880 procedure Set_Static_Initialization (Id : E; V : N) is
5883 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5885 end Set_Static_Initialization;
5887 procedure Set_Stored_Constraint (Id : E; V : L) is
5889 pragma Assert (Nkind (Id) in N_Entity);
5890 Set_Elist23 (Id, V);
5891 end Set_Stored_Constraint;
5893 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5895 pragma Assert (Ekind (Id) = E_Constant);
5896 Set_Flag270 (Id, V);
5897 end Set_Stores_Attribute_Old_Prefix;
5899 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5901 pragma Assert (Id = Base_Type (Id));
5902 Set_Flag145 (Id, V);
5903 end Set_Strict_Alignment;
5905 procedure Set_String_Literal_Length (Id : E; V : U) is
5907 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5909 end Set_String_Literal_Length;
5911 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5913 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5915 end Set_String_Literal_Low_Bound;
5917 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5919 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5921 end Set_Subprograms_For_Type;
5923 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5925 Set_Flag148 (Id, V);
5926 end Set_Suppress_Elaboration_Warnings;
5928 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5930 pragma Assert (Is_Type (Id));
5931 Set_Flag105 (Id, V);
5932 end Set_Suppress_Initialization;
5934 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5936 Set_Flag165 (Id, V);
5937 end Set_Suppress_Style_Checks;
5939 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5941 Set_Flag217 (Id, V);
5942 end Set_Suppress_Value_Tracking_On_Call;
5944 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5946 pragma Assert (Ekind (Id) in Task_Kind);
5948 end Set_Task_Body_Procedure;
5950 procedure Set_Thunk_Entity (Id : E; V : E) is
5952 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5953 and then Is_Thunk (Id));
5955 end Set_Thunk_Entity;
5957 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5960 end Set_Treat_As_Volatile;
5962 procedure Set_Underlying_Full_View (Id : E; V : E) is
5964 pragma Assert (Ekind (Id) in Private_Kind);
5966 end Set_Underlying_Full_View;
5968 procedure Set_Underlying_Record_View (Id : E; V : E) is
5970 pragma Assert (Ekind (Id) = E_Record_Type);
5972 end Set_Underlying_Record_View;
5974 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5976 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5977 Set_Flag216 (Id, V);
5978 end Set_Universal_Aliasing;
5980 procedure Set_Unset_Reference (Id : E; V : N) is
5983 end Set_Unset_Reference;
5985 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5987 Set_Flag222 (Id, V);
5988 end Set_Used_As_Generic_Actual;
5990 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5992 pragma Assert (Ekind (Id) = E_Protected_Type);
5993 Set_Flag188 (Id, V);
5994 end Set_Uses_Lock_Free;
5996 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5999 end Set_Uses_Sec_Stack;
6001 procedure Set_Warnings_Off (Id : E; V : B := True) is
6004 end Set_Warnings_Off;
6006 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6008 Set_Flag236 (Id, V);
6009 end Set_Warnings_Off_Used;
6011 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6013 Set_Flag237 (Id, V);
6014 end Set_Warnings_Off_Used_Unmodified;
6016 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6018 Set_Flag238 (Id, V);
6019 end Set_Warnings_Off_Used_Unreferenced;
6021 procedure Set_Was_Hidden (Id : E; V : B := True) is
6023 Set_Flag196 (Id, V);
6026 procedure Set_Wrapped_Entity (Id : E; V : E) is
6028 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6029 and then Is_Primitive_Wrapper (Id));
6031 end Set_Wrapped_Entity;
6033 -----------------------------------
6034 -- Field Initialization Routines --
6035 -----------------------------------
6037 procedure Init_Alignment (Id : E) is
6039 Set_Uint14 (Id, Uint_0);
6042 procedure Init_Alignment (Id : E; V : Int) is
6044 Set_Uint14 (Id, UI_From_Int (V));
6047 procedure Init_Component_Bit_Offset (Id : E) is
6049 Set_Uint11 (Id, No_Uint);
6050 end Init_Component_Bit_Offset;
6052 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6054 Set_Uint11 (Id, UI_From_Int (V));
6055 end Init_Component_Bit_Offset;
6057 procedure Init_Component_Size (Id : E) is
6059 Set_Uint22 (Id, Uint_0);
6060 end Init_Component_Size;
6062 procedure Init_Component_Size (Id : E; V : Int) is
6064 Set_Uint22 (Id, UI_From_Int (V));
6065 end Init_Component_Size;
6067 procedure Init_Digits_Value (Id : E) is
6069 Set_Uint17 (Id, Uint_0);
6070 end Init_Digits_Value;
6072 procedure Init_Digits_Value (Id : E; V : Int) is
6074 Set_Uint17 (Id, UI_From_Int (V));
6075 end Init_Digits_Value;
6077 procedure Init_Esize (Id : E) is
6079 Set_Uint12 (Id, Uint_0);
6082 procedure Init_Esize (Id : E; V : Int) is
6084 Set_Uint12 (Id, UI_From_Int (V));
6087 procedure Init_Normalized_First_Bit (Id : E) is
6089 Set_Uint8 (Id, No_Uint);
6090 end Init_Normalized_First_Bit;
6092 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6094 Set_Uint8 (Id, UI_From_Int (V));
6095 end Init_Normalized_First_Bit;
6097 procedure Init_Normalized_Position (Id : E) is
6099 Set_Uint14 (Id, No_Uint);
6100 end Init_Normalized_Position;
6102 procedure Init_Normalized_Position (Id : E; V : Int) is
6104 Set_Uint14 (Id, UI_From_Int (V));
6105 end Init_Normalized_Position;
6107 procedure Init_Normalized_Position_Max (Id : E) is
6109 Set_Uint10 (Id, No_Uint);
6110 end Init_Normalized_Position_Max;
6112 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6114 Set_Uint10 (Id, UI_From_Int (V));
6115 end Init_Normalized_Position_Max;
6117 procedure Init_RM_Size (Id : E) is
6119 Set_Uint13 (Id, Uint_0);
6122 procedure Init_RM_Size (Id : E; V : Int) is
6124 Set_Uint13 (Id, UI_From_Int (V));
6127 -----------------------------
6128 -- Init_Component_Location --
6129 -----------------------------
6131 procedure Init_Component_Location (Id : E) is
6133 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6134 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6135 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6136 Set_Uint12 (Id, Uint_0); -- Esize
6137 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6138 end Init_Component_Location;
6140 ----------------------------
6141 -- Init_Object_Size_Align --
6142 ----------------------------
6144 procedure Init_Object_Size_Align (Id : E) is
6146 Set_Uint12 (Id, Uint_0); -- Esize
6147 Set_Uint14 (Id, Uint_0); -- Alignment
6148 end Init_Object_Size_Align;
6154 procedure Init_Size (Id : E; V : Int) is
6156 pragma Assert (not Is_Object (Id));
6157 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6158 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6161 ---------------------
6162 -- Init_Size_Align --
6163 ---------------------
6165 procedure Init_Size_Align (Id : E) is
6167 pragma Assert (not Is_Object (Id));
6168 Set_Uint12 (Id, Uint_0); -- Esize
6169 Set_Uint13 (Id, Uint_0); -- RM_Size
6170 Set_Uint14 (Id, Uint_0); -- Alignment
6171 end Init_Size_Align;
6173 ----------------------------------------------
6174 -- Type Representation Attribute Predicates --
6175 ----------------------------------------------
6177 function Known_Alignment (E : Entity_Id) return B is
6179 return Uint14 (E) /= Uint_0
6180 and then Uint14 (E) /= No_Uint;
6181 end Known_Alignment;
6183 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6185 return Uint11 (E) /= No_Uint;
6186 end Known_Component_Bit_Offset;
6188 function Known_Component_Size (E : Entity_Id) return B is
6190 return Uint22 (Base_Type (E)) /= Uint_0
6191 and then Uint22 (Base_Type (E)) /= No_Uint;
6192 end Known_Component_Size;
6194 function Known_Esize (E : Entity_Id) return B is
6196 return Uint12 (E) /= Uint_0
6197 and then Uint12 (E) /= No_Uint;
6200 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6202 return Uint8 (E) /= No_Uint;
6203 end Known_Normalized_First_Bit;
6205 function Known_Normalized_Position (E : Entity_Id) return B is
6207 return Uint14 (E) /= No_Uint;
6208 end Known_Normalized_Position;
6210 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6212 return Uint10 (E) /= No_Uint;
6213 end Known_Normalized_Position_Max;
6215 function Known_RM_Size (E : Entity_Id) return B is
6217 return Uint13 (E) /= No_Uint
6218 and then (Uint13 (E) /= Uint_0
6219 or else Is_Discrete_Type (E)
6220 or else Is_Fixed_Point_Type (E));
6223 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6225 return Uint11 (E) /= No_Uint
6226 and then Uint11 (E) >= Uint_0;
6227 end Known_Static_Component_Bit_Offset;
6229 function Known_Static_Component_Size (E : Entity_Id) return B is
6231 return Uint22 (Base_Type (E)) > Uint_0;
6232 end Known_Static_Component_Size;
6234 function Known_Static_Esize (E : Entity_Id) return B is
6236 return Uint12 (E) > Uint_0
6237 and then not Is_Generic_Type (E);
6238 end Known_Static_Esize;
6240 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6242 return Uint8 (E) /= No_Uint
6243 and then Uint8 (E) >= Uint_0;
6244 end Known_Static_Normalized_First_Bit;
6246 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6248 return Uint14 (E) /= No_Uint
6249 and then Uint14 (E) >= Uint_0;
6250 end Known_Static_Normalized_Position;
6252 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6254 return Uint10 (E) /= No_Uint
6255 and then Uint10 (E) >= Uint_0;
6256 end Known_Static_Normalized_Position_Max;
6258 function Known_Static_RM_Size (E : Entity_Id) return B is
6260 return (Uint13 (E) > Uint_0
6261 or else Is_Discrete_Type (E)
6262 or else Is_Fixed_Point_Type (E))
6263 and then not Is_Generic_Type (E);
6264 end Known_Static_RM_Size;
6266 function Unknown_Alignment (E : Entity_Id) return B is
6268 return Uint14 (E) = Uint_0
6269 or else Uint14 (E) = No_Uint;
6270 end Unknown_Alignment;
6272 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6274 return Uint11 (E) = No_Uint;
6275 end Unknown_Component_Bit_Offset;
6277 function Unknown_Component_Size (E : Entity_Id) return B is
6279 return Uint22 (Base_Type (E)) = Uint_0
6281 Uint22 (Base_Type (E)) = No_Uint;
6282 end Unknown_Component_Size;
6284 function Unknown_Esize (E : Entity_Id) return B is
6286 return Uint12 (E) = No_Uint
6288 Uint12 (E) = Uint_0;
6291 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6293 return Uint8 (E) = No_Uint;
6294 end Unknown_Normalized_First_Bit;
6296 function Unknown_Normalized_Position (E : Entity_Id) return B is
6298 return Uint14 (E) = No_Uint;
6299 end Unknown_Normalized_Position;
6301 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6303 return Uint10 (E) = No_Uint;
6304 end Unknown_Normalized_Position_Max;
6306 function Unknown_RM_Size (E : Entity_Id) return B is
6308 return (Uint13 (E) = Uint_0
6309 and then not Is_Discrete_Type (E)
6310 and then not Is_Fixed_Point_Type (E))
6311 or else Uint13 (E) = No_Uint;
6312 end Unknown_RM_Size;
6314 --------------------
6315 -- Address_Clause --
6316 --------------------
6318 function Address_Clause (Id : E) return N is
6320 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6327 function Aft_Value (Id : E) return U is
6329 Delta_Val : Ureal := Delta_Value (Id);
6331 while Delta_Val < Ureal_Tenth loop
6332 Delta_Val := Delta_Val * Ureal_10;
6333 Result := Result + 1;
6336 return UI_From_Int (Result);
6339 ----------------------
6340 -- Alignment_Clause --
6341 ----------------------
6343 function Alignment_Clause (Id : E) return N is
6345 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6346 end Alignment_Clause;
6352 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6354 if Last_Entity (V) = Empty then
6355 Set_First_Entity (Id => V, V => Id);
6357 Set_Next_Entity (Last_Entity (V), Id);
6360 Set_Next_Entity (Id, Empty);
6362 Set_Last_Entity (Id => V, V => Id);
6369 function Base_Type (Id : E) return E is
6371 if Is_Base_Type (Id) then
6374 pragma Assert (Is_Type (Id));
6379 -------------------------
6380 -- Component_Alignment --
6381 -------------------------
6383 -- Component Alignment is encoded using two flags, Flag128/129 as
6384 -- follows. Note that both flags False = Align_Default, so that the
6385 -- default initialization of flags to False initializes component
6386 -- alignment to the default value as required.
6388 -- Flag128 Flag129 Value
6389 -- ------- ------- -----
6390 -- False False Calign_Default
6391 -- False True Calign_Component_Size
6392 -- True False Calign_Component_Size_4
6393 -- True True Calign_Storage_Unit
6395 function Component_Alignment (Id : E) return C is
6396 BT : constant Node_Id := Base_Type (Id);
6399 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6401 if Flag128 (BT) then
6402 if Flag129 (BT) then
6403 return Calign_Storage_Unit;
6405 return Calign_Component_Size_4;
6409 if Flag129 (BT) then
6410 return Calign_Component_Size;
6412 return Calign_Default;
6415 end Component_Alignment;
6417 ----------------------
6418 -- Declaration_Node --
6419 ----------------------
6421 function Declaration_Node (Id : E) return N is
6425 if Ekind (Id) = E_Incomplete_Type
6426 and then Present (Full_View (Id))
6428 P := Parent (Full_View (Id));
6434 if Nkind (P) /= N_Selected_Component
6435 and then Nkind (P) /= N_Expanded_Name
6437 not (Nkind (P) = N_Defining_Program_Unit_Name
6438 and then Is_Child_Unit (Id))
6445 end Declaration_Node;
6447 ---------------------------------
6448 -- Default_Init_Cond_Procedure --
6449 ---------------------------------
6451 function Default_Init_Cond_Procedure (Id : E) return E is
6457 and then (Has_Default_Init_Cond (Id)
6458 or Has_Inherited_Default_Init_Cond (Id)));
6460 S := Subprograms_For_Type (Id);
6461 while Present (S) loop
6462 if Is_Default_Init_Cond_Procedure (S) then
6466 S := Subprograms_For_Type (S);
6470 end Default_Init_Cond_Procedure;
6472 ---------------------
6473 -- Designated_Type --
6474 ---------------------
6476 function Designated_Type (Id : E) return E is
6480 Desig_Type := Directly_Designated_Type (Id);
6482 if Ekind (Desig_Type) = E_Incomplete_Type
6483 and then Present (Full_View (Desig_Type))
6485 return Full_View (Desig_Type);
6487 elsif Is_Class_Wide_Type (Desig_Type)
6488 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6489 and then Present (Full_View (Etype (Desig_Type)))
6490 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6492 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6497 end Designated_Type;
6499 ----------------------
6500 -- Entry_Index_Type --
6501 ----------------------
6503 function Entry_Index_Type (Id : E) return N is
6505 pragma Assert (Ekind (Id) = E_Entry_Family);
6506 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6507 end Entry_Index_Type;
6509 ---------------------
6510 -- First_Component --
6511 ---------------------
6513 function First_Component (Id : E) return E is
6518 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6520 Comp_Id := First_Entity (Id);
6521 while Present (Comp_Id) loop
6522 exit when Ekind (Comp_Id) = E_Component;
6523 Comp_Id := Next_Entity (Comp_Id);
6527 end First_Component;
6529 -------------------------------------
6530 -- First_Component_Or_Discriminant --
6531 -------------------------------------
6533 function First_Component_Or_Discriminant (Id : E) return E is
6538 (Is_Record_Type (Id)
6539 or else Is_Incomplete_Or_Private_Type (Id)
6540 or else Has_Discriminants (Id));
6542 Comp_Id := First_Entity (Id);
6543 while Present (Comp_Id) loop
6544 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6545 Comp_Id := Next_Entity (Comp_Id);
6549 end First_Component_Or_Discriminant;
6555 function First_Formal (Id : E) return E is
6560 (Is_Overloadable (Id)
6561 or else Ekind_In (Id, E_Entry_Family,
6563 E_Subprogram_Type));
6565 if Ekind (Id) = E_Enumeration_Literal then
6569 Formal := First_Entity (Id);
6571 if Present (Formal) and then Is_Formal (Formal) then
6579 ------------------------------
6580 -- First_Formal_With_Extras --
6581 ------------------------------
6583 function First_Formal_With_Extras (Id : E) return E is
6588 (Is_Overloadable (Id)
6589 or else Ekind_In (Id, E_Entry_Family,
6591 E_Subprogram_Type));
6593 if Ekind (Id) = E_Enumeration_Literal then
6597 Formal := First_Entity (Id);
6599 if Present (Formal) and then Is_Formal (Formal) then
6602 return Extra_Formals (Id); -- Empty if no extra formals
6605 end First_Formal_With_Extras;
6607 -------------------------------------
6608 -- Get_Attribute_Definition_Clause --
6609 -------------------------------------
6611 function Get_Attribute_Definition_Clause
6613 Id : Attribute_Id) return Node_Id
6618 N := First_Rep_Item (E);
6619 while Present (N) loop
6620 if Nkind (N) = N_Attribute_Definition_Clause
6621 and then Get_Attribute_Id (Chars (N)) = Id
6630 end Get_Attribute_Definition_Clause;
6636 function Get_Full_View (T : Entity_Id) return Entity_Id is
6638 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6639 return Full_View (T);
6641 elsif Is_Class_Wide_Type (T)
6642 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6643 and then Present (Full_View (Root_Type (T)))
6645 return Class_Wide_Type (Full_View (Root_Type (T)));
6656 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6657 Is_CDG : constant Boolean :=
6658 Id = Pragma_Abstract_State or else
6659 Id = Pragma_Async_Readers or else
6660 Id = Pragma_Async_Writers or else
6661 Id = Pragma_Depends or else
6662 Id = Pragma_Effective_Reads or else
6663 Id = Pragma_Effective_Writes or else
6664 Id = Pragma_Global or else
6665 Id = Pragma_Initial_Condition or else
6666 Id = Pragma_Initializes or else
6667 Id = Pragma_Part_Of or else
6668 Id = Pragma_Refined_Depends or else
6669 Id = Pragma_Refined_Global or else
6670 Id = Pragma_Refined_State;
6671 Is_CTC : constant Boolean :=
6672 Id = Pragma_Contract_Cases or else
6673 Id = Pragma_Test_Case;
6674 Is_PPC : constant Boolean :=
6675 Id = Pragma_Precondition or else
6676 Id = Pragma_Postcondition or else
6677 Id = Pragma_Refined_Post;
6679 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6685 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6686 -- extracted from their specialized list.
6689 Items := Contract (E);
6695 Item := Classifications (Items);
6698 Item := Contract_Test_Cases (Items);
6701 Item := Pre_Post_Conditions (Items);
6707 Item := First_Rep_Item (E);
6710 while Present (Item) loop
6711 if Nkind (Item) = N_Pragma
6712 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6716 -- All nodes in N_Contract are chained using Next_Pragma
6718 elsif In_Contract then
6719 Item := Next_Pragma (Item);
6724 Next_Rep_Item (Item);
6731 --------------------------------------
6732 -- Get_Record_Representation_Clause --
6733 --------------------------------------
6735 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6739 N := First_Rep_Item (E);
6740 while Present (N) loop
6741 if Nkind (N) = N_Record_Representation_Clause then
6749 end Get_Record_Representation_Clause;
6751 ------------------------
6752 -- Has_Attach_Handler --
6753 ------------------------
6755 function Has_Attach_Handler (Id : E) return B is
6759 pragma Assert (Is_Protected_Type (Id));
6761 Ritem := First_Rep_Item (Id);
6762 while Present (Ritem) loop
6763 if Nkind (Ritem) = N_Pragma
6764 and then Pragma_Name (Ritem) = Name_Attach_Handler
6768 Next_Rep_Item (Ritem);
6773 end Has_Attach_Handler;
6779 function Has_Entries (Id : E) return B is
6783 pragma Assert (Is_Concurrent_Type (Id));
6785 Ent := First_Entity (Id);
6786 while Present (Ent) loop
6787 if Is_Entry (Ent) then
6791 Ent := Next_Entity (Ent);
6797 ----------------------------
6798 -- Has_Foreign_Convention --
6799 ----------------------------
6801 function Has_Foreign_Convention (Id : E) return B is
6803 -- While regular Intrinsics such as the Standard operators fit in the
6804 -- "Ada" convention, those with an Interface_Name materialize GCC
6805 -- builtin imports for which Ada special treatments shouldn't apply.
6807 return Convention (Id) in Foreign_Convention
6808 or else (Convention (Id) = Convention_Intrinsic
6809 and then Present (Interface_Name (Id)));
6810 end Has_Foreign_Convention;
6812 ---------------------------
6813 -- Has_Interrupt_Handler --
6814 ---------------------------
6816 function Has_Interrupt_Handler (Id : E) return B is
6820 pragma Assert (Is_Protected_Type (Id));
6822 Ritem := First_Rep_Item (Id);
6823 while Present (Ritem) loop
6824 if Nkind (Ritem) = N_Pragma
6825 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6829 Next_Rep_Item (Ritem);
6834 end Has_Interrupt_Handler;
6836 -----------------------------
6837 -- Has_Non_Null_Refinement --
6838 -----------------------------
6840 function Has_Non_Null_Refinement (Id : E) return B is
6842 -- "Refinement" is a concept applicable only to abstract states
6844 pragma Assert (Ekind (Id) = E_Abstract_State);
6846 if Has_Visible_Refinement (Id) then
6847 pragma Assert (Present (Refinement_Constituents (Id)));
6849 -- For a refinement to be non-null, the first constituent must be
6850 -- anything other than null.
6853 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6857 end Has_Non_Null_Refinement;
6859 -----------------------------
6860 -- Has_Null_Abstract_State --
6861 -----------------------------
6863 function Has_Null_Abstract_State (Id : E) return B is
6865 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6868 Present (Abstract_States (Id))
6869 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6870 end Has_Null_Abstract_State;
6872 -------------------------
6873 -- Has_Null_Refinement --
6874 -------------------------
6876 function Has_Null_Refinement (Id : E) return B is
6878 -- "Refinement" is a concept applicable only to abstract states
6880 pragma Assert (Ekind (Id) = E_Abstract_State);
6882 if Has_Visible_Refinement (Id) then
6883 pragma Assert (Present (Refinement_Constituents (Id)));
6885 -- For a refinement to be null, the state's sole constituent must be
6889 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6893 end Has_Null_Refinement;
6895 --------------------
6896 -- Has_Unmodified --
6897 --------------------
6899 function Has_Unmodified (E : Entity_Id) return Boolean is
6901 if Has_Pragma_Unmodified (E) then
6903 elsif Warnings_Off (E) then
6904 Set_Warnings_Off_Used_Unmodified (E);
6911 ---------------------
6912 -- Has_Unreferenced --
6913 ---------------------
6915 function Has_Unreferenced (E : Entity_Id) return Boolean is
6917 if Has_Pragma_Unreferenced (E) then
6919 elsif Warnings_Off (E) then
6920 Set_Warnings_Off_Used_Unreferenced (E);
6925 end Has_Unreferenced;
6927 ----------------------
6928 -- Has_Warnings_Off --
6929 ----------------------
6931 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6933 if Warnings_Off (E) then
6934 Set_Warnings_Off_Used (E);
6939 end Has_Warnings_Off;
6941 ------------------------------
6942 -- Implementation_Base_Type --
6943 ------------------------------
6945 function Implementation_Base_Type (Id : E) return E is
6950 Bastyp := Base_Type (Id);
6952 if Is_Incomplete_Or_Private_Type (Bastyp) then
6953 Imptyp := Underlying_Type (Bastyp);
6955 -- If we have an implementation type, then just return it,
6956 -- otherwise we return the Base_Type anyway. This can only
6957 -- happen in error situations and should avoid some error bombs.
6959 if Present (Imptyp) then
6960 return Base_Type (Imptyp);
6968 end Implementation_Base_Type;
6970 -------------------------
6971 -- Invariant_Procedure --
6972 -------------------------
6974 function Invariant_Procedure (Id : E) return E is
6978 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6980 if No (Subprograms_For_Type (Id)) then
6984 S := Subprograms_For_Type (Id);
6985 while Present (S) loop
6986 if Is_Invariant_Procedure (S) then
6989 S := Subprograms_For_Type (S);
6995 end Invariant_Procedure;
7001 -- Global flag table allowing rapid computation of this function
7003 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7004 (E_Enumeration_Subtype |
7006 E_Signed_Integer_Subtype |
7007 E_Modular_Integer_Subtype |
7008 E_Floating_Point_Subtype |
7009 E_Ordinary_Fixed_Point_Subtype |
7010 E_Decimal_Fixed_Point_Subtype |
7015 E_Record_Subtype_With_Private |
7016 E_Limited_Private_Subtype |
7018 E_Protected_Subtype |
7020 E_String_Literal_Subtype |
7021 E_Class_Wide_Subtype => False,
7024 function Is_Base_Type (Id : E) return Boolean is
7026 return Entity_Is_Base_Type (Ekind (Id));
7029 ---------------------
7030 -- Is_Boolean_Type --
7031 ---------------------
7033 function Is_Boolean_Type (Id : E) return B is
7035 return Root_Type (Id) = Standard_Boolean;
7036 end Is_Boolean_Type;
7038 ------------------------
7039 -- Is_Constant_Object --
7040 ------------------------
7042 function Is_Constant_Object (Id : E) return B is
7043 K : constant Entity_Kind := Ekind (Id);
7046 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7047 end Is_Constant_Object;
7049 --------------------
7050 -- Is_Discriminal --
7051 --------------------
7053 function Is_Discriminal (Id : E) return B is
7055 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7056 and then Present (Discriminal_Link (Id)));
7059 ----------------------
7060 -- Is_Dynamic_Scope --
7061 ----------------------
7063 function Is_Dynamic_Scope (Id : E) return B is
7066 Ekind (Id) = E_Block
7068 Ekind (Id) = E_Function
7070 Ekind (Id) = E_Procedure
7072 Ekind (Id) = E_Subprogram_Body
7074 Ekind (Id) = E_Task_Type
7076 (Ekind (Id) = E_Limited_Private_Type
7077 and then Present (Full_View (Id))
7078 and then Ekind (Full_View (Id)) = E_Task_Type)
7080 Ekind (Id) = E_Entry
7082 Ekind (Id) = E_Entry_Family
7084 Ekind (Id) = E_Return_Statement;
7085 end Is_Dynamic_Scope;
7087 --------------------
7088 -- Is_Entity_Name --
7089 --------------------
7091 function Is_Entity_Name (N : Node_Id) return Boolean is
7092 Kind : constant Node_Kind := Nkind (N);
7095 -- Identifiers, operator symbols, expanded names are entity names
7097 return Kind = N_Identifier
7098 or else Kind = N_Operator_Symbol
7099 or else Kind = N_Expanded_Name
7101 -- Attribute references are entity names if they refer to an entity.
7102 -- Note that we don't do this by testing for the presence of the
7103 -- Entity field in the N_Attribute_Reference node, since it may not
7104 -- have been set yet.
7106 or else (Kind = N_Attribute_Reference
7107 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7110 -----------------------
7111 -- Is_External_State --
7112 -----------------------
7114 function Is_External_State (Id : E) return B is
7117 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7118 end Is_External_State;
7124 function Is_Finalizer (Id : E) return B is
7126 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7129 ---------------------
7130 -- Is_Ghost_Entity --
7131 ---------------------
7133 -- Note: coding below allows for ghost variables. They are not currently
7134 -- implemented, so we will always get False for variables, but that is
7135 -- expected to change in the future.
7137 function Is_Ghost_Entity (Id : E) return B is
7139 if Present (Id) and then Ekind (Id) = E_Variable then
7140 return Convention (Id) = Convention_Ghost;
7142 return Is_Ghost_Subprogram (Id);
7144 end Is_Ghost_Entity;
7146 -------------------------
7147 -- Is_Ghost_Subprogram --
7148 -------------------------
7150 function Is_Ghost_Subprogram (Id : E) return B is
7152 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7153 return Convention (Id) = Convention_Ghost;
7157 end Is_Ghost_Subprogram;
7163 function Is_Null_State (Id : E) return B is
7166 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7169 ---------------------
7170 -- Is_Packed_Array --
7171 ---------------------
7173 function Is_Packed_Array (Id : E) return B is
7175 return Is_Array_Type (Id) and then Is_Packed (Id);
7176 end Is_Packed_Array;
7178 -----------------------------------
7179 -- Is_Package_Or_Generic_Package --
7180 -----------------------------------
7182 function Is_Package_Or_Generic_Package (Id : E) return B is
7184 return Ekind_In (Id, E_Generic_Package, E_Package);
7185 end Is_Package_Or_Generic_Package;
7191 function Is_Prival (Id : E) return B is
7193 return (Ekind_In (Id, E_Constant, E_Variable)
7194 and then Present (Prival_Link (Id)));
7197 ----------------------------
7198 -- Is_Protected_Component --
7199 ----------------------------
7201 function Is_Protected_Component (Id : E) return B is
7203 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7204 end Is_Protected_Component;
7206 ----------------------------
7207 -- Is_Protected_Interface --
7208 ----------------------------
7210 function Is_Protected_Interface (Id : E) return B is
7211 Typ : constant Entity_Id := Base_Type (Id);
7213 if not Is_Interface (Typ) then
7215 elsif Is_Class_Wide_Type (Typ) then
7216 return Is_Protected_Interface (Etype (Typ));
7218 return Protected_Present (Type_Definition (Parent (Typ)));
7220 end Is_Protected_Interface;
7222 ------------------------------
7223 -- Is_Protected_Record_Type --
7224 ------------------------------
7226 function Is_Protected_Record_Type (Id : E) return B is
7229 Is_Concurrent_Record_Type (Id)
7230 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7231 end Is_Protected_Record_Type;
7233 --------------------------------
7234 -- Is_Standard_Character_Type --
7235 --------------------------------
7237 function Is_Standard_Character_Type (Id : E) return B is
7239 if Is_Type (Id) then
7241 R : constant Entity_Id := Root_Type (Id);
7244 R = Standard_Character
7246 R = Standard_Wide_Character
7248 R = Standard_Wide_Wide_Character;
7254 end Is_Standard_Character_Type;
7256 --------------------
7257 -- Is_String_Type --
7258 --------------------
7260 function Is_String_Type (Id : E) return B is
7262 return Is_Array_Type (Id)
7263 and then Id /= Any_Composite
7264 and then Number_Dimensions (Id) = 1
7265 and then Is_Character_Type (Component_Type (Id));
7268 -------------------------------
7269 -- Is_Synchronized_Interface --
7270 -------------------------------
7272 function Is_Synchronized_Interface (Id : E) return B is
7273 Typ : constant Entity_Id := Base_Type (Id);
7276 if not Is_Interface (Typ) then
7279 elsif Is_Class_Wide_Type (Typ) then
7280 return Is_Synchronized_Interface (Etype (Typ));
7283 return Protected_Present (Type_Definition (Parent (Typ)))
7284 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7285 or else Task_Present (Type_Definition (Parent (Typ)));
7287 end Is_Synchronized_Interface;
7289 -----------------------
7290 -- Is_Task_Interface --
7291 -----------------------
7293 function Is_Task_Interface (Id : E) return B is
7294 Typ : constant Entity_Id := Base_Type (Id);
7296 if not Is_Interface (Typ) then
7298 elsif Is_Class_Wide_Type (Typ) then
7299 return Is_Task_Interface (Etype (Typ));
7301 return Task_Present (Type_Definition (Parent (Typ)));
7303 end Is_Task_Interface;
7305 -------------------------
7306 -- Is_Task_Record_Type --
7307 -------------------------
7309 function Is_Task_Record_Type (Id : E) return B is
7312 Is_Concurrent_Record_Type (Id)
7313 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7314 end Is_Task_Record_Type;
7316 ------------------------
7317 -- Is_Wrapper_Package --
7318 ------------------------
7320 function Is_Wrapper_Package (Id : E) return B is
7322 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7323 end Is_Wrapper_Package;
7329 function Last_Formal (Id : E) return E is
7334 (Is_Overloadable (Id)
7335 or else Ekind_In (Id, E_Entry_Family,
7337 E_Subprogram_Type));
7339 if Ekind (Id) = E_Enumeration_Literal then
7343 Formal := First_Formal (Id);
7345 if Present (Formal) then
7346 while Present (Next_Formal (Formal)) loop
7347 Formal := Next_Formal (Formal);
7355 function Model_Emin_Value (Id : E) return Uint is
7357 return Machine_Emin_Value (Id);
7358 end Model_Emin_Value;
7360 -------------------------
7361 -- Model_Epsilon_Value --
7362 -------------------------
7364 function Model_Epsilon_Value (Id : E) return Ureal is
7365 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7367 return Radix ** (1 - Model_Mantissa_Value (Id));
7368 end Model_Epsilon_Value;
7370 --------------------------
7371 -- Model_Mantissa_Value --
7372 --------------------------
7374 function Model_Mantissa_Value (Id : E) return Uint is
7376 return Machine_Mantissa_Value (Id);
7377 end Model_Mantissa_Value;
7379 -----------------------
7380 -- Model_Small_Value --
7381 -----------------------
7383 function Model_Small_Value (Id : E) return Ureal is
7384 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7386 return Radix ** (Model_Emin_Value (Id) - 1);
7387 end Model_Small_Value;
7389 ------------------------
7390 -- Machine_Emax_Value --
7391 ------------------------
7393 function Machine_Emax_Value (Id : E) return Uint is
7394 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7397 case Float_Rep (Id) is
7400 when 1 .. 6 => return Uint_128;
7401 when 7 .. 15 => return 2**10;
7402 when 16 .. 33 => return 2**14;
7403 when others => return No_Uint;
7407 return Uint_2 ** Uint_7 - Uint_1;
7409 end Machine_Emax_Value;
7411 ------------------------
7412 -- Machine_Emin_Value --
7413 ------------------------
7415 function Machine_Emin_Value (Id : E) return Uint is
7417 case Float_Rep (Id) is
7418 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7419 when AAMP => return -Machine_Emax_Value (Id);
7421 end Machine_Emin_Value;
7423 ----------------------------
7424 -- Machine_Mantissa_Value --
7425 ----------------------------
7427 function Machine_Mantissa_Value (Id : E) return Uint is
7428 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7431 case Float_Rep (Id) is
7434 when 1 .. 6 => return Uint_24;
7435 when 7 .. 15 => return UI_From_Int (53);
7436 when 16 .. 18 => return Uint_64;
7437 when 19 .. 33 => return UI_From_Int (113);
7438 when others => return No_Uint;
7443 when 1 .. 6 => return Uint_24;
7444 when 7 .. 9 => return UI_From_Int (40);
7445 when others => return No_Uint;
7448 end Machine_Mantissa_Value;
7450 -------------------------
7451 -- Machine_Radix_Value --
7452 -------------------------
7454 function Machine_Radix_Value (Id : E) return U is
7456 case Float_Rep (Id) is
7457 when IEEE_Binary | AAMP =>
7460 end Machine_Radix_Value;
7462 --------------------
7463 -- Next_Component --
7464 --------------------
7466 function Next_Component (Id : E) return E is
7470 Comp_Id := Next_Entity (Id);
7471 while Present (Comp_Id) loop
7472 exit when Ekind (Comp_Id) = E_Component;
7473 Comp_Id := Next_Entity (Comp_Id);
7479 ------------------------------------
7480 -- Next_Component_Or_Discriminant --
7481 ------------------------------------
7483 function Next_Component_Or_Discriminant (Id : E) return E is
7487 Comp_Id := Next_Entity (Id);
7488 while Present (Comp_Id) loop
7489 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7490 Comp_Id := Next_Entity (Comp_Id);
7494 end Next_Component_Or_Discriminant;
7496 -----------------------
7497 -- Next_Discriminant --
7498 -----------------------
7500 -- This function actually implements both Next_Discriminant and
7501 -- Next_Stored_Discriminant by making sure that the Discriminant
7502 -- returned is of the same variety as Id.
7504 function Next_Discriminant (Id : E) return E is
7506 -- Derived Tagged types with private extensions look like this...
7508 -- E_Discriminant d1
7509 -- E_Discriminant d2
7511 -- E_Discriminant d1
7512 -- E_Discriminant d2
7515 -- so it is critical not to go past the leading discriminants
7520 pragma Assert (Ekind (Id) = E_Discriminant);
7523 D := Next_Entity (D);
7525 or else (Ekind (D) /= E_Discriminant
7526 and then not Is_Itype (D))
7531 exit when Ekind (D) = E_Discriminant
7532 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7536 end Next_Discriminant;
7542 function Next_Formal (Id : E) return E is
7546 -- Follow the chain of declared entities as long as the kind of the
7547 -- entity corresponds to a formal parameter. Skip internal entities
7548 -- that may have been created for implicit subtypes, in the process
7549 -- of analyzing default expressions.
7553 P := Next_Entity (P);
7555 if No (P) or else Is_Formal (P) then
7557 elsif not Is_Internal (P) then
7563 -----------------------------
7564 -- Next_Formal_With_Extras --
7565 -----------------------------
7567 function Next_Formal_With_Extras (Id : E) return E is
7569 if Present (Extra_Formal (Id)) then
7570 return Extra_Formal (Id);
7572 return Next_Formal (Id);
7574 end Next_Formal_With_Extras;
7580 function Next_Index (Id : Node_Id) return Node_Id is
7589 function Next_Literal (Id : E) return E is
7591 pragma Assert (Nkind (Id) in N_Entity);
7595 ------------------------------
7596 -- Next_Stored_Discriminant --
7597 ------------------------------
7599 function Next_Stored_Discriminant (Id : E) return E is
7601 -- See comment in Next_Discriminant
7603 return Next_Discriminant (Id);
7604 end Next_Stored_Discriminant;
7606 -----------------------
7607 -- Number_Dimensions --
7608 -----------------------
7610 function Number_Dimensions (Id : E) return Pos is
7615 if Ekind (Id) = E_String_Literal_Subtype then
7620 T := First_Index (Id);
7621 while Present (T) loop
7628 end Number_Dimensions;
7630 --------------------
7631 -- Number_Entries --
7632 --------------------
7634 function Number_Entries (Id : E) return Nat is
7639 pragma Assert (Is_Concurrent_Type (Id));
7642 Ent := First_Entity (Id);
7643 while Present (Ent) loop
7644 if Is_Entry (Ent) then
7648 Ent := Next_Entity (Ent);
7654 --------------------
7655 -- Number_Formals --
7656 --------------------
7658 function Number_Formals (Id : E) return Pos is
7664 Formal := First_Formal (Id);
7665 while Present (Formal) loop
7667 Formal := Next_Formal (Formal);
7673 --------------------
7674 -- Parameter_Mode --
7675 --------------------
7677 function Parameter_Mode (Id : E) return Formal_Kind is
7682 ------------------------
7683 -- Predicate_Function --
7684 ------------------------
7686 function Predicate_Function (Id : E) return E is
7691 pragma Assert (Is_Type (Id));
7693 -- If type is private and has a completion, predicate may be defined
7694 -- on the full view.
7696 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7697 T := Full_View (Id);
7702 if No (Subprograms_For_Type (T)) then
7706 S := Subprograms_For_Type (T);
7707 while Present (S) loop
7708 if Is_Predicate_Function (S) then
7711 S := Subprograms_For_Type (S);
7717 end Predicate_Function;
7719 --------------------------
7720 -- Predicate_Function_M --
7721 --------------------------
7723 function Predicate_Function_M (Id : E) return E is
7728 pragma Assert (Is_Type (Id));
7730 -- If type is private and has a completion, predicate may be defined
7731 -- on the full view.
7733 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7734 T := Full_View (Id);
7739 if No (Subprograms_For_Type (T)) then
7743 S := Subprograms_For_Type (T);
7744 while Present (S) loop
7745 if Is_Predicate_Function_M (S) then
7748 S := Subprograms_For_Type (S);
7754 end Predicate_Function_M;
7756 -------------------------
7757 -- Present_In_Rep_Item --
7758 -------------------------
7760 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7764 Ritem := First_Rep_Item (E);
7766 while Present (Ritem) loop
7771 Next_Rep_Item (Ritem);
7775 end Present_In_Rep_Item;
7777 --------------------------
7778 -- Primitive_Operations --
7779 --------------------------
7781 function Primitive_Operations (Id : E) return L is
7783 if Is_Concurrent_Type (Id) then
7784 if Present (Corresponding_Record_Type (Id)) then
7785 return Direct_Primitive_Operations
7786 (Corresponding_Record_Type (Id));
7788 -- If expansion is disabled the corresponding record type is absent,
7789 -- but if the type has ancestors it may have primitive operations.
7791 elsif Is_Tagged_Type (Id) then
7792 return Direct_Primitive_Operations (Id);
7798 return Direct_Primitive_Operations (Id);
7800 end Primitive_Operations;
7802 ---------------------
7803 -- Record_Rep_Item --
7804 ---------------------
7806 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7808 Set_Next_Rep_Item (N, First_Rep_Item (E));
7809 Set_First_Rep_Item (E, N);
7810 end Record_Rep_Item;
7816 function Root_Type (Id : E) return E is
7820 pragma Assert (Nkind (Id) in N_Entity);
7822 T := Base_Type (Id);
7824 if Ekind (T) = E_Class_Wide_Type then
7836 -- Following test catches some error cases resulting from
7839 elsif No (Etyp) then
7840 Check_Error_Detected;
7843 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7846 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7852 -- Return if there is a circularity in the inheritance chain. This
7853 -- happens in some error situations and we do not want to get
7854 -- stuck in this loop.
7856 if T = Base_Type (Id) then
7863 ---------------------
7864 -- Safe_Emax_Value --
7865 ---------------------
7867 function Safe_Emax_Value (Id : E) return Uint is
7869 return Machine_Emax_Value (Id);
7870 end Safe_Emax_Value;
7872 ----------------------
7873 -- Safe_First_Value --
7874 ----------------------
7876 function Safe_First_Value (Id : E) return Ureal is
7878 return -Safe_Last_Value (Id);
7879 end Safe_First_Value;
7881 ---------------------
7882 -- Safe_Last_Value --
7883 ---------------------
7885 function Safe_Last_Value (Id : E) return Ureal is
7886 Radix : constant Uint := Machine_Radix_Value (Id);
7887 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7888 Emax : constant Uint := Safe_Emax_Value (Id);
7889 Significand : constant Uint := Radix ** Mantissa - 1;
7890 Exponent : constant Uint := Emax - Mantissa;
7896 (Num => Significand * 2 ** (Exponent mod 4),
7897 Den => -Exponent / 4,
7903 (Num => Significand,
7907 end Safe_Last_Value;
7913 function Scope_Depth (Id : E) return Uint is
7918 while Is_Record_Type (Scop) loop
7919 Scop := Scope (Scop);
7922 return Scope_Depth_Value (Scop);
7925 ---------------------
7926 -- Scope_Depth_Set --
7927 ---------------------
7929 function Scope_Depth_Set (Id : E) return B is
7931 return not Is_Record_Type (Id)
7932 and then Field22 (Id) /= Union_Id (Empty);
7933 end Scope_Depth_Set;
7935 -----------------------------
7936 -- Set_Component_Alignment --
7937 -----------------------------
7939 -- Component Alignment is encoded using two flags, Flag128/129 as
7940 -- follows. Note that both flags False = Align_Default, so that the
7941 -- default initialization of flags to False initializes component
7942 -- alignment to the default value as required.
7944 -- Flag128 Flag129 Value
7945 -- ------- ------- -----
7946 -- False False Calign_Default
7947 -- False True Calign_Component_Size
7948 -- True False Calign_Component_Size_4
7949 -- True True Calign_Storage_Unit
7951 procedure Set_Component_Alignment (Id : E; V : C) is
7953 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7954 and then Is_Base_Type (Id));
7957 when Calign_Default =>
7958 Set_Flag128 (Id, False);
7959 Set_Flag129 (Id, False);
7961 when Calign_Component_Size =>
7962 Set_Flag128 (Id, False);
7963 Set_Flag129 (Id, True);
7965 when Calign_Component_Size_4 =>
7966 Set_Flag128 (Id, True);
7967 Set_Flag129 (Id, False);
7969 when Calign_Storage_Unit =>
7970 Set_Flag128 (Id, True);
7971 Set_Flag129 (Id, True);
7973 end Set_Component_Alignment;
7975 -------------------------------------
7976 -- Set_Default_Init_Cond_Procedure --
7977 -------------------------------------
7979 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
7985 and then (Has_Default_Init_Cond (Id)
7986 or Has_Inherited_Default_Init_Cond (Id)));
7988 S := Subprograms_For_Type (Id);
7989 Set_Subprograms_For_Type (Id, V);
7990 Set_Subprograms_For_Type (V, S);
7992 -- Check for a duplicate procedure
7994 while Present (S) loop
7995 if Is_Default_Init_Cond_Procedure (S) then
7996 raise Program_Error;
7999 S := Subprograms_For_Type (S);
8001 end Set_Default_Init_Cond_Procedure;
8003 -----------------------------
8004 -- Set_Invariant_Procedure --
8005 -----------------------------
8007 procedure Set_Invariant_Procedure (Id : E; V : E) is
8011 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
8013 S := Subprograms_For_Type (Id);
8014 Set_Subprograms_For_Type (Id, V);
8015 Set_Subprograms_For_Type (V, S);
8017 -- Check for duplicate entry
8019 while Present (S) loop
8020 if Is_Invariant_Procedure (S) then
8021 raise Program_Error;
8023 S := Subprograms_For_Type (S);
8026 end Set_Invariant_Procedure;
8028 ----------------------------
8029 -- Set_Predicate_Function --
8030 ----------------------------
8032 procedure Set_Predicate_Function (Id : E; V : E) is
8036 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8038 S := Subprograms_For_Type (Id);
8039 Set_Subprograms_For_Type (Id, V);
8040 Set_Subprograms_For_Type (V, S);
8042 while Present (S) loop
8043 if Is_Predicate_Function (S) then
8044 raise Program_Error;
8046 S := Subprograms_For_Type (S);
8049 end Set_Predicate_Function;
8051 ------------------------------
8052 -- Set_Predicate_Function_M --
8053 ------------------------------
8055 procedure Set_Predicate_Function_M (Id : E; V : E) is
8059 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8061 S := Subprograms_For_Type (Id);
8062 Set_Subprograms_For_Type (Id, V);
8063 Set_Subprograms_For_Type (V, S);
8065 -- Check for duplicates
8067 while Present (S) loop
8068 if Is_Predicate_Function_M (S) then
8069 raise Program_Error;
8071 S := Subprograms_For_Type (S);
8074 end Set_Predicate_Function_M;
8080 function Size_Clause (Id : E) return N is
8082 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8085 ------------------------
8086 -- Stream_Size_Clause --
8087 ------------------------
8089 function Stream_Size_Clause (Id : E) return N is
8091 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
8092 end Stream_Size_Clause;
8098 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
8104 Kind := E_Access_Subtype;
8108 Kind := E_Array_Subtype;
8110 when E_Class_Wide_Type |
8111 E_Class_Wide_Subtype =>
8112 Kind := E_Class_Wide_Subtype;
8114 when E_Decimal_Fixed_Point_Type |
8115 E_Decimal_Fixed_Point_Subtype =>
8116 Kind := E_Decimal_Fixed_Point_Subtype;
8118 when E_Ordinary_Fixed_Point_Type |
8119 E_Ordinary_Fixed_Point_Subtype =>
8120 Kind := E_Ordinary_Fixed_Point_Subtype;
8122 when E_Private_Type |
8123 E_Private_Subtype =>
8124 Kind := E_Private_Subtype;
8126 when E_Limited_Private_Type |
8127 E_Limited_Private_Subtype =>
8128 Kind := E_Limited_Private_Subtype;
8130 when E_Record_Type_With_Private |
8131 E_Record_Subtype_With_Private =>
8132 Kind := E_Record_Subtype_With_Private;
8134 when E_Record_Type |
8136 Kind := E_Record_Subtype;
8138 when Enumeration_Kind =>
8139 Kind := E_Enumeration_Subtype;
8142 Kind := E_Floating_Point_Subtype;
8144 when Signed_Integer_Kind =>
8145 Kind := E_Signed_Integer_Subtype;
8147 when Modular_Integer_Kind =>
8148 Kind := E_Modular_Integer_Subtype;
8150 when Protected_Kind =>
8151 Kind := E_Protected_Subtype;
8154 Kind := E_Task_Subtype;
8158 raise Program_Error;
8164 ---------------------
8165 -- Type_High_Bound --
8166 ---------------------
8168 function Type_High_Bound (Id : E) return Node_Id is
8169 Rng : constant Node_Id := Scalar_Range (Id);
8171 if Nkind (Rng) = N_Subtype_Indication then
8172 return High_Bound (Range_Expression (Constraint (Rng)));
8174 return High_Bound (Rng);
8176 end Type_High_Bound;
8178 --------------------
8179 -- Type_Low_Bound --
8180 --------------------
8182 function Type_Low_Bound (Id : E) return Node_Id is
8183 Rng : constant Node_Id := Scalar_Range (Id);
8185 if Nkind (Rng) = N_Subtype_Indication then
8186 return Low_Bound (Range_Expression (Constraint (Rng)));
8188 return Low_Bound (Rng);
8192 ---------------------
8193 -- Underlying_Type --
8194 ---------------------
8196 function Underlying_Type (Id : E) return E is
8198 -- For record_with_private the underlying type is always the direct
8199 -- full view. Never try to take the full view of the parent it
8200 -- doesn't make sense.
8202 if Ekind (Id) = E_Record_Type_With_Private then
8203 return Full_View (Id);
8205 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8207 -- If we have an incomplete or private type with a full view,
8208 -- then we return the Underlying_Type of this full view.
8210 if Present (Full_View (Id)) then
8211 if Id = Full_View (Id) then
8213 -- Previous error in declaration
8218 return Underlying_Type (Full_View (Id));
8221 -- If we have a private type with an underlying full view, then we
8222 -- return the Underlying_Type of this underlying full view.
8224 elsif Ekind (Id) in Private_Kind
8225 and then Present (Underlying_Full_View (Id))
8227 return Underlying_Type (Underlying_Full_View (Id));
8229 -- If we have an incomplete entity that comes from the limited
8230 -- view then we return the Underlying_Type of its non-limited
8233 elsif From_Limited_With (Id)
8234 and then Present (Non_Limited_View (Id))
8236 return Underlying_Type (Non_Limited_View (Id));
8238 -- Otherwise check for the case where we have a derived type or
8239 -- subtype, and if so get the Underlying_Type of the parent type.
8241 elsif Etype (Id) /= Id then
8242 return Underlying_Type (Etype (Id));
8244 -- Otherwise we have an incomplete or private type that has
8245 -- no full view, which means that we have not encountered the
8246 -- completion, so return Empty to indicate the underlying type
8247 -- is not yet known.
8253 -- For non-incomplete, non-private types, return the type itself Also
8254 -- for entities that are not types at all return the entity itself.
8259 end Underlying_Type;
8261 ------------------------
8262 -- Write_Entity_Flags --
8263 ------------------------
8265 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8267 procedure W (Flag_Name : String; Flag : Boolean);
8268 -- Write out given flag if it is set
8274 procedure W (Flag_Name : String; Flag : Boolean) is
8278 Write_Str (Flag_Name);
8279 Write_Str (" = True");
8284 -- Start of processing for Write_Entity_Flags
8287 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8288 and then Is_Base_Type (Id)
8291 Write_Str ("Component_Alignment = ");
8293 case Component_Alignment (Id) is
8294 when Calign_Default =>
8295 Write_Str ("Calign_Default");
8297 when Calign_Component_Size =>
8298 Write_Str ("Calign_Component_Size");
8300 when Calign_Component_Size_4 =>
8301 Write_Str ("Calign_Component_Size_4");
8303 when Calign_Storage_Unit =>
8304 Write_Str ("Calign_Storage_Unit");
8310 W ("Address_Taken", Flag104 (Id));
8311 W ("Body_Needed_For_SAL", Flag40 (Id));
8312 W ("C_Pass_By_Copy", Flag125 (Id));
8313 W ("Can_Never_Be_Null", Flag38 (Id));
8314 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8315 W ("Debug_Info_Off", Flag166 (Id));
8316 W ("Default_Expressions_Processed", Flag108 (Id));
8317 W ("Delay_Cleanups", Flag114 (Id));
8318 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8319 W ("Depends_On_Private", Flag14 (Id));
8320 W ("Discard_Names", Flag88 (Id));
8321 W ("Elaboration_Entity_Required", Flag174 (Id));
8322 W ("Elaborate_Body_Desirable", Flag210 (Id));
8323 W ("Entry_Accepted", Flag152 (Id));
8324 W ("Can_Use_Internal_Rep", Flag229 (Id));
8325 W ("Finalize_Storage_Only", Flag158 (Id));
8326 W ("From_Limited_With", Flag159 (Id));
8327 W ("Has_Aliased_Components", Flag135 (Id));
8328 W ("Has_Alignment_Clause", Flag46 (Id));
8329 W ("Has_All_Calls_Remote", Flag79 (Id));
8330 W ("Has_Anonymous_Master", Flag253 (Id));
8331 W ("Has_Atomic_Components", Flag86 (Id));
8332 W ("Has_Biased_Representation", Flag139 (Id));
8333 W ("Has_Completion", Flag26 (Id));
8334 W ("Has_Completion_In_Body", Flag71 (Id));
8335 W ("Has_Complex_Representation", Flag140 (Id));
8336 W ("Has_Component_Size_Clause", Flag68 (Id));
8337 W ("Has_Contiguous_Rep", Flag181 (Id));
8338 W ("Has_Controlled_Component", Flag43 (Id));
8339 W ("Has_Controlling_Result", Flag98 (Id));
8340 W ("Has_Convention_Pragma", Flag119 (Id));
8341 W ("Has_Default_Aspect", Flag39 (Id));
8342 W ("Has_Default_Init_Cond", Flag3 (Id));
8343 W ("Has_Delayed_Aspects", Flag200 (Id));
8344 W ("Has_Delayed_Freeze", Flag18 (Id));
8345 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8346 W ("Has_Discriminants", Flag5 (Id));
8347 W ("Has_Dispatch_Table", Flag220 (Id));
8348 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8349 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8350 W ("Has_Exit", Flag47 (Id));
8351 W ("Has_Forward_Instantiation", Flag175 (Id));
8352 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8353 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8354 W ("Has_Homonym", Flag56 (Id));
8355 W ("Has_Implicit_Dereference", Flag251 (Id));
8356 W ("Has_Independent_Components", Flag34 (Id));
8357 W ("Has_Inheritable_Invariants", Flag248 (Id));
8358 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
8359 W ("Has_Initial_Value", Flag219 (Id));
8360 W ("Has_Invariants", Flag232 (Id));
8361 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8362 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8363 W ("Has_Master_Entity", Flag21 (Id));
8364 W ("Has_Missing_Return", Flag142 (Id));
8365 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8366 W ("Has_Non_Standard_Rep", Flag75 (Id));
8367 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8368 W ("Has_Object_Size_Clause", Flag172 (Id));
8369 W ("Has_Per_Object_Constraint", Flag154 (Id));
8370 W ("Has_Postconditions", Flag240 (Id));
8371 W ("Has_Pragma_Controlled", Flag27 (Id));
8372 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8373 W ("Has_Pragma_Inline", Flag157 (Id));
8374 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8375 W ("Has_Pragma_No_Inline", Flag201 (Id));
8376 W ("Has_Pragma_Ordered", Flag198 (Id));
8377 W ("Has_Pragma_Pack", Flag121 (Id));
8378 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8379 W ("Has_Pragma_Pure", Flag203 (Id));
8380 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8381 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8382 W ("Has_Pragma_Unmodified", Flag233 (Id));
8383 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8384 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8385 W ("Has_Predicates", Flag250 (Id));
8386 W ("Has_Primitive_Operations", Flag120 (Id));
8387 W ("Has_Private_Ancestor", Flag151 (Id));
8388 W ("Has_Private_Declaration", Flag155 (Id));
8389 W ("Has_Protected", Flag271 (Id));
8390 W ("Has_Qualified_Name", Flag161 (Id));
8391 W ("Has_RACW", Flag214 (Id));
8392 W ("Has_Record_Rep_Clause", Flag65 (Id));
8393 W ("Has_Recursive_Call", Flag143 (Id));
8394 W ("Has_Shift_Operator", Flag267 (Id));
8395 W ("Has_Size_Clause", Flag29 (Id));
8396 W ("Has_Small_Clause", Flag67 (Id));
8397 W ("Has_Specified_Layout", Flag100 (Id));
8398 W ("Has_Specified_Stream_Input", Flag190 (Id));
8399 W ("Has_Specified_Stream_Output", Flag191 (Id));
8400 W ("Has_Specified_Stream_Read", Flag192 (Id));
8401 W ("Has_Specified_Stream_Write", Flag193 (Id));
8402 W ("Has_Static_Discriminants", Flag211 (Id));
8403 W ("Has_Static_Predicate", Flag269 (Id));
8404 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8405 W ("Has_Storage_Size_Clause", Flag23 (Id));
8406 W ("Has_Stream_Size_Clause", Flag184 (Id));
8407 W ("Has_Task", Flag30 (Id));
8408 W ("Has_Thunks", Flag228 (Id));
8409 W ("Has_Unchecked_Union", Flag123 (Id));
8410 W ("Has_Unknown_Discriminants", Flag72 (Id));
8411 W ("Has_Up_Level_Access", Flag215 (Id));
8412 W ("Has_Visible_Refinement", Flag263 (Id));
8413 W ("Has_Volatile_Components", Flag87 (Id));
8414 W ("Has_Xref_Entry", Flag182 (Id));
8415 W ("In_Package_Body", Flag48 (Id));
8416 W ("In_Private_Part", Flag45 (Id));
8417 W ("In_Use", Flag8 (Id));
8418 W ("Is_Abstract_Subprogram", Flag19 (Id));
8419 W ("Is_Abstract_Type", Flag146 (Id));
8420 W ("Is_Access_Constant", Flag69 (Id));
8421 W ("Is_Ada_2005_Only", Flag185 (Id));
8422 W ("Is_Ada_2012_Only", Flag199 (Id));
8423 W ("Is_Aliased", Flag15 (Id));
8424 W ("Is_Asynchronous", Flag81 (Id));
8425 W ("Is_Atomic", Flag85 (Id));
8426 W ("Is_Bit_Packed_Array", Flag122 (Id));
8427 W ("Is_CPP_Class", Flag74 (Id));
8428 W ("Is_Called", Flag102 (Id));
8429 W ("Is_Character_Type", Flag63 (Id));
8430 W ("Is_Child_Unit", Flag73 (Id));
8431 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8432 W ("Is_Compilation_Unit", Flag149 (Id));
8433 W ("Is_Completely_Hidden", Flag103 (Id));
8434 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8435 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8436 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8437 W ("Is_Constrained", Flag12 (Id));
8438 W ("Is_Constructor", Flag76 (Id));
8439 W ("Is_Controlled", Flag42 (Id));
8440 W ("Is_Controlling_Formal", Flag97 (Id));
8441 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
8442 W ("Is_Descendent_Of_Address", Flag223 (Id));
8443 W ("Is_Discrim_SO_Function", Flag176 (Id));
8444 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8445 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8446 W ("Is_Dispatching_Operation", Flag6 (Id));
8447 W ("Is_Eliminated", Flag124 (Id));
8448 W ("Is_Entry_Formal", Flag52 (Id));
8449 W ("Is_Exported", Flag99 (Id));
8450 W ("Is_First_Subtype", Flag70 (Id));
8451 W ("Is_For_Access_Subtype", Flag118 (Id));
8452 W ("Is_Formal_Subprogram", Flag111 (Id));
8453 W ("Is_Frozen", Flag4 (Id));
8454 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
8455 W ("Is_Generic_Actual_Type", Flag94 (Id));
8456 W ("Is_Generic_Instance", Flag130 (Id));
8457 W ("Is_Generic_Type", Flag13 (Id));
8458 W ("Is_Hidden", Flag57 (Id));
8459 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
8460 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8461 W ("Is_Immediately_Visible", Flag7 (Id));
8462 W ("Is_Implementation_Defined", Flag254 (Id));
8463 W ("Is_Imported", Flag24 (Id));
8464 W ("Is_Independent", Flag268 (Id));
8465 W ("Is_Inlined", Flag11 (Id));
8466 W ("Is_Inlined_Always", Flag1 (Id));
8467 W ("Is_Instantiated", Flag126 (Id));
8468 W ("Is_Interface", Flag186 (Id));
8469 W ("Is_Internal", Flag17 (Id));
8470 W ("Is_Interrupt_Handler", Flag89 (Id));
8471 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8472 W ("Is_Invariant_Procedure", Flag257 (Id));
8473 W ("Is_Itype", Flag91 (Id));
8474 W ("Is_Known_Non_Null", Flag37 (Id));
8475 W ("Is_Known_Null", Flag204 (Id));
8476 W ("Is_Known_Valid", Flag170 (Id));
8477 W ("Is_Limited_Composite", Flag106 (Id));
8478 W ("Is_Limited_Interface", Flag197 (Id));
8479 W ("Is_Limited_Record", Flag25 (Id));
8480 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8481 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8482 W ("Is_Non_Static_Subtype", Flag109 (Id));
8483 W ("Is_Null_Init_Proc", Flag178 (Id));
8484 W ("Is_Obsolescent", Flag153 (Id));
8485 W ("Is_Only_Out_Parameter", Flag226 (Id));
8486 W ("Is_Package_Body_Entity", Flag160 (Id));
8487 W ("Is_Packed", Flag51 (Id));
8488 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8489 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8490 W ("Is_Predicate_Function", Flag255 (Id));
8491 W ("Is_Predicate_Function_M", Flag256 (Id));
8492 W ("Is_Preelaborated", Flag59 (Id));
8493 W ("Is_Primitive", Flag218 (Id));
8494 W ("Is_Primitive_Wrapper", Flag195 (Id));
8495 W ("Is_Private_Composite", Flag107 (Id));
8496 W ("Is_Private_Descendant", Flag53 (Id));
8497 W ("Is_Private_Primitive", Flag245 (Id));
8498 W ("Is_Processed_Transient", Flag252 (Id));
8499 W ("Is_Public", Flag10 (Id));
8500 W ("Is_Pure", Flag44 (Id));
8501 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8502 W ("Is_RACW_Stub_Type", Flag244 (Id));
8503 W ("Is_Raised", Flag224 (Id));
8504 W ("Is_Remote_Call_Interface", Flag62 (Id));
8505 W ("Is_Remote_Types", Flag61 (Id));
8506 W ("Is_Renaming_Of_Object", Flag112 (Id));
8507 W ("Is_Return_Object", Flag209 (Id));
8508 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8509 W ("Is_Shared_Passive", Flag60 (Id));
8510 W ("Is_Statically_Allocated", Flag28 (Id));
8511 W ("Is_Tag", Flag78 (Id));
8512 W ("Is_Tagged_Type", Flag55 (Id));
8513 W ("Is_Thunk", Flag225 (Id));
8514 W ("Is_Trivial_Subprogram", Flag235 (Id));
8515 W ("Is_True_Constant", Flag163 (Id));
8516 W ("Is_Unchecked_Union", Flag117 (Id));
8517 W ("Is_Underlying_Record_View", Flag246 (Id));
8518 W ("Is_Unsigned_Type", Flag144 (Id));
8519 W ("Is_Valued_Procedure", Flag127 (Id));
8520 W ("Is_Visible_Formal", Flag206 (Id));
8521 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8522 W ("Is_Volatile", Flag16 (Id));
8523 W ("Itype_Printed", Flag202 (Id));
8524 W ("Kill_Elaboration_Checks", Flag32 (Id));
8525 W ("Kill_Range_Checks", Flag33 (Id));
8526 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8527 W ("Low_Bound_Tested", Flag205 (Id));
8528 W ("Machine_Radix_10", Flag84 (Id));
8529 W ("Materialize_Entity", Flag168 (Id));
8530 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8531 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8532 W ("Must_Have_Preelab_Init", Flag208 (Id));
8533 W ("Needs_Debug_Info", Flag147 (Id));
8534 W ("Needs_No_Actuals", Flag22 (Id));
8535 W ("Never_Set_In_Source", Flag115 (Id));
8536 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
8537 W ("No_Pool_Assigned", Flag131 (Id));
8538 W ("No_Predicate_On_actual", Flag275 (Id));
8539 W ("No_Return", Flag113 (Id));
8540 W ("No_Strict_Aliasing", Flag136 (Id));
8541 W ("Non_Binary_Modulus", Flag58 (Id));
8542 W ("Nonzero_Is_True", Flag162 (Id));
8543 W ("OK_To_Rename", Flag247 (Id));
8544 W ("OK_To_Reorder_Components", Flag239 (Id));
8545 W ("Optimize_Alignment_Space", Flag241 (Id));
8546 W ("Optimize_Alignment_Time", Flag242 (Id));
8547 W ("Overlays_Constant", Flag243 (Id));
8548 W ("Reachable", Flag49 (Id));
8549 W ("Referenced", Flag156 (Id));
8550 W ("Referenced_As_LHS", Flag36 (Id));
8551 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8552 W ("Renamed_In_Spec", Flag231 (Id));
8553 W ("Requires_Overriding", Flag213 (Id));
8554 W ("Return_Present", Flag54 (Id));
8555 W ("Returns_By_Ref", Flag90 (Id));
8556 W ("Reverse_Bit_Order", Flag164 (Id));
8557 W ("Reverse_Storage_Order", Flag93 (Id));
8558 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8559 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8560 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8561 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8562 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8563 W ("SSO_Set_High_By_Default", Flag273 (Id));
8564 W ("SSO_Set_Low_By_Default", Flag272 (Id));
8565 W ("Static_Elaboration_Desired", Flag77 (Id));
8566 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8567 W ("Strict_Alignment", Flag145 (Id));
8568 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8569 W ("Suppress_Initialization", Flag105 (Id));
8570 W ("Suppress_Style_Checks", Flag165 (Id));
8571 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8572 W ("Treat_As_Volatile", Flag41 (Id));
8573 W ("Universal_Aliasing", Flag216 (Id));
8574 W ("Used_As_Generic_Actual", Flag222 (Id));
8575 W ("Uses_Sec_Stack", Flag95 (Id));
8576 W ("Warnings_Off", Flag96 (Id));
8577 W ("Warnings_Off_Used", Flag236 (Id));
8578 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8579 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8580 W ("Was_Hidden", Flag196 (Id));
8581 end Write_Entity_Flags;
8583 -----------------------
8584 -- Write_Entity_Info --
8585 -----------------------
8587 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8589 procedure Write_Attribute (Which : String; Nam : E);
8590 -- Write attribute value with given string name
8592 procedure Write_Kind (Id : Entity_Id);
8593 -- Write Ekind field of entity
8595 ---------------------
8596 -- Write_Attribute --
8597 ---------------------
8599 procedure Write_Attribute (Which : String; Nam : E) is
8603 Write_Int (Int (Nam));
8605 Write_Name (Chars (Nam));
8607 end Write_Attribute;
8613 procedure Write_Kind (Id : Entity_Id) is
8614 K : constant String := Entity_Kind'Image (Ekind (Id));
8618 Write_Str (" Kind ");
8620 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8621 Write_Str ("TAGGED ");
8624 Write_Str (K (3 .. K'Length));
8627 if Is_Type (Id) and then Depends_On_Private (Id) then
8628 Write_Str ("Depends_On_Private ");
8632 -- Start of processing for Write_Entity_Info
8636 Write_Attribute ("Name ", Id);
8637 Write_Int (Int (Id));
8641 Write_Attribute (" Type ", Etype (Id));
8643 Write_Attribute (" Scope ", Scope (Id));
8648 when Discrete_Kind =>
8649 Write_Str ("Bounds: Id = ");
8651 if Present (Scalar_Range (Id)) then
8652 Write_Int (Int (Type_Low_Bound (Id)));
8653 Write_Str (" .. Id = ");
8654 Write_Int (Int (Type_High_Bound (Id)));
8656 Write_Str ("Empty");
8667 (" Component Type ", Component_Type (Id));
8670 Write_Str (" Indexes ");
8672 Index := First_Index (Id);
8673 while Present (Index) loop
8674 Write_Attribute (" ", Etype (Index));
8675 Index := Next_Index (Index);
8683 (" Directly Designated Type ",
8684 Directly_Designated_Type (Id));
8687 when Overloadable_Kind =>
8688 if Present (Homonym (Id)) then
8689 Write_Str (" Homonym ");
8690 Write_Name (Chars (Homonym (Id)));
8692 Write_Int (Int (Homonym (Id)));
8699 if Ekind (Scope (Id)) in Record_Kind then
8701 " Original_Record_Component ",
8702 Original_Record_Component (Id));
8703 Write_Int (Int (Original_Record_Component (Id)));
8707 when others => null;
8709 end Write_Entity_Info;
8711 -----------------------
8712 -- Write_Field6_Name --
8713 -----------------------
8715 procedure Write_Field6_Name (Id : Entity_Id) is
8716 pragma Warnings (Off, Id);
8718 Write_Str ("First_Rep_Item");
8719 end Write_Field6_Name;
8721 -----------------------
8722 -- Write_Field7_Name --
8723 -----------------------
8725 procedure Write_Field7_Name (Id : Entity_Id) is
8726 pragma Warnings (Off, Id);
8728 Write_Str ("Freeze_Node");
8729 end Write_Field7_Name;
8731 -----------------------
8732 -- Write_Field8_Name --
8733 -----------------------
8735 procedure Write_Field8_Name (Id : Entity_Id) is
8739 Write_Str ("Associated_Node_For_Itype");
8742 Write_Str ("Dependent_Instances");
8745 Write_Str ("First_Exit_Statement");
8748 Write_Str ("Hiding_Loop_Variable");
8752 E_Subprogram_Body =>
8753 Write_Str ("Mechanism");
8757 Write_Str ("Normalized_First_Bit");
8760 Write_Str ("Postcondition_Proc");
8762 when E_Abstract_State =>
8763 Write_Str ("Refinement_Constituents");
8765 when E_Return_Statement =>
8766 Write_Str ("Return_Applies_To");
8769 Write_Str ("Field8??");
8771 end Write_Field8_Name;
8773 -----------------------
8774 -- Write_Field9_Name --
8775 -----------------------
8777 procedure Write_Field9_Name (Id : Entity_Id) is
8781 Write_Str ("Class_Wide_Type");
8784 Write_Str ("Current_Value");
8786 when E_Abstract_State =>
8787 Write_Str ("Part_Of_Constituents");
8790 E_Generic_Function |
8792 E_Generic_Procedure |
8795 Write_Str ("Renaming_Map");
8798 Write_Str ("Field9??");
8800 end Write_Field9_Name;
8802 ------------------------
8803 -- Write_Field10_Name --
8804 ------------------------
8806 procedure Write_Field10_Name (Id : Entity_Id) is
8809 when E_Abstract_State |
8811 Write_Str ("Encapsulating_State");
8813 when Class_Wide_Kind |
8819 Write_Str ("Direct_Primitive_Operations");
8822 Write_Str ("Float_Rep");
8824 when E_In_Parameter |
8826 Write_Str ("Discriminal_Link");
8832 Write_Str ("Handler_Records");
8836 Write_Str ("Normalized_Position_Max");
8839 Write_Str ("Field10??");
8841 end Write_Field10_Name;
8843 ------------------------
8844 -- Write_Field11_Name --
8845 ------------------------
8847 procedure Write_Field11_Name (Id : Entity_Id) is
8851 Write_Str ("Block_Node");
8855 Write_Str ("Component_Bit_Offset");
8858 Write_Str ("Entry_Component");
8860 when E_Enumeration_Literal =>
8861 Write_Str ("Enumeration_Pos");
8865 Write_Str ("Full_View");
8867 when E_Generic_Package =>
8868 Write_Str ("Generic_Homonym");
8874 Write_Str ("Protected_Body_Subprogram");
8877 Write_Str ("Field11??");
8879 end Write_Field11_Name;
8881 ------------------------
8882 -- Write_Field12_Name --
8883 ------------------------
8885 procedure Write_Field12_Name (Id : Entity_Id) is
8889 Write_Str ("Associated_Formal_Package");
8892 Write_Str ("Barrier_Function");
8894 when E_Enumeration_Literal =>
8895 Write_Str ("Enumeration_Rep");
8903 E_In_Out_Parameter |
8907 Write_Str ("Esize");
8911 Write_Str ("Next_Inlined_Subprogram");
8914 Write_Str ("Field12??");
8916 end Write_Field12_Name;
8918 ------------------------
8919 -- Write_Field13_Name --
8920 ------------------------
8922 procedure Write_Field13_Name (Id : Entity_Id) is
8927 Write_Str ("Component_Clause");
8930 Write_Str ("Elaboration_Entity");
8934 Generic_Unit_Kind =>
8935 Write_Str ("Elaboration_Entity");
8939 Write_Str ("Extra_Accessibility");
8942 Write_Str ("RM_Size");
8945 Write_Str ("Field13??");
8947 end Write_Field13_Name;
8949 -----------------------
8950 -- Write_Field14_Name --
8951 -----------------------
8953 procedure Write_Field14_Name (Id : Entity_Id) is
8962 Write_Str ("Alignment");
8966 Write_Str ("Normalized_Position");
8969 E_Generic_Package =>
8970 Write_Str ("Shadow_Entities");
8973 Write_Str ("Field14??");
8975 end Write_Field14_Name;
8977 ------------------------
8978 -- Write_Field15_Name --
8979 ------------------------
8981 procedure Write_Field15_Name (Id : Entity_Id) is
8984 when E_Discriminant =>
8985 Write_Str ("Discriminant_Number");
8988 Write_Str ("DT_Entry_Count");
8992 Write_Str ("DT_Position");
8994 when E_Protected_Type =>
8995 Write_Str ("Entry_Bodies_Array");
8998 Write_Str ("Entry_Parameters_Type");
9001 Write_Str ("Extra_Formal");
9003 when Enumeration_Kind =>
9004 Write_Str ("Lit_Indexes");
9008 Write_Str ("Related_Instance");
9010 when Decimal_Fixed_Point_Kind =>
9011 Write_Str ("Scale_Value");
9015 Write_Str ("Status_Flag_Or_Transient_Decl");
9019 Write_Str ("Storage_Size_Variable");
9021 when E_String_Literal_Subtype =>
9022 Write_Str ("String_Literal_Low_Bound");
9025 Write_Str ("Field15??");
9027 end Write_Field15_Name;
9029 ------------------------
9030 -- Write_Field16_Name --
9031 ------------------------
9033 procedure Write_Field16_Name (Id : Entity_Id) is
9036 when E_Record_Type |
9037 E_Record_Type_With_Private =>
9038 Write_Str ("Access_Disp_Table");
9040 when E_Abstract_State =>
9041 Write_Str ("Body_References");
9043 when E_Record_Subtype |
9044 E_Class_Wide_Subtype =>
9045 Write_Str ("Cloned_Subtype");
9049 Write_Str ("DTC_Entity");
9052 Write_Str ("Entry_Formal");
9057 Write_Str ("First_Private_Entity");
9059 when Enumeration_Kind =>
9060 Write_Str ("Lit_Strings");
9062 when E_String_Literal_Subtype =>
9063 Write_Str ("String_Literal_Length");
9067 Write_Str ("Unset_Reference");
9070 Write_Str ("Field16??");
9072 end Write_Field16_Name;
9074 ------------------------
9075 -- Write_Field17_Name --
9076 ------------------------
9078 procedure Write_Field17_Name (Id : Entity_Id) is
9083 E_Generic_In_Out_Parameter |
9085 Write_Str ("Actual_Subtype");
9088 Write_Str ("Digits_Value");
9090 when E_Discriminant =>
9091 Write_Str ("Discriminal");
9100 E_Generic_Function |
9102 E_Generic_Procedure |
9110 E_Return_Statement |
9112 E_Subprogram_Type =>
9113 Write_Str ("First_Entity");
9116 Write_Str ("First_Index");
9118 when Enumeration_Kind =>
9119 Write_Str ("First_Literal");
9122 Write_Str ("Master_Id");
9124 when Modular_Integer_Kind =>
9125 Write_Str ("Modulus");
9127 when E_Abstract_State |
9128 E_Incomplete_Type =>
9129 Write_Str ("Non_Limited_View");
9131 when E_Incomplete_Subtype =>
9132 if From_Limited_With (Id) then
9133 Write_Str ("Non_Limited_View");
9137 Write_Str ("Prival");
9140 Write_Str ("Field17??");
9142 end Write_Field17_Name;
9144 ------------------------
9145 -- Write_Field18_Name --
9146 ------------------------
9148 procedure Write_Field18_Name (Id : Entity_Id) is
9151 when E_Enumeration_Literal |
9155 Write_Str ("Alias");
9157 when E_Record_Type =>
9158 Write_Str ("Corresponding_Concurrent_Type");
9160 when E_Subprogram_Body =>
9161 Write_Str ("Corresponding_Protected_Entry");
9163 when Concurrent_Kind =>
9164 Write_Str ("Corresponding_Record_Type");
9169 Write_Str ("Enclosing_Scope");
9171 when E_Entry_Index_Parameter =>
9172 Write_Str ("Entry_Index_Constant");
9174 when E_Class_Wide_Subtype |
9175 E_Access_Protected_Subprogram_Type |
9176 E_Anonymous_Access_Protected_Subprogram_Type |
9177 E_Access_Subprogram_Type |
9179 Write_Str ("Equivalent_Type");
9181 when Fixed_Point_Kind =>
9182 Write_Str ("Delta_Value");
9184 when Incomplete_Or_Private_Kind |
9186 Write_Str ("Private_Dependents");
9189 Write_Str ("Renamed_Object");
9193 E_Generic_Function |
9194 E_Generic_Procedure |
9195 E_Generic_Package =>
9196 Write_Str ("Renamed_Entity");
9199 Write_Str ("Field18??");
9201 end Write_Field18_Name;
9203 -----------------------
9204 -- Write_Field19_Name --
9205 -----------------------
9207 procedure Write_Field19_Name (Id : Entity_Id) is
9211 E_Generic_Package =>
9212 Write_Str ("Body_Entity");
9214 when E_Discriminant =>
9215 Write_Str ("Corresponding_Discriminant");
9218 Write_Str ("Default_Aspect_Value");
9220 when E_Array_Type =>
9221 Write_Str ("Default_Component_Value");
9223 when E_Record_Type =>
9224 Write_Str ("Parent_Subtype");
9228 Write_Str ("Size_Check_Code");
9230 when E_Package_Body |
9232 Write_Str ("Spec_Entity");
9234 when Private_Kind =>
9235 Write_Str ("Underlying_Full_View");
9237 when E_Function | E_Operator | E_Subprogram_Type =>
9238 Write_Str ("Extra_Accessibility_Of_Result");
9241 Write_Str ("Field19??");
9243 end Write_Field19_Name;
9245 -----------------------
9246 -- Write_Field20_Name --
9247 -----------------------
9249 procedure Write_Field20_Name (Id : Entity_Id) is
9253 Write_Str ("Component_Type");
9255 when E_In_Parameter |
9256 E_Generic_In_Parameter =>
9257 Write_Str ("Default_Value");
9260 Write_Str ("Directly_Designated_Type");
9263 Write_Str ("Discriminant_Checking_Func");
9265 when E_Discriminant =>
9266 Write_Str ("Discriminant_Default_Value");
9275 E_Generic_Function |
9277 E_Generic_Procedure |
9285 E_Return_Statement |
9287 E_Subprogram_Type =>
9288 Write_Str ("Last_Entity");
9292 Write_Str ("Prival_Link");
9295 Write_Str ("Scalar_Range");
9298 Write_Str ("Register_Exception_Call");
9301 Write_Str ("Field20??");
9303 end Write_Field20_Name;
9305 -----------------------
9306 -- Write_Field21_Name --
9307 -----------------------
9309 procedure Write_Field21_Name (Id : Entity_Id) is
9313 Write_Str ("Accept_Address");
9315 when E_In_Parameter =>
9316 Write_Str ("Default_Expr_Function");
9318 when Concurrent_Kind |
9319 Incomplete_Or_Private_Kind |
9323 Write_Str ("Discriminant_Constraint");
9328 E_Generic_Function |
9330 E_Generic_Procedure |
9332 Write_Str ("Interface_Name");
9335 Modular_Integer_Kind =>
9336 Write_Str ("Original_Array_Type");
9338 when Fixed_Point_Kind =>
9339 Write_Str ("Small_Value");
9342 Write_Str ("Field21??");
9344 end Write_Field21_Name;
9346 -----------------------
9347 -- Write_Field22_Name --
9348 -----------------------
9350 procedure Write_Field22_Name (Id : Entity_Id) is
9354 Write_Str ("Associated_Storage_Pool");
9357 Write_Str ("Component_Size");
9359 when E_Record_Type =>
9360 Write_Str ("Corresponding_Remote_Type");
9364 Write_Str ("Original_Record_Component");
9366 when E_Enumeration_Literal =>
9367 Write_Str ("Enumeration_Rep_Expr");
9369 when E_Record_Type_With_Private |
9370 E_Record_Subtype_With_Private |
9373 E_Limited_Private_Type |
9374 E_Limited_Private_Subtype =>
9375 Write_Str ("Private_View");
9378 Write_Str ("Protected_Formal");
9388 E_Generic_Function |
9389 E_Generic_Procedure |
9392 E_Return_Statement |
9395 Write_Str ("Scope_Depth_Value");
9398 Write_Str ("Shared_Var_Procs_Instance");
9401 Write_Str ("Field22??");
9403 end Write_Field22_Name;
9405 ------------------------
9406 -- Write_Field23_Name --
9407 ------------------------
9409 procedure Write_Field23_Name (Id : Entity_Id) is
9412 when E_Discriminant =>
9413 Write_Str ("CR_Discriminant");
9416 Write_Str ("Entry_Cancel_Parameter");
9418 when E_Enumeration_Type =>
9419 Write_Str ("Enum_Pos_To_Rep");
9423 Write_Str ("Extra_Constrained");
9426 Write_Str ("Finalization_Master");
9428 when E_Generic_Function |
9430 E_Generic_Procedure =>
9431 Write_Str ("Inner_Instances");
9434 Write_Str ("Packed_Array_Impl_Type");
9437 Write_Str ("Protection_Object");
9439 when Concurrent_Kind |
9440 Incomplete_Or_Private_Kind |
9444 Write_Str ("Stored_Constraint");
9448 if Present (Scope (Id))
9449 and then Is_Protected_Type (Scope (Id))
9451 Write_Str ("Protection_Object");
9453 Write_Str ("Generic_Renamings");
9457 if Is_Generic_Instance (Id) then
9458 Write_Str ("Generic_Renamings");
9460 Write_Str ("Limited_View");
9464 Write_Str ("Field23??");
9466 end Write_Field23_Name;
9468 ------------------------
9469 -- Write_Field24_Name --
9470 ------------------------
9472 procedure Write_Field24_Name (Id : Entity_Id) is
9478 Write_Str ("Related_Expression");
9481 Write_Str ("Field24???");
9483 end Write_Field24_Name;
9485 ------------------------
9486 -- Write_Field25_Name --
9487 ------------------------
9489 procedure Write_Field25_Name (Id : Entity_Id) is
9492 when E_Generic_Package |
9494 Write_Str ("Abstract_States");
9497 Write_Str ("Debug_Renaming_Link");
9500 Write_Str ("DT_Offset_To_Top_Func");
9504 Write_Str ("Interface_Alias");
9506 when E_Record_Type |
9508 E_Record_Type_With_Private |
9509 E_Record_Subtype_With_Private =>
9510 Write_Str ("Interfaces");
9514 Write_Str ("Related_Array_Object");
9517 Write_Str ("Task_Body_Procedure");
9521 Write_Str ("PPC_Wrapper");
9523 when Discrete_Kind =>
9524 Write_Str ("Static_Discrete_Predicate");
9527 Write_Str ("Static_Real_Or_String_Predicate");
9530 Write_Str ("Field25??");
9532 end Write_Field25_Name;
9534 ------------------------
9535 -- Write_Field26_Name --
9536 ------------------------
9538 procedure Write_Field26_Name (Id : Entity_Id) is
9541 when E_Record_Type |
9542 E_Record_Type_With_Private =>
9543 Write_Str ("Dispatch_Table_Wrappers");
9545 when E_In_Out_Parameter |
9548 Write_Str ("Last_Assignment");
9550 when E_Access_Subprogram_Type =>
9551 Write_Str ("Original_Access_Type");
9553 when E_Generic_Package |
9555 Write_Str ("Package_Instantiation");
9559 Write_Str ("Related_Type");
9562 Write_Str ("Relative_Deadline_Variable");
9566 Write_Str ("Overridden_Operation");
9569 Write_Str ("Field26??");
9571 end Write_Field26_Name;
9573 ------------------------
9574 -- Write_Field27_Name --
9575 ------------------------
9577 procedure Write_Field27_Name (Id : Entity_Id) is
9582 Write_Str ("Current_Use_Clause");
9587 Write_Str ("Related_Type");
9591 Write_Str ("Wrapped_Entity");
9594 Write_Str ("Field27??");
9596 end Write_Field27_Name;
9598 ------------------------
9599 -- Write_Field28_Name --
9600 ------------------------
9602 procedure Write_Field28_Name (Id : Entity_Id) is
9610 E_Subprogram_Type =>
9611 Write_Str ("Extra_Formals");
9615 Write_Str ("Finalizer");
9619 Write_Str ("Initialization_Statements");
9621 when E_Record_Type =>
9622 Write_Str ("Underlying_Record_View");
9625 Write_Str ("Field28??");
9627 end Write_Field28_Name;
9629 ------------------------
9630 -- Write_Field29_Name --
9631 ------------------------
9633 procedure Write_Field29_Name (Id : Entity_Id) is
9638 Write_Str ("BIP_Initialization_Call");
9641 Write_Str ("Subprograms_For_Type");
9644 Write_Str ("Field29??");
9646 end Write_Field29_Name;
9648 ------------------------
9649 -- Write_Field30_Name --
9650 ------------------------
9652 procedure Write_Field30_Name (Id : Entity_Id) is
9656 Write_Str ("Corresponding_Equality");
9660 Write_Str ("Last_Aggregate_Assignment");
9663 Write_Str ("Static_Initialization");
9666 Write_Str ("Field30??");
9668 end Write_Field30_Name;
9670 ------------------------
9671 -- Write_Field31_Name --
9672 ------------------------
9674 procedure Write_Field31_Name (Id : Entity_Id) is
9679 Write_Str ("Thunk_Entity");
9682 Write_Str ("Derived_Type_Link");
9685 Write_Str ("Field31??");
9687 end Write_Field31_Name;
9689 ------------------------
9690 -- Write_Field32_Name --
9691 ------------------------
9693 procedure Write_Field32_Name (Id : Entity_Id) is
9697 E_Generic_Function |
9699 E_Generic_Procedure |
9703 E_Subprogram_Body =>
9704 Write_Str ("SPARK_Pragma");
9707 Write_Str ("Field32??");
9709 end Write_Field32_Name;
9711 ------------------------
9712 -- Write_Field33_Name --
9713 ------------------------
9715 procedure Write_Field33_Name (Id : Entity_Id) is
9718 when E_Generic_Package |
9721 Write_Str ("SPARK_Aux_Pragma");
9727 Write_Str ("Linker_Section_Pragma");
9730 Write_Str ("Field33??");
9732 end Write_Field33_Name;
9734 ------------------------
9735 -- Write_Field34_Name --
9736 ------------------------
9738 procedure Write_Field34_Name (Id : Entity_Id) is
9748 Generic_Subprogram_Kind |
9750 Write_Str ("Contract");
9753 Write_Str ("Field34??");
9755 end Write_Field34_Name;
9757 ------------------------
9758 -- Write_Field35_Name --
9759 ------------------------
9761 procedure Write_Field35_Name (Id : Entity_Id) is
9764 when Subprogram_Kind =>
9765 Write_Str ("Import_Pragma");
9767 Write_Str ("Field35??");
9769 end Write_Field35_Name;
9771 -------------------------
9772 -- Iterator Procedures --
9773 -------------------------
9775 procedure Proc_Next_Component (N : in out Node_Id) is
9777 N := Next_Component (N);
9778 end Proc_Next_Component;
9780 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9782 N := Next_Entity (N);
9783 while Present (N) loop
9784 exit when Ekind_In (N, E_Component, E_Discriminant);
9785 N := Next_Entity (N);
9787 end Proc_Next_Component_Or_Discriminant;
9789 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9791 N := Next_Discriminant (N);
9792 end Proc_Next_Discriminant;
9794 procedure Proc_Next_Formal (N : in out Node_Id) is
9796 N := Next_Formal (N);
9797 end Proc_Next_Formal;
9799 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9801 N := Next_Formal_With_Extras (N);
9802 end Proc_Next_Formal_With_Extras;
9804 procedure Proc_Next_Index (N : in out Node_Id) is
9806 N := Next_Index (N);
9807 end Proc_Next_Index;
9809 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9811 N := Next_Inlined_Subprogram (N);
9812 end Proc_Next_Inlined_Subprogram;
9814 procedure Proc_Next_Literal (N : in out Node_Id) is
9816 N := Next_Literal (N);
9817 end Proc_Next_Literal;
9819 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9821 N := Next_Stored_Discriminant (N);
9822 end Proc_Next_Stored_Discriminant;