2013-05-14 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ada / einfo.adb
blobbfe5b37dad1042998e18929414e6288bd61f73fa
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
10 -- --
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. --
17 -- --
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. --
21 -- --
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/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Namet; use Namet;
37 with Nlists; use Nlists;
38 with Output; use Output;
39 with Sinfo; use Sinfo;
40 with Stand; use Stand;
42 package body Einfo is
44 use Atree.Unchecked_Access;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
60 -- Chars Name1
61 -- Next_Entity Node2
62 -- Scope Node3
63 -- Etype Node5
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
69 -- Homonym Node4
70 -- First_Rep_Item Node6
71 -- Freeze_Node Node7
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
79 -- Integrity_Level Uint8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Refined_State Node9
89 -- Renaming_Map Uint9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
97 -- Component_Bit_Offset Uint11
98 -- Full_View Node11
99 -- Entry_Component Node11
100 -- Enumeration_Pos Uint11
101 -- Generic_Homonym Node11
102 -- Protected_Body_Subprogram Node11
103 -- Block_Node Node11
105 -- Barrier_Function Node12
106 -- Enumeration_Rep Uint12
107 -- Esize Uint12
108 -- Next_Inlined_Subprogram Node12
110 -- Component_Clause Node13
111 -- Elaboration_Entity Node13
112 -- Extra_Accessibility Node13
113 -- RM_Size Uint13
115 -- Alignment Uint14
116 -- First_Optional_Parameter Node14
117 -- Normalized_Position Uint14
118 -- Shadow_Entities List14
120 -- Discriminant_Number Uint15
121 -- DT_Position Uint15
122 -- DT_Entry_Count Uint15
123 -- Entry_Bodies_Array Node15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Lit_Indexes Node15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
129 -- Scale_Value Uint15
130 -- Storage_Size_Variable Node15
131 -- String_Literal_Low_Bound Node15
133 -- Access_Disp_Table Elist16
134 -- Cloned_Subtype Node16
135 -- DTC_Entity Node16
136 -- Entry_Formal Node16
137 -- First_Private_Entity Node16
138 -- Lit_Strings Node16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
148 -- Master_Id Node17
149 -- Modulus Uint17
150 -- Non_Limited_View Node17
151 -- Prival Node17
153 -- Alias Node18
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Protected_Entry Node18
156 -- Corresponding_Record_Type Node18
157 -- Delta_Value Ureal18
158 -- Enclosing_Scope Node18
159 -- Equivalent_Type Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Default_Aspect_Component_Value Node19
167 -- Default_Aspect_Value Node19
168 -- Extra_Accessibility_Of_Result Node19
169 -- Parent_Subtype Node19
170 -- Size_Check_Code Node19
171 -- Spec_Entity Node19
172 -- Underlying_Full_View Node19
174 -- Component_Type Node20
175 -- Default_Value Node20
176 -- Directly_Designated_Type Node20
177 -- Discriminant_Checking_Func Node20
178 -- Discriminant_Default_Value Node20
179 -- Last_Entity Node20
180 -- Prival_Link Node20
181 -- Register_Exception_Call Node20
182 -- Scalar_Range Node20
184 -- Accept_Address Elist21
185 -- Default_Expr_Function Node21
186 -- Discriminant_Constraint Elist21
187 -- Interface_Name Node21
188 -- Original_Array_Type Node21
189 -- Small_Value Ureal21
191 -- Associated_Storage_Pool Node22
192 -- Component_Size Uint22
193 -- Corresponding_Remote_Type Node22
194 -- Enumeration_Rep_Expr Node22
195 -- Exception_Code Uint22
196 -- Original_Record_Component Node22
197 -- Private_View Node22
198 -- Protected_Formal Node22
199 -- Scope_Depth_Value Uint22
200 -- Shared_Var_Procs_Instance Node22
202 -- CR_Discriminant Node23
203 -- Entry_Cancel_Parameter Node23
204 -- Enum_Pos_To_Rep Node23
205 -- Extra_Constrained Node23
206 -- Finalization_Master Node23
207 -- Generic_Renamings Elist23
208 -- Inner_Instances Elist23
209 -- Limited_View Node23
210 -- Packed_Array_Type Node23
211 -- Protection_Object Node23
212 -- Stored_Constraint Elist23
214 -- Finalizer Node24
215 -- Related_Expression Node24
216 -- Contract Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
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
239 -- Initialization_Statements Node28
240 -- Underlying_Record_View Node28
242 -- Subprograms_For_Type Node29
244 -- Corresponding_Equality Node30
245 -- Static_Initialization Node30
247 -- Thunk_Entity Node31
249 -- (unused) Node32
251 -- (unused) Node33
253 -- (unused) Node34
255 -- (unused) Node35
257 ---------------------------------------------
258 -- Usage of Flags in Defining Entity Nodes --
259 ---------------------------------------------
261 -- All flags are unique, there is no overlaying, so each flag is physically
262 -- present in every entity. However, for many of the flags, it only makes
263 -- sense for them to be set true for certain subsets of entity kinds. See
264 -- the spec of Einfo for further details.
266 -- Note: Flag1-Flag3 are not used, for historical reasons
268 -- Is_Frozen Flag4
269 -- Has_Discriminants Flag5
270 -- Is_Dispatching_Operation Flag6
271 -- Is_Immediately_Visible Flag7
272 -- In_Use Flag8
273 -- Is_Potentially_Use_Visible Flag9
274 -- Is_Public Flag10
276 -- Is_Inlined Flag11
277 -- Is_Constrained Flag12
278 -- Is_Generic_Type Flag13
279 -- Depends_On_Private Flag14
280 -- Is_Aliased Flag15
281 -- Is_Volatile Flag16
282 -- Is_Internal Flag17
283 -- Has_Delayed_Freeze Flag18
284 -- Is_Abstract_Subprogram Flag19
285 -- Is_Concurrent_Record_Type Flag20
287 -- Has_Master_Entity Flag21
288 -- Needs_No_Actuals Flag22
289 -- Has_Storage_Size_Clause Flag23
290 -- Is_Imported Flag24
291 -- Is_Limited_Record Flag25
292 -- Has_Completion Flag26
293 -- Has_Pragma_Controlled Flag27
294 -- Is_Statically_Allocated Flag28
295 -- Has_Size_Clause Flag29
296 -- Has_Task Flag30
298 -- Checks_May_Be_Suppressed Flag31
299 -- Kill_Elaboration_Checks Flag32
300 -- Kill_Range_Checks Flag33
301 -- Has_Independent_Components Flag34
302 -- Is_Class_Wide_Equivalent_Type Flag35
303 -- Referenced_As_LHS Flag36
304 -- Is_Known_Non_Null Flag37
305 -- Can_Never_Be_Null Flag38
306 -- Has_Default_Aspect Flag39
307 -- Body_Needed_For_SAL Flag40
309 -- Treat_As_Volatile Flag41
310 -- Is_Controlled Flag42
311 -- Has_Controlled_Component Flag43
312 -- Is_Pure Flag44
313 -- In_Private_Part Flag45
314 -- Has_Alignment_Clause Flag46
315 -- Has_Exit Flag47
316 -- In_Package_Body Flag48
317 -- Reachable Flag49
318 -- Delay_Subprogram_Descriptors Flag50
320 -- Is_Packed Flag51
321 -- Is_Entry_Formal Flag52
322 -- Is_Private_Descendant Flag53
323 -- Return_Present Flag54
324 -- Is_Tagged_Type Flag55
325 -- Has_Homonym Flag56
326 -- Is_Hidden Flag57
327 -- Non_Binary_Modulus Flag58
328 -- Is_Preelaborated Flag59
329 -- Is_Shared_Passive Flag60
331 -- Is_Remote_Types Flag61
332 -- Is_Remote_Call_Interface Flag62
333 -- Is_Character_Type Flag63
334 -- Is_Intrinsic_Subprogram Flag64
335 -- Has_Record_Rep_Clause Flag65
336 -- Has_Enumeration_Rep_Clause Flag66
337 -- Has_Small_Clause Flag67
338 -- Has_Component_Size_Clause Flag68
339 -- Is_Access_Constant Flag69
340 -- Is_First_Subtype Flag70
342 -- Has_Completion_In_Body Flag71
343 -- Has_Unknown_Discriminants Flag72
344 -- Is_Child_Unit Flag73
345 -- Is_CPP_Class Flag74
346 -- Has_Non_Standard_Rep Flag75
347 -- Is_Constructor Flag76
348 -- Static_Elaboration_Desired Flag77
349 -- Is_Tag Flag78
350 -- Has_All_Calls_Remote Flag79
351 -- Is_Constr_Subt_For_U_Nominal Flag80
353 -- Is_Asynchronous Flag81
354 -- Has_Gigi_Rep_Item Flag82
355 -- Has_Machine_Radix_Clause Flag83
356 -- Machine_Radix_10 Flag84
357 -- Is_Atomic Flag85
358 -- Has_Atomic_Components Flag86
359 -- Has_Volatile_Components Flag87
360 -- Discard_Names Flag88
361 -- Is_Interrupt_Handler Flag89
362 -- Returns_By_Ref Flag90
364 -- Is_Itype Flag91
365 -- Size_Known_At_Compile_Time Flag92
366 -- Reverse_Storage_Order Flag93
367 -- Is_Generic_Actual_Type Flag94
368 -- Uses_Sec_Stack Flag95
369 -- Warnings_Off Flag96
370 -- Is_Controlling_Formal Flag97
371 -- Has_Controlling_Result Flag98
372 -- Is_Exported Flag99
373 -- Has_Specified_Layout Flag100
375 -- Has_Nested_Block_With_Handler Flag101
376 -- Is_Called Flag102
377 -- Is_Completely_Hidden Flag103
378 -- Address_Taken Flag104
379 -- Suppress_Initialization Flag105
380 -- Is_Limited_Composite Flag106
381 -- Is_Private_Composite Flag107
382 -- Default_Expressions_Processed Flag108
383 -- Is_Non_Static_Subtype Flag109
384 -- Has_External_Tag_Rep_Clause Flag110
386 -- Is_Formal_Subprogram Flag111
387 -- Is_Renaming_Of_Object Flag112
388 -- No_Return Flag113
389 -- Delay_Cleanups Flag114
390 -- Never_Set_In_Source Flag115
391 -- Is_Visible_Lib_Unit Flag116
392 -- Is_Unchecked_Union Flag117
393 -- Is_For_Access_Subtype Flag118
394 -- Has_Convention_Pragma Flag119
395 -- Has_Primitive_Operations Flag120
397 -- Has_Pragma_Pack Flag121
398 -- Is_Bit_Packed_Array Flag122
399 -- Has_Unchecked_Union Flag123
400 -- Is_Eliminated Flag124
401 -- C_Pass_By_Copy Flag125
402 -- Is_Instantiated Flag126
403 -- Is_Valued_Procedure Flag127
404 -- (used for Component_Alignment) Flag128
405 -- (used for Component_Alignment) Flag129
406 -- Is_Generic_Instance Flag130
408 -- No_Pool_Assigned Flag131
409 -- Is_AST_Entry Flag132
410 -- Is_VMS_Exception Flag133
411 -- Is_Optional_Parameter Flag134
412 -- Has_Aliased_Components Flag135
413 -- No_Strict_Aliasing Flag136
414 -- Is_Machine_Code_Subprogram Flag137
415 -- Is_Packed_Array_Type Flag138
416 -- Has_Biased_Representation Flag139
417 -- Has_Complex_Representation Flag140
419 -- Is_Constr_Subt_For_UN_Aliased Flag141
420 -- Has_Missing_Return Flag142
421 -- Has_Recursive_Call Flag143
422 -- Is_Unsigned_Type Flag144
423 -- Strict_Alignment Flag145
424 -- Is_Abstract_Type Flag146
425 -- Needs_Debug_Info Flag147
426 -- Suppress_Elaboration_Warnings Flag148
427 -- Is_Compilation_Unit Flag149
428 -- Has_Pragma_Elaborate_Body Flag150
430 -- Has_Private_Ancestor Flag151
431 -- Entry_Accepted Flag152
432 -- Is_Obsolescent Flag153
433 -- Has_Per_Object_Constraint Flag154
434 -- Has_Private_Declaration Flag155
435 -- Referenced Flag156
436 -- Has_Pragma_Inline Flag157
437 -- Finalize_Storage_Only Flag158
438 -- From_With_Type Flag159
439 -- Is_Package_Body_Entity Flag160
441 -- Has_Qualified_Name Flag161
442 -- Nonzero_Is_True Flag162
443 -- Is_True_Constant Flag163
444 -- Reverse_Bit_Order Flag164
445 -- Suppress_Style_Checks Flag165
446 -- Debug_Info_Off Flag166
447 -- Sec_Stack_Needed_For_Return Flag167
448 -- Materialize_Entity Flag168
449 -- Has_Pragma_Thread_Local_Storage Flag169
450 -- Is_Known_Valid Flag170
452 -- Is_Hidden_Open_Scope Flag171
453 -- Has_Object_Size_Clause Flag172
454 -- Has_Fully_Qualified_Name Flag173
455 -- Elaboration_Entity_Required Flag174
456 -- Has_Forward_Instantiation Flag175
457 -- Is_Discrim_SO_Function Flag176
458 -- Size_Depends_On_Discriminant Flag177
459 -- Is_Null_Init_Proc Flag178
460 -- Has_Pragma_Pure_Function Flag179
461 -- Has_Pragma_Unreferenced Flag180
463 -- Has_Contiguous_Rep Flag181
464 -- Has_Xref_Entry Flag182
465 -- Must_Be_On_Byte_Boundary Flag183
466 -- Has_Stream_Size_Clause Flag184
467 -- Is_Ada_2005_Only Flag185
468 -- Is_Interface Flag186
469 -- Has_Constrained_Partial_View Flag187
470 -- Uses_Lock_Free Flag188
471 -- Is_Pure_Unit_Access_Type Flag189
472 -- Has_Specified_Stream_Input Flag190
474 -- Has_Specified_Stream_Output Flag191
475 -- Has_Specified_Stream_Read Flag192
476 -- Has_Specified_Stream_Write Flag193
477 -- Is_Local_Anonymous_Access Flag194
478 -- Is_Primitive_Wrapper Flag195
479 -- Was_Hidden Flag196
480 -- Is_Limited_Interface Flag197
481 -- Has_Pragma_Ordered Flag198
482 -- Is_Ada_2012_Only Flag199
484 -- Has_Delayed_Aspects Flag200
485 -- Has_Pragma_No_Inline Flag201
486 -- Itype_Printed Flag202
487 -- Has_Pragma_Pure Flag203
488 -- Is_Known_Null Flag204
489 -- Low_Bound_Tested Flag205
490 -- Is_Visible_Formal Flag206
491 -- Known_To_Have_Preelab_Init Flag207
492 -- Must_Have_Preelab_Init Flag208
493 -- Is_Return_Object Flag209
494 -- Elaborate_Body_Desirable Flag210
496 -- Has_Static_Discriminants Flag211
497 -- Has_Pragma_Unreferenced_Objects Flag212
498 -- Requires_Overriding Flag213
499 -- Has_RACW Flag214
500 -- Has_Up_Level_Access Flag215
501 -- Universal_Aliasing Flag216
502 -- Suppress_Value_Tracking_On_Call Flag217
503 -- Is_Primitive Flag218
504 -- Has_Initial_Value Flag219
505 -- Has_Dispatch_Table Flag220
507 -- Has_Pragma_Preelab_Init Flag221
508 -- Used_As_Generic_Actual Flag222
509 -- Is_Descendent_Of_Address Flag223
510 -- Is_Raised Flag224
511 -- Is_Thunk Flag225
512 -- Is_Only_Out_Parameter Flag226
513 -- Referenced_As_Out_Parameter Flag227
514 -- Has_Thunks Flag228
515 -- Can_Use_Internal_Rep Flag229
516 -- Has_Pragma_Inline_Always Flag230
518 -- Renamed_In_Spec Flag231
519 -- Has_Invariants Flag232
520 -- Has_Pragma_Unmodified Flag233
521 -- Is_Dispatch_Table_Entity Flag234
522 -- Is_Trivial_Subprogram Flag235
523 -- Warnings_Off_Used Flag236
524 -- Warnings_Off_Used_Unmodified Flag237
525 -- Warnings_Off_Used_Unreferenced Flag238
526 -- OK_To_Reorder_Components Flag239
527 -- Has_Postconditions Flag240
529 -- Optimize_Alignment_Space Flag241
530 -- Optimize_Alignment_Time Flag242
531 -- Overlays_Constant Flag243
532 -- Is_RACW_Stub_Type Flag244
533 -- Is_Private_Primitive Flag245
534 -- Is_Underlying_Record_View Flag246
535 -- OK_To_Rename Flag247
536 -- Has_Inheritable_Invariants Flag248
537 -- Is_Safe_To_Reevaluate Flag249
538 -- Has_Predicates Flag250
540 -- Has_Implicit_Dereference Flag251
541 -- Is_Processed_Transient Flag252
542 -- Has_Anonymous_Master Flag253
543 -- Is_Implementation_Defined Flag254
544 -- Is_Predicate_Function Flag255
545 -- Is_Predicate_Function_M Flag256
546 -- Is_Invariant_Procedure Flag257
547 -- Has_Dynamic_Predicate_Aspect Flag258
548 -- Has_Static_Predicate_Aspect Flag259
549 -- Has_Loop_Entry_Attributes Flag260
551 -- (unused) Flag261
552 -- (unused) Flag262
553 -- (unused) Flag263
554 -- (unused) Flag264
555 -- (unused) Flag265
556 -- (unused) Flag266
557 -- (unused) Flag267
558 -- (unused) Flag268
559 -- (unused) Flag269
560 -- (unused) Flag270
562 -- (unused) Flag271
563 -- (unused) Flag272
564 -- (unused) Flag273
565 -- (unused) Flag274
566 -- (unused) Flag275
567 -- (unused) Flag276
568 -- (unused) Flag277
569 -- (unused) Flag278
570 -- (unused) Flag279
571 -- (unused) Flag280
573 -- (unused) Flag281
574 -- (unused) Flag282
575 -- (unused) Flag283
576 -- (unused) Flag284
577 -- (unused) Flag285
578 -- (unused) Flag286
580 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
582 -----------------------
583 -- Local subprograms --
584 -----------------------
586 function Has_Property
587 (State : Entity_Id;
588 Prop_Nam : Name_Id) return Boolean;
589 -- Determine whether abstract state State has a particular property denoted
590 -- by the name Prop_Nam.
592 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
593 -- Returns the attribute definition clause for Id whose name is Rep_Name.
594 -- Returns Empty if no matching attribute definition clause found for Id.
596 ---------------
597 -- Float_Rep --
598 ---------------
600 function Float_Rep (Id : E) return F is
601 pragma Assert (Is_Floating_Point_Type (Id));
602 begin
603 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
604 end Float_Rep;
606 ------------------
607 -- Has_Property --
608 ------------------
610 function Has_Property
611 (State : Entity_Id;
612 Prop_Nam : Name_Id) return Boolean
614 Par : constant Node_Id := Parent (State);
615 Prop : Node_Id;
617 begin
618 pragma Assert (Ekind (State) = E_Abstract_State);
620 -- States with properties appear as extension aggregates in the tree
622 if Nkind (Par) = N_Extension_Aggregate then
623 if Prop_Nam = Name_Integrity then
624 return Present (Component_Associations (Par));
626 else
627 Prop := First (Expressions (Par));
628 while Present (Prop) loop
629 if Chars (Prop) = Prop_Nam then
630 return True;
631 end if;
633 Next (Prop);
634 end loop;
635 end if;
636 end if;
638 return False;
639 end Has_Property;
641 ----------------
642 -- Rep_Clause --
643 ----------------
645 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
646 Ritem : Node_Id;
648 begin
649 Ritem := First_Rep_Item (Id);
650 while Present (Ritem) loop
651 if Nkind (Ritem) = N_Attribute_Definition_Clause
652 and then Chars (Ritem) = Rep_Name
653 then
654 return Ritem;
655 else
656 Next_Rep_Item (Ritem);
657 end if;
658 end loop;
660 return Empty;
661 end Rep_Clause;
663 --------------------------------
664 -- Attribute Access Functions --
665 --------------------------------
667 function Abstract_States (Id : E) return L is
668 begin
669 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
670 return Elist25 (Id);
671 end Abstract_States;
673 function Accept_Address (Id : E) return L is
674 begin
675 return Elist21 (Id);
676 end Accept_Address;
678 function Access_Disp_Table (Id : E) return L is
679 begin
680 pragma Assert (Ekind_In (Id, E_Record_Type,
681 E_Record_Subtype));
682 return Elist16 (Implementation_Base_Type (Id));
683 end Access_Disp_Table;
685 function Actual_Subtype (Id : E) return E is
686 begin
687 pragma Assert
688 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
689 or else Is_Formal (Id));
690 return Node17 (Id);
691 end Actual_Subtype;
693 function Address_Taken (Id : E) return B is
694 begin
695 return Flag104 (Id);
696 end Address_Taken;
698 function Alias (Id : E) return E is
699 begin
700 pragma Assert
701 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
702 return Node18 (Id);
703 end Alias;
705 function Alignment (Id : E) return U is
706 begin
707 pragma Assert (Is_Type (Id)
708 or else Is_Formal (Id)
709 or else Ekind_In (Id, E_Loop_Parameter,
710 E_Constant,
711 E_Exception,
712 E_Variable));
713 return Uint14 (Id);
714 end Alignment;
716 function Associated_Formal_Package (Id : E) return E is
717 begin
718 pragma Assert (Ekind (Id) = E_Package);
719 return Node12 (Id);
720 end Associated_Formal_Package;
722 function Associated_Node_For_Itype (Id : E) return N is
723 begin
724 return Node8 (Id);
725 end Associated_Node_For_Itype;
727 function Associated_Storage_Pool (Id : E) return E is
728 begin
729 pragma Assert (Is_Access_Type (Id));
730 return Node22 (Root_Type (Id));
731 end Associated_Storage_Pool;
733 function Barrier_Function (Id : E) return N is
734 begin
735 pragma Assert (Is_Entry (Id));
736 return Node12 (Id);
737 end Barrier_Function;
739 function Block_Node (Id : E) return N is
740 begin
741 pragma Assert (Ekind (Id) = E_Block);
742 return Node11 (Id);
743 end Block_Node;
745 function Body_Entity (Id : E) return E is
746 begin
747 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
748 return Node19 (Id);
749 end Body_Entity;
751 function Body_Needed_For_SAL (Id : E) return B is
752 begin
753 pragma Assert
754 (Ekind (Id) = E_Package
755 or else Is_Subprogram (Id)
756 or else Is_Generic_Unit (Id));
757 return Flag40 (Id);
758 end Body_Needed_For_SAL;
760 function C_Pass_By_Copy (Id : E) return B is
761 begin
762 pragma Assert (Is_Record_Type (Id));
763 return Flag125 (Implementation_Base_Type (Id));
764 end C_Pass_By_Copy;
766 function Can_Never_Be_Null (Id : E) return B is
767 begin
768 return Flag38 (Id);
769 end Can_Never_Be_Null;
771 function Checks_May_Be_Suppressed (Id : E) return B is
772 begin
773 return Flag31 (Id);
774 end Checks_May_Be_Suppressed;
776 function Class_Wide_Type (Id : E) return E is
777 begin
778 pragma Assert (Is_Type (Id));
779 return Node9 (Id);
780 end Class_Wide_Type;
782 function Cloned_Subtype (Id : E) return E is
783 begin
784 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
785 return Node16 (Id);
786 end Cloned_Subtype;
788 function Component_Bit_Offset (Id : E) return U is
789 begin
790 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
791 return Uint11 (Id);
792 end Component_Bit_Offset;
794 function Component_Clause (Id : E) return N is
795 begin
796 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
797 return Node13 (Id);
798 end Component_Clause;
800 function Component_Size (Id : E) return U is
801 begin
802 pragma Assert (Is_Array_Type (Id));
803 return Uint22 (Implementation_Base_Type (Id));
804 end Component_Size;
806 function Component_Type (Id : E) return E is
807 begin
808 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
809 return Node20 (Implementation_Base_Type (Id));
810 end Component_Type;
812 function Corresponding_Concurrent_Type (Id : E) return E is
813 begin
814 pragma Assert (Ekind (Id) = E_Record_Type);
815 return Node18 (Id);
816 end Corresponding_Concurrent_Type;
818 function Corresponding_Discriminant (Id : E) return E is
819 begin
820 pragma Assert (Ekind (Id) = E_Discriminant);
821 return Node19 (Id);
822 end Corresponding_Discriminant;
824 function Corresponding_Equality (Id : E) return E is
825 begin
826 pragma Assert
827 (Ekind (Id) = E_Function
828 and then not Comes_From_Source (Id)
829 and then Chars (Id) = Name_Op_Ne);
830 return Node30 (Id);
831 end Corresponding_Equality;
833 function Corresponding_Protected_Entry (Id : E) return E is
834 begin
835 pragma Assert (Ekind (Id) = E_Subprogram_Body);
836 return Node18 (Id);
837 end Corresponding_Protected_Entry;
839 function Corresponding_Record_Type (Id : E) return E is
840 begin
841 pragma Assert (Is_Concurrent_Type (Id));
842 return Node18 (Id);
843 end Corresponding_Record_Type;
845 function Corresponding_Remote_Type (Id : E) return E is
846 begin
847 return Node22 (Id);
848 end Corresponding_Remote_Type;
850 function Current_Use_Clause (Id : E) return E is
851 begin
852 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
853 return Node27 (Id);
854 end Current_Use_Clause;
856 function Current_Value (Id : E) return N is
857 begin
858 pragma Assert (Ekind (Id) in Object_Kind);
859 return Node9 (Id);
860 end Current_Value;
862 function CR_Discriminant (Id : E) return E is
863 begin
864 return Node23 (Id);
865 end CR_Discriminant;
867 function Debug_Info_Off (Id : E) return B is
868 begin
869 return Flag166 (Id);
870 end Debug_Info_Off;
872 function Debug_Renaming_Link (Id : E) return E is
873 begin
874 return Node25 (Id);
875 end Debug_Renaming_Link;
877 function Default_Aspect_Component_Value (Id : E) return N is
878 begin
879 pragma Assert (Is_Array_Type (Id));
880 return Node19 (Id);
881 end Default_Aspect_Component_Value;
883 function Default_Aspect_Value (Id : E) return N is
884 begin
885 pragma Assert (Is_Scalar_Type (Id));
886 return Node19 (Id);
887 end Default_Aspect_Value;
889 function Default_Expr_Function (Id : E) return E is
890 begin
891 pragma Assert (Is_Formal (Id));
892 return Node21 (Id);
893 end Default_Expr_Function;
895 function Default_Expressions_Processed (Id : E) return B is
896 begin
897 return Flag108 (Id);
898 end Default_Expressions_Processed;
900 function Default_Value (Id : E) return N is
901 begin
902 pragma Assert (Is_Formal (Id));
903 return Node20 (Id);
904 end Default_Value;
906 function Delay_Cleanups (Id : E) return B is
907 begin
908 return Flag114 (Id);
909 end Delay_Cleanups;
911 function Delay_Subprogram_Descriptors (Id : E) return B is
912 begin
913 return Flag50 (Id);
914 end Delay_Subprogram_Descriptors;
916 function Delta_Value (Id : E) return R is
917 begin
918 pragma Assert (Is_Fixed_Point_Type (Id));
919 return Ureal18 (Id);
920 end Delta_Value;
922 function Dependent_Instances (Id : E) return L is
923 begin
924 pragma Assert (Is_Generic_Instance (Id));
925 return Elist8 (Id);
926 end Dependent_Instances;
928 function Depends_On_Private (Id : E) return B is
929 begin
930 pragma Assert (Nkind (Id) in N_Entity);
931 return Flag14 (Id);
932 end Depends_On_Private;
934 function Digits_Value (Id : E) return U is
935 begin
936 pragma Assert
937 (Is_Floating_Point_Type (Id)
938 or else Is_Decimal_Fixed_Point_Type (Id));
939 return Uint17 (Id);
940 end Digits_Value;
942 function Direct_Primitive_Operations (Id : E) return L is
943 begin
944 pragma Assert (Is_Tagged_Type (Id));
945 return Elist10 (Id);
946 end Direct_Primitive_Operations;
948 function Directly_Designated_Type (Id : E) return E is
949 begin
950 pragma Assert (Is_Access_Type (Id));
951 return Node20 (Id);
952 end Directly_Designated_Type;
954 function Discard_Names (Id : E) return B is
955 begin
956 return Flag88 (Id);
957 end Discard_Names;
959 function Discriminal (Id : E) return E is
960 begin
961 pragma Assert (Ekind (Id) = E_Discriminant);
962 return Node17 (Id);
963 end Discriminal;
965 function Discriminal_Link (Id : E) return N is
966 begin
967 return Node10 (Id);
968 end Discriminal_Link;
970 function Discriminant_Checking_Func (Id : E) return E is
971 begin
972 pragma Assert (Ekind (Id) = E_Component);
973 return Node20 (Id);
974 end Discriminant_Checking_Func;
976 function Discriminant_Constraint (Id : E) return L is
977 begin
978 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
979 return Elist21 (Id);
980 end Discriminant_Constraint;
982 function Discriminant_Default_Value (Id : E) return N is
983 begin
984 pragma Assert (Ekind (Id) = E_Discriminant);
985 return Node20 (Id);
986 end Discriminant_Default_Value;
988 function Discriminant_Number (Id : E) return U is
989 begin
990 pragma Assert (Ekind (Id) = E_Discriminant);
991 return Uint15 (Id);
992 end Discriminant_Number;
994 function Dispatch_Table_Wrappers (Id : E) return L is
995 begin
996 pragma Assert (Ekind_In (Id, E_Record_Type,
997 E_Record_Subtype));
998 return Elist26 (Implementation_Base_Type (Id));
999 end Dispatch_Table_Wrappers;
1001 function DT_Entry_Count (Id : E) return U is
1002 begin
1003 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1004 return Uint15 (Id);
1005 end DT_Entry_Count;
1007 function DT_Offset_To_Top_Func (Id : E) return E is
1008 begin
1009 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1010 return Node25 (Id);
1011 end DT_Offset_To_Top_Func;
1013 function DT_Position (Id : E) return U is
1014 begin
1015 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1016 and then Present (DTC_Entity (Id)));
1017 return Uint15 (Id);
1018 end DT_Position;
1020 function DTC_Entity (Id : E) return E is
1021 begin
1022 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1023 return Node16 (Id);
1024 end DTC_Entity;
1026 function Elaborate_Body_Desirable (Id : E) return B is
1027 begin
1028 pragma Assert (Ekind (Id) = E_Package);
1029 return Flag210 (Id);
1030 end Elaborate_Body_Desirable;
1032 function Elaboration_Entity (Id : E) return E is
1033 begin
1034 pragma Assert
1035 (Is_Subprogram (Id)
1036 or else
1037 Ekind (Id) = E_Package
1038 or else
1039 Is_Generic_Unit (Id));
1040 return Node13 (Id);
1041 end Elaboration_Entity;
1043 function Elaboration_Entity_Required (Id : E) return B is
1044 begin
1045 pragma Assert
1046 (Is_Subprogram (Id)
1047 or else
1048 Ekind (Id) = E_Package
1049 or else
1050 Is_Generic_Unit (Id));
1051 return Flag174 (Id);
1052 end Elaboration_Entity_Required;
1054 function Enclosing_Scope (Id : E) return E is
1055 begin
1056 return Node18 (Id);
1057 end Enclosing_Scope;
1059 function Entry_Accepted (Id : E) return B is
1060 begin
1061 pragma Assert (Is_Entry (Id));
1062 return Flag152 (Id);
1063 end Entry_Accepted;
1065 function Entry_Bodies_Array (Id : E) return E is
1066 begin
1067 return Node15 (Id);
1068 end Entry_Bodies_Array;
1070 function Entry_Cancel_Parameter (Id : E) return E is
1071 begin
1072 return Node23 (Id);
1073 end Entry_Cancel_Parameter;
1075 function Entry_Component (Id : E) return E is
1076 begin
1077 return Node11 (Id);
1078 end Entry_Component;
1080 function Entry_Formal (Id : E) return E is
1081 begin
1082 return Node16 (Id);
1083 end Entry_Formal;
1085 function Entry_Index_Constant (Id : E) return N is
1086 begin
1087 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1088 return Node18 (Id);
1089 end Entry_Index_Constant;
1091 function Contract (Id : E) return N is
1092 begin
1093 pragma Assert
1094 (Ekind_In (Id, E_Entry, E_Entry_Family)
1095 or else Is_Subprogram (Id)
1096 or else Is_Generic_Subprogram (Id));
1097 return Node24 (Id);
1098 end Contract;
1100 function Entry_Parameters_Type (Id : E) return E is
1101 begin
1102 return Node15 (Id);
1103 end Entry_Parameters_Type;
1105 function Enum_Pos_To_Rep (Id : E) return E is
1106 begin
1107 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1108 return Node23 (Id);
1109 end Enum_Pos_To_Rep;
1111 function Enumeration_Pos (Id : E) return Uint is
1112 begin
1113 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1114 return Uint11 (Id);
1115 end Enumeration_Pos;
1117 function Enumeration_Rep (Id : E) return U is
1118 begin
1119 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1120 return Uint12 (Id);
1121 end Enumeration_Rep;
1123 function Enumeration_Rep_Expr (Id : E) return N is
1124 begin
1125 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1126 return Node22 (Id);
1127 end Enumeration_Rep_Expr;
1129 function Equivalent_Type (Id : E) return E is
1130 begin
1131 pragma Assert
1132 (Ekind_In (Id, E_Class_Wide_Type,
1133 E_Class_Wide_Subtype,
1134 E_Access_Protected_Subprogram_Type,
1135 E_Anonymous_Access_Protected_Subprogram_Type,
1136 E_Access_Subprogram_Type,
1137 E_Exception_Type));
1138 return Node18 (Id);
1139 end Equivalent_Type;
1141 function Esize (Id : E) return Uint is
1142 begin
1143 return Uint12 (Id);
1144 end Esize;
1146 function Exception_Code (Id : E) return Uint is
1147 begin
1148 pragma Assert (Ekind (Id) = E_Exception);
1149 return Uint22 (Id);
1150 end Exception_Code;
1152 function Extra_Accessibility (Id : E) return E is
1153 begin
1154 pragma Assert
1155 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1156 return Node13 (Id);
1157 end Extra_Accessibility;
1159 function Extra_Accessibility_Of_Result (Id : E) return E is
1160 begin
1161 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1162 return Node19 (Id);
1163 end Extra_Accessibility_Of_Result;
1165 function Extra_Constrained (Id : E) return E is
1166 begin
1167 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1168 return Node23 (Id);
1169 end Extra_Constrained;
1171 function Extra_Formal (Id : E) return E is
1172 begin
1173 return Node15 (Id);
1174 end Extra_Formal;
1176 function Extra_Formals (Id : E) return E is
1177 begin
1178 pragma Assert
1179 (Is_Overloadable (Id)
1180 or else Ekind_In (Id, E_Entry_Family,
1181 E_Subprogram_Body,
1182 E_Subprogram_Type));
1183 return Node28 (Id);
1184 end Extra_Formals;
1186 function Can_Use_Internal_Rep (Id : E) return B is
1187 begin
1188 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1189 return Flag229 (Base_Type (Id));
1190 end Can_Use_Internal_Rep;
1192 function Finalization_Master (Id : E) return E is
1193 begin
1194 pragma Assert (Is_Access_Type (Id));
1195 return Node23 (Root_Type (Id));
1196 end Finalization_Master;
1198 function Finalize_Storage_Only (Id : E) return B is
1199 begin
1200 pragma Assert (Is_Type (Id));
1201 return Flag158 (Base_Type (Id));
1202 end Finalize_Storage_Only;
1204 function Finalizer (Id : E) return E is
1205 begin
1206 pragma Assert
1207 (Ekind (Id) = E_Package
1208 or else Ekind (Id) = E_Package_Body);
1209 return Node24 (Id);
1210 end Finalizer;
1212 function First_Entity (Id : E) return E is
1213 begin
1214 return Node17 (Id);
1215 end First_Entity;
1217 function First_Exit_Statement (Id : E) return N is
1218 begin
1219 pragma Assert (Ekind (Id) = E_Loop);
1220 return Node8 (Id);
1221 end First_Exit_Statement;
1223 function First_Index (Id : E) return N is
1224 begin
1225 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1226 return Node17 (Id);
1227 end First_Index;
1229 function First_Literal (Id : E) return E is
1230 begin
1231 pragma Assert (Is_Enumeration_Type (Id));
1232 return Node17 (Id);
1233 end First_Literal;
1235 function First_Optional_Parameter (Id : E) return E is
1236 begin
1237 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1238 return Node14 (Id);
1239 end First_Optional_Parameter;
1241 function First_Private_Entity (Id : E) return E is
1242 begin
1243 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1244 or else Ekind (Id) in Concurrent_Kind);
1245 return Node16 (Id);
1246 end First_Private_Entity;
1248 function First_Rep_Item (Id : E) return E is
1249 begin
1250 return Node6 (Id);
1251 end First_Rep_Item;
1253 function Freeze_Node (Id : E) return N is
1254 begin
1255 return Node7 (Id);
1256 end Freeze_Node;
1258 function From_With_Type (Id : E) return B is
1259 begin
1260 return Flag159 (Id);
1261 end From_With_Type;
1263 function Full_View (Id : E) return E is
1264 begin
1265 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1266 return Node11 (Id);
1267 end Full_View;
1269 function Generic_Homonym (Id : E) return E is
1270 begin
1271 pragma Assert (Ekind (Id) = E_Generic_Package);
1272 return Node11 (Id);
1273 end Generic_Homonym;
1275 function Generic_Renamings (Id : E) return L is
1276 begin
1277 return Elist23 (Id);
1278 end Generic_Renamings;
1280 function Handler_Records (Id : E) return S is
1281 begin
1282 return List10 (Id);
1283 end Handler_Records;
1285 function Has_Aliased_Components (Id : E) return B is
1286 begin
1287 return Flag135 (Implementation_Base_Type (Id));
1288 end Has_Aliased_Components;
1290 function Has_Alignment_Clause (Id : E) return B is
1291 begin
1292 return Flag46 (Id);
1293 end Has_Alignment_Clause;
1295 function Has_All_Calls_Remote (Id : E) return B is
1296 begin
1297 return Flag79 (Id);
1298 end Has_All_Calls_Remote;
1300 function Has_Anonymous_Master (Id : E) return B is
1301 begin
1302 pragma Assert
1303 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1304 return Flag253 (Id);
1305 end Has_Anonymous_Master;
1307 function Has_Atomic_Components (Id : E) return B is
1308 begin
1309 return Flag86 (Implementation_Base_Type (Id));
1310 end Has_Atomic_Components;
1312 function Has_Biased_Representation (Id : E) return B is
1313 begin
1314 return Flag139 (Id);
1315 end Has_Biased_Representation;
1317 function Has_Completion (Id : E) return B is
1318 begin
1319 return Flag26 (Id);
1320 end Has_Completion;
1322 function Has_Completion_In_Body (Id : E) return B is
1323 begin
1324 pragma Assert (Is_Type (Id));
1325 return Flag71 (Id);
1326 end Has_Completion_In_Body;
1328 function Has_Complex_Representation (Id : E) return B is
1329 begin
1330 pragma Assert (Is_Type (Id));
1331 return Flag140 (Implementation_Base_Type (Id));
1332 end Has_Complex_Representation;
1334 function Has_Component_Size_Clause (Id : E) return B is
1335 begin
1336 pragma Assert (Is_Array_Type (Id));
1337 return Flag68 (Implementation_Base_Type (Id));
1338 end Has_Component_Size_Clause;
1340 function Has_Constrained_Partial_View (Id : E) return B is
1341 begin
1342 pragma Assert (Is_Type (Id));
1343 return Flag187 (Id);
1344 end Has_Constrained_Partial_View;
1346 function Has_Controlled_Component (Id : E) return B is
1347 begin
1348 return Flag43 (Base_Type (Id));
1349 end Has_Controlled_Component;
1351 function Has_Contiguous_Rep (Id : E) return B is
1352 begin
1353 return Flag181 (Id);
1354 end Has_Contiguous_Rep;
1356 function Has_Controlling_Result (Id : E) return B is
1357 begin
1358 return Flag98 (Id);
1359 end Has_Controlling_Result;
1361 function Has_Convention_Pragma (Id : E) return B is
1362 begin
1363 return Flag119 (Id);
1364 end Has_Convention_Pragma;
1366 function Has_Default_Aspect (Id : E) return B is
1367 begin
1368 return Flag39 (Base_Type (Id));
1369 end Has_Default_Aspect;
1371 function Has_Delayed_Aspects (Id : E) return B is
1372 begin
1373 pragma Assert (Nkind (Id) in N_Entity);
1374 return Flag200 (Id);
1375 end Has_Delayed_Aspects;
1377 function Has_Delayed_Freeze (Id : E) return B is
1378 begin
1379 pragma Assert (Nkind (Id) in N_Entity);
1380 return Flag18 (Id);
1381 end Has_Delayed_Freeze;
1383 function Has_Discriminants (Id : E) return B is
1384 begin
1385 pragma Assert (Nkind (Id) in N_Entity);
1386 return Flag5 (Id);
1387 end Has_Discriminants;
1389 function Has_Dispatch_Table (Id : E) return B is
1390 begin
1391 pragma Assert (Is_Tagged_Type (Id));
1392 return Flag220 (Id);
1393 end Has_Dispatch_Table;
1395 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1396 begin
1397 pragma Assert (Is_Type (Id));
1398 return Flag258 (Id);
1399 end Has_Dynamic_Predicate_Aspect;
1401 function Has_Enumeration_Rep_Clause (Id : E) return B is
1402 begin
1403 pragma Assert (Is_Enumeration_Type (Id));
1404 return Flag66 (Id);
1405 end Has_Enumeration_Rep_Clause;
1407 function Has_Exit (Id : E) return B is
1408 begin
1409 return Flag47 (Id);
1410 end Has_Exit;
1412 function Has_External_Tag_Rep_Clause (Id : E) return B is
1413 begin
1414 pragma Assert (Is_Tagged_Type (Id));
1415 return Flag110 (Id);
1416 end Has_External_Tag_Rep_Clause;
1418 function Has_Forward_Instantiation (Id : E) return B is
1419 begin
1420 return Flag175 (Id);
1421 end Has_Forward_Instantiation;
1423 function Has_Fully_Qualified_Name (Id : E) return B is
1424 begin
1425 return Flag173 (Id);
1426 end Has_Fully_Qualified_Name;
1428 function Has_Gigi_Rep_Item (Id : E) return B is
1429 begin
1430 return Flag82 (Id);
1431 end Has_Gigi_Rep_Item;
1433 function Has_Homonym (Id : E) return B is
1434 begin
1435 return Flag56 (Id);
1436 end Has_Homonym;
1438 function Has_Implicit_Dereference (Id : E) return B is
1439 begin
1440 return Flag251 (Id);
1441 end Has_Implicit_Dereference;
1443 function Has_Independent_Components (Id : E) return B is
1444 begin
1445 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1446 return Flag34 (Id);
1447 end Has_Independent_Components;
1449 function Has_Inheritable_Invariants (Id : E) return B is
1450 begin
1451 pragma Assert (Is_Type (Id));
1452 return Flag248 (Id);
1453 end Has_Inheritable_Invariants;
1455 function Has_Initial_Value (Id : E) return B is
1456 begin
1457 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1458 return Flag219 (Id);
1459 end Has_Initial_Value;
1461 function Has_Invariants (Id : E) return B is
1462 begin
1463 pragma Assert (Is_Type (Id));
1464 return Flag232 (Id);
1465 end Has_Invariants;
1467 function Has_Loop_Entry_Attributes (Id : E) return B is
1468 begin
1469 pragma Assert (Ekind (Id) = E_Loop);
1470 return Flag260 (Id);
1471 end Has_Loop_Entry_Attributes;
1473 function Has_Machine_Radix_Clause (Id : E) return B is
1474 begin
1475 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1476 return Flag83 (Id);
1477 end Has_Machine_Radix_Clause;
1479 function Has_Master_Entity (Id : E) return B is
1480 begin
1481 return Flag21 (Id);
1482 end Has_Master_Entity;
1484 function Has_Missing_Return (Id : E) return B is
1485 begin
1486 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1487 return Flag142 (Id);
1488 end Has_Missing_Return;
1490 function Has_Nested_Block_With_Handler (Id : E) return B is
1491 begin
1492 return Flag101 (Id);
1493 end Has_Nested_Block_With_Handler;
1495 function Has_Non_Standard_Rep (Id : E) return B is
1496 begin
1497 return Flag75 (Implementation_Base_Type (Id));
1498 end Has_Non_Standard_Rep;
1500 function Has_Object_Size_Clause (Id : E) return B is
1501 begin
1502 pragma Assert (Is_Type (Id));
1503 return Flag172 (Id);
1504 end Has_Object_Size_Clause;
1506 function Has_Per_Object_Constraint (Id : E) return B is
1507 begin
1508 return Flag154 (Id);
1509 end Has_Per_Object_Constraint;
1511 function Has_Postconditions (Id : E) return B is
1512 begin
1513 pragma Assert (Is_Subprogram (Id));
1514 return Flag240 (Id);
1515 end Has_Postconditions;
1517 function Has_Pragma_Controlled (Id : E) return B is
1518 begin
1519 pragma Assert (Is_Access_Type (Id));
1520 return Flag27 (Implementation_Base_Type (Id));
1521 end Has_Pragma_Controlled;
1523 function Has_Pragma_Elaborate_Body (Id : E) return B is
1524 begin
1525 return Flag150 (Id);
1526 end Has_Pragma_Elaborate_Body;
1528 function Has_Pragma_Inline (Id : E) return B is
1529 begin
1530 return Flag157 (Id);
1531 end Has_Pragma_Inline;
1533 function Has_Pragma_Inline_Always (Id : E) return B is
1534 begin
1535 return Flag230 (Id);
1536 end Has_Pragma_Inline_Always;
1538 function Has_Pragma_No_Inline (Id : E) return B is
1539 begin
1540 return Flag201 (Id);
1541 end Has_Pragma_No_Inline;
1543 function Has_Pragma_Ordered (Id : E) return B is
1544 begin
1545 pragma Assert (Is_Enumeration_Type (Id));
1546 return Flag198 (Implementation_Base_Type (Id));
1547 end Has_Pragma_Ordered;
1549 function Has_Pragma_Pack (Id : E) return B is
1550 begin
1551 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1552 return Flag121 (Implementation_Base_Type (Id));
1553 end Has_Pragma_Pack;
1555 function Has_Pragma_Preelab_Init (Id : E) return B is
1556 begin
1557 return Flag221 (Id);
1558 end Has_Pragma_Preelab_Init;
1560 function Has_Pragma_Pure (Id : E) return B is
1561 begin
1562 return Flag203 (Id);
1563 end Has_Pragma_Pure;
1565 function Has_Pragma_Pure_Function (Id : E) return B is
1566 begin
1567 return Flag179 (Id);
1568 end Has_Pragma_Pure_Function;
1570 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1571 begin
1572 return Flag169 (Id);
1573 end Has_Pragma_Thread_Local_Storage;
1575 function Has_Pragma_Unmodified (Id : E) return B is
1576 begin
1577 return Flag233 (Id);
1578 end Has_Pragma_Unmodified;
1580 function Has_Pragma_Unreferenced (Id : E) return B is
1581 begin
1582 return Flag180 (Id);
1583 end Has_Pragma_Unreferenced;
1585 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1586 begin
1587 pragma Assert (Is_Type (Id));
1588 return Flag212 (Id);
1589 end Has_Pragma_Unreferenced_Objects;
1591 function Has_Predicates (Id : E) return B is
1592 begin
1593 pragma Assert (Is_Type (Id));
1594 return Flag250 (Id);
1595 end Has_Predicates;
1597 function Has_Primitive_Operations (Id : E) return B is
1598 begin
1599 pragma Assert (Is_Type (Id));
1600 return Flag120 (Base_Type (Id));
1601 end Has_Primitive_Operations;
1603 function Has_Private_Ancestor (Id : E) return B is
1604 begin
1605 return Flag151 (Id);
1606 end Has_Private_Ancestor;
1608 function Has_Private_Declaration (Id : E) return B is
1609 begin
1610 return Flag155 (Id);
1611 end Has_Private_Declaration;
1613 function Has_Qualified_Name (Id : E) return B is
1614 begin
1615 return Flag161 (Id);
1616 end Has_Qualified_Name;
1618 function Has_RACW (Id : E) return B is
1619 begin
1620 pragma Assert (Ekind (Id) = E_Package);
1621 return Flag214 (Id);
1622 end Has_RACW;
1624 function Has_Record_Rep_Clause (Id : E) return B is
1625 begin
1626 pragma Assert (Is_Record_Type (Id));
1627 return Flag65 (Implementation_Base_Type (Id));
1628 end Has_Record_Rep_Clause;
1630 function Has_Recursive_Call (Id : E) return B is
1631 begin
1632 pragma Assert (Is_Subprogram (Id));
1633 return Flag143 (Id);
1634 end Has_Recursive_Call;
1636 function Has_Size_Clause (Id : E) return B is
1637 begin
1638 return Flag29 (Id);
1639 end Has_Size_Clause;
1641 function Has_Small_Clause (Id : E) return B is
1642 begin
1643 return Flag67 (Id);
1644 end Has_Small_Clause;
1646 function Has_Specified_Layout (Id : E) return B is
1647 begin
1648 pragma Assert (Is_Type (Id));
1649 return Flag100 (Implementation_Base_Type (Id));
1650 end Has_Specified_Layout;
1652 function Has_Specified_Stream_Input (Id : E) return B is
1653 begin
1654 pragma Assert (Is_Type (Id));
1655 return Flag190 (Id);
1656 end Has_Specified_Stream_Input;
1658 function Has_Specified_Stream_Output (Id : E) return B is
1659 begin
1660 pragma Assert (Is_Type (Id));
1661 return Flag191 (Id);
1662 end Has_Specified_Stream_Output;
1664 function Has_Specified_Stream_Read (Id : E) return B is
1665 begin
1666 pragma Assert (Is_Type (Id));
1667 return Flag192 (Id);
1668 end Has_Specified_Stream_Read;
1670 function Has_Specified_Stream_Write (Id : E) return B is
1671 begin
1672 pragma Assert (Is_Type (Id));
1673 return Flag193 (Id);
1674 end Has_Specified_Stream_Write;
1676 function Has_Static_Discriminants (Id : E) return B is
1677 begin
1678 pragma Assert (Is_Type (Id));
1679 return Flag211 (Id);
1680 end Has_Static_Discriminants;
1682 function Has_Static_Predicate_Aspect (Id : E) return B is
1683 begin
1684 pragma Assert (Is_Type (Id));
1685 return Flag259 (Id);
1686 end Has_Static_Predicate_Aspect;
1688 function Has_Storage_Size_Clause (Id : E) return B is
1689 begin
1690 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1691 return Flag23 (Implementation_Base_Type (Id));
1692 end Has_Storage_Size_Clause;
1694 function Has_Stream_Size_Clause (Id : E) return B is
1695 begin
1696 return Flag184 (Id);
1697 end Has_Stream_Size_Clause;
1699 function Has_Task (Id : E) return B is
1700 begin
1701 return Flag30 (Base_Type (Id));
1702 end Has_Task;
1704 function Has_Thunks (Id : E) return B is
1705 begin
1706 return Flag228 (Id);
1707 end Has_Thunks;
1709 function Has_Unchecked_Union (Id : E) return B is
1710 begin
1711 return Flag123 (Base_Type (Id));
1712 end Has_Unchecked_Union;
1714 function Has_Unknown_Discriminants (Id : E) return B is
1715 begin
1716 pragma Assert (Is_Type (Id));
1717 return Flag72 (Id);
1718 end Has_Unknown_Discriminants;
1720 function Has_Up_Level_Access (Id : E) return B is
1721 begin
1722 pragma Assert
1723 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1724 return Flag215 (Id);
1725 end Has_Up_Level_Access;
1727 function Has_Volatile_Components (Id : E) return B is
1728 begin
1729 return Flag87 (Implementation_Base_Type (Id));
1730 end Has_Volatile_Components;
1732 function Has_Xref_Entry (Id : E) return B is
1733 begin
1734 return Flag182 (Id);
1735 end Has_Xref_Entry;
1737 function Hiding_Loop_Variable (Id : E) return E is
1738 begin
1739 pragma Assert (Ekind (Id) = E_Variable);
1740 return Node8 (Id);
1741 end Hiding_Loop_Variable;
1743 function Homonym (Id : E) return E is
1744 begin
1745 return Node4 (Id);
1746 end Homonym;
1748 function Interface_Alias (Id : E) return E is
1749 begin
1750 pragma Assert (Is_Subprogram (Id));
1751 return Node25 (Id);
1752 end Interface_Alias;
1754 function Interfaces (Id : E) return L is
1755 begin
1756 pragma Assert (Is_Record_Type (Id));
1757 return Elist25 (Id);
1758 end Interfaces;
1760 function In_Package_Body (Id : E) return B is
1761 begin
1762 return Flag48 (Id);
1763 end In_Package_Body;
1765 function In_Private_Part (Id : E) return B is
1766 begin
1767 return Flag45 (Id);
1768 end In_Private_Part;
1770 function In_Use (Id : E) return B is
1771 begin
1772 pragma Assert (Nkind (Id) in N_Entity);
1773 return Flag8 (Id);
1774 end In_Use;
1776 function Initialization_Statements (Id : E) return N is
1777 begin
1778 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1779 return Node28 (Id);
1780 end Initialization_Statements;
1782 function Integrity_Level (Id : E) return U is
1783 begin
1784 pragma Assert (Ekind (Id) = E_Abstract_State);
1785 return Uint8 (Id);
1786 end Integrity_Level;
1788 function Inner_Instances (Id : E) return L is
1789 begin
1790 return Elist23 (Id);
1791 end Inner_Instances;
1793 function Interface_Name (Id : E) return N is
1794 begin
1795 return Node21 (Id);
1796 end Interface_Name;
1798 function Is_Abstract_Subprogram (Id : E) return B is
1799 begin
1800 pragma Assert (Is_Overloadable (Id));
1801 return Flag19 (Id);
1802 end Is_Abstract_Subprogram;
1804 function Is_Abstract_Type (Id : E) return B is
1805 begin
1806 pragma Assert (Is_Type (Id));
1807 return Flag146 (Id);
1808 end Is_Abstract_Type;
1810 function Is_Local_Anonymous_Access (Id : E) return B is
1811 begin
1812 pragma Assert (Is_Access_Type (Id));
1813 return Flag194 (Id);
1814 end Is_Local_Anonymous_Access;
1816 function Is_Access_Constant (Id : E) return B is
1817 begin
1818 pragma Assert (Is_Access_Type (Id));
1819 return Flag69 (Id);
1820 end Is_Access_Constant;
1822 function Is_Ada_2005_Only (Id : E) return B is
1823 begin
1824 return Flag185 (Id);
1825 end Is_Ada_2005_Only;
1827 function Is_Ada_2012_Only (Id : E) return B is
1828 begin
1829 return Flag199 (Id);
1830 end Is_Ada_2012_Only;
1832 function Is_Aliased (Id : E) return B is
1833 begin
1834 pragma Assert (Nkind (Id) in N_Entity);
1835 return Flag15 (Id);
1836 end Is_Aliased;
1838 function Is_AST_Entry (Id : E) return B is
1839 begin
1840 pragma Assert (Is_Entry (Id));
1841 return Flag132 (Id);
1842 end Is_AST_Entry;
1844 function Is_Asynchronous (Id : E) return B is
1845 begin
1846 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1847 return Flag81 (Id);
1848 end Is_Asynchronous;
1850 function Is_Atomic (Id : E) return B is
1851 begin
1852 return Flag85 (Id);
1853 end Is_Atomic;
1855 function Is_Bit_Packed_Array (Id : E) return B is
1856 begin
1857 return Flag122 (Implementation_Base_Type (Id));
1858 end Is_Bit_Packed_Array;
1860 function Is_Called (Id : E) return B is
1861 begin
1862 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1863 return Flag102 (Id);
1864 end Is_Called;
1866 function Is_Character_Type (Id : E) return B is
1867 begin
1868 return Flag63 (Id);
1869 end Is_Character_Type;
1871 function Is_Child_Unit (Id : E) return B is
1872 begin
1873 return Flag73 (Id);
1874 end Is_Child_Unit;
1876 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1877 begin
1878 return Flag35 (Id);
1879 end Is_Class_Wide_Equivalent_Type;
1881 function Is_Compilation_Unit (Id : E) return B is
1882 begin
1883 return Flag149 (Id);
1884 end Is_Compilation_Unit;
1886 function Is_Completely_Hidden (Id : E) return B is
1887 begin
1888 pragma Assert (Ekind (Id) = E_Discriminant);
1889 return Flag103 (Id);
1890 end Is_Completely_Hidden;
1892 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1893 begin
1894 return Flag80 (Id);
1895 end Is_Constr_Subt_For_U_Nominal;
1897 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1898 begin
1899 return Flag141 (Id);
1900 end Is_Constr_Subt_For_UN_Aliased;
1902 function Is_Constrained (Id : E) return B is
1903 begin
1904 pragma Assert (Nkind (Id) in N_Entity);
1905 return Flag12 (Id);
1906 end Is_Constrained;
1908 function Is_Constructor (Id : E) return B is
1909 begin
1910 return Flag76 (Id);
1911 end Is_Constructor;
1913 function Is_Controlled (Id : E) return B is
1914 begin
1915 return Flag42 (Base_Type (Id));
1916 end Is_Controlled;
1918 function Is_Controlling_Formal (Id : E) return B is
1919 begin
1920 pragma Assert (Is_Formal (Id));
1921 return Flag97 (Id);
1922 end Is_Controlling_Formal;
1924 function Is_CPP_Class (Id : E) return B is
1925 begin
1926 return Flag74 (Id);
1927 end Is_CPP_Class;
1929 function Is_Descendent_Of_Address (Id : E) return B is
1930 begin
1931 pragma Assert (Is_Type (Id));
1932 return Flag223 (Id);
1933 end Is_Descendent_Of_Address;
1935 function Is_Discrim_SO_Function (Id : E) return B is
1936 begin
1937 return Flag176 (Id);
1938 end Is_Discrim_SO_Function;
1940 function Is_Dispatch_Table_Entity (Id : E) return B is
1941 begin
1942 return Flag234 (Id);
1943 end Is_Dispatch_Table_Entity;
1945 function Is_Dispatching_Operation (Id : E) return B is
1946 begin
1947 pragma Assert (Nkind (Id) in N_Entity);
1948 return Flag6 (Id);
1949 end Is_Dispatching_Operation;
1951 function Is_Eliminated (Id : E) return B is
1952 begin
1953 return Flag124 (Id);
1954 end Is_Eliminated;
1956 function Is_Entry_Formal (Id : E) return B is
1957 begin
1958 return Flag52 (Id);
1959 end Is_Entry_Formal;
1961 function Is_Exported (Id : E) return B is
1962 begin
1963 return Flag99 (Id);
1964 end Is_Exported;
1966 function Is_First_Subtype (Id : E) return B is
1967 begin
1968 return Flag70 (Id);
1969 end Is_First_Subtype;
1971 function Is_For_Access_Subtype (Id : E) return B is
1972 begin
1973 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1974 return Flag118 (Id);
1975 end Is_For_Access_Subtype;
1977 function Is_Formal_Subprogram (Id : E) return B is
1978 begin
1979 return Flag111 (Id);
1980 end Is_Formal_Subprogram;
1982 function Is_Frozen (Id : E) return B is
1983 begin
1984 return Flag4 (Id);
1985 end Is_Frozen;
1987 function Is_Generic_Actual_Type (Id : E) return B is
1988 begin
1989 pragma Assert (Is_Type (Id));
1990 return Flag94 (Id);
1991 end Is_Generic_Actual_Type;
1993 function Is_Generic_Instance (Id : E) return B is
1994 begin
1995 return Flag130 (Id);
1996 end Is_Generic_Instance;
1998 function Is_Generic_Type (Id : E) return B is
1999 begin
2000 pragma Assert (Nkind (Id) in N_Entity);
2001 return Flag13 (Id);
2002 end Is_Generic_Type;
2004 function Is_Hidden (Id : E) return B is
2005 begin
2006 return Flag57 (Id);
2007 end Is_Hidden;
2009 function Is_Hidden_Open_Scope (Id : E) return B is
2010 begin
2011 return Flag171 (Id);
2012 end Is_Hidden_Open_Scope;
2014 function Is_Immediately_Visible (Id : E) return B is
2015 begin
2016 pragma Assert (Nkind (Id) in N_Entity);
2017 return Flag7 (Id);
2018 end Is_Immediately_Visible;
2020 function Is_Implementation_Defined (Id : E) return B is
2021 begin
2022 return Flag254 (Id);
2023 end Is_Implementation_Defined;
2025 function Is_Imported (Id : E) return B is
2026 begin
2027 return Flag24 (Id);
2028 end Is_Imported;
2030 function Is_Inlined (Id : E) return B is
2031 begin
2032 return Flag11 (Id);
2033 end Is_Inlined;
2035 function Is_Interface (Id : E) return B is
2036 begin
2037 return Flag186 (Id);
2038 end Is_Interface;
2040 function Is_Instantiated (Id : E) return B is
2041 begin
2042 return Flag126 (Id);
2043 end Is_Instantiated;
2045 function Is_Internal (Id : E) return B is
2046 begin
2047 pragma Assert (Nkind (Id) in N_Entity);
2048 return Flag17 (Id);
2049 end Is_Internal;
2051 function Is_Interrupt_Handler (Id : E) return B is
2052 begin
2053 pragma Assert (Nkind (Id) in N_Entity);
2054 return Flag89 (Id);
2055 end Is_Interrupt_Handler;
2057 function Is_Intrinsic_Subprogram (Id : E) return B is
2058 begin
2059 return Flag64 (Id);
2060 end Is_Intrinsic_Subprogram;
2062 function Is_Invariant_Procedure (Id : E) return B is
2063 begin
2064 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2065 return Flag257 (Id);
2066 end Is_Invariant_Procedure;
2068 function Is_Itype (Id : E) return B is
2069 begin
2070 return Flag91 (Id);
2071 end Is_Itype;
2073 function Is_Known_Non_Null (Id : E) return B is
2074 begin
2075 return Flag37 (Id);
2076 end Is_Known_Non_Null;
2078 function Is_Known_Null (Id : E) return B is
2079 begin
2080 return Flag204 (Id);
2081 end Is_Known_Null;
2083 function Is_Known_Valid (Id : E) return B is
2084 begin
2085 return Flag170 (Id);
2086 end Is_Known_Valid;
2088 function Is_Limited_Composite (Id : E) return B is
2089 begin
2090 return Flag106 (Id);
2091 end Is_Limited_Composite;
2093 function Is_Limited_Interface (Id : E) return B is
2094 begin
2095 return Flag197 (Id);
2096 end Is_Limited_Interface;
2098 function Is_Limited_Record (Id : E) return B is
2099 begin
2100 return Flag25 (Id);
2101 end Is_Limited_Record;
2103 function Is_Machine_Code_Subprogram (Id : E) return B is
2104 begin
2105 pragma Assert (Is_Subprogram (Id));
2106 return Flag137 (Id);
2107 end Is_Machine_Code_Subprogram;
2109 function Is_Non_Static_Subtype (Id : E) return B is
2110 begin
2111 pragma Assert (Is_Type (Id));
2112 return Flag109 (Id);
2113 end Is_Non_Static_Subtype;
2115 function Is_Null_Init_Proc (Id : E) return B is
2116 begin
2117 pragma Assert (Ekind (Id) = E_Procedure);
2118 return Flag178 (Id);
2119 end Is_Null_Init_Proc;
2121 function Is_Obsolescent (Id : E) return B is
2122 begin
2123 return Flag153 (Id);
2124 end Is_Obsolescent;
2126 function Is_Only_Out_Parameter (Id : E) return B is
2127 begin
2128 pragma Assert (Is_Formal (Id));
2129 return Flag226 (Id);
2130 end Is_Only_Out_Parameter;
2132 function Is_Optional_Parameter (Id : E) return B is
2133 begin
2134 pragma Assert (Is_Formal (Id));
2135 return Flag134 (Id);
2136 end Is_Optional_Parameter;
2138 function Is_Package_Body_Entity (Id : E) return B is
2139 begin
2140 return Flag160 (Id);
2141 end Is_Package_Body_Entity;
2143 function Is_Packed (Id : E) return B is
2144 begin
2145 return Flag51 (Implementation_Base_Type (Id));
2146 end Is_Packed;
2148 function Is_Packed_Array_Type (Id : E) return B is
2149 begin
2150 return Flag138 (Id);
2151 end Is_Packed_Array_Type;
2153 function Is_Potentially_Use_Visible (Id : E) return B is
2154 begin
2155 pragma Assert (Nkind (Id) in N_Entity);
2156 return Flag9 (Id);
2157 end Is_Potentially_Use_Visible;
2159 function Is_Predicate_Function (Id : E) return B is
2160 begin
2161 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2162 return Flag255 (Id);
2163 end Is_Predicate_Function;
2165 function Is_Predicate_Function_M (Id : E) return B is
2166 begin
2167 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2168 return Flag256 (Id);
2169 end Is_Predicate_Function_M;
2171 function Is_Preelaborated (Id : E) return B is
2172 begin
2173 return Flag59 (Id);
2174 end Is_Preelaborated;
2176 function Is_Primitive (Id : E) return B is
2177 begin
2178 pragma Assert
2179 (Is_Overloadable (Id)
2180 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2181 return Flag218 (Id);
2182 end Is_Primitive;
2184 function Is_Primitive_Wrapper (Id : E) return B is
2185 begin
2186 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2187 return Flag195 (Id);
2188 end Is_Primitive_Wrapper;
2190 function Is_Private_Composite (Id : E) return B is
2191 begin
2192 pragma Assert (Is_Type (Id));
2193 return Flag107 (Id);
2194 end Is_Private_Composite;
2196 function Is_Private_Descendant (Id : E) return B is
2197 begin
2198 return Flag53 (Id);
2199 end Is_Private_Descendant;
2201 function Is_Private_Primitive (Id : E) return B is
2202 begin
2203 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2204 return Flag245 (Id);
2205 end Is_Private_Primitive;
2207 function Is_Processed_Transient (Id : E) return B is
2208 begin
2209 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2210 return Flag252 (Id);
2211 end Is_Processed_Transient;
2213 function Is_Public (Id : E) return B is
2214 begin
2215 pragma Assert (Nkind (Id) in N_Entity);
2216 return Flag10 (Id);
2217 end Is_Public;
2219 function Is_Pure (Id : E) return B is
2220 begin
2221 return Flag44 (Id);
2222 end Is_Pure;
2224 function Is_Pure_Unit_Access_Type (Id : E) return B is
2225 begin
2226 pragma Assert (Is_Access_Type (Id));
2227 return Flag189 (Id);
2228 end Is_Pure_Unit_Access_Type;
2230 function Is_RACW_Stub_Type (Id : E) return B is
2231 begin
2232 pragma Assert (Is_Type (Id));
2233 return Flag244 (Id);
2234 end Is_RACW_Stub_Type;
2236 function Is_Raised (Id : E) return B is
2237 begin
2238 pragma Assert (Ekind (Id) = E_Exception);
2239 return Flag224 (Id);
2240 end Is_Raised;
2242 function Is_Remote_Call_Interface (Id : E) return B is
2243 begin
2244 return Flag62 (Id);
2245 end Is_Remote_Call_Interface;
2247 function Is_Remote_Types (Id : E) return B is
2248 begin
2249 return Flag61 (Id);
2250 end Is_Remote_Types;
2252 function Is_Renaming_Of_Object (Id : E) return B is
2253 begin
2254 return Flag112 (Id);
2255 end Is_Renaming_Of_Object;
2257 function Is_Return_Object (Id : E) return B is
2258 begin
2259 return Flag209 (Id);
2260 end Is_Return_Object;
2262 function Is_Safe_To_Reevaluate (Id : E) return B is
2263 begin
2264 return Flag249 (Id);
2265 end Is_Safe_To_Reevaluate;
2267 function Is_Shared_Passive (Id : E) return B is
2268 begin
2269 return Flag60 (Id);
2270 end Is_Shared_Passive;
2272 function Is_Statically_Allocated (Id : E) return B is
2273 begin
2274 return Flag28 (Id);
2275 end Is_Statically_Allocated;
2277 function Is_Tag (Id : E) return B is
2278 begin
2279 pragma Assert (Nkind (Id) in N_Entity);
2280 return Flag78 (Id);
2281 end Is_Tag;
2283 function Is_Tagged_Type (Id : E) return B is
2284 begin
2285 return Flag55 (Id);
2286 end Is_Tagged_Type;
2288 function Is_Thunk (Id : E) return B is
2289 begin
2290 return Flag225 (Id);
2291 end Is_Thunk;
2293 function Is_Trivial_Subprogram (Id : E) return B is
2294 begin
2295 return Flag235 (Id);
2296 end Is_Trivial_Subprogram;
2298 function Is_True_Constant (Id : E) return B is
2299 begin
2300 return Flag163 (Id);
2301 end Is_True_Constant;
2303 function Is_Unchecked_Union (Id : E) return B is
2304 begin
2305 return Flag117 (Implementation_Base_Type (Id));
2306 end Is_Unchecked_Union;
2308 function Is_Underlying_Record_View (Id : E) return B is
2309 begin
2310 return Flag246 (Id);
2311 end Is_Underlying_Record_View;
2313 function Is_Unsigned_Type (Id : E) return B is
2314 begin
2315 pragma Assert (Is_Type (Id));
2316 return Flag144 (Id);
2317 end Is_Unsigned_Type;
2319 function Is_Valued_Procedure (Id : E) return B is
2320 begin
2321 pragma Assert (Ekind (Id) = E_Procedure);
2322 return Flag127 (Id);
2323 end Is_Valued_Procedure;
2325 function Is_Visible_Formal (Id : E) return B is
2326 begin
2327 return Flag206 (Id);
2328 end Is_Visible_Formal;
2330 function Is_Visible_Lib_Unit (Id : E) return B is
2331 begin
2332 return Flag116 (Id);
2333 end Is_Visible_Lib_Unit;
2335 function Is_VMS_Exception (Id : E) return B is
2336 begin
2337 return Flag133 (Id);
2338 end Is_VMS_Exception;
2340 function Is_Volatile (Id : E) return B is
2341 begin
2342 pragma Assert (Nkind (Id) in N_Entity);
2344 if Is_Type (Id) then
2345 return Flag16 (Base_Type (Id));
2346 else
2347 return Flag16 (Id);
2348 end if;
2349 end Is_Volatile;
2351 function Itype_Printed (Id : E) return B is
2352 begin
2353 pragma Assert (Is_Itype (Id));
2354 return Flag202 (Id);
2355 end Itype_Printed;
2357 function Kill_Elaboration_Checks (Id : E) return B is
2358 begin
2359 return Flag32 (Id);
2360 end Kill_Elaboration_Checks;
2362 function Kill_Range_Checks (Id : E) return B is
2363 begin
2364 return Flag33 (Id);
2365 end Kill_Range_Checks;
2367 function Known_To_Have_Preelab_Init (Id : E) return B is
2368 begin
2369 pragma Assert (Is_Type (Id));
2370 return Flag207 (Id);
2371 end Known_To_Have_Preelab_Init;
2373 function Last_Assignment (Id : E) return N is
2374 begin
2375 pragma Assert (Is_Assignable (Id));
2376 return Node26 (Id);
2377 end Last_Assignment;
2379 function Last_Entity (Id : E) return E is
2380 begin
2381 return Node20 (Id);
2382 end Last_Entity;
2384 function Limited_View (Id : E) return E is
2385 begin
2386 pragma Assert (Ekind (Id) = E_Package);
2387 return Node23 (Id);
2388 end Limited_View;
2390 function Lit_Indexes (Id : E) return E is
2391 begin
2392 pragma Assert (Is_Enumeration_Type (Id));
2393 return Node15 (Id);
2394 end Lit_Indexes;
2396 function Lit_Strings (Id : E) return E is
2397 begin
2398 pragma Assert (Is_Enumeration_Type (Id));
2399 return Node16 (Id);
2400 end Lit_Strings;
2402 function Low_Bound_Tested (Id : E) return B is
2403 begin
2404 return Flag205 (Id);
2405 end Low_Bound_Tested;
2407 function Machine_Radix_10 (Id : E) return B is
2408 begin
2409 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2410 return Flag84 (Id);
2411 end Machine_Radix_10;
2413 function Master_Id (Id : E) return E is
2414 begin
2415 pragma Assert (Is_Access_Type (Id));
2416 return Node17 (Id);
2417 end Master_Id;
2419 function Materialize_Entity (Id : E) return B is
2420 begin
2421 return Flag168 (Id);
2422 end Materialize_Entity;
2424 function Mechanism (Id : E) return M is
2425 begin
2426 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2427 return UI_To_Int (Uint8 (Id));
2428 end Mechanism;
2430 function Modulus (Id : E) return Uint is
2431 begin
2432 pragma Assert (Is_Modular_Integer_Type (Id));
2433 return Uint17 (Base_Type (Id));
2434 end Modulus;
2436 function Must_Be_On_Byte_Boundary (Id : E) return B is
2437 begin
2438 pragma Assert (Is_Type (Id));
2439 return Flag183 (Id);
2440 end Must_Be_On_Byte_Boundary;
2442 function Must_Have_Preelab_Init (Id : E) return B is
2443 begin
2444 pragma Assert (Is_Type (Id));
2445 return Flag208 (Id);
2446 end Must_Have_Preelab_Init;
2448 function Needs_Debug_Info (Id : E) return B is
2449 begin
2450 return Flag147 (Id);
2451 end Needs_Debug_Info;
2453 function Needs_No_Actuals (Id : E) return B is
2454 begin
2455 pragma Assert
2456 (Is_Overloadable (Id)
2457 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2458 return Flag22 (Id);
2459 end Needs_No_Actuals;
2461 function Never_Set_In_Source (Id : E) return B is
2462 begin
2463 return Flag115 (Id);
2464 end Never_Set_In_Source;
2466 function Next_Inlined_Subprogram (Id : E) return E is
2467 begin
2468 return Node12 (Id);
2469 end Next_Inlined_Subprogram;
2471 function No_Pool_Assigned (Id : E) return B is
2472 begin
2473 pragma Assert (Is_Access_Type (Id));
2474 return Flag131 (Root_Type (Id));
2475 end No_Pool_Assigned;
2477 function No_Return (Id : E) return B is
2478 begin
2479 return Flag113 (Id);
2480 end No_Return;
2482 function No_Strict_Aliasing (Id : E) return B is
2483 begin
2484 pragma Assert (Is_Access_Type (Id));
2485 return Flag136 (Base_Type (Id));
2486 end No_Strict_Aliasing;
2488 function Non_Binary_Modulus (Id : E) return B is
2489 begin
2490 pragma Assert (Is_Type (Id));
2491 return Flag58 (Base_Type (Id));
2492 end Non_Binary_Modulus;
2494 function Non_Limited_View (Id : E) return E is
2495 begin
2496 pragma Assert (Ekind (Id) in Incomplete_Kind);
2497 return Node17 (Id);
2498 end Non_Limited_View;
2500 function Nonzero_Is_True (Id : E) return B is
2501 begin
2502 pragma Assert (Root_Type (Id) = Standard_Boolean);
2503 return Flag162 (Base_Type (Id));
2504 end Nonzero_Is_True;
2506 function Normalized_First_Bit (Id : E) return U is
2507 begin
2508 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2509 return Uint8 (Id);
2510 end Normalized_First_Bit;
2512 function Normalized_Position (Id : E) return U is
2513 begin
2514 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2515 return Uint14 (Id);
2516 end Normalized_Position;
2518 function Normalized_Position_Max (Id : E) return U is
2519 begin
2520 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2521 return Uint10 (Id);
2522 end Normalized_Position_Max;
2524 function OK_To_Rename (Id : E) return B is
2525 begin
2526 pragma Assert (Ekind (Id) = E_Variable);
2527 return Flag247 (Id);
2528 end OK_To_Rename;
2530 function OK_To_Reorder_Components (Id : E) return B is
2531 begin
2532 pragma Assert (Is_Record_Type (Id));
2533 return Flag239 (Base_Type (Id));
2534 end OK_To_Reorder_Components;
2536 function Optimize_Alignment_Space (Id : E) return B is
2537 begin
2538 pragma Assert
2539 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2540 return Flag241 (Id);
2541 end Optimize_Alignment_Space;
2543 function Optimize_Alignment_Time (Id : E) return B is
2544 begin
2545 pragma Assert
2546 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2547 return Flag242 (Id);
2548 end Optimize_Alignment_Time;
2550 function Original_Access_Type (Id : E) return E is
2551 begin
2552 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2553 return Node26 (Id);
2554 end Original_Access_Type;
2556 function Original_Array_Type (Id : E) return E is
2557 begin
2558 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2559 return Node21 (Id);
2560 end Original_Array_Type;
2562 function Original_Record_Component (Id : E) return E is
2563 begin
2564 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2565 return Node22 (Id);
2566 end Original_Record_Component;
2568 function Overlays_Constant (Id : E) return B is
2569 begin
2570 return Flag243 (Id);
2571 end Overlays_Constant;
2573 function Overridden_Operation (Id : E) return E is
2574 begin
2575 return Node26 (Id);
2576 end Overridden_Operation;
2578 function Package_Instantiation (Id : E) return N is
2579 begin
2580 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2581 return Node26 (Id);
2582 end Package_Instantiation;
2584 function Packed_Array_Type (Id : E) return E is
2585 begin
2586 pragma Assert (Is_Array_Type (Id));
2587 return Node23 (Id);
2588 end Packed_Array_Type;
2590 function Parent_Subtype (Id : E) return E is
2591 begin
2592 pragma Assert (Is_Record_Type (Id));
2593 return Node19 (Base_Type (Id));
2594 end Parent_Subtype;
2596 function Postcondition_Proc (Id : E) return E is
2597 begin
2598 pragma Assert (Ekind (Id) = E_Procedure);
2599 return Node8 (Id);
2600 end Postcondition_Proc;
2602 function PPC_Wrapper (Id : E) return E is
2603 begin
2604 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2605 return Node25 (Id);
2606 end PPC_Wrapper;
2608 function Prival (Id : E) return E is
2609 begin
2610 pragma Assert (Is_Protected_Component (Id));
2611 return Node17 (Id);
2612 end Prival;
2614 function Prival_Link (Id : E) return E is
2615 begin
2616 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2617 return Node20 (Id);
2618 end Prival_Link;
2620 function Private_Dependents (Id : E) return L is
2621 begin
2622 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2623 return Elist18 (Id);
2624 end Private_Dependents;
2626 function Private_View (Id : E) return N is
2627 begin
2628 pragma Assert (Is_Private_Type (Id));
2629 return Node22 (Id);
2630 end Private_View;
2632 function Protected_Body_Subprogram (Id : E) return E is
2633 begin
2634 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2635 return Node11 (Id);
2636 end Protected_Body_Subprogram;
2638 function Protected_Formal (Id : E) return E is
2639 begin
2640 pragma Assert (Is_Formal (Id));
2641 return Node22 (Id);
2642 end Protected_Formal;
2644 function Protection_Object (Id : E) return E is
2645 begin
2646 pragma Assert
2647 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2648 return Node23 (Id);
2649 end Protection_Object;
2651 function Reachable (Id : E) return B is
2652 begin
2653 return Flag49 (Id);
2654 end Reachable;
2656 function Referenced (Id : E) return B is
2657 begin
2658 return Flag156 (Id);
2659 end Referenced;
2661 function Referenced_As_LHS (Id : E) return B is
2662 begin
2663 return Flag36 (Id);
2664 end Referenced_As_LHS;
2666 function Referenced_As_Out_Parameter (Id : E) return B is
2667 begin
2668 return Flag227 (Id);
2669 end Referenced_As_Out_Parameter;
2671 function Refined_State (Id : E) return E is
2672 begin
2673 pragma Assert (Ekind (Id) = E_Abstract_State);
2674 return Node9 (Id);
2675 end Refined_State;
2677 function Register_Exception_Call (Id : E) return N is
2678 begin
2679 pragma Assert (Ekind (Id) = E_Exception);
2680 return Node20 (Id);
2681 end Register_Exception_Call;
2683 function Related_Array_Object (Id : E) return E is
2684 begin
2685 pragma Assert (Is_Array_Type (Id));
2686 return Node25 (Id);
2687 end Related_Array_Object;
2689 function Related_Expression (Id : E) return N is
2690 begin
2691 pragma Assert (Ekind (Id) in Type_Kind
2692 or else Ekind_In (Id, E_Constant, E_Variable));
2693 return Node24 (Id);
2694 end Related_Expression;
2696 function Related_Instance (Id : E) return E is
2697 begin
2698 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2699 return Node15 (Id);
2700 end Related_Instance;
2702 function Related_Type (Id : E) return E is
2703 begin
2704 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2705 return Node27 (Id);
2706 end Related_Type;
2708 function Relative_Deadline_Variable (Id : E) return E is
2709 begin
2710 pragma Assert (Is_Task_Type (Id));
2711 return Node26 (Implementation_Base_Type (Id));
2712 end Relative_Deadline_Variable;
2714 function Renamed_Entity (Id : E) return N is
2715 begin
2716 return Node18 (Id);
2717 end Renamed_Entity;
2719 function Renamed_In_Spec (Id : E) return B is
2720 begin
2721 pragma Assert (Ekind (Id) = E_Package);
2722 return Flag231 (Id);
2723 end Renamed_In_Spec;
2725 function Renamed_Object (Id : E) return N is
2726 begin
2727 return Node18 (Id);
2728 end Renamed_Object;
2730 function Renaming_Map (Id : E) return U is
2731 begin
2732 return Uint9 (Id);
2733 end Renaming_Map;
2735 function Requires_Overriding (Id : E) return B is
2736 begin
2737 pragma Assert (Is_Overloadable (Id));
2738 return Flag213 (Id);
2739 end Requires_Overriding;
2741 function Return_Present (Id : E) return B is
2742 begin
2743 return Flag54 (Id);
2744 end Return_Present;
2746 function Return_Applies_To (Id : E) return N is
2747 begin
2748 return Node8 (Id);
2749 end Return_Applies_To;
2751 function Returns_By_Ref (Id : E) return B is
2752 begin
2753 return Flag90 (Id);
2754 end Returns_By_Ref;
2756 function Reverse_Bit_Order (Id : E) return B is
2757 begin
2758 pragma Assert (Is_Record_Type (Id));
2759 return Flag164 (Base_Type (Id));
2760 end Reverse_Bit_Order;
2762 function Reverse_Storage_Order (Id : E) return B is
2763 begin
2764 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2765 return Flag93 (Base_Type (Id));
2766 end Reverse_Storage_Order;
2768 function RM_Size (Id : E) return U is
2769 begin
2770 pragma Assert (Is_Type (Id));
2771 return Uint13 (Id);
2772 end RM_Size;
2774 function Scalar_Range (Id : E) return N is
2775 begin
2776 return Node20 (Id);
2777 end Scalar_Range;
2779 function Scale_Value (Id : E) return U is
2780 begin
2781 return Uint15 (Id);
2782 end Scale_Value;
2784 function Scope_Depth_Value (Id : E) return U is
2785 begin
2786 return Uint22 (Id);
2787 end Scope_Depth_Value;
2789 function Sec_Stack_Needed_For_Return (Id : E) return B is
2790 begin
2791 return Flag167 (Id);
2792 end Sec_Stack_Needed_For_Return;
2794 function Shadow_Entities (Id : E) return S is
2795 begin
2796 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2797 return List14 (Id);
2798 end Shadow_Entities;
2800 function Shared_Var_Procs_Instance (Id : E) return E is
2801 begin
2802 pragma Assert (Ekind (Id) = E_Variable);
2803 return Node22 (Id);
2804 end Shared_Var_Procs_Instance;
2806 function Size_Check_Code (Id : E) return N is
2807 begin
2808 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2809 return Node19 (Id);
2810 end Size_Check_Code;
2812 function Size_Depends_On_Discriminant (Id : E) return B is
2813 begin
2814 return Flag177 (Id);
2815 end Size_Depends_On_Discriminant;
2817 function Size_Known_At_Compile_Time (Id : E) return B is
2818 begin
2819 return Flag92 (Id);
2820 end Size_Known_At_Compile_Time;
2822 function Small_Value (Id : E) return R is
2823 begin
2824 pragma Assert (Is_Fixed_Point_Type (Id));
2825 return Ureal21 (Id);
2826 end Small_Value;
2828 function Spec_Entity (Id : E) return E is
2829 begin
2830 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2831 return Node19 (Id);
2832 end Spec_Entity;
2834 function Static_Predicate (Id : E) return S is
2835 begin
2836 pragma Assert (Is_Discrete_Type (Id));
2837 return List25 (Id);
2838 end Static_Predicate;
2840 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2841 begin
2842 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2843 return Node15 (Id);
2844 end Status_Flag_Or_Transient_Decl;
2846 function Storage_Size_Variable (Id : E) return E is
2847 begin
2848 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2849 return Node15 (Implementation_Base_Type (Id));
2850 end Storage_Size_Variable;
2852 function Static_Elaboration_Desired (Id : E) return B is
2853 begin
2854 pragma Assert (Ekind (Id) = E_Package);
2855 return Flag77 (Id);
2856 end Static_Elaboration_Desired;
2858 function Static_Initialization (Id : E) return N is
2859 begin
2860 pragma Assert
2861 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2862 return Node30 (Id);
2863 end Static_Initialization;
2865 function Stored_Constraint (Id : E) return L is
2866 begin
2867 pragma Assert
2868 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2869 return Elist23 (Id);
2870 end Stored_Constraint;
2872 function Strict_Alignment (Id : E) return B is
2873 begin
2874 return Flag145 (Implementation_Base_Type (Id));
2875 end Strict_Alignment;
2877 function String_Literal_Length (Id : E) return U is
2878 begin
2879 return Uint16 (Id);
2880 end String_Literal_Length;
2882 function String_Literal_Low_Bound (Id : E) return N is
2883 begin
2884 return Node15 (Id);
2885 end String_Literal_Low_Bound;
2887 function Subprograms_For_Type (Id : E) return E is
2888 begin
2889 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2890 return Node29 (Id);
2891 end Subprograms_For_Type;
2893 function Suppress_Elaboration_Warnings (Id : E) return B is
2894 begin
2895 return Flag148 (Id);
2896 end Suppress_Elaboration_Warnings;
2898 function Suppress_Initialization (Id : E) return B is
2899 begin
2900 pragma Assert (Is_Type (Id));
2901 return Flag105 (Id);
2902 end Suppress_Initialization;
2904 function Suppress_Style_Checks (Id : E) return B is
2905 begin
2906 return Flag165 (Id);
2907 end Suppress_Style_Checks;
2909 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2910 begin
2911 return Flag217 (Id);
2912 end Suppress_Value_Tracking_On_Call;
2914 function Task_Body_Procedure (Id : E) return N is
2915 begin
2916 pragma Assert (Ekind (Id) in Task_Kind);
2917 return Node25 (Id);
2918 end Task_Body_Procedure;
2920 function Thunk_Entity (Id : E) return E is
2921 begin
2922 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2923 and then Is_Thunk (Id));
2924 return Node31 (Id);
2925 end Thunk_Entity;
2927 function Treat_As_Volatile (Id : E) return B is
2928 begin
2929 return Flag41 (Id);
2930 end Treat_As_Volatile;
2932 function Underlying_Full_View (Id : E) return E is
2933 begin
2934 pragma Assert (Ekind (Id) in Private_Kind);
2935 return Node19 (Id);
2936 end Underlying_Full_View;
2938 function Underlying_Record_View (Id : E) return E is
2939 begin
2940 return Node28 (Id);
2941 end Underlying_Record_View;
2943 function Universal_Aliasing (Id : E) return B is
2944 begin
2945 pragma Assert (Is_Type (Id));
2946 return Flag216 (Implementation_Base_Type (Id));
2947 end Universal_Aliasing;
2949 function Unset_Reference (Id : E) return N is
2950 begin
2951 return Node16 (Id);
2952 end Unset_Reference;
2954 function Used_As_Generic_Actual (Id : E) return B is
2955 begin
2956 return Flag222 (Id);
2957 end Used_As_Generic_Actual;
2959 function Uses_Lock_Free (Id : E) return B is
2960 begin
2961 pragma Assert (Is_Protected_Type (Id));
2962 return Flag188 (Id);
2963 end Uses_Lock_Free;
2965 function Uses_Sec_Stack (Id : E) return B is
2966 begin
2967 return Flag95 (Id);
2968 end Uses_Sec_Stack;
2970 function Warnings_Off (Id : E) return B is
2971 begin
2972 return Flag96 (Id);
2973 end Warnings_Off;
2975 function Warnings_Off_Used (Id : E) return B is
2976 begin
2977 return Flag236 (Id);
2978 end Warnings_Off_Used;
2980 function Warnings_Off_Used_Unmodified (Id : E) return B is
2981 begin
2982 return Flag237 (Id);
2983 end Warnings_Off_Used_Unmodified;
2985 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2986 begin
2987 return Flag238 (Id);
2988 end Warnings_Off_Used_Unreferenced;
2990 function Wrapped_Entity (Id : E) return E is
2991 begin
2992 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2993 and then Is_Primitive_Wrapper (Id));
2994 return Node27 (Id);
2995 end Wrapped_Entity;
2997 function Was_Hidden (Id : E) return B is
2998 begin
2999 return Flag196 (Id);
3000 end Was_Hidden;
3002 ------------------------------
3003 -- Classification Functions --
3004 ------------------------------
3006 function Is_Access_Type (Id : E) return B is
3007 begin
3008 return Ekind (Id) in Access_Kind;
3009 end Is_Access_Type;
3011 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3012 begin
3013 return Ekind (Id) in Access_Protected_Kind;
3014 end Is_Access_Protected_Subprogram_Type;
3016 function Is_Access_Subprogram_Type (Id : E) return B is
3017 begin
3018 return Ekind (Id) in Access_Subprogram_Kind;
3019 end Is_Access_Subprogram_Type;
3021 function Is_Aggregate_Type (Id : E) return B is
3022 begin
3023 return Ekind (Id) in Aggregate_Kind;
3024 end Is_Aggregate_Type;
3026 function Is_Array_Type (Id : E) return B is
3027 begin
3028 return Ekind (Id) in Array_Kind;
3029 end Is_Array_Type;
3031 function Is_Assignable (Id : E) return B is
3032 begin
3033 return Ekind (Id) in Assignable_Kind;
3034 end Is_Assignable;
3036 function Is_Class_Wide_Type (Id : E) return B is
3037 begin
3038 return Ekind (Id) in Class_Wide_Kind;
3039 end Is_Class_Wide_Type;
3041 function Is_Composite_Type (Id : E) return B is
3042 begin
3043 return Ekind (Id) in Composite_Kind;
3044 end Is_Composite_Type;
3046 function Is_Concurrent_Body (Id : E) return B is
3047 begin
3048 return Ekind (Id) in
3049 Concurrent_Body_Kind;
3050 end Is_Concurrent_Body;
3052 function Is_Concurrent_Record_Type (Id : E) return B is
3053 begin
3054 return Flag20 (Id);
3055 end Is_Concurrent_Record_Type;
3057 function Is_Concurrent_Type (Id : E) return B is
3058 begin
3059 return Ekind (Id) in Concurrent_Kind;
3060 end Is_Concurrent_Type;
3062 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3063 begin
3064 return Ekind (Id) in
3065 Decimal_Fixed_Point_Kind;
3066 end Is_Decimal_Fixed_Point_Type;
3068 function Is_Digits_Type (Id : E) return B is
3069 begin
3070 return Ekind (Id) in Digits_Kind;
3071 end Is_Digits_Type;
3073 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3074 begin
3075 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3076 end Is_Discrete_Or_Fixed_Point_Type;
3078 function Is_Discrete_Type (Id : E) return B is
3079 begin
3080 return Ekind (Id) in Discrete_Kind;
3081 end Is_Discrete_Type;
3083 function Is_Elementary_Type (Id : E) return B is
3084 begin
3085 return Ekind (Id) in Elementary_Kind;
3086 end Is_Elementary_Type;
3088 function Is_Entry (Id : E) return B is
3089 begin
3090 return Ekind (Id) in Entry_Kind;
3091 end Is_Entry;
3093 function Is_Enumeration_Type (Id : E) return B is
3094 begin
3095 return Ekind (Id) in
3096 Enumeration_Kind;
3097 end Is_Enumeration_Type;
3099 function Is_Fixed_Point_Type (Id : E) return B is
3100 begin
3101 return Ekind (Id) in
3102 Fixed_Point_Kind;
3103 end Is_Fixed_Point_Type;
3105 function Is_Floating_Point_Type (Id : E) return B is
3106 begin
3107 return Ekind (Id) in Float_Kind;
3108 end Is_Floating_Point_Type;
3110 function Is_Formal (Id : E) return B is
3111 begin
3112 return Ekind (Id) in Formal_Kind;
3113 end Is_Formal;
3115 function Is_Formal_Object (Id : E) return B is
3116 begin
3117 return Ekind (Id) in Formal_Object_Kind;
3118 end Is_Formal_Object;
3120 function Is_Generic_Subprogram (Id : E) return B is
3121 begin
3122 return Ekind (Id) in Generic_Subprogram_Kind;
3123 end Is_Generic_Subprogram;
3125 function Is_Generic_Unit (Id : E) return B is
3126 begin
3127 return Ekind (Id) in Generic_Unit_Kind;
3128 end Is_Generic_Unit;
3130 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3131 begin
3132 return Ekind (Id) in
3133 Incomplete_Or_Private_Kind;
3134 end Is_Incomplete_Or_Private_Type;
3136 function Is_Incomplete_Type (Id : E) return B is
3137 begin
3138 return Ekind (Id) in
3139 Incomplete_Kind;
3140 end Is_Incomplete_Type;
3142 function Is_Integer_Type (Id : E) return B is
3143 begin
3144 return Ekind (Id) in Integer_Kind;
3145 end Is_Integer_Type;
3147 function Is_Modular_Integer_Type (Id : E) return B is
3148 begin
3149 return Ekind (Id) in
3150 Modular_Integer_Kind;
3151 end Is_Modular_Integer_Type;
3153 function Is_Named_Number (Id : E) return B is
3154 begin
3155 return Ekind (Id) in Named_Kind;
3156 end Is_Named_Number;
3158 function Is_Numeric_Type (Id : E) return B is
3159 begin
3160 return Ekind (Id) in Numeric_Kind;
3161 end Is_Numeric_Type;
3163 function Is_Object (Id : E) return B is
3164 begin
3165 return Ekind (Id) in Object_Kind;
3166 end Is_Object;
3168 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3169 begin
3170 return Ekind (Id) in
3171 Ordinary_Fixed_Point_Kind;
3172 end Is_Ordinary_Fixed_Point_Type;
3174 function Is_Overloadable (Id : E) return B is
3175 begin
3176 return Ekind (Id) in Overloadable_Kind;
3177 end Is_Overloadable;
3179 function Is_Private_Type (Id : E) return B is
3180 begin
3181 return Ekind (Id) in Private_Kind;
3182 end Is_Private_Type;
3184 function Is_Protected_Type (Id : E) return B is
3185 begin
3186 return Ekind (Id) in Protected_Kind;
3187 end Is_Protected_Type;
3189 function Is_Real_Type (Id : E) return B is
3190 begin
3191 return Ekind (Id) in Real_Kind;
3192 end Is_Real_Type;
3194 function Is_Record_Type (Id : E) return B is
3195 begin
3196 return Ekind (Id) in Record_Kind;
3197 end Is_Record_Type;
3199 function Is_Scalar_Type (Id : E) return B is
3200 begin
3201 return Ekind (Id) in Scalar_Kind;
3202 end Is_Scalar_Type;
3204 function Is_Signed_Integer_Type (Id : E) return B is
3205 begin
3206 return Ekind (Id) in Signed_Integer_Kind;
3207 end Is_Signed_Integer_Type;
3209 function Is_Subprogram (Id : E) return B is
3210 begin
3211 return Ekind (Id) in Subprogram_Kind;
3212 end Is_Subprogram;
3214 function Is_Task_Type (Id : E) return B is
3215 begin
3216 return Ekind (Id) in Task_Kind;
3217 end Is_Task_Type;
3219 function Is_Type (Id : E) return B is
3220 begin
3221 return Ekind (Id) in Type_Kind;
3222 end Is_Type;
3224 ------------------------------
3225 -- Attribute Set Procedures --
3226 ------------------------------
3228 -- Note: in many of these set procedures an "obvious" assertion is missing.
3229 -- The reason for this is that in many cases, a field is set before the
3230 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3231 -- it is possible to add assertions that specifically include the E_Void
3232 -- possibility, but in some cases, we just omit the assertions.
3234 procedure Set_Abstract_States (Id : E; V : L) is
3235 begin
3236 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3237 Set_Elist25 (Id, V);
3238 end Set_Abstract_States;
3240 procedure Set_Accept_Address (Id : E; V : L) is
3241 begin
3242 Set_Elist21 (Id, V);
3243 end Set_Accept_Address;
3245 procedure Set_Access_Disp_Table (Id : E; V : L) is
3246 begin
3247 pragma Assert (Ekind (Id) = E_Record_Type
3248 and then Id = Implementation_Base_Type (Id));
3249 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3250 Set_Elist16 (Id, V);
3251 end Set_Access_Disp_Table;
3253 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3254 begin
3255 Set_Node12 (Id, V);
3256 end Set_Associated_Formal_Package;
3258 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3259 begin
3260 Set_Node8 (Id, V);
3261 end Set_Associated_Node_For_Itype;
3263 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3264 begin
3265 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3266 Set_Node22 (Id, V);
3267 end Set_Associated_Storage_Pool;
3269 procedure Set_Actual_Subtype (Id : E; V : E) is
3270 begin
3271 pragma Assert
3272 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3273 or else Is_Formal (Id));
3274 Set_Node17 (Id, V);
3275 end Set_Actual_Subtype;
3277 procedure Set_Address_Taken (Id : E; V : B := True) is
3278 begin
3279 Set_Flag104 (Id, V);
3280 end Set_Address_Taken;
3282 procedure Set_Alias (Id : E; V : E) is
3283 begin
3284 pragma Assert
3285 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3286 Set_Node18 (Id, V);
3287 end Set_Alias;
3289 procedure Set_Alignment (Id : E; V : U) is
3290 begin
3291 pragma Assert (Is_Type (Id)
3292 or else Is_Formal (Id)
3293 or else Ekind_In (Id, E_Loop_Parameter,
3294 E_Constant,
3295 E_Exception,
3296 E_Variable));
3297 Set_Uint14 (Id, V);
3298 end Set_Alignment;
3300 procedure Set_Barrier_Function (Id : E; V : N) is
3301 begin
3302 pragma Assert (Is_Entry (Id));
3303 Set_Node12 (Id, V);
3304 end Set_Barrier_Function;
3306 procedure Set_Block_Node (Id : E; V : N) is
3307 begin
3308 pragma Assert (Ekind (Id) = E_Block);
3309 Set_Node11 (Id, V);
3310 end Set_Block_Node;
3312 procedure Set_Body_Entity (Id : E; V : E) is
3313 begin
3314 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3315 Set_Node19 (Id, V);
3316 end Set_Body_Entity;
3318 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3319 begin
3320 pragma Assert
3321 (Ekind (Id) = E_Package
3322 or else Is_Subprogram (Id)
3323 or else Is_Generic_Unit (Id));
3324 Set_Flag40 (Id, V);
3325 end Set_Body_Needed_For_SAL;
3327 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3328 begin
3329 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3330 Set_Flag125 (Id, V);
3331 end Set_C_Pass_By_Copy;
3333 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3334 begin
3335 Set_Flag38 (Id, V);
3336 end Set_Can_Never_Be_Null;
3338 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3339 begin
3340 Set_Flag31 (Id, V);
3341 end Set_Checks_May_Be_Suppressed;
3343 procedure Set_Class_Wide_Type (Id : E; V : E) is
3344 begin
3345 pragma Assert (Is_Type (Id));
3346 Set_Node9 (Id, V);
3347 end Set_Class_Wide_Type;
3349 procedure Set_Cloned_Subtype (Id : E; V : E) is
3350 begin
3351 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3352 Set_Node16 (Id, V);
3353 end Set_Cloned_Subtype;
3355 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3356 begin
3357 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3358 Set_Uint11 (Id, V);
3359 end Set_Component_Bit_Offset;
3361 procedure Set_Component_Clause (Id : E; V : N) is
3362 begin
3363 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3364 Set_Node13 (Id, V);
3365 end Set_Component_Clause;
3367 procedure Set_Component_Size (Id : E; V : U) is
3368 begin
3369 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3370 Set_Uint22 (Id, V);
3371 end Set_Component_Size;
3373 procedure Set_Component_Type (Id : E; V : E) is
3374 begin
3375 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3376 Set_Node20 (Id, V);
3377 end Set_Component_Type;
3379 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3380 begin
3381 pragma Assert
3382 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3383 Set_Node18 (Id, V);
3384 end Set_Corresponding_Concurrent_Type;
3386 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3387 begin
3388 pragma Assert (Ekind (Id) = E_Discriminant);
3389 Set_Node19 (Id, V);
3390 end Set_Corresponding_Discriminant;
3392 procedure Set_Corresponding_Equality (Id : E; V : E) is
3393 begin
3394 pragma Assert
3395 (Ekind (Id) = E_Function
3396 and then not Comes_From_Source (Id)
3397 and then Chars (Id) = Name_Op_Ne);
3398 Set_Node30 (Id, V);
3399 end Set_Corresponding_Equality;
3401 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3402 begin
3403 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3404 Set_Node18 (Id, V);
3405 end Set_Corresponding_Protected_Entry;
3407 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3408 begin
3409 pragma Assert (Is_Concurrent_Type (Id));
3410 Set_Node18 (Id, V);
3411 end Set_Corresponding_Record_Type;
3413 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3414 begin
3415 Set_Node22 (Id, V);
3416 end Set_Corresponding_Remote_Type;
3418 procedure Set_Current_Use_Clause (Id : E; V : E) is
3419 begin
3420 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3421 Set_Node27 (Id, V);
3422 end Set_Current_Use_Clause;
3424 procedure Set_Current_Value (Id : E; V : N) is
3425 begin
3426 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3427 Set_Node9 (Id, V);
3428 end Set_Current_Value;
3430 procedure Set_CR_Discriminant (Id : E; V : E) is
3431 begin
3432 Set_Node23 (Id, V);
3433 end Set_CR_Discriminant;
3435 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3436 begin
3437 Set_Flag166 (Id, V);
3438 end Set_Debug_Info_Off;
3440 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3441 begin
3442 Set_Node25 (Id, V);
3443 end Set_Debug_Renaming_Link;
3445 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3446 begin
3447 pragma Assert (Is_Array_Type (Id));
3448 Set_Node19 (Id, V);
3449 end Set_Default_Aspect_Component_Value;
3451 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3452 begin
3453 pragma Assert (Is_Scalar_Type (Id));
3454 Set_Node19 (Id, V);
3455 end Set_Default_Aspect_Value;
3457 procedure Set_Default_Expr_Function (Id : E; V : E) is
3458 begin
3459 pragma Assert (Is_Formal (Id));
3460 Set_Node21 (Id, V);
3461 end Set_Default_Expr_Function;
3463 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3464 begin
3465 Set_Flag108 (Id, V);
3466 end Set_Default_Expressions_Processed;
3468 procedure Set_Default_Value (Id : E; V : N) is
3469 begin
3470 pragma Assert (Is_Formal (Id));
3471 Set_Node20 (Id, V);
3472 end Set_Default_Value;
3474 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3475 begin
3476 pragma Assert
3477 (Is_Subprogram (Id)
3478 or else Is_Task_Type (Id)
3479 or else Ekind (Id) = E_Block);
3480 Set_Flag114 (Id, V);
3481 end Set_Delay_Cleanups;
3483 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3484 begin
3485 pragma Assert
3486 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3488 Set_Flag50 (Id, V);
3489 end Set_Delay_Subprogram_Descriptors;
3491 procedure Set_Delta_Value (Id : E; V : R) is
3492 begin
3493 pragma Assert (Is_Fixed_Point_Type (Id));
3494 Set_Ureal18 (Id, V);
3495 end Set_Delta_Value;
3497 procedure Set_Dependent_Instances (Id : E; V : L) is
3498 begin
3499 pragma Assert (Is_Generic_Instance (Id));
3500 Set_Elist8 (Id, V);
3501 end Set_Dependent_Instances;
3503 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3504 begin
3505 pragma Assert (Nkind (Id) in N_Entity);
3506 Set_Flag14 (Id, V);
3507 end Set_Depends_On_Private;
3509 procedure Set_Digits_Value (Id : E; V : U) is
3510 begin
3511 pragma Assert
3512 (Is_Floating_Point_Type (Id)
3513 or else Is_Decimal_Fixed_Point_Type (Id));
3514 Set_Uint17 (Id, V);
3515 end Set_Digits_Value;
3517 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3518 begin
3519 Set_Node20 (Id, V);
3520 end Set_Directly_Designated_Type;
3522 procedure Set_Discard_Names (Id : E; V : B := True) is
3523 begin
3524 Set_Flag88 (Id, V);
3525 end Set_Discard_Names;
3527 procedure Set_Discriminal (Id : E; V : E) is
3528 begin
3529 pragma Assert (Ekind (Id) = E_Discriminant);
3530 Set_Node17 (Id, V);
3531 end Set_Discriminal;
3533 procedure Set_Discriminal_Link (Id : E; V : E) is
3534 begin
3535 Set_Node10 (Id, V);
3536 end Set_Discriminal_Link;
3538 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3539 begin
3540 pragma Assert (Ekind (Id) = E_Component);
3541 Set_Node20 (Id, V);
3542 end Set_Discriminant_Checking_Func;
3544 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3545 begin
3546 pragma Assert (Nkind (Id) in N_Entity);
3547 Set_Elist21 (Id, V);
3548 end Set_Discriminant_Constraint;
3550 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3551 begin
3552 Set_Node20 (Id, V);
3553 end Set_Discriminant_Default_Value;
3555 procedure Set_Discriminant_Number (Id : E; V : U) is
3556 begin
3557 Set_Uint15 (Id, V);
3558 end Set_Discriminant_Number;
3560 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3561 begin
3562 pragma Assert (Ekind (Id) = E_Record_Type
3563 and then Id = Implementation_Base_Type (Id));
3564 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3565 Set_Elist26 (Id, V);
3566 end Set_Dispatch_Table_Wrappers;
3568 procedure Set_DT_Entry_Count (Id : E; V : U) is
3569 begin
3570 pragma Assert (Ekind (Id) = E_Component);
3571 Set_Uint15 (Id, V);
3572 end Set_DT_Entry_Count;
3574 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3575 begin
3576 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3577 Set_Node25 (Id, V);
3578 end Set_DT_Offset_To_Top_Func;
3580 procedure Set_DT_Position (Id : E; V : U) is
3581 begin
3582 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3583 Set_Uint15 (Id, V);
3584 end Set_DT_Position;
3586 procedure Set_DTC_Entity (Id : E; V : E) is
3587 begin
3588 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3589 Set_Node16 (Id, V);
3590 end Set_DTC_Entity;
3592 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3593 begin
3594 pragma Assert (Ekind (Id) = E_Package);
3595 Set_Flag210 (Id, V);
3596 end Set_Elaborate_Body_Desirable;
3598 procedure Set_Elaboration_Entity (Id : E; V : E) is
3599 begin
3600 pragma Assert
3601 (Is_Subprogram (Id)
3602 or else
3603 Ekind (Id) = E_Package
3604 or else
3605 Is_Generic_Unit (Id));
3606 Set_Node13 (Id, V);
3607 end Set_Elaboration_Entity;
3609 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3610 begin
3611 pragma Assert
3612 (Is_Subprogram (Id)
3613 or else
3614 Ekind (Id) = E_Package
3615 or else
3616 Is_Generic_Unit (Id));
3617 Set_Flag174 (Id, V);
3618 end Set_Elaboration_Entity_Required;
3620 procedure Set_Enclosing_Scope (Id : E; V : E) is
3621 begin
3622 Set_Node18 (Id, V);
3623 end Set_Enclosing_Scope;
3625 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3626 begin
3627 pragma Assert (Is_Entry (Id));
3628 Set_Flag152 (Id, V);
3629 end Set_Entry_Accepted;
3631 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3632 begin
3633 Set_Node15 (Id, V);
3634 end Set_Entry_Bodies_Array;
3636 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3637 begin
3638 Set_Node23 (Id, V);
3639 end Set_Entry_Cancel_Parameter;
3641 procedure Set_Entry_Component (Id : E; V : E) is
3642 begin
3643 Set_Node11 (Id, V);
3644 end Set_Entry_Component;
3646 procedure Set_Entry_Formal (Id : E; V : E) is
3647 begin
3648 Set_Node16 (Id, V);
3649 end Set_Entry_Formal;
3651 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3652 begin
3653 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3654 Set_Node18 (Id, V);
3655 end Set_Entry_Index_Constant;
3657 procedure Set_Contract (Id : E; V : N) is
3658 begin
3659 pragma Assert
3660 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3661 or else Is_Subprogram (Id)
3662 or else Is_Generic_Subprogram (Id));
3663 Set_Node24 (Id, V);
3664 end Set_Contract;
3666 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3667 begin
3668 Set_Node15 (Id, V);
3669 end Set_Entry_Parameters_Type;
3671 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3672 begin
3673 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3674 Set_Node23 (Id, V);
3675 end Set_Enum_Pos_To_Rep;
3677 procedure Set_Enumeration_Pos (Id : E; V : U) is
3678 begin
3679 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3680 Set_Uint11 (Id, V);
3681 end Set_Enumeration_Pos;
3683 procedure Set_Enumeration_Rep (Id : E; V : U) is
3684 begin
3685 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3686 Set_Uint12 (Id, V);
3687 end Set_Enumeration_Rep;
3689 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3690 begin
3691 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3692 Set_Node22 (Id, V);
3693 end Set_Enumeration_Rep_Expr;
3695 procedure Set_Equivalent_Type (Id : E; V : E) is
3696 begin
3697 pragma Assert
3698 (Ekind_In (Id, E_Class_Wide_Type,
3699 E_Class_Wide_Subtype,
3700 E_Access_Protected_Subprogram_Type,
3701 E_Anonymous_Access_Protected_Subprogram_Type,
3702 E_Access_Subprogram_Type,
3703 E_Exception_Type));
3704 Set_Node18 (Id, V);
3705 end Set_Equivalent_Type;
3707 procedure Set_Esize (Id : E; V : U) is
3708 begin
3709 Set_Uint12 (Id, V);
3710 end Set_Esize;
3712 procedure Set_Exception_Code (Id : E; V : U) is
3713 begin
3714 pragma Assert (Ekind (Id) = E_Exception);
3715 Set_Uint22 (Id, V);
3716 end Set_Exception_Code;
3718 procedure Set_Extra_Accessibility (Id : E; V : E) is
3719 begin
3720 pragma Assert
3721 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3722 Set_Node13 (Id, V);
3723 end Set_Extra_Accessibility;
3725 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3726 begin
3727 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3728 Set_Node19 (Id, V);
3729 end Set_Extra_Accessibility_Of_Result;
3731 procedure Set_Extra_Constrained (Id : E; V : E) is
3732 begin
3733 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3734 Set_Node23 (Id, V);
3735 end Set_Extra_Constrained;
3737 procedure Set_Extra_Formal (Id : E; V : E) is
3738 begin
3739 Set_Node15 (Id, V);
3740 end Set_Extra_Formal;
3742 procedure Set_Extra_Formals (Id : E; V : E) is
3743 begin
3744 pragma Assert
3745 (Is_Overloadable (Id)
3746 or else Ekind_In (Id, E_Entry_Family,
3747 E_Subprogram_Body,
3748 E_Subprogram_Type));
3749 Set_Node28 (Id, V);
3750 end Set_Extra_Formals;
3752 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3753 begin
3754 pragma Assert
3755 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3756 Set_Flag229 (Id, V);
3757 end Set_Can_Use_Internal_Rep;
3759 procedure Set_Finalization_Master (Id : E; V : E) is
3760 begin
3761 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3762 Set_Node23 (Id, V);
3763 end Set_Finalization_Master;
3765 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3766 begin
3767 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3768 Set_Flag158 (Id, V);
3769 end Set_Finalize_Storage_Only;
3771 procedure Set_Finalizer (Id : E; V : E) is
3772 begin
3773 pragma Assert
3774 (Ekind (Id) = E_Package
3775 or else Ekind (Id) = E_Package_Body);
3776 Set_Node24 (Id, V);
3777 end Set_Finalizer;
3779 procedure Set_First_Entity (Id : E; V : E) is
3780 begin
3781 Set_Node17 (Id, V);
3782 end Set_First_Entity;
3784 procedure Set_First_Exit_Statement (Id : E; V : N) is
3785 begin
3786 pragma Assert (Ekind (Id) = E_Loop);
3787 Set_Node8 (Id, V);
3788 end Set_First_Exit_Statement;
3790 procedure Set_First_Index (Id : E; V : N) is
3791 begin
3792 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3793 Set_Node17 (Id, V);
3794 end Set_First_Index;
3796 procedure Set_First_Literal (Id : E; V : E) is
3797 begin
3798 pragma Assert (Is_Enumeration_Type (Id));
3799 Set_Node17 (Id, V);
3800 end Set_First_Literal;
3802 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3803 begin
3804 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3805 Set_Node14 (Id, V);
3806 end Set_First_Optional_Parameter;
3808 procedure Set_First_Private_Entity (Id : E; V : E) is
3809 begin
3810 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3811 or else Ekind (Id) in Concurrent_Kind);
3812 Set_Node16 (Id, V);
3813 end Set_First_Private_Entity;
3815 procedure Set_First_Rep_Item (Id : E; V : N) is
3816 begin
3817 Set_Node6 (Id, V);
3818 end Set_First_Rep_Item;
3820 procedure Set_Float_Rep (Id : E; V : F) is
3821 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3822 begin
3823 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3824 end Set_Float_Rep;
3826 procedure Set_Freeze_Node (Id : E; V : N) is
3827 begin
3828 Set_Node7 (Id, V);
3829 end Set_Freeze_Node;
3831 procedure Set_From_With_Type (Id : E; V : B := True) is
3832 begin
3833 pragma Assert
3834 (Is_Type (Id)
3835 or else Ekind (Id) = E_Package);
3836 Set_Flag159 (Id, V);
3837 end Set_From_With_Type;
3839 procedure Set_Full_View (Id : E; V : E) is
3840 begin
3841 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3842 Set_Node11 (Id, V);
3843 end Set_Full_View;
3845 procedure Set_Generic_Homonym (Id : E; V : E) is
3846 begin
3847 Set_Node11 (Id, V);
3848 end Set_Generic_Homonym;
3850 procedure Set_Generic_Renamings (Id : E; V : L) is
3851 begin
3852 Set_Elist23 (Id, V);
3853 end Set_Generic_Renamings;
3855 procedure Set_Handler_Records (Id : E; V : S) is
3856 begin
3857 Set_List10 (Id, V);
3858 end Set_Handler_Records;
3860 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3861 begin
3862 pragma Assert (Id = Base_Type (Id));
3863 Set_Flag135 (Id, V);
3864 end Set_Has_Aliased_Components;
3866 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3867 begin
3868 Set_Flag46 (Id, V);
3869 end Set_Has_Alignment_Clause;
3871 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3872 begin
3873 Set_Flag79 (Id, V);
3874 end Set_Has_All_Calls_Remote;
3876 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3877 begin
3878 pragma Assert
3879 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3880 Set_Flag253 (Id, V);
3881 end Set_Has_Anonymous_Master;
3883 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3884 begin
3885 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3886 Set_Flag86 (Id, V);
3887 end Set_Has_Atomic_Components;
3889 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3890 begin
3891 pragma Assert
3892 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3893 Set_Flag139 (Id, V);
3894 end Set_Has_Biased_Representation;
3896 procedure Set_Has_Completion (Id : E; V : B := True) is
3897 begin
3898 Set_Flag26 (Id, V);
3899 end Set_Has_Completion;
3901 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3902 begin
3903 pragma Assert (Is_Type (Id));
3904 Set_Flag71 (Id, V);
3905 end Set_Has_Completion_In_Body;
3907 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3908 begin
3909 pragma Assert (Ekind (Id) = E_Record_Type);
3910 Set_Flag140 (Id, V);
3911 end Set_Has_Complex_Representation;
3913 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3914 begin
3915 pragma Assert (Ekind (Id) = E_Array_Type);
3916 Set_Flag68 (Id, V);
3917 end Set_Has_Component_Size_Clause;
3919 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3920 begin
3921 pragma Assert (Is_Type (Id));
3922 Set_Flag187 (Id, V);
3923 end Set_Has_Constrained_Partial_View;
3925 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3926 begin
3927 Set_Flag181 (Id, V);
3928 end Set_Has_Contiguous_Rep;
3930 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3931 begin
3932 pragma Assert (Id = Base_Type (Id));
3933 Set_Flag43 (Id, V);
3934 end Set_Has_Controlled_Component;
3936 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3937 begin
3938 Set_Flag98 (Id, V);
3939 end Set_Has_Controlling_Result;
3941 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3942 begin
3943 Set_Flag119 (Id, V);
3944 end Set_Has_Convention_Pragma;
3946 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3947 begin
3948 pragma Assert
3949 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3950 and then Is_Base_Type (Id));
3951 Set_Flag39 (Id, V);
3952 end Set_Has_Default_Aspect;
3954 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3955 begin
3956 pragma Assert (Nkind (Id) in N_Entity);
3957 Set_Flag200 (Id, V);
3958 end Set_Has_Delayed_Aspects;
3960 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3961 begin
3962 pragma Assert (Nkind (Id) in N_Entity);
3963 Set_Flag18 (Id, V);
3964 end Set_Has_Delayed_Freeze;
3966 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3967 begin
3968 pragma Assert (Nkind (Id) in N_Entity);
3969 Set_Flag5 (Id, V);
3970 end Set_Has_Discriminants;
3972 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3973 begin
3974 pragma Assert (Ekind (Id) = E_Record_Type
3975 and then Is_Tagged_Type (Id));
3976 Set_Flag220 (Id, V);
3977 end Set_Has_Dispatch_Table;
3979 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3980 begin
3981 pragma Assert (Is_Type (Id));
3982 Set_Flag258 (Id, V);
3983 end Set_Has_Dynamic_Predicate_Aspect;
3985 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3986 begin
3987 pragma Assert (Is_Enumeration_Type (Id));
3988 Set_Flag66 (Id, V);
3989 end Set_Has_Enumeration_Rep_Clause;
3991 procedure Set_Has_Exit (Id : E; V : B := True) is
3992 begin
3993 Set_Flag47 (Id, V);
3994 end Set_Has_Exit;
3996 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3997 begin
3998 pragma Assert (Is_Tagged_Type (Id));
3999 Set_Flag110 (Id, V);
4000 end Set_Has_External_Tag_Rep_Clause;
4002 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4003 begin
4004 Set_Flag175 (Id, V);
4005 end Set_Has_Forward_Instantiation;
4007 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4008 begin
4009 Set_Flag173 (Id, V);
4010 end Set_Has_Fully_Qualified_Name;
4012 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4013 begin
4014 Set_Flag82 (Id, V);
4015 end Set_Has_Gigi_Rep_Item;
4017 procedure Set_Has_Homonym (Id : E; V : B := True) is
4018 begin
4019 Set_Flag56 (Id, V);
4020 end Set_Has_Homonym;
4022 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4023 begin
4024 Set_Flag251 (Id, V);
4025 end Set_Has_Implicit_Dereference;
4027 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4028 begin
4029 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4030 Set_Flag34 (Id, V);
4031 end Set_Has_Independent_Components;
4033 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4034 begin
4035 pragma Assert (Is_Type (Id));
4036 Set_Flag248 (Id, V);
4037 end Set_Has_Inheritable_Invariants;
4039 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4040 begin
4041 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4042 Set_Flag219 (Id, V);
4043 end Set_Has_Initial_Value;
4045 procedure Set_Has_Invariants (Id : E; V : B := True) is
4046 begin
4047 pragma Assert (Is_Type (Id));
4048 Set_Flag232 (Id, V);
4049 end Set_Has_Invariants;
4051 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4052 begin
4053 pragma Assert (Ekind (Id) = E_Loop);
4054 Set_Flag260 (Id, V);
4055 end Set_Has_Loop_Entry_Attributes;
4057 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4058 begin
4059 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4060 Set_Flag83 (Id, V);
4061 end Set_Has_Machine_Radix_Clause;
4063 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4064 begin
4065 Set_Flag21 (Id, V);
4066 end Set_Has_Master_Entity;
4068 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4069 begin
4070 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4071 Set_Flag142 (Id, V);
4072 end Set_Has_Missing_Return;
4074 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4075 begin
4076 Set_Flag101 (Id, V);
4077 end Set_Has_Nested_Block_With_Handler;
4079 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4080 begin
4081 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4082 Set_Flag215 (Id, V);
4083 end Set_Has_Up_Level_Access;
4085 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4086 begin
4087 pragma Assert (Id = Base_Type (Id));
4088 Set_Flag75 (Id, V);
4089 end Set_Has_Non_Standard_Rep;
4091 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4092 begin
4093 pragma Assert (Is_Type (Id));
4094 Set_Flag172 (Id, V);
4095 end Set_Has_Object_Size_Clause;
4097 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4098 begin
4099 Set_Flag154 (Id, V);
4100 end Set_Has_Per_Object_Constraint;
4102 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4103 begin
4104 pragma Assert (Is_Subprogram (Id));
4105 Set_Flag240 (Id, V);
4106 end Set_Has_Postconditions;
4108 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4109 begin
4110 pragma Assert (Is_Access_Type (Id));
4111 Set_Flag27 (Base_Type (Id), V);
4112 end Set_Has_Pragma_Controlled;
4114 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4115 begin
4116 Set_Flag150 (Id, V);
4117 end Set_Has_Pragma_Elaborate_Body;
4119 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4120 begin
4121 Set_Flag157 (Id, V);
4122 end Set_Has_Pragma_Inline;
4124 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4125 begin
4126 Set_Flag230 (Id, V);
4127 end Set_Has_Pragma_Inline_Always;
4129 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4130 begin
4131 Set_Flag201 (Id, V);
4132 end Set_Has_Pragma_No_Inline;
4134 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4135 begin
4136 pragma Assert (Is_Enumeration_Type (Id));
4137 pragma Assert (Id = Base_Type (Id));
4138 Set_Flag198 (Id, V);
4139 end Set_Has_Pragma_Ordered;
4141 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4142 begin
4143 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4144 pragma Assert (Id = Base_Type (Id));
4145 Set_Flag121 (Id, V);
4146 end Set_Has_Pragma_Pack;
4148 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4149 begin
4150 Set_Flag221 (Id, V);
4151 end Set_Has_Pragma_Preelab_Init;
4153 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4154 begin
4155 Set_Flag203 (Id, V);
4156 end Set_Has_Pragma_Pure;
4158 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4159 begin
4160 Set_Flag179 (Id, V);
4161 end Set_Has_Pragma_Pure_Function;
4163 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4164 begin
4165 Set_Flag169 (Id, V);
4166 end Set_Has_Pragma_Thread_Local_Storage;
4168 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4169 begin
4170 Set_Flag233 (Id, V);
4171 end Set_Has_Pragma_Unmodified;
4173 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4174 begin
4175 Set_Flag180 (Id, V);
4176 end Set_Has_Pragma_Unreferenced;
4178 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4179 begin
4180 pragma Assert (Is_Type (Id));
4181 Set_Flag212 (Id, V);
4182 end Set_Has_Pragma_Unreferenced_Objects;
4184 procedure Set_Has_Predicates (Id : E; V : B := True) is
4185 begin
4186 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4187 Set_Flag250 (Id, V);
4188 end Set_Has_Predicates;
4190 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4191 begin
4192 pragma Assert (Id = Base_Type (Id));
4193 Set_Flag120 (Id, V);
4194 end Set_Has_Primitive_Operations;
4196 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4197 begin
4198 pragma Assert (Is_Type (Id));
4199 Set_Flag151 (Id, V);
4200 end Set_Has_Private_Ancestor;
4202 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4203 begin
4204 Set_Flag155 (Id, V);
4205 end Set_Has_Private_Declaration;
4207 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4208 begin
4209 Set_Flag161 (Id, V);
4210 end Set_Has_Qualified_Name;
4212 procedure Set_Has_RACW (Id : E; V : B := True) is
4213 begin
4214 pragma Assert (Ekind (Id) = E_Package);
4215 Set_Flag214 (Id, V);
4216 end Set_Has_RACW;
4218 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4219 begin
4220 pragma Assert (Id = Base_Type (Id));
4221 Set_Flag65 (Id, V);
4222 end Set_Has_Record_Rep_Clause;
4224 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4225 begin
4226 pragma Assert (Is_Subprogram (Id));
4227 Set_Flag143 (Id, V);
4228 end Set_Has_Recursive_Call;
4230 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4231 begin
4232 Set_Flag29 (Id, V);
4233 end Set_Has_Size_Clause;
4235 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4236 begin
4237 Set_Flag67 (Id, V);
4238 end Set_Has_Small_Clause;
4240 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4241 begin
4242 pragma Assert (Id = Base_Type (Id));
4243 Set_Flag100 (Id, V);
4244 end Set_Has_Specified_Layout;
4246 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4247 begin
4248 pragma Assert (Is_Type (Id));
4249 Set_Flag190 (Id, V);
4250 end Set_Has_Specified_Stream_Input;
4252 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4253 begin
4254 pragma Assert (Is_Type (Id));
4255 Set_Flag191 (Id, V);
4256 end Set_Has_Specified_Stream_Output;
4258 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4259 begin
4260 pragma Assert (Is_Type (Id));
4261 Set_Flag192 (Id, V);
4262 end Set_Has_Specified_Stream_Read;
4264 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4265 begin
4266 pragma Assert (Is_Type (Id));
4267 Set_Flag193 (Id, V);
4268 end Set_Has_Specified_Stream_Write;
4270 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4271 begin
4272 Set_Flag211 (Id, V);
4273 end Set_Has_Static_Discriminants;
4275 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4276 begin
4277 pragma Assert (Is_Type (Id));
4278 Set_Flag259 (Id, V);
4279 end Set_Has_Static_Predicate_Aspect;
4281 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4282 begin
4283 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4284 pragma Assert (Id = Base_Type (Id));
4285 Set_Flag23 (Id, V);
4286 end Set_Has_Storage_Size_Clause;
4288 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4289 begin
4290 pragma Assert (Is_Elementary_Type (Id));
4291 Set_Flag184 (Id, V);
4292 end Set_Has_Stream_Size_Clause;
4294 procedure Set_Has_Task (Id : E; V : B := True) is
4295 begin
4296 pragma Assert (Id = Base_Type (Id));
4297 Set_Flag30 (Id, V);
4298 end Set_Has_Task;
4300 procedure Set_Has_Thunks (Id : E; V : B := True) is
4301 begin
4302 pragma Assert (Is_Tag (Id));
4303 Set_Flag228 (Id, V);
4304 end Set_Has_Thunks;
4306 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4307 begin
4308 pragma Assert (Id = Base_Type (Id));
4309 Set_Flag123 (Id, V);
4310 end Set_Has_Unchecked_Union;
4312 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4313 begin
4314 pragma Assert (Is_Type (Id));
4315 Set_Flag72 (Id, V);
4316 end Set_Has_Unknown_Discriminants;
4318 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4319 begin
4320 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4321 Set_Flag87 (Id, V);
4322 end Set_Has_Volatile_Components;
4324 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4325 begin
4326 Set_Flag182 (Id, V);
4327 end Set_Has_Xref_Entry;
4329 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4330 begin
4331 pragma Assert (Ekind (Id) = E_Variable);
4332 Set_Node8 (Id, V);
4333 end Set_Hiding_Loop_Variable;
4335 procedure Set_Homonym (Id : E; V : E) is
4336 begin
4337 pragma Assert (Id /= V);
4338 Set_Node4 (Id, V);
4339 end Set_Homonym;
4341 procedure Set_Interface_Alias (Id : E; V : E) is
4342 begin
4343 pragma Assert
4344 (Is_Internal (Id)
4345 and then Is_Hidden (Id)
4346 and then (Ekind_In (Id, E_Procedure, E_Function)));
4347 Set_Node25 (Id, V);
4348 end Set_Interface_Alias;
4350 procedure Set_Interfaces (Id : E; V : L) is
4351 begin
4352 pragma Assert (Is_Record_Type (Id));
4353 Set_Elist25 (Id, V);
4354 end Set_Interfaces;
4356 procedure Set_In_Package_Body (Id : E; V : B := True) is
4357 begin
4358 Set_Flag48 (Id, V);
4359 end Set_In_Package_Body;
4361 procedure Set_In_Private_Part (Id : E; V : B := True) is
4362 begin
4363 Set_Flag45 (Id, V);
4364 end Set_In_Private_Part;
4366 procedure Set_In_Use (Id : E; V : B := True) is
4367 begin
4368 pragma Assert (Nkind (Id) in N_Entity);
4369 Set_Flag8 (Id, V);
4370 end Set_In_Use;
4372 procedure Set_Initialization_Statements (Id : E; V : N) is
4373 begin
4374 -- Tolerate an E_Void entity since this can be called while resolving
4375 -- an aggregate used as the initialization expression for an object
4376 -- declaration, and this occurs before the Ekind for the object is set.
4378 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4379 Set_Node28 (Id, V);
4380 end Set_Initialization_Statements;
4382 procedure Set_Integrity_Level (Id : E; V : Uint) is
4383 begin
4384 pragma Assert (Ekind (Id) = E_Abstract_State);
4385 Set_Uint8 (Id, V);
4386 end Set_Integrity_Level;
4388 procedure Set_Inner_Instances (Id : E; V : L) is
4389 begin
4390 Set_Elist23 (Id, V);
4391 end Set_Inner_Instances;
4393 procedure Set_Interface_Name (Id : E; V : N) is
4394 begin
4395 Set_Node21 (Id, V);
4396 end Set_Interface_Name;
4398 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4399 begin
4400 pragma Assert (Is_Overloadable (Id));
4401 Set_Flag19 (Id, V);
4402 end Set_Is_Abstract_Subprogram;
4404 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4405 begin
4406 pragma Assert (Is_Type (Id));
4407 Set_Flag146 (Id, V);
4408 end Set_Is_Abstract_Type;
4410 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4411 begin
4412 pragma Assert (Is_Access_Type (Id));
4413 Set_Flag194 (Id, V);
4414 end Set_Is_Local_Anonymous_Access;
4416 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4417 begin
4418 pragma Assert (Is_Access_Type (Id));
4419 Set_Flag69 (Id, V);
4420 end Set_Is_Access_Constant;
4422 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4423 begin
4424 Set_Flag185 (Id, V);
4425 end Set_Is_Ada_2005_Only;
4427 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4428 begin
4429 Set_Flag199 (Id, V);
4430 end Set_Is_Ada_2012_Only;
4432 procedure Set_Is_Aliased (Id : E; V : B := True) is
4433 begin
4434 pragma Assert (Nkind (Id) in N_Entity);
4435 Set_Flag15 (Id, V);
4436 end Set_Is_Aliased;
4438 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4439 begin
4440 pragma Assert (Is_Entry (Id));
4441 Set_Flag132 (Id, V);
4442 end Set_Is_AST_Entry;
4444 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4445 begin
4446 pragma Assert
4447 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4448 Set_Flag81 (Id, V);
4449 end Set_Is_Asynchronous;
4451 procedure Set_Is_Atomic (Id : E; V : B := True) is
4452 begin
4453 Set_Flag85 (Id, V);
4454 end Set_Is_Atomic;
4456 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4457 begin
4458 pragma Assert ((not V)
4459 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4460 Set_Flag122 (Id, V);
4461 end Set_Is_Bit_Packed_Array;
4463 procedure Set_Is_Called (Id : E; V : B := True) is
4464 begin
4465 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4466 Set_Flag102 (Id, V);
4467 end Set_Is_Called;
4469 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4470 begin
4471 Set_Flag63 (Id, V);
4472 end Set_Is_Character_Type;
4474 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4475 begin
4476 Set_Flag73 (Id, V);
4477 end Set_Is_Child_Unit;
4479 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4480 begin
4481 Set_Flag35 (Id, V);
4482 end Set_Is_Class_Wide_Equivalent_Type;
4484 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4485 begin
4486 Set_Flag149 (Id, V);
4487 end Set_Is_Compilation_Unit;
4489 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4490 begin
4491 pragma Assert (Ekind (Id) = E_Discriminant);
4492 Set_Flag103 (Id, V);
4493 end Set_Is_Completely_Hidden;
4495 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4496 begin
4497 Set_Flag20 (Id, V);
4498 end Set_Is_Concurrent_Record_Type;
4500 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4501 begin
4502 Set_Flag80 (Id, V);
4503 end Set_Is_Constr_Subt_For_U_Nominal;
4505 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4506 begin
4507 Set_Flag141 (Id, V);
4508 end Set_Is_Constr_Subt_For_UN_Aliased;
4510 procedure Set_Is_Constrained (Id : E; V : B := True) is
4511 begin
4512 pragma Assert (Nkind (Id) in N_Entity);
4513 Set_Flag12 (Id, V);
4514 end Set_Is_Constrained;
4516 procedure Set_Is_Constructor (Id : E; V : B := True) is
4517 begin
4518 Set_Flag76 (Id, V);
4519 end Set_Is_Constructor;
4521 procedure Set_Is_Controlled (Id : E; V : B := True) is
4522 begin
4523 pragma Assert (Id = Base_Type (Id));
4524 Set_Flag42 (Id, V);
4525 end Set_Is_Controlled;
4527 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4528 begin
4529 pragma Assert (Is_Formal (Id));
4530 Set_Flag97 (Id, V);
4531 end Set_Is_Controlling_Formal;
4533 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4534 begin
4535 Set_Flag74 (Id, V);
4536 end Set_Is_CPP_Class;
4538 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4539 begin
4540 pragma Assert (Is_Type (Id));
4541 Set_Flag223 (Id, V);
4542 end Set_Is_Descendent_Of_Address;
4544 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4545 begin
4546 Set_Flag176 (Id, V);
4547 end Set_Is_Discrim_SO_Function;
4549 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4550 begin
4551 Set_Flag234 (Id, V);
4552 end Set_Is_Dispatch_Table_Entity;
4554 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4555 begin
4556 pragma Assert
4557 (V = False
4558 or else
4559 Is_Overloadable (Id)
4560 or else
4561 Ekind (Id) = E_Subprogram_Type);
4563 Set_Flag6 (Id, V);
4564 end Set_Is_Dispatching_Operation;
4566 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4567 begin
4568 Set_Flag124 (Id, V);
4569 end Set_Is_Eliminated;
4571 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4572 begin
4573 Set_Flag52 (Id, V);
4574 end Set_Is_Entry_Formal;
4576 procedure Set_Is_Exported (Id : E; V : B := True) is
4577 begin
4578 Set_Flag99 (Id, V);
4579 end Set_Is_Exported;
4581 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4582 begin
4583 Set_Flag70 (Id, V);
4584 end Set_Is_First_Subtype;
4586 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4587 begin
4588 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4589 Set_Flag118 (Id, V);
4590 end Set_Is_For_Access_Subtype;
4592 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4593 begin
4594 Set_Flag111 (Id, V);
4595 end Set_Is_Formal_Subprogram;
4597 procedure Set_Is_Frozen (Id : E; V : B := True) is
4598 begin
4599 pragma Assert (Nkind (Id) in N_Entity);
4600 Set_Flag4 (Id, V);
4601 end Set_Is_Frozen;
4603 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4604 begin
4605 pragma Assert (Is_Type (Id));
4606 Set_Flag94 (Id, V);
4607 end Set_Is_Generic_Actual_Type;
4609 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4610 begin
4611 Set_Flag130 (Id, V);
4612 end Set_Is_Generic_Instance;
4614 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4615 begin
4616 pragma Assert (Nkind (Id) in N_Entity);
4617 Set_Flag13 (Id, V);
4618 end Set_Is_Generic_Type;
4620 procedure Set_Is_Hidden (Id : E; V : B := True) is
4621 begin
4622 Set_Flag57 (Id, V);
4623 end Set_Is_Hidden;
4625 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4626 begin
4627 Set_Flag171 (Id, V);
4628 end Set_Is_Hidden_Open_Scope;
4630 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4631 begin
4632 pragma Assert (Nkind (Id) in N_Entity);
4633 Set_Flag7 (Id, V);
4634 end Set_Is_Immediately_Visible;
4636 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4637 begin
4638 Set_Flag254 (Id, V);
4639 end Set_Is_Implementation_Defined;
4641 procedure Set_Is_Imported (Id : E; V : B := True) is
4642 begin
4643 Set_Flag24 (Id, V);
4644 end Set_Is_Imported;
4646 procedure Set_Is_Inlined (Id : E; V : B := True) is
4647 begin
4648 Set_Flag11 (Id, V);
4649 end Set_Is_Inlined;
4651 procedure Set_Is_Interface (Id : E; V : B := True) is
4652 begin
4653 pragma Assert (Is_Record_Type (Id));
4654 Set_Flag186 (Id, V);
4655 end Set_Is_Interface;
4657 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4658 begin
4659 Set_Flag126 (Id, V);
4660 end Set_Is_Instantiated;
4662 procedure Set_Is_Internal (Id : E; V : B := True) is
4663 begin
4664 pragma Assert (Nkind (Id) in N_Entity);
4665 Set_Flag17 (Id, V);
4666 end Set_Is_Internal;
4668 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4669 begin
4670 pragma Assert (Nkind (Id) in N_Entity);
4671 Set_Flag89 (Id, V);
4672 end Set_Is_Interrupt_Handler;
4674 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4675 begin
4676 Set_Flag64 (Id, V);
4677 end Set_Is_Intrinsic_Subprogram;
4679 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4680 begin
4681 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4682 Set_Flag257 (Id, V);
4683 end Set_Is_Invariant_Procedure;
4685 procedure Set_Is_Itype (Id : E; V : B := True) is
4686 begin
4687 Set_Flag91 (Id, V);
4688 end Set_Is_Itype;
4690 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4691 begin
4692 Set_Flag37 (Id, V);
4693 end Set_Is_Known_Non_Null;
4695 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4696 begin
4697 Set_Flag204 (Id, V);
4698 end Set_Is_Known_Null;
4700 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4701 begin
4702 Set_Flag170 (Id, V);
4703 end Set_Is_Known_Valid;
4705 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4706 begin
4707 pragma Assert (Is_Type (Id));
4708 Set_Flag106 (Id, V);
4709 end Set_Is_Limited_Composite;
4711 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4712 begin
4713 pragma Assert (Is_Interface (Id));
4714 Set_Flag197 (Id, V);
4715 end Set_Is_Limited_Interface;
4717 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4718 begin
4719 Set_Flag25 (Id, V);
4720 end Set_Is_Limited_Record;
4722 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4723 begin
4724 pragma Assert (Is_Subprogram (Id));
4725 Set_Flag137 (Id, V);
4726 end Set_Is_Machine_Code_Subprogram;
4728 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4729 begin
4730 pragma Assert (Is_Type (Id));
4731 Set_Flag109 (Id, V);
4732 end Set_Is_Non_Static_Subtype;
4734 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4735 begin
4736 pragma Assert (Ekind (Id) = E_Procedure);
4737 Set_Flag178 (Id, V);
4738 end Set_Is_Null_Init_Proc;
4740 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4741 begin
4742 Set_Flag153 (Id, V);
4743 end Set_Is_Obsolescent;
4745 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4746 begin
4747 pragma Assert (Ekind (Id) = E_Out_Parameter);
4748 Set_Flag226 (Id, V);
4749 end Set_Is_Only_Out_Parameter;
4751 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4752 begin
4753 pragma Assert (Is_Formal (Id));
4754 Set_Flag134 (Id, V);
4755 end Set_Is_Optional_Parameter;
4757 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4758 begin
4759 Set_Flag160 (Id, V);
4760 end Set_Is_Package_Body_Entity;
4762 procedure Set_Is_Packed (Id : E; V : B := True) is
4763 begin
4764 pragma Assert (Id = Base_Type (Id));
4765 Set_Flag51 (Id, V);
4766 end Set_Is_Packed;
4768 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4769 begin
4770 Set_Flag138 (Id, V);
4771 end Set_Is_Packed_Array_Type;
4773 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4774 begin
4775 pragma Assert (Nkind (Id) in N_Entity);
4776 Set_Flag9 (Id, V);
4777 end Set_Is_Potentially_Use_Visible;
4779 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4780 begin
4781 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4782 Set_Flag255 (Id, V);
4783 end Set_Is_Predicate_Function;
4785 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4786 begin
4787 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4788 Set_Flag256 (Id, V);
4789 end Set_Is_Predicate_Function_M;
4791 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4792 begin
4793 Set_Flag59 (Id, V);
4794 end Set_Is_Preelaborated;
4796 procedure Set_Is_Primitive (Id : E; V : B := True) is
4797 begin
4798 pragma Assert
4799 (Is_Overloadable (Id)
4800 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4801 Set_Flag218 (Id, V);
4802 end Set_Is_Primitive;
4804 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4805 begin
4806 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4807 Set_Flag195 (Id, V);
4808 end Set_Is_Primitive_Wrapper;
4810 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4811 begin
4812 pragma Assert (Is_Type (Id));
4813 Set_Flag107 (Id, V);
4814 end Set_Is_Private_Composite;
4816 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4817 begin
4818 Set_Flag53 (Id, V);
4819 end Set_Is_Private_Descendant;
4821 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4822 begin
4823 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4824 Set_Flag245 (Id, V);
4825 end Set_Is_Private_Primitive;
4827 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4828 begin
4829 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4830 Set_Flag252 (Id, V);
4831 end Set_Is_Processed_Transient;
4833 procedure Set_Is_Public (Id : E; V : B := True) is
4834 begin
4835 pragma Assert (Nkind (Id) in N_Entity);
4836 Set_Flag10 (Id, V);
4837 end Set_Is_Public;
4839 procedure Set_Is_Pure (Id : E; V : B := True) is
4840 begin
4841 Set_Flag44 (Id, V);
4842 end Set_Is_Pure;
4844 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4845 begin
4846 pragma Assert (Is_Access_Type (Id));
4847 Set_Flag189 (Id, V);
4848 end Set_Is_Pure_Unit_Access_Type;
4850 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4851 begin
4852 pragma Assert (Is_Type (Id));
4853 Set_Flag244 (Id, V);
4854 end Set_Is_RACW_Stub_Type;
4856 procedure Set_Is_Raised (Id : E; V : B := True) is
4857 begin
4858 pragma Assert (Ekind (Id) = E_Exception);
4859 Set_Flag224 (Id, V);
4860 end Set_Is_Raised;
4862 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4863 begin
4864 Set_Flag62 (Id, V);
4865 end Set_Is_Remote_Call_Interface;
4867 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4868 begin
4869 Set_Flag61 (Id, V);
4870 end Set_Is_Remote_Types;
4872 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4873 begin
4874 Set_Flag112 (Id, V);
4875 end Set_Is_Renaming_Of_Object;
4877 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4878 begin
4879 Set_Flag209 (Id, V);
4880 end Set_Is_Return_Object;
4882 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4883 begin
4884 pragma Assert (Ekind (Id) = E_Variable);
4885 Set_Flag249 (Id, V);
4886 end Set_Is_Safe_To_Reevaluate;
4888 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4889 begin
4890 Set_Flag60 (Id, V);
4891 end Set_Is_Shared_Passive;
4893 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4894 begin
4895 pragma Assert
4896 (Is_Type (Id)
4897 or else Ekind_In (Id, E_Exception,
4898 E_Variable,
4899 E_Constant,
4900 E_Void));
4901 Set_Flag28 (Id, V);
4902 end Set_Is_Statically_Allocated;
4904 procedure Set_Is_Tag (Id : E; V : B := True) is
4905 begin
4906 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4907 Set_Flag78 (Id, V);
4908 end Set_Is_Tag;
4910 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4911 begin
4912 Set_Flag55 (Id, V);
4913 end Set_Is_Tagged_Type;
4915 procedure Set_Is_Thunk (Id : E; V : B := True) is
4916 begin
4917 pragma Assert (Is_Subprogram (Id));
4918 Set_Flag225 (Id, V);
4919 end Set_Is_Thunk;
4921 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4922 begin
4923 Set_Flag235 (Id, V);
4924 end Set_Is_Trivial_Subprogram;
4926 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4927 begin
4928 Set_Flag163 (Id, V);
4929 end Set_Is_True_Constant;
4931 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4932 begin
4933 pragma Assert (Id = Base_Type (Id));
4934 Set_Flag117 (Id, V);
4935 end Set_Is_Unchecked_Union;
4937 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4938 begin
4939 pragma Assert (Ekind (Id) = E_Record_Type);
4940 Set_Flag246 (Id, V);
4941 end Set_Is_Underlying_Record_View;
4943 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4944 begin
4945 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4946 Set_Flag144 (Id, V);
4947 end Set_Is_Unsigned_Type;
4949 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4950 begin
4951 pragma Assert (Ekind (Id) = E_Procedure);
4952 Set_Flag127 (Id, V);
4953 end Set_Is_Valued_Procedure;
4955 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4956 begin
4957 Set_Flag206 (Id, V);
4958 end Set_Is_Visible_Formal;
4960 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4961 begin
4962 Set_Flag116 (Id, V);
4963 end Set_Is_Visible_Lib_Unit;
4965 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4966 begin
4967 pragma Assert (Ekind (Id) = E_Exception);
4968 Set_Flag133 (Id, V);
4969 end Set_Is_VMS_Exception;
4971 procedure Set_Is_Volatile (Id : E; V : B := True) is
4972 begin
4973 pragma Assert (Nkind (Id) in N_Entity);
4974 Set_Flag16 (Id, V);
4975 end Set_Is_Volatile;
4977 procedure Set_Itype_Printed (Id : E; V : B := True) is
4978 begin
4979 pragma Assert (Is_Itype (Id));
4980 Set_Flag202 (Id, V);
4981 end Set_Itype_Printed;
4983 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4984 begin
4985 Set_Flag32 (Id, V);
4986 end Set_Kill_Elaboration_Checks;
4988 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4989 begin
4990 Set_Flag33 (Id, V);
4991 end Set_Kill_Range_Checks;
4993 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4994 begin
4995 pragma Assert (Is_Type (Id));
4996 Set_Flag207 (Id, V);
4997 end Set_Known_To_Have_Preelab_Init;
4999 procedure Set_Last_Assignment (Id : E; V : N) is
5000 begin
5001 pragma Assert (Is_Assignable (Id));
5002 Set_Node26 (Id, V);
5003 end Set_Last_Assignment;
5005 procedure Set_Last_Entity (Id : E; V : E) is
5006 begin
5007 Set_Node20 (Id, V);
5008 end Set_Last_Entity;
5010 procedure Set_Limited_View (Id : E; V : E) is
5011 begin
5012 pragma Assert (Ekind (Id) = E_Package);
5013 Set_Node23 (Id, V);
5014 end Set_Limited_View;
5016 procedure Set_Lit_Indexes (Id : E; V : E) is
5017 begin
5018 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5019 Set_Node15 (Id, V);
5020 end Set_Lit_Indexes;
5022 procedure Set_Lit_Strings (Id : E; V : E) is
5023 begin
5024 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5025 Set_Node16 (Id, V);
5026 end Set_Lit_Strings;
5028 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5029 begin
5030 pragma Assert (Is_Formal (Id));
5031 Set_Flag205 (Id, V);
5032 end Set_Low_Bound_Tested;
5034 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5035 begin
5036 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5037 Set_Flag84 (Id, V);
5038 end Set_Machine_Radix_10;
5040 procedure Set_Master_Id (Id : E; V : E) is
5041 begin
5042 pragma Assert (Is_Access_Type (Id));
5043 Set_Node17 (Id, V);
5044 end Set_Master_Id;
5046 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5047 begin
5048 Set_Flag168 (Id, V);
5049 end Set_Materialize_Entity;
5051 procedure Set_Mechanism (Id : E; V : M) is
5052 begin
5053 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5054 Set_Uint8 (Id, UI_From_Int (V));
5055 end Set_Mechanism;
5057 procedure Set_Modulus (Id : E; V : U) is
5058 begin
5059 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5060 Set_Uint17 (Id, V);
5061 end Set_Modulus;
5063 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5064 begin
5065 pragma Assert (Is_Type (Id));
5066 Set_Flag183 (Id, V);
5067 end Set_Must_Be_On_Byte_Boundary;
5069 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5070 begin
5071 pragma Assert (Is_Type (Id));
5072 Set_Flag208 (Id, V);
5073 end Set_Must_Have_Preelab_Init;
5075 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5076 begin
5077 Set_Flag147 (Id, V);
5078 end Set_Needs_Debug_Info;
5080 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5081 begin
5082 pragma Assert
5083 (Is_Overloadable (Id)
5084 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5085 Set_Flag22 (Id, V);
5086 end Set_Needs_No_Actuals;
5088 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5089 begin
5090 Set_Flag115 (Id, V);
5091 end Set_Never_Set_In_Source;
5093 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5094 begin
5095 Set_Node12 (Id, V);
5096 end Set_Next_Inlined_Subprogram;
5098 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5099 begin
5100 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5101 Set_Flag131 (Id, V);
5102 end Set_No_Pool_Assigned;
5104 procedure Set_No_Return (Id : E; V : B := True) is
5105 begin
5106 pragma Assert
5107 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5108 Set_Flag113 (Id, V);
5109 end Set_No_Return;
5111 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5112 begin
5113 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5114 Set_Flag136 (Id, V);
5115 end Set_No_Strict_Aliasing;
5117 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5118 begin
5119 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5120 Set_Flag58 (Id, V);
5121 end Set_Non_Binary_Modulus;
5123 procedure Set_Non_Limited_View (Id : E; V : E) is
5124 begin
5125 pragma Assert (Ekind (Id) in Incomplete_Kind);
5126 Set_Node17 (Id, V);
5127 end Set_Non_Limited_View;
5129 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5130 begin
5131 pragma Assert
5132 (Root_Type (Id) = Standard_Boolean
5133 and then Ekind (Id) = E_Enumeration_Type);
5134 Set_Flag162 (Id, V);
5135 end Set_Nonzero_Is_True;
5137 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5138 begin
5139 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5140 Set_Uint8 (Id, V);
5141 end Set_Normalized_First_Bit;
5143 procedure Set_Normalized_Position (Id : E; V : U) is
5144 begin
5145 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5146 Set_Uint14 (Id, V);
5147 end Set_Normalized_Position;
5149 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5150 begin
5151 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5152 Set_Uint10 (Id, V);
5153 end Set_Normalized_Position_Max;
5155 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5156 begin
5157 pragma Assert (Ekind (Id) = E_Variable);
5158 Set_Flag247 (Id, V);
5159 end Set_OK_To_Rename;
5161 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5162 begin
5163 pragma Assert
5164 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5165 Set_Flag239 (Id, V);
5166 end Set_OK_To_Reorder_Components;
5168 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5169 begin
5170 pragma Assert
5171 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5172 Set_Flag241 (Id, V);
5173 end Set_Optimize_Alignment_Space;
5175 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5176 begin
5177 pragma Assert
5178 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5179 Set_Flag242 (Id, V);
5180 end Set_Optimize_Alignment_Time;
5182 procedure Set_Original_Access_Type (Id : E; V : E) is
5183 begin
5184 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5185 Set_Node26 (Id, V);
5186 end Set_Original_Access_Type;
5188 procedure Set_Original_Array_Type (Id : E; V : E) is
5189 begin
5190 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5191 Set_Node21 (Id, V);
5192 end Set_Original_Array_Type;
5194 procedure Set_Original_Record_Component (Id : E; V : E) is
5195 begin
5196 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5197 Set_Node22 (Id, V);
5198 end Set_Original_Record_Component;
5200 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5201 begin
5202 Set_Flag243 (Id, V);
5203 end Set_Overlays_Constant;
5205 procedure Set_Overridden_Operation (Id : E; V : E) is
5206 begin
5207 Set_Node26 (Id, V);
5208 end Set_Overridden_Operation;
5210 procedure Set_Package_Instantiation (Id : E; V : N) is
5211 begin
5212 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5213 Set_Node26 (Id, V);
5214 end Set_Package_Instantiation;
5216 procedure Set_Packed_Array_Type (Id : E; V : E) is
5217 begin
5218 pragma Assert (Is_Array_Type (Id));
5219 Set_Node23 (Id, V);
5220 end Set_Packed_Array_Type;
5222 procedure Set_Parent_Subtype (Id : E; V : E) is
5223 begin
5224 pragma Assert (Ekind (Id) = E_Record_Type);
5225 Set_Node19 (Id, V);
5226 end Set_Parent_Subtype;
5228 procedure Set_Postcondition_Proc (Id : E; V : E) is
5229 begin
5230 pragma Assert (Ekind (Id) = E_Procedure);
5231 Set_Node8 (Id, V);
5232 end Set_Postcondition_Proc;
5234 procedure Set_PPC_Wrapper (Id : E; V : E) is
5235 begin
5236 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5237 Set_Node25 (Id, V);
5238 end Set_PPC_Wrapper;
5240 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5241 begin
5242 pragma Assert (Is_Tagged_Type (Id));
5243 Set_Elist10 (Id, V);
5244 end Set_Direct_Primitive_Operations;
5246 procedure Set_Prival (Id : E; V : E) is
5247 begin
5248 pragma Assert (Is_Protected_Component (Id));
5249 Set_Node17 (Id, V);
5250 end Set_Prival;
5252 procedure Set_Prival_Link (Id : E; V : E) is
5253 begin
5254 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5255 Set_Node20 (Id, V);
5256 end Set_Prival_Link;
5258 procedure Set_Private_Dependents (Id : E; V : L) is
5259 begin
5260 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5261 Set_Elist18 (Id, V);
5262 end Set_Private_Dependents;
5264 procedure Set_Private_View (Id : E; V : N) is
5265 begin
5266 pragma Assert (Is_Private_Type (Id));
5267 Set_Node22 (Id, V);
5268 end Set_Private_View;
5270 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5271 begin
5272 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5273 Set_Node11 (Id, V);
5274 end Set_Protected_Body_Subprogram;
5276 procedure Set_Protected_Formal (Id : E; V : E) is
5277 begin
5278 pragma Assert (Is_Formal (Id));
5279 Set_Node22 (Id, V);
5280 end Set_Protected_Formal;
5282 procedure Set_Protection_Object (Id : E; V : E) is
5283 begin
5284 pragma Assert (Ekind_In (Id, E_Entry,
5285 E_Entry_Family,
5286 E_Function,
5287 E_Procedure));
5288 Set_Node23 (Id, V);
5289 end Set_Protection_Object;
5291 procedure Set_Reachable (Id : E; V : B := True) is
5292 begin
5293 Set_Flag49 (Id, V);
5294 end Set_Reachable;
5296 procedure Set_Referenced (Id : E; V : B := True) is
5297 begin
5298 Set_Flag156 (Id, V);
5299 end Set_Referenced;
5301 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5302 begin
5303 Set_Flag36 (Id, V);
5304 end Set_Referenced_As_LHS;
5306 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5307 begin
5308 Set_Flag227 (Id, V);
5309 end Set_Referenced_As_Out_Parameter;
5311 procedure Set_Refined_State (Id : E; V : E) is
5312 begin
5313 pragma Assert (Ekind (Id) = E_Abstract_State);
5314 Set_Node9 (Id, V);
5315 end Set_Refined_State;
5317 procedure Set_Register_Exception_Call (Id : E; V : N) is
5318 begin
5319 pragma Assert (Ekind (Id) = E_Exception);
5320 Set_Node20 (Id, V);
5321 end Set_Register_Exception_Call;
5323 procedure Set_Related_Array_Object (Id : E; V : E) is
5324 begin
5325 pragma Assert (Is_Array_Type (Id));
5326 Set_Node25 (Id, V);
5327 end Set_Related_Array_Object;
5329 procedure Set_Related_Expression (Id : E; V : N) is
5330 begin
5331 pragma Assert (Ekind (Id) in Type_Kind
5332 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5333 Set_Node24 (Id, V);
5334 end Set_Related_Expression;
5336 procedure Set_Related_Instance (Id : E; V : E) is
5337 begin
5338 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5339 Set_Node15 (Id, V);
5340 end Set_Related_Instance;
5342 procedure Set_Related_Type (Id : E; V : E) is
5343 begin
5344 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5345 Set_Node27 (Id, V);
5346 end Set_Related_Type;
5348 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5349 begin
5350 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5351 Set_Node26 (Id, V);
5352 end Set_Relative_Deadline_Variable;
5354 procedure Set_Renamed_Entity (Id : E; V : N) is
5355 begin
5356 Set_Node18 (Id, V);
5357 end Set_Renamed_Entity;
5359 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5360 begin
5361 pragma Assert (Ekind (Id) = E_Package);
5362 Set_Flag231 (Id, V);
5363 end Set_Renamed_In_Spec;
5365 procedure Set_Renamed_Object (Id : E; V : N) is
5366 begin
5367 Set_Node18 (Id, V);
5368 end Set_Renamed_Object;
5370 procedure Set_Renaming_Map (Id : E; V : U) is
5371 begin
5372 Set_Uint9 (Id, V);
5373 end Set_Renaming_Map;
5375 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5376 begin
5377 pragma Assert (Is_Overloadable (Id));
5378 Set_Flag213 (Id, V);
5379 end Set_Requires_Overriding;
5381 procedure Set_Return_Present (Id : E; V : B := True) is
5382 begin
5383 Set_Flag54 (Id, V);
5384 end Set_Return_Present;
5386 procedure Set_Return_Applies_To (Id : E; V : N) is
5387 begin
5388 Set_Node8 (Id, V);
5389 end Set_Return_Applies_To;
5391 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5392 begin
5393 Set_Flag90 (Id, V);
5394 end Set_Returns_By_Ref;
5396 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5397 begin
5398 pragma Assert
5399 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5400 Set_Flag164 (Id, V);
5401 end Set_Reverse_Bit_Order;
5403 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5404 begin
5405 pragma Assert
5406 (Is_Base_Type (Id)
5407 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5408 Set_Flag93 (Id, V);
5409 end Set_Reverse_Storage_Order;
5411 procedure Set_RM_Size (Id : E; V : U) is
5412 begin
5413 pragma Assert (Is_Type (Id));
5414 Set_Uint13 (Id, V);
5415 end Set_RM_Size;
5417 procedure Set_Scalar_Range (Id : E; V : N) is
5418 begin
5419 Set_Node20 (Id, V);
5420 end Set_Scalar_Range;
5422 procedure Set_Scale_Value (Id : E; V : U) is
5423 begin
5424 Set_Uint15 (Id, V);
5425 end Set_Scale_Value;
5427 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5428 begin
5429 pragma Assert (not Is_Record_Type (Id));
5430 Set_Uint22 (Id, V);
5431 end Set_Scope_Depth_Value;
5433 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5434 begin
5435 Set_Flag167 (Id, V);
5436 end Set_Sec_Stack_Needed_For_Return;
5438 procedure Set_Shadow_Entities (Id : E; V : S) is
5439 begin
5440 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5441 Set_List14 (Id, V);
5442 end Set_Shadow_Entities;
5444 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5445 begin
5446 pragma Assert (Ekind (Id) = E_Variable);
5447 Set_Node22 (Id, V);
5448 end Set_Shared_Var_Procs_Instance;
5450 procedure Set_Size_Check_Code (Id : E; V : N) is
5451 begin
5452 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5453 Set_Node19 (Id, V);
5454 end Set_Size_Check_Code;
5456 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5457 begin
5458 Set_Flag177 (Id, V);
5459 end Set_Size_Depends_On_Discriminant;
5461 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5462 begin
5463 Set_Flag92 (Id, V);
5464 end Set_Size_Known_At_Compile_Time;
5466 procedure Set_Small_Value (Id : E; V : R) is
5467 begin
5468 pragma Assert (Is_Fixed_Point_Type (Id));
5469 Set_Ureal21 (Id, V);
5470 end Set_Small_Value;
5472 procedure Set_Spec_Entity (Id : E; V : E) is
5473 begin
5474 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5475 Set_Node19 (Id, V);
5476 end Set_Spec_Entity;
5478 procedure Set_Static_Predicate (Id : E; V : S) is
5479 begin
5480 pragma Assert
5481 (Ekind_In (Id, E_Enumeration_Subtype,
5482 E_Modular_Integer_Subtype,
5483 E_Signed_Integer_Subtype)
5484 and then Has_Predicates (Id));
5485 Set_List25 (Id, V);
5486 end Set_Static_Predicate;
5488 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5489 begin
5490 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5491 Set_Node15 (Id, V);
5492 end Set_Status_Flag_Or_Transient_Decl;
5494 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5495 begin
5496 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5497 pragma Assert (Id = Base_Type (Id));
5498 Set_Node15 (Id, V);
5499 end Set_Storage_Size_Variable;
5501 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5502 begin
5503 pragma Assert (Ekind (Id) = E_Package);
5504 Set_Flag77 (Id, V);
5505 end Set_Static_Elaboration_Desired;
5507 procedure Set_Static_Initialization (Id : E; V : N) is
5508 begin
5509 pragma Assert
5510 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5511 Set_Node30 (Id, V);
5512 end Set_Static_Initialization;
5514 procedure Set_Stored_Constraint (Id : E; V : L) is
5515 begin
5516 pragma Assert (Nkind (Id) in N_Entity);
5517 Set_Elist23 (Id, V);
5518 end Set_Stored_Constraint;
5520 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5521 begin
5522 pragma Assert (Id = Base_Type (Id));
5523 Set_Flag145 (Id, V);
5524 end Set_Strict_Alignment;
5526 procedure Set_String_Literal_Length (Id : E; V : U) is
5527 begin
5528 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5529 Set_Uint16 (Id, V);
5530 end Set_String_Literal_Length;
5532 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5533 begin
5534 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5535 Set_Node15 (Id, V);
5536 end Set_String_Literal_Low_Bound;
5538 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5539 begin
5540 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5541 Set_Node29 (Id, V);
5542 end Set_Subprograms_For_Type;
5544 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5545 begin
5546 Set_Flag148 (Id, V);
5547 end Set_Suppress_Elaboration_Warnings;
5549 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5550 begin
5551 pragma Assert (Is_Type (Id));
5552 Set_Flag105 (Id, V);
5553 end Set_Suppress_Initialization;
5555 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5556 begin
5557 Set_Flag165 (Id, V);
5558 end Set_Suppress_Style_Checks;
5560 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5561 begin
5562 Set_Flag217 (Id, V);
5563 end Set_Suppress_Value_Tracking_On_Call;
5565 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5566 begin
5567 pragma Assert (Ekind (Id) in Task_Kind);
5568 Set_Node25 (Id, V);
5569 end Set_Task_Body_Procedure;
5571 procedure Set_Thunk_Entity (Id : E; V : E) is
5572 begin
5573 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5574 and then Is_Thunk (Id));
5575 Set_Node31 (Id, V);
5576 end Set_Thunk_Entity;
5578 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5579 begin
5580 Set_Flag41 (Id, V);
5581 end Set_Treat_As_Volatile;
5583 procedure Set_Underlying_Full_View (Id : E; V : E) is
5584 begin
5585 pragma Assert (Ekind (Id) in Private_Kind);
5586 Set_Node19 (Id, V);
5587 end Set_Underlying_Full_View;
5589 procedure Set_Underlying_Record_View (Id : E; V : E) is
5590 begin
5591 pragma Assert (Ekind (Id) = E_Record_Type);
5592 Set_Node28 (Id, V);
5593 end Set_Underlying_Record_View;
5595 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5596 begin
5597 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5598 Set_Flag216 (Id, V);
5599 end Set_Universal_Aliasing;
5601 procedure Set_Unset_Reference (Id : E; V : N) is
5602 begin
5603 Set_Node16 (Id, V);
5604 end Set_Unset_Reference;
5606 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5607 begin
5608 Set_Flag222 (Id, V);
5609 end Set_Used_As_Generic_Actual;
5611 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5612 begin
5613 pragma Assert (Ekind (Id) = E_Protected_Type);
5614 Set_Flag188 (Id, V);
5615 end Set_Uses_Lock_Free;
5617 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5618 begin
5619 Set_Flag95 (Id, V);
5620 end Set_Uses_Sec_Stack;
5622 procedure Set_Warnings_Off (Id : E; V : B := True) is
5623 begin
5624 Set_Flag96 (Id, V);
5625 end Set_Warnings_Off;
5627 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5628 begin
5629 Set_Flag236 (Id, V);
5630 end Set_Warnings_Off_Used;
5632 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5633 begin
5634 Set_Flag237 (Id, V);
5635 end Set_Warnings_Off_Used_Unmodified;
5637 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5638 begin
5639 Set_Flag238 (Id, V);
5640 end Set_Warnings_Off_Used_Unreferenced;
5642 procedure Set_Was_Hidden (Id : E; V : B := True) is
5643 begin
5644 Set_Flag196 (Id, V);
5645 end Set_Was_Hidden;
5647 procedure Set_Wrapped_Entity (Id : E; V : E) is
5648 begin
5649 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5650 and then Is_Primitive_Wrapper (Id));
5651 Set_Node27 (Id, V);
5652 end Set_Wrapped_Entity;
5654 -----------------------------------
5655 -- Field Initialization Routines --
5656 -----------------------------------
5658 procedure Init_Alignment (Id : E) is
5659 begin
5660 Set_Uint14 (Id, Uint_0);
5661 end Init_Alignment;
5663 procedure Init_Alignment (Id : E; V : Int) is
5664 begin
5665 Set_Uint14 (Id, UI_From_Int (V));
5666 end Init_Alignment;
5668 procedure Init_Component_Bit_Offset (Id : E) is
5669 begin
5670 Set_Uint11 (Id, No_Uint);
5671 end Init_Component_Bit_Offset;
5673 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5674 begin
5675 Set_Uint11 (Id, UI_From_Int (V));
5676 end Init_Component_Bit_Offset;
5678 procedure Init_Component_Size (Id : E) is
5679 begin
5680 Set_Uint22 (Id, Uint_0);
5681 end Init_Component_Size;
5683 procedure Init_Component_Size (Id : E; V : Int) is
5684 begin
5685 Set_Uint22 (Id, UI_From_Int (V));
5686 end Init_Component_Size;
5688 procedure Init_Digits_Value (Id : E) is
5689 begin
5690 Set_Uint17 (Id, Uint_0);
5691 end Init_Digits_Value;
5693 procedure Init_Digits_Value (Id : E; V : Int) is
5694 begin
5695 Set_Uint17 (Id, UI_From_Int (V));
5696 end Init_Digits_Value;
5698 procedure Init_Esize (Id : E) is
5699 begin
5700 Set_Uint12 (Id, Uint_0);
5701 end Init_Esize;
5703 procedure Init_Esize (Id : E; V : Int) is
5704 begin
5705 Set_Uint12 (Id, UI_From_Int (V));
5706 end Init_Esize;
5708 procedure Init_Normalized_First_Bit (Id : E) is
5709 begin
5710 Set_Uint8 (Id, No_Uint);
5711 end Init_Normalized_First_Bit;
5713 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5714 begin
5715 Set_Uint8 (Id, UI_From_Int (V));
5716 end Init_Normalized_First_Bit;
5718 procedure Init_Normalized_Position (Id : E) is
5719 begin
5720 Set_Uint14 (Id, No_Uint);
5721 end Init_Normalized_Position;
5723 procedure Init_Normalized_Position (Id : E; V : Int) is
5724 begin
5725 Set_Uint14 (Id, UI_From_Int (V));
5726 end Init_Normalized_Position;
5728 procedure Init_Normalized_Position_Max (Id : E) is
5729 begin
5730 Set_Uint10 (Id, No_Uint);
5731 end Init_Normalized_Position_Max;
5733 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5734 begin
5735 Set_Uint10 (Id, UI_From_Int (V));
5736 end Init_Normalized_Position_Max;
5738 procedure Init_RM_Size (Id : E) is
5739 begin
5740 Set_Uint13 (Id, Uint_0);
5741 end Init_RM_Size;
5743 procedure Init_RM_Size (Id : E; V : Int) is
5744 begin
5745 Set_Uint13 (Id, UI_From_Int (V));
5746 end Init_RM_Size;
5748 -----------------------------
5749 -- Init_Component_Location --
5750 -----------------------------
5752 procedure Init_Component_Location (Id : E) is
5753 begin
5754 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5755 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5756 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5757 Set_Uint12 (Id, Uint_0); -- Esize
5758 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5759 end Init_Component_Location;
5761 ----------------------------
5762 -- Init_Object_Size_Align --
5763 ----------------------------
5765 procedure Init_Object_Size_Align (Id : E) is
5766 begin
5767 Set_Uint12 (Id, Uint_0); -- Esize
5768 Set_Uint14 (Id, Uint_0); -- Alignment
5769 end Init_Object_Size_Align;
5771 ---------------
5772 -- Init_Size --
5773 ---------------
5775 procedure Init_Size (Id : E; V : Int) is
5776 begin
5777 pragma Assert (not Is_Object (Id));
5778 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5779 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5780 end Init_Size;
5782 ---------------------
5783 -- Init_Size_Align --
5784 ---------------------
5786 procedure Init_Size_Align (Id : E) is
5787 begin
5788 pragma Assert (not Is_Object (Id));
5789 Set_Uint12 (Id, Uint_0); -- Esize
5790 Set_Uint13 (Id, Uint_0); -- RM_Size
5791 Set_Uint14 (Id, Uint_0); -- Alignment
5792 end Init_Size_Align;
5794 ----------------------------------------------
5795 -- Type Representation Attribute Predicates --
5796 ----------------------------------------------
5798 function Known_Alignment (E : Entity_Id) return B is
5799 begin
5800 return Uint14 (E) /= Uint_0
5801 and then Uint14 (E) /= No_Uint;
5802 end Known_Alignment;
5804 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5805 begin
5806 return Uint11 (E) /= No_Uint;
5807 end Known_Component_Bit_Offset;
5809 function Known_Component_Size (E : Entity_Id) return B is
5810 begin
5811 return Uint22 (Base_Type (E)) /= Uint_0
5812 and then Uint22 (Base_Type (E)) /= No_Uint;
5813 end Known_Component_Size;
5815 function Known_Esize (E : Entity_Id) return B is
5816 begin
5817 return Uint12 (E) /= Uint_0
5818 and then Uint12 (E) /= No_Uint;
5819 end Known_Esize;
5821 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5822 begin
5823 return Uint8 (E) /= No_Uint;
5824 end Known_Normalized_First_Bit;
5826 function Known_Normalized_Position (E : Entity_Id) return B is
5827 begin
5828 return Uint14 (E) /= No_Uint;
5829 end Known_Normalized_Position;
5831 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5832 begin
5833 return Uint10 (E) /= No_Uint;
5834 end Known_Normalized_Position_Max;
5836 function Known_RM_Size (E : Entity_Id) return B is
5837 begin
5838 return Uint13 (E) /= No_Uint
5839 and then (Uint13 (E) /= Uint_0
5840 or else Is_Discrete_Type (E)
5841 or else Is_Fixed_Point_Type (E));
5842 end Known_RM_Size;
5844 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5845 begin
5846 return Uint11 (E) /= No_Uint
5847 and then Uint11 (E) >= Uint_0;
5848 end Known_Static_Component_Bit_Offset;
5850 function Known_Static_Component_Size (E : Entity_Id) return B is
5851 begin
5852 return Uint22 (Base_Type (E)) > Uint_0;
5853 end Known_Static_Component_Size;
5855 function Known_Static_Esize (E : Entity_Id) return B is
5856 begin
5857 return Uint12 (E) > Uint_0
5858 and then not Is_Generic_Type (E);
5859 end Known_Static_Esize;
5861 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5862 begin
5863 return Uint8 (E) /= No_Uint
5864 and then Uint8 (E) >= Uint_0;
5865 end Known_Static_Normalized_First_Bit;
5867 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5868 begin
5869 return Uint14 (E) /= No_Uint
5870 and then Uint14 (E) >= Uint_0;
5871 end Known_Static_Normalized_Position;
5873 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5874 begin
5875 return Uint10 (E) /= No_Uint
5876 and then Uint10 (E) >= Uint_0;
5877 end Known_Static_Normalized_Position_Max;
5879 function Known_Static_RM_Size (E : Entity_Id) return B is
5880 begin
5881 return (Uint13 (E) > Uint_0
5882 or else Is_Discrete_Type (E)
5883 or else Is_Fixed_Point_Type (E))
5884 and then not Is_Generic_Type (E);
5885 end Known_Static_RM_Size;
5887 function Unknown_Alignment (E : Entity_Id) return B is
5888 begin
5889 return Uint14 (E) = Uint_0
5890 or else Uint14 (E) = No_Uint;
5891 end Unknown_Alignment;
5893 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5894 begin
5895 return Uint11 (E) = No_Uint;
5896 end Unknown_Component_Bit_Offset;
5898 function Unknown_Component_Size (E : Entity_Id) return B is
5899 begin
5900 return Uint22 (Base_Type (E)) = Uint_0
5901 or else
5902 Uint22 (Base_Type (E)) = No_Uint;
5903 end Unknown_Component_Size;
5905 function Unknown_Esize (E : Entity_Id) return B is
5906 begin
5907 return Uint12 (E) = No_Uint
5908 or else
5909 Uint12 (E) = Uint_0;
5910 end Unknown_Esize;
5912 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5913 begin
5914 return Uint8 (E) = No_Uint;
5915 end Unknown_Normalized_First_Bit;
5917 function Unknown_Normalized_Position (E : Entity_Id) return B is
5918 begin
5919 return Uint14 (E) = No_Uint;
5920 end Unknown_Normalized_Position;
5922 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5923 begin
5924 return Uint10 (E) = No_Uint;
5925 end Unknown_Normalized_Position_Max;
5927 function Unknown_RM_Size (E : Entity_Id) return B is
5928 begin
5929 return (Uint13 (E) = Uint_0
5930 and then not Is_Discrete_Type (E)
5931 and then not Is_Fixed_Point_Type (E))
5932 or else Uint13 (E) = No_Uint;
5933 end Unknown_RM_Size;
5935 --------------------
5936 -- Address_Clause --
5937 --------------------
5939 function Address_Clause (Id : E) return N is
5940 begin
5941 return Rep_Clause (Id, Name_Address);
5942 end Address_Clause;
5944 ---------------
5945 -- Aft_Value --
5946 ---------------
5948 function Aft_Value (Id : E) return U is
5949 Result : Nat := 1;
5950 Delta_Val : Ureal := Delta_Value (Id);
5951 begin
5952 while Delta_Val < Ureal_Tenth loop
5953 Delta_Val := Delta_Val * Ureal_10;
5954 Result := Result + 1;
5955 end loop;
5957 return UI_From_Int (Result);
5958 end Aft_Value;
5960 ----------------------
5961 -- Alignment_Clause --
5962 ----------------------
5964 function Alignment_Clause (Id : E) return N is
5965 begin
5966 return Rep_Clause (Id, Name_Alignment);
5967 end Alignment_Clause;
5969 -------------------
5970 -- Append_Entity --
5971 -------------------
5973 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5974 begin
5975 if Last_Entity (V) = Empty then
5976 Set_First_Entity (Id => V, V => Id);
5977 else
5978 Set_Next_Entity (Last_Entity (V), Id);
5979 end if;
5981 Set_Next_Entity (Id, Empty);
5982 Set_Scope (Id, V);
5983 Set_Last_Entity (Id => V, V => Id);
5984 end Append_Entity;
5986 ---------------
5987 -- Base_Type --
5988 ---------------
5990 function Base_Type (Id : E) return E is
5991 begin
5992 if Is_Base_Type (Id) then
5993 return Id;
5994 else
5995 pragma Assert (Is_Type (Id));
5996 return Etype (Id);
5997 end if;
5998 end Base_Type;
6000 -------------------------
6001 -- Component_Alignment --
6002 -------------------------
6004 -- Component Alignment is encoded using two flags, Flag128/129 as
6005 -- follows. Note that both flags False = Align_Default, so that the
6006 -- default initialization of flags to False initializes component
6007 -- alignment to the default value as required.
6009 -- Flag128 Flag129 Value
6010 -- ------- ------- -----
6011 -- False False Calign_Default
6012 -- False True Calign_Component_Size
6013 -- True False Calign_Component_Size_4
6014 -- True True Calign_Storage_Unit
6016 function Component_Alignment (Id : E) return C is
6017 BT : constant Node_Id := Base_Type (Id);
6019 begin
6020 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6022 if Flag128 (BT) then
6023 if Flag129 (BT) then
6024 return Calign_Storage_Unit;
6025 else
6026 return Calign_Component_Size_4;
6027 end if;
6029 else
6030 if Flag129 (BT) then
6031 return Calign_Component_Size;
6032 else
6033 return Calign_Default;
6034 end if;
6035 end if;
6036 end Component_Alignment;
6038 ----------------------
6039 -- Declaration_Node --
6040 ----------------------
6042 function Declaration_Node (Id : E) return N is
6043 P : Node_Id;
6045 begin
6046 if Ekind (Id) = E_Incomplete_Type
6047 and then Present (Full_View (Id))
6048 then
6049 P := Parent (Full_View (Id));
6050 else
6051 P := Parent (Id);
6052 end if;
6054 loop
6055 if Nkind (P) /= N_Selected_Component
6056 and then Nkind (P) /= N_Expanded_Name
6057 and then
6058 not (Nkind (P) = N_Defining_Program_Unit_Name
6059 and then Is_Child_Unit (Id))
6060 then
6061 return P;
6062 else
6063 P := Parent (P);
6064 end if;
6065 end loop;
6066 end Declaration_Node;
6068 ---------------------
6069 -- Designated_Type --
6070 ---------------------
6072 function Designated_Type (Id : E) return E is
6073 Desig_Type : E;
6075 begin
6076 Desig_Type := Directly_Designated_Type (Id);
6078 if Ekind (Desig_Type) = E_Incomplete_Type
6079 and then Present (Full_View (Desig_Type))
6080 then
6081 return Full_View (Desig_Type);
6083 elsif Is_Class_Wide_Type (Desig_Type)
6084 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6085 and then Present (Full_View (Etype (Desig_Type)))
6086 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6087 then
6088 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6090 else
6091 return Desig_Type;
6092 end if;
6093 end Designated_Type;
6095 ----------------------
6096 -- Entry_Index_Type --
6097 ----------------------
6099 function Entry_Index_Type (Id : E) return N is
6100 begin
6101 pragma Assert (Ekind (Id) = E_Entry_Family);
6102 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6103 end Entry_Index_Type;
6105 ---------------------
6106 -- First_Component --
6107 ---------------------
6109 function First_Component (Id : E) return E is
6110 Comp_Id : E;
6112 begin
6113 pragma Assert
6114 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6116 Comp_Id := First_Entity (Id);
6117 while Present (Comp_Id) loop
6118 exit when Ekind (Comp_Id) = E_Component;
6119 Comp_Id := Next_Entity (Comp_Id);
6120 end loop;
6122 return Comp_Id;
6123 end First_Component;
6125 -------------------------------------
6126 -- First_Component_Or_Discriminant --
6127 -------------------------------------
6129 function First_Component_Or_Discriminant (Id : E) return E is
6130 Comp_Id : E;
6132 begin
6133 pragma Assert
6134 (Is_Record_Type (Id)
6135 or else Is_Incomplete_Or_Private_Type (Id)
6136 or else Has_Discriminants (Id));
6138 Comp_Id := First_Entity (Id);
6139 while Present (Comp_Id) loop
6140 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6141 Comp_Id := Next_Entity (Comp_Id);
6142 end loop;
6144 return Comp_Id;
6145 end First_Component_Or_Discriminant;
6147 ------------------
6148 -- First_Formal --
6149 ------------------
6151 function First_Formal (Id : E) return E is
6152 Formal : E;
6154 begin
6155 pragma Assert
6156 (Is_Overloadable (Id)
6157 or else Ekind_In (Id, E_Entry_Family,
6158 E_Subprogram_Body,
6159 E_Subprogram_Type));
6161 if Ekind (Id) = E_Enumeration_Literal then
6162 return Empty;
6164 else
6165 Formal := First_Entity (Id);
6167 if Present (Formal) and then Is_Formal (Formal) then
6168 return Formal;
6169 else
6170 return Empty;
6171 end if;
6172 end if;
6173 end First_Formal;
6175 ------------------------------
6176 -- First_Formal_With_Extras --
6177 ------------------------------
6179 function First_Formal_With_Extras (Id : E) return E is
6180 Formal : E;
6182 begin
6183 pragma Assert
6184 (Is_Overloadable (Id)
6185 or else Ekind_In (Id, E_Entry_Family,
6186 E_Subprogram_Body,
6187 E_Subprogram_Type));
6189 if Ekind (Id) = E_Enumeration_Literal then
6190 return Empty;
6192 else
6193 Formal := First_Entity (Id);
6195 if Present (Formal) and then Is_Formal (Formal) then
6196 return Formal;
6197 else
6198 return Extra_Formals (Id); -- Empty if no extra formals
6199 end if;
6200 end if;
6201 end First_Formal_With_Extras;
6203 -------------------------------------
6204 -- Get_Attribute_Definition_Clause --
6205 -------------------------------------
6207 function Get_Attribute_Definition_Clause
6208 (E : Entity_Id;
6209 Id : Attribute_Id) return Node_Id
6211 N : Node_Id;
6213 begin
6214 N := First_Rep_Item (E);
6215 while Present (N) loop
6216 if Nkind (N) = N_Attribute_Definition_Clause
6217 and then Get_Attribute_Id (Chars (N)) = Id
6218 then
6219 return N;
6220 else
6221 Next_Rep_Item (N);
6222 end if;
6223 end loop;
6225 return Empty;
6226 end Get_Attribute_Definition_Clause;
6228 -------------------
6229 -- Get_Full_View --
6230 -------------------
6232 function Get_Full_View (T : Entity_Id) return Entity_Id is
6233 begin
6234 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6235 return Full_View (T);
6237 elsif Is_Class_Wide_Type (T)
6238 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6239 and then Present (Full_View (Root_Type (T)))
6240 then
6241 return Class_Wide_Type (Full_View (Root_Type (T)));
6243 else
6244 return T;
6245 end if;
6246 end Get_Full_View;
6248 ----------------
6249 -- Get_Pragma --
6250 ----------------
6252 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id
6254 N : Node_Id;
6256 begin
6257 N := First_Rep_Item (E);
6258 while Present (N) loop
6259 if Nkind (N) = N_Pragma
6260 and then Get_Pragma_Id (Pragma_Name (N)) = Id
6261 then
6262 return N;
6263 else
6264 Next_Rep_Item (N);
6265 end if;
6266 end loop;
6268 return Empty;
6269 end Get_Pragma;
6271 --------------------------------------
6272 -- Get_Record_Representation_Clause --
6273 --------------------------------------
6275 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6276 N : Node_Id;
6278 begin
6279 N := First_Rep_Item (E);
6280 while Present (N) loop
6281 if Nkind (N) = N_Record_Representation_Clause then
6282 return N;
6283 end if;
6285 Next_Rep_Item (N);
6286 end loop;
6288 return Empty;
6289 end Get_Record_Representation_Clause;
6291 ------------------------
6292 -- Has_Attach_Handler --
6293 ------------------------
6295 function Has_Attach_Handler (Id : E) return B is
6296 Ritem : Node_Id;
6298 begin
6299 pragma Assert (Is_Protected_Type (Id));
6301 Ritem := First_Rep_Item (Id);
6302 while Present (Ritem) loop
6303 if Nkind (Ritem) = N_Pragma
6304 and then Pragma_Name (Ritem) = Name_Attach_Handler
6305 then
6306 return True;
6307 else
6308 Next_Rep_Item (Ritem);
6309 end if;
6310 end loop;
6312 return False;
6313 end Has_Attach_Handler;
6315 -----------------
6316 -- Has_Entries --
6317 -----------------
6319 function Has_Entries (Id : E) return B is
6320 Ent : Entity_Id;
6322 begin
6323 pragma Assert (Is_Concurrent_Type (Id));
6325 Ent := First_Entity (Id);
6326 while Present (Ent) loop
6327 if Is_Entry (Ent) then
6328 return True;
6329 end if;
6331 Ent := Next_Entity (Ent);
6332 end loop;
6334 return False;
6335 end Has_Entries;
6337 ----------------------------
6338 -- Has_Foreign_Convention --
6339 ----------------------------
6341 function Has_Foreign_Convention (Id : E) return B is
6342 begin
6343 -- While regular Intrinsics such as the Standard operators fit in the
6344 -- "Ada" convention, those with an Interface_Name materialize GCC
6345 -- builtin imports for which Ada special treatments shouldn't apply.
6347 return Convention (Id) in Foreign_Convention
6348 or else (Convention (Id) = Convention_Intrinsic
6349 and then Present (Interface_Name (Id)));
6350 end Has_Foreign_Convention;
6352 ---------------------------
6353 -- Has_Interrupt_Handler --
6354 ---------------------------
6356 function Has_Interrupt_Handler (Id : E) return B is
6357 Ritem : Node_Id;
6359 begin
6360 pragma Assert (Is_Protected_Type (Id));
6362 Ritem := First_Rep_Item (Id);
6363 while Present (Ritem) loop
6364 if Nkind (Ritem) = N_Pragma
6365 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6366 then
6367 return True;
6368 else
6369 Next_Rep_Item (Ritem);
6370 end if;
6371 end loop;
6373 return False;
6374 end Has_Interrupt_Handler;
6376 --------------------
6377 -- Has_Unmodified --
6378 --------------------
6380 function Has_Unmodified (E : Entity_Id) return Boolean is
6381 begin
6382 if Has_Pragma_Unmodified (E) then
6383 return True;
6384 elsif Warnings_Off (E) then
6385 Set_Warnings_Off_Used_Unmodified (E);
6386 return True;
6387 else
6388 return False;
6389 end if;
6390 end Has_Unmodified;
6392 ---------------------
6393 -- Has_Unreferenced --
6394 ---------------------
6396 function Has_Unreferenced (E : Entity_Id) return Boolean is
6397 begin
6398 if Has_Pragma_Unreferenced (E) then
6399 return True;
6400 elsif Warnings_Off (E) then
6401 Set_Warnings_Off_Used_Unreferenced (E);
6402 return True;
6403 else
6404 return False;
6405 end if;
6406 end Has_Unreferenced;
6408 ----------------------
6409 -- Has_Warnings_Off --
6410 ----------------------
6412 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6413 begin
6414 if Warnings_Off (E) then
6415 Set_Warnings_Off_Used (E);
6416 return True;
6417 else
6418 return False;
6419 end if;
6420 end Has_Warnings_Off;
6422 ------------------------------
6423 -- Implementation_Base_Type --
6424 ------------------------------
6426 function Implementation_Base_Type (Id : E) return E is
6427 Bastyp : Entity_Id;
6428 Imptyp : Entity_Id;
6430 begin
6431 Bastyp := Base_Type (Id);
6433 if Is_Incomplete_Or_Private_Type (Bastyp) then
6434 Imptyp := Underlying_Type (Bastyp);
6436 -- If we have an implementation type, then just return it,
6437 -- otherwise we return the Base_Type anyway. This can only
6438 -- happen in error situations and should avoid some error bombs.
6440 if Present (Imptyp) then
6441 return Base_Type (Imptyp);
6442 else
6443 return Bastyp;
6444 end if;
6446 else
6447 return Bastyp;
6448 end if;
6449 end Implementation_Base_Type;
6451 -------------------------
6452 -- Invariant_Procedure --
6453 -------------------------
6455 function Invariant_Procedure (Id : E) return E is
6456 S : Entity_Id;
6458 begin
6459 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6461 if No (Subprograms_For_Type (Id)) then
6462 return Empty;
6464 else
6465 S := Subprograms_For_Type (Id);
6466 while Present (S) loop
6467 if Is_Invariant_Procedure (S) then
6468 return S;
6469 else
6470 S := Subprograms_For_Type (S);
6471 end if;
6472 end loop;
6474 return Empty;
6475 end if;
6476 end Invariant_Procedure;
6478 ------------------
6479 -- Is_Base_Type --
6480 ------------------
6482 -- Global flag table allowing rapid computation of this function
6484 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6485 (E_Enumeration_Subtype |
6486 E_Incomplete_Type |
6487 E_Signed_Integer_Subtype |
6488 E_Modular_Integer_Subtype |
6489 E_Floating_Point_Subtype |
6490 E_Ordinary_Fixed_Point_Subtype |
6491 E_Decimal_Fixed_Point_Subtype |
6492 E_Array_Subtype |
6493 E_String_Subtype |
6494 E_Record_Subtype |
6495 E_Private_Subtype |
6496 E_Record_Subtype_With_Private |
6497 E_Limited_Private_Subtype |
6498 E_Access_Subtype |
6499 E_Protected_Subtype |
6500 E_Task_Subtype |
6501 E_String_Literal_Subtype |
6502 E_Class_Wide_Subtype => False,
6503 others => True);
6505 function Is_Base_Type (Id : E) return Boolean is
6506 begin
6507 return Entity_Is_Base_Type (Ekind (Id));
6508 end Is_Base_Type;
6510 ---------------------
6511 -- Is_Boolean_Type --
6512 ---------------------
6514 function Is_Boolean_Type (Id : E) return B is
6515 begin
6516 return Root_Type (Id) = Standard_Boolean;
6517 end Is_Boolean_Type;
6519 ------------------------
6520 -- Is_Constant_Object --
6521 ------------------------
6523 function Is_Constant_Object (Id : E) return B is
6524 K : constant Entity_Kind := Ekind (Id);
6525 begin
6526 return
6527 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6528 end Is_Constant_Object;
6530 --------------------
6531 -- Is_Discriminal --
6532 --------------------
6534 function Is_Discriminal (Id : E) return B is
6535 begin
6536 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6537 and then Present (Discriminal_Link (Id)));
6538 end Is_Discriminal;
6540 ----------------------
6541 -- Is_Dynamic_Scope --
6542 ----------------------
6544 function Is_Dynamic_Scope (Id : E) return B is
6545 begin
6546 return
6547 Ekind (Id) = E_Block
6548 or else
6549 Ekind (Id) = E_Function
6550 or else
6551 Ekind (Id) = E_Procedure
6552 or else
6553 Ekind (Id) = E_Subprogram_Body
6554 or else
6555 Ekind (Id) = E_Task_Type
6556 or else
6557 (Ekind (Id) = E_Limited_Private_Type
6558 and then Present (Full_View (Id))
6559 and then Ekind (Full_View (Id)) = E_Task_Type)
6560 or else
6561 Ekind (Id) = E_Entry
6562 or else
6563 Ekind (Id) = E_Entry_Family
6564 or else
6565 Ekind (Id) = E_Return_Statement;
6566 end Is_Dynamic_Scope;
6568 --------------------
6569 -- Is_Entity_Name --
6570 --------------------
6572 function Is_Entity_Name (N : Node_Id) return Boolean is
6573 Kind : constant Node_Kind := Nkind (N);
6575 begin
6576 -- Identifiers, operator symbols, expanded names are entity names
6578 return Kind = N_Identifier
6579 or else Kind = N_Operator_Symbol
6580 or else Kind = N_Expanded_Name
6582 -- Attribute references are entity names if they refer to an entity.
6583 -- Note that we don't do this by testing for the presence of the
6584 -- Entity field in the N_Attribute_Reference node, since it may not
6585 -- have been set yet.
6587 or else (Kind = N_Attribute_Reference
6588 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6589 end Is_Entity_Name;
6591 ------------------
6592 -- Is_Finalizer --
6593 ------------------
6595 function Is_Finalizer (Id : E) return B is
6596 begin
6597 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6598 end Is_Finalizer;
6600 ---------------------
6601 -- Is_Ghost_Entity --
6602 ---------------------
6604 function Is_Ghost_Entity (Id : E) return B is
6605 begin
6606 if Present (Id) and then Ekind (Id) = E_Variable then
6607 return Convention (Id) = Convention_Ghost;
6608 else
6609 return Is_Ghost_Subprogram (Id);
6610 end if;
6611 end Is_Ghost_Entity;
6613 -------------------------
6614 -- Is_Ghost_Subprogram --
6615 -------------------------
6617 function Is_Ghost_Subprogram (Id : E) return B is
6618 begin
6619 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6620 return Convention (Id) = Convention_Ghost;
6621 else
6622 return False;
6623 end if;
6624 end Is_Ghost_Subprogram;
6626 --------------------
6627 -- Is_Input_State --
6628 --------------------
6630 function Is_Input_State (Id : E) return B is
6631 begin
6632 return
6633 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Input);
6634 end Is_Input_State;
6636 -------------------
6637 -- Is_Null_State --
6638 -------------------
6640 function Is_Null_State (Id : E) return B is
6641 begin
6642 return
6643 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6644 end Is_Null_State;
6646 ---------------------
6647 -- Is_Output_State --
6648 ---------------------
6650 function Is_Output_State (Id : E) return B is
6651 begin
6652 return
6653 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Output);
6654 end Is_Output_State;
6656 -----------------------------------
6657 -- Is_Package_Or_Generic_Package --
6658 -----------------------------------
6660 function Is_Package_Or_Generic_Package (Id : E) return B is
6661 begin
6662 return Ekind_In (Id, E_Generic_Package, E_Package);
6663 end Is_Package_Or_Generic_Package;
6665 ---------------
6666 -- Is_Prival --
6667 ---------------
6669 function Is_Prival (Id : E) return B is
6670 begin
6671 return (Ekind_In (Id, E_Constant, E_Variable)
6672 and then Present (Prival_Link (Id)));
6673 end Is_Prival;
6675 ----------------------------
6676 -- Is_Protected_Component --
6677 ----------------------------
6679 function Is_Protected_Component (Id : E) return B is
6680 begin
6681 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6682 end Is_Protected_Component;
6684 ----------------------------
6685 -- Is_Protected_Interface --
6686 ----------------------------
6688 function Is_Protected_Interface (Id : E) return B is
6689 Typ : constant Entity_Id := Base_Type (Id);
6690 begin
6691 if not Is_Interface (Typ) then
6692 return False;
6693 elsif Is_Class_Wide_Type (Typ) then
6694 return Is_Protected_Interface (Etype (Typ));
6695 else
6696 return Protected_Present (Type_Definition (Parent (Typ)));
6697 end if;
6698 end Is_Protected_Interface;
6700 ------------------------------
6701 -- Is_Protected_Record_Type --
6702 ------------------------------
6704 function Is_Protected_Record_Type (Id : E) return B is
6705 begin
6706 return
6707 Is_Concurrent_Record_Type (Id)
6708 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6709 end Is_Protected_Record_Type;
6711 --------------------------------
6712 -- Is_Standard_Character_Type --
6713 --------------------------------
6715 function Is_Standard_Character_Type (Id : E) return B is
6716 begin
6717 if Is_Type (Id) then
6718 declare
6719 R : constant Entity_Id := Root_Type (Id);
6720 begin
6721 return
6722 R = Standard_Character
6723 or else
6724 R = Standard_Wide_Character
6725 or else
6726 R = Standard_Wide_Wide_Character;
6727 end;
6729 else
6730 return False;
6731 end if;
6732 end Is_Standard_Character_Type;
6734 --------------------
6735 -- Is_String_Type --
6736 --------------------
6738 function Is_String_Type (Id : E) return B is
6739 begin
6740 return Ekind (Id) in String_Kind
6741 or else (Is_Array_Type (Id)
6742 and then Id /= Any_Composite
6743 and then Number_Dimensions (Id) = 1
6744 and then Is_Character_Type (Component_Type (Id)));
6745 end Is_String_Type;
6747 -------------------------------
6748 -- Is_Synchronized_Interface --
6749 -------------------------------
6751 function Is_Synchronized_Interface (Id : E) return B is
6752 Typ : constant Entity_Id := Base_Type (Id);
6754 begin
6755 if not Is_Interface (Typ) then
6756 return False;
6758 elsif Is_Class_Wide_Type (Typ) then
6759 return Is_Synchronized_Interface (Etype (Typ));
6761 else
6762 return Protected_Present (Type_Definition (Parent (Typ)))
6763 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6764 or else Task_Present (Type_Definition (Parent (Typ)));
6765 end if;
6766 end Is_Synchronized_Interface;
6768 -----------------------
6769 -- Is_Task_Interface --
6770 -----------------------
6772 function Is_Task_Interface (Id : E) return B is
6773 Typ : constant Entity_Id := Base_Type (Id);
6774 begin
6775 if not Is_Interface (Typ) then
6776 return False;
6777 elsif Is_Class_Wide_Type (Typ) then
6778 return Is_Task_Interface (Etype (Typ));
6779 else
6780 return Task_Present (Type_Definition (Parent (Typ)));
6781 end if;
6782 end Is_Task_Interface;
6784 -------------------------
6785 -- Is_Task_Record_Type --
6786 -------------------------
6788 function Is_Task_Record_Type (Id : E) return B is
6789 begin
6790 return
6791 Is_Concurrent_Record_Type (Id)
6792 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6793 end Is_Task_Record_Type;
6795 -----------------------
6796 -- Is_Volatile_State --
6797 -----------------------
6799 function Is_Volatile_State (Id : E) return B is
6800 begin
6801 return
6802 Ekind (Id) = E_Abstract_State
6803 and then Has_Property (Id, Name_Volatile);
6804 end Is_Volatile_State;
6806 ------------------------
6807 -- Is_Wrapper_Package --
6808 ------------------------
6810 function Is_Wrapper_Package (Id : E) return B is
6811 begin
6812 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6813 end Is_Wrapper_Package;
6815 -----------------
6816 -- Last_Formal --
6817 -----------------
6819 function Last_Formal (Id : E) return E is
6820 Formal : E;
6822 begin
6823 pragma Assert
6824 (Is_Overloadable (Id)
6825 or else Ekind_In (Id, E_Entry_Family,
6826 E_Subprogram_Body,
6827 E_Subprogram_Type));
6829 if Ekind (Id) = E_Enumeration_Literal then
6830 return Empty;
6832 else
6833 Formal := First_Formal (Id);
6835 if Present (Formal) then
6836 while Present (Next_Formal (Formal)) loop
6837 Formal := Next_Formal (Formal);
6838 end loop;
6839 end if;
6841 return Formal;
6842 end if;
6843 end Last_Formal;
6845 function Model_Emin_Value (Id : E) return Uint is
6846 begin
6847 return Machine_Emin_Value (Id);
6848 end Model_Emin_Value;
6850 -------------------------
6851 -- Model_Epsilon_Value --
6852 -------------------------
6854 function Model_Epsilon_Value (Id : E) return Ureal is
6855 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6856 begin
6857 return Radix ** (1 - Model_Mantissa_Value (Id));
6858 end Model_Epsilon_Value;
6860 --------------------------
6861 -- Model_Mantissa_Value --
6862 --------------------------
6864 function Model_Mantissa_Value (Id : E) return Uint is
6865 begin
6866 return Machine_Mantissa_Value (Id);
6867 end Model_Mantissa_Value;
6869 -----------------------
6870 -- Model_Small_Value --
6871 -----------------------
6873 function Model_Small_Value (Id : E) return Ureal is
6874 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6875 begin
6876 return Radix ** (Model_Emin_Value (Id) - 1);
6877 end Model_Small_Value;
6879 ------------------------
6880 -- Machine_Emax_Value --
6881 ------------------------
6883 function Machine_Emax_Value (Id : E) return Uint is
6884 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6886 begin
6887 case Float_Rep (Id) is
6888 when IEEE_Binary =>
6889 case Digs is
6890 when 1 .. 6 => return Uint_128;
6891 when 7 .. 15 => return 2**10;
6892 when 16 .. 33 => return 2**14;
6893 when others => return No_Uint;
6894 end case;
6896 when VAX_Native =>
6897 case Digs is
6898 when 1 .. 9 => return 2**7 - 1;
6899 when 10 .. 15 => return 2**10 - 1;
6900 when others => return No_Uint;
6901 end case;
6903 when AAMP =>
6904 return Uint_2 ** Uint_7 - Uint_1;
6905 end case;
6906 end Machine_Emax_Value;
6908 ------------------------
6909 -- Machine_Emin_Value --
6910 ------------------------
6912 function Machine_Emin_Value (Id : E) return Uint is
6913 begin
6914 case Float_Rep (Id) is
6915 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6916 when VAX_Native => return -Machine_Emax_Value (Id);
6917 when AAMP => return -Machine_Emax_Value (Id);
6918 end case;
6919 end Machine_Emin_Value;
6921 ----------------------------
6922 -- Machine_Mantissa_Value --
6923 ----------------------------
6925 function Machine_Mantissa_Value (Id : E) return Uint is
6926 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6928 begin
6929 case Float_Rep (Id) is
6930 when IEEE_Binary =>
6931 case Digs is
6932 when 1 .. 6 => return Uint_24;
6933 when 7 .. 15 => return UI_From_Int (53);
6934 when 16 .. 18 => return Uint_64;
6935 when 19 .. 33 => return UI_From_Int (113);
6936 when others => return No_Uint;
6937 end case;
6939 when VAX_Native =>
6940 case Digs is
6941 when 1 .. 6 => return Uint_24;
6942 when 7 .. 9 => return UI_From_Int (56);
6943 when 10 .. 15 => return UI_From_Int (53);
6944 when others => return No_Uint;
6945 end case;
6947 when AAMP =>
6948 case Digs is
6949 when 1 .. 6 => return Uint_24;
6950 when 7 .. 9 => return UI_From_Int (40);
6951 when others => return No_Uint;
6952 end case;
6953 end case;
6954 end Machine_Mantissa_Value;
6956 -------------------------
6957 -- Machine_Radix_Value --
6958 -------------------------
6960 function Machine_Radix_Value (Id : E) return U is
6961 begin
6962 case Float_Rep (Id) is
6963 when IEEE_Binary | VAX_Native | AAMP =>
6964 return Uint_2;
6965 end case;
6966 end Machine_Radix_Value;
6968 --------------------
6969 -- Next_Component --
6970 --------------------
6972 function Next_Component (Id : E) return E is
6973 Comp_Id : E;
6975 begin
6976 Comp_Id := Next_Entity (Id);
6977 while Present (Comp_Id) loop
6978 exit when Ekind (Comp_Id) = E_Component;
6979 Comp_Id := Next_Entity (Comp_Id);
6980 end loop;
6982 return Comp_Id;
6983 end Next_Component;
6985 ------------------------------------
6986 -- Next_Component_Or_Discriminant --
6987 ------------------------------------
6989 function Next_Component_Or_Discriminant (Id : E) return E is
6990 Comp_Id : E;
6992 begin
6993 Comp_Id := Next_Entity (Id);
6994 while Present (Comp_Id) loop
6995 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6996 Comp_Id := Next_Entity (Comp_Id);
6997 end loop;
6999 return Comp_Id;
7000 end Next_Component_Or_Discriminant;
7002 -----------------------
7003 -- Next_Discriminant --
7004 -----------------------
7006 -- This function actually implements both Next_Discriminant and
7007 -- Next_Stored_Discriminant by making sure that the Discriminant
7008 -- returned is of the same variety as Id.
7010 function Next_Discriminant (Id : E) return E is
7012 -- Derived Tagged types with private extensions look like this...
7014 -- E_Discriminant d1
7015 -- E_Discriminant d2
7016 -- E_Component _tag
7017 -- E_Discriminant d1
7018 -- E_Discriminant d2
7019 -- ...
7021 -- so it is critical not to go past the leading discriminants
7023 D : E := Id;
7025 begin
7026 pragma Assert (Ekind (Id) = E_Discriminant);
7028 loop
7029 D := Next_Entity (D);
7030 if No (D)
7031 or else (Ekind (D) /= E_Discriminant
7032 and then not Is_Itype (D))
7033 then
7034 return Empty;
7035 end if;
7037 exit when Ekind (D) = E_Discriminant
7038 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7039 end loop;
7041 return D;
7042 end Next_Discriminant;
7044 -----------------
7045 -- Next_Formal --
7046 -----------------
7048 function Next_Formal (Id : E) return E is
7049 P : E;
7051 begin
7052 -- Follow the chain of declared entities as long as the kind of the
7053 -- entity corresponds to a formal parameter. Skip internal entities
7054 -- that may have been created for implicit subtypes, in the process
7055 -- of analyzing default expressions.
7057 P := Id;
7058 loop
7059 P := Next_Entity (P);
7061 if No (P) or else Is_Formal (P) then
7062 return P;
7063 elsif not Is_Internal (P) then
7064 return Empty;
7065 end if;
7066 end loop;
7067 end Next_Formal;
7069 -----------------------------
7070 -- Next_Formal_With_Extras --
7071 -----------------------------
7073 function Next_Formal_With_Extras (Id : E) return E is
7074 begin
7075 if Present (Extra_Formal (Id)) then
7076 return Extra_Formal (Id);
7077 else
7078 return Next_Formal (Id);
7079 end if;
7080 end Next_Formal_With_Extras;
7082 ----------------
7083 -- Next_Index --
7084 ----------------
7086 function Next_Index (Id : Node_Id) return Node_Id is
7087 begin
7088 return Next (Id);
7089 end Next_Index;
7091 ------------------
7092 -- Next_Literal --
7093 ------------------
7095 function Next_Literal (Id : E) return E is
7096 begin
7097 pragma Assert (Nkind (Id) in N_Entity);
7098 return Next (Id);
7099 end Next_Literal;
7101 ------------------------------
7102 -- Next_Stored_Discriminant --
7103 ------------------------------
7105 function Next_Stored_Discriminant (Id : E) return E is
7106 begin
7107 -- See comment in Next_Discriminant
7109 return Next_Discriminant (Id);
7110 end Next_Stored_Discriminant;
7112 -----------------------
7113 -- Number_Dimensions --
7114 -----------------------
7116 function Number_Dimensions (Id : E) return Pos is
7117 N : Int;
7118 T : Node_Id;
7120 begin
7121 if Ekind (Id) in String_Kind then
7122 return 1;
7124 else
7125 N := 0;
7126 T := First_Index (Id);
7127 while Present (T) loop
7128 N := N + 1;
7129 T := Next (T);
7130 end loop;
7132 return N;
7133 end if;
7134 end Number_Dimensions;
7136 --------------------
7137 -- Number_Entries --
7138 --------------------
7140 function Number_Entries (Id : E) return Nat is
7141 N : Int;
7142 Ent : Entity_Id;
7144 begin
7145 pragma Assert (Is_Concurrent_Type (Id));
7147 N := 0;
7148 Ent := First_Entity (Id);
7149 while Present (Ent) loop
7150 if Is_Entry (Ent) then
7151 N := N + 1;
7152 end if;
7154 Ent := Next_Entity (Ent);
7155 end loop;
7157 return N;
7158 end Number_Entries;
7160 --------------------
7161 -- Number_Formals --
7162 --------------------
7164 function Number_Formals (Id : E) return Pos is
7165 N : Int;
7166 Formal : Entity_Id;
7168 begin
7169 N := 0;
7170 Formal := First_Formal (Id);
7171 while Present (Formal) loop
7172 N := N + 1;
7173 Formal := Next_Formal (Formal);
7174 end loop;
7176 return N;
7177 end Number_Formals;
7179 --------------------
7180 -- Parameter_Mode --
7181 --------------------
7183 function Parameter_Mode (Id : E) return Formal_Kind is
7184 begin
7185 return Ekind (Id);
7186 end Parameter_Mode;
7188 ------------------------
7189 -- Predicate_Function --
7190 ------------------------
7192 function Predicate_Function (Id : E) return E is
7193 S : Entity_Id;
7194 T : Entity_Id;
7196 begin
7197 pragma Assert (Is_Type (Id));
7199 -- If type is private and has a completion, predicate may be defined
7200 -- on the full view.
7202 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7203 T := Full_View (Id);
7204 else
7205 T := Id;
7206 end if;
7208 if No (Subprograms_For_Type (T)) then
7209 return Empty;
7211 else
7212 S := Subprograms_For_Type (T);
7213 while Present (S) loop
7214 if Is_Predicate_Function (S) then
7215 return S;
7216 else
7217 S := Subprograms_For_Type (S);
7218 end if;
7219 end loop;
7221 return Empty;
7222 end if;
7223 end Predicate_Function;
7225 --------------------------
7226 -- Predicate_Function_M --
7227 --------------------------
7229 function Predicate_Function_M (Id : E) return E is
7230 S : Entity_Id;
7231 T : Entity_Id;
7233 begin
7234 pragma Assert (Is_Type (Id));
7236 -- If type is private and has a completion, predicate may be defined
7237 -- on the full view.
7239 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7240 T := Full_View (Id);
7241 else
7242 T := Id;
7243 end if;
7245 if No (Subprograms_For_Type (T)) then
7246 return Empty;
7248 else
7249 S := Subprograms_For_Type (T);
7250 while Present (S) loop
7251 if Is_Predicate_Function_M (S) then
7252 return S;
7253 else
7254 S := Subprograms_For_Type (S);
7255 end if;
7256 end loop;
7258 return Empty;
7259 end if;
7260 end Predicate_Function_M;
7262 -------------------------
7263 -- Present_In_Rep_Item --
7264 -------------------------
7266 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7267 Ritem : Node_Id;
7269 begin
7270 Ritem := First_Rep_Item (E);
7272 while Present (Ritem) loop
7273 if Ritem = N then
7274 return True;
7275 end if;
7277 Next_Rep_Item (Ritem);
7278 end loop;
7280 return False;
7281 end Present_In_Rep_Item;
7283 --------------------------
7284 -- Primitive_Operations --
7285 --------------------------
7287 function Primitive_Operations (Id : E) return L is
7288 begin
7289 if Is_Concurrent_Type (Id) then
7290 if Present (Corresponding_Record_Type (Id)) then
7291 return Direct_Primitive_Operations
7292 (Corresponding_Record_Type (Id));
7294 -- If expansion is disabled the corresponding record type is absent,
7295 -- but if the type has ancestors it may have primitive operations.
7297 elsif Is_Tagged_Type (Id) then
7298 return Direct_Primitive_Operations (Id);
7300 else
7301 return No_Elist;
7302 end if;
7303 else
7304 return Direct_Primitive_Operations (Id);
7305 end if;
7306 end Primitive_Operations;
7308 ---------------------
7309 -- Record_Rep_Item --
7310 ---------------------
7312 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7313 begin
7314 Set_Next_Rep_Item (N, First_Rep_Item (E));
7315 Set_First_Rep_Item (E, N);
7316 end Record_Rep_Item;
7318 ---------------
7319 -- Root_Type --
7320 ---------------
7322 function Root_Type (Id : E) return E is
7323 T, Etyp : E;
7325 begin
7326 pragma Assert (Nkind (Id) in N_Entity);
7328 T := Base_Type (Id);
7330 if Ekind (T) = E_Class_Wide_Type then
7331 return Etype (T);
7333 -- Other cases
7335 else
7336 loop
7337 Etyp := Etype (T);
7339 if T = Etyp then
7340 return T;
7342 -- Following test catches some error cases resulting from
7343 -- previous errors.
7345 elsif No (Etyp) then
7346 Check_Error_Detected;
7347 return T;
7349 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7350 return T;
7352 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7353 return T;
7354 end if;
7356 T := Etyp;
7358 -- Return if there is a circularity in the inheritance chain. This
7359 -- happens in some error situations and we do not want to get
7360 -- stuck in this loop.
7362 if T = Base_Type (Id) then
7363 return T;
7364 end if;
7365 end loop;
7366 end if;
7367 end Root_Type;
7369 ---------------------
7370 -- Safe_Emax_Value --
7371 ---------------------
7373 function Safe_Emax_Value (Id : E) return Uint is
7374 begin
7375 return Machine_Emax_Value (Id);
7376 end Safe_Emax_Value;
7378 ----------------------
7379 -- Safe_First_Value --
7380 ----------------------
7382 function Safe_First_Value (Id : E) return Ureal is
7383 begin
7384 return -Safe_Last_Value (Id);
7385 end Safe_First_Value;
7387 ---------------------
7388 -- Safe_Last_Value --
7389 ---------------------
7391 function Safe_Last_Value (Id : E) return Ureal is
7392 Radix : constant Uint := Machine_Radix_Value (Id);
7393 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7394 Emax : constant Uint := Safe_Emax_Value (Id);
7395 Significand : constant Uint := Radix ** Mantissa - 1;
7396 Exponent : constant Uint := Emax - Mantissa;
7398 begin
7399 if Radix = 2 then
7400 return
7401 UR_From_Components
7402 (Num => Significand * 2 ** (Exponent mod 4),
7403 Den => -Exponent / 4,
7404 Rbase => 16);
7406 else
7407 return
7408 UR_From_Components
7409 (Num => Significand,
7410 Den => -Exponent,
7411 Rbase => 16);
7412 end if;
7413 end Safe_Last_Value;
7415 -----------------
7416 -- Scope_Depth --
7417 -----------------
7419 function Scope_Depth (Id : E) return Uint is
7420 Scop : Entity_Id;
7422 begin
7423 Scop := Id;
7424 while Is_Record_Type (Scop) loop
7425 Scop := Scope (Scop);
7426 end loop;
7428 return Scope_Depth_Value (Scop);
7429 end Scope_Depth;
7431 ---------------------
7432 -- Scope_Depth_Set --
7433 ---------------------
7435 function Scope_Depth_Set (Id : E) return B is
7436 begin
7437 return not Is_Record_Type (Id)
7438 and then Field22 (Id) /= Union_Id (Empty);
7439 end Scope_Depth_Set;
7441 -----------------------------
7442 -- Set_Component_Alignment --
7443 -----------------------------
7445 -- Component Alignment is encoded using two flags, Flag128/129 as
7446 -- follows. Note that both flags False = Align_Default, so that the
7447 -- default initialization of flags to False initializes component
7448 -- alignment to the default value as required.
7450 -- Flag128 Flag129 Value
7451 -- ------- ------- -----
7452 -- False False Calign_Default
7453 -- False True Calign_Component_Size
7454 -- True False Calign_Component_Size_4
7455 -- True True Calign_Storage_Unit
7457 procedure Set_Component_Alignment (Id : E; V : C) is
7458 begin
7459 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7460 and then Is_Base_Type (Id));
7462 case V is
7463 when Calign_Default =>
7464 Set_Flag128 (Id, False);
7465 Set_Flag129 (Id, False);
7467 when Calign_Component_Size =>
7468 Set_Flag128 (Id, False);
7469 Set_Flag129 (Id, True);
7471 when Calign_Component_Size_4 =>
7472 Set_Flag128 (Id, True);
7473 Set_Flag129 (Id, False);
7475 when Calign_Storage_Unit =>
7476 Set_Flag128 (Id, True);
7477 Set_Flag129 (Id, True);
7478 end case;
7479 end Set_Component_Alignment;
7481 -----------------------------
7482 -- Set_Invariant_Procedure --
7483 -----------------------------
7485 procedure Set_Invariant_Procedure (Id : E; V : E) is
7486 S : Entity_Id;
7488 begin
7489 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7491 S := Subprograms_For_Type (Id);
7492 Set_Subprograms_For_Type (Id, V);
7493 Set_Subprograms_For_Type (V, S);
7495 -- Check for duplicate entry
7497 while Present (S) loop
7498 if Is_Invariant_Procedure (S) then
7499 raise Program_Error;
7500 else
7501 S := Subprograms_For_Type (S);
7502 end if;
7503 end loop;
7504 end Set_Invariant_Procedure;
7506 ----------------------------
7507 -- Set_Predicate_Function --
7508 ----------------------------
7510 procedure Set_Predicate_Function (Id : E; V : E) is
7511 S : Entity_Id;
7513 begin
7514 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7516 S := Subprograms_For_Type (Id);
7517 Set_Subprograms_For_Type (Id, V);
7518 Set_Subprograms_For_Type (V, S);
7520 while Present (S) loop
7521 if Is_Predicate_Function (S) then
7522 raise Program_Error;
7523 else
7524 S := Subprograms_For_Type (S);
7525 end if;
7526 end loop;
7527 end Set_Predicate_Function;
7529 ------------------------------
7530 -- Set_Predicate_Function_M --
7531 ------------------------------
7533 procedure Set_Predicate_Function_M (Id : E; V : E) is
7534 S : Entity_Id;
7536 begin
7537 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7539 S := Subprograms_For_Type (Id);
7540 Set_Subprograms_For_Type (Id, V);
7541 Set_Subprograms_For_Type (V, S);
7543 -- Check for duplicates
7545 while Present (S) loop
7546 if Is_Predicate_Function_M (S) then
7547 raise Program_Error;
7548 else
7549 S := Subprograms_For_Type (S);
7550 end if;
7551 end loop;
7552 end Set_Predicate_Function_M;
7554 -----------------
7555 -- Size_Clause --
7556 -----------------
7558 function Size_Clause (Id : E) return N is
7559 begin
7560 return Rep_Clause (Id, Name_Size);
7561 end Size_Clause;
7563 ------------------------
7564 -- Stream_Size_Clause --
7565 ------------------------
7567 function Stream_Size_Clause (Id : E) return N is
7568 begin
7569 return Rep_Clause (Id, Name_Stream_Size);
7570 end Stream_Size_Clause;
7572 ------------------
7573 -- Subtype_Kind --
7574 ------------------
7576 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7577 Kind : Entity_Kind;
7579 begin
7580 case K is
7581 when Access_Kind =>
7582 Kind := E_Access_Subtype;
7584 when E_Array_Type |
7585 E_Array_Subtype =>
7586 Kind := E_Array_Subtype;
7588 when E_Class_Wide_Type |
7589 E_Class_Wide_Subtype =>
7590 Kind := E_Class_Wide_Subtype;
7592 when E_Decimal_Fixed_Point_Type |
7593 E_Decimal_Fixed_Point_Subtype =>
7594 Kind := E_Decimal_Fixed_Point_Subtype;
7596 when E_Ordinary_Fixed_Point_Type |
7597 E_Ordinary_Fixed_Point_Subtype =>
7598 Kind := E_Ordinary_Fixed_Point_Subtype;
7600 when E_Private_Type |
7601 E_Private_Subtype =>
7602 Kind := E_Private_Subtype;
7604 when E_Limited_Private_Type |
7605 E_Limited_Private_Subtype =>
7606 Kind := E_Limited_Private_Subtype;
7608 when E_Record_Type_With_Private |
7609 E_Record_Subtype_With_Private =>
7610 Kind := E_Record_Subtype_With_Private;
7612 when E_Record_Type |
7613 E_Record_Subtype =>
7614 Kind := E_Record_Subtype;
7616 when E_String_Type |
7617 E_String_Subtype =>
7618 Kind := E_String_Subtype;
7620 when Enumeration_Kind =>
7621 Kind := E_Enumeration_Subtype;
7623 when Float_Kind =>
7624 Kind := E_Floating_Point_Subtype;
7626 when Signed_Integer_Kind =>
7627 Kind := E_Signed_Integer_Subtype;
7629 when Modular_Integer_Kind =>
7630 Kind := E_Modular_Integer_Subtype;
7632 when Protected_Kind =>
7633 Kind := E_Protected_Subtype;
7635 when Task_Kind =>
7636 Kind := E_Task_Subtype;
7638 when others =>
7639 Kind := E_Void;
7640 raise Program_Error;
7641 end case;
7643 return Kind;
7644 end Subtype_Kind;
7646 ---------------------
7647 -- Type_High_Bound --
7648 ---------------------
7650 function Type_High_Bound (Id : E) return Node_Id is
7651 Rng : constant Node_Id := Scalar_Range (Id);
7652 begin
7653 if Nkind (Rng) = N_Subtype_Indication then
7654 return High_Bound (Range_Expression (Constraint (Rng)));
7655 else
7656 return High_Bound (Rng);
7657 end if;
7658 end Type_High_Bound;
7660 --------------------
7661 -- Type_Low_Bound --
7662 --------------------
7664 function Type_Low_Bound (Id : E) return Node_Id is
7665 Rng : constant Node_Id := Scalar_Range (Id);
7666 begin
7667 if Nkind (Rng) = N_Subtype_Indication then
7668 return Low_Bound (Range_Expression (Constraint (Rng)));
7669 else
7670 return Low_Bound (Rng);
7671 end if;
7672 end Type_Low_Bound;
7674 ---------------------
7675 -- Underlying_Type --
7676 ---------------------
7678 function Underlying_Type (Id : E) return E is
7679 begin
7680 -- For record_with_private the underlying type is always the direct
7681 -- full view. Never try to take the full view of the parent it
7682 -- doesn't make sense.
7684 if Ekind (Id) = E_Record_Type_With_Private then
7685 return Full_View (Id);
7687 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7689 -- If we have an incomplete or private type with a full view,
7690 -- then we return the Underlying_Type of this full view
7692 if Present (Full_View (Id)) then
7693 if Id = Full_View (Id) then
7695 -- Previous error in declaration
7697 return Empty;
7699 else
7700 return Underlying_Type (Full_View (Id));
7701 end if;
7703 -- If we have an incomplete entity that comes from the limited
7704 -- view then we return the Underlying_Type of its non-limited
7705 -- view.
7707 elsif From_With_Type (Id)
7708 and then Present (Non_Limited_View (Id))
7709 then
7710 return Underlying_Type (Non_Limited_View (Id));
7712 -- Otherwise check for the case where we have a derived type or
7713 -- subtype, and if so get the Underlying_Type of the parent type.
7715 elsif Etype (Id) /= Id then
7716 return Underlying_Type (Etype (Id));
7718 -- Otherwise we have an incomplete or private type that has
7719 -- no full view, which means that we have not encountered the
7720 -- completion, so return Empty to indicate the underlying type
7721 -- is not yet known.
7723 else
7724 return Empty;
7725 end if;
7727 -- For non-incomplete, non-private types, return the type itself
7728 -- Also for entities that are not types at all return the entity
7729 -- itself.
7731 else
7732 return Id;
7733 end if;
7734 end Underlying_Type;
7736 ---------------
7737 -- Vax_Float --
7738 ---------------
7740 function Vax_Float (Id : E) return B is
7741 begin
7742 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7743 end Vax_Float;
7745 ------------------------
7746 -- Write_Entity_Flags --
7747 ------------------------
7749 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7751 procedure W (Flag_Name : String; Flag : Boolean);
7752 -- Write out given flag if it is set
7754 -------
7755 -- W --
7756 -------
7758 procedure W (Flag_Name : String; Flag : Boolean) is
7759 begin
7760 if Flag then
7761 Write_Str (Prefix);
7762 Write_Str (Flag_Name);
7763 Write_Str (" = True");
7764 Write_Eol;
7765 end if;
7766 end W;
7768 -- Start of processing for Write_Entity_Flags
7770 begin
7771 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7772 and then Is_Base_Type (Id)
7773 then
7774 Write_Str (Prefix);
7775 Write_Str ("Component_Alignment = ");
7777 case Component_Alignment (Id) is
7778 when Calign_Default =>
7779 Write_Str ("Calign_Default");
7781 when Calign_Component_Size =>
7782 Write_Str ("Calign_Component_Size");
7784 when Calign_Component_Size_4 =>
7785 Write_Str ("Calign_Component_Size_4");
7787 when Calign_Storage_Unit =>
7788 Write_Str ("Calign_Storage_Unit");
7789 end case;
7791 Write_Eol;
7792 end if;
7794 W ("Address_Taken", Flag104 (Id));
7795 W ("Body_Needed_For_SAL", Flag40 (Id));
7796 W ("C_Pass_By_Copy", Flag125 (Id));
7797 W ("Can_Never_Be_Null", Flag38 (Id));
7798 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7799 W ("Debug_Info_Off", Flag166 (Id));
7800 W ("Default_Expressions_Processed", Flag108 (Id));
7801 W ("Delay_Cleanups", Flag114 (Id));
7802 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7803 W ("Depends_On_Private", Flag14 (Id));
7804 W ("Discard_Names", Flag88 (Id));
7805 W ("Elaboration_Entity_Required", Flag174 (Id));
7806 W ("Elaborate_Body_Desirable", Flag210 (Id));
7807 W ("Entry_Accepted", Flag152 (Id));
7808 W ("Can_Use_Internal_Rep", Flag229 (Id));
7809 W ("Finalize_Storage_Only", Flag158 (Id));
7810 W ("From_With_Type", Flag159 (Id));
7811 W ("Has_Aliased_Components", Flag135 (Id));
7812 W ("Has_Alignment_Clause", Flag46 (Id));
7813 W ("Has_All_Calls_Remote", Flag79 (Id));
7814 W ("Has_Anonymous_Master", Flag253 (Id));
7815 W ("Has_Atomic_Components", Flag86 (Id));
7816 W ("Has_Biased_Representation", Flag139 (Id));
7817 W ("Has_Completion", Flag26 (Id));
7818 W ("Has_Completion_In_Body", Flag71 (Id));
7819 W ("Has_Complex_Representation", Flag140 (Id));
7820 W ("Has_Component_Size_Clause", Flag68 (Id));
7821 W ("Has_Contiguous_Rep", Flag181 (Id));
7822 W ("Has_Controlled_Component", Flag43 (Id));
7823 W ("Has_Controlling_Result", Flag98 (Id));
7824 W ("Has_Convention_Pragma", Flag119 (Id));
7825 W ("Has_Default_Aspect", Flag39 (Id));
7826 W ("Has_Delayed_Aspects", Flag200 (Id));
7827 W ("Has_Delayed_Freeze", Flag18 (Id));
7828 W ("Has_Discriminants", Flag5 (Id));
7829 W ("Has_Dispatch_Table", Flag220 (Id));
7830 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7831 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7832 W ("Has_Exit", Flag47 (Id));
7833 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7834 W ("Has_Forward_Instantiation", Flag175 (Id));
7835 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7836 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7837 W ("Has_Homonym", Flag56 (Id));
7838 W ("Has_Implicit_Dereference", Flag251 (Id));
7839 W ("Has_Inheritable_Invariants", Flag248 (Id));
7840 W ("Has_Initial_Value", Flag219 (Id));
7841 W ("Has_Invariants", Flag232 (Id));
7842 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7843 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7844 W ("Has_Master_Entity", Flag21 (Id));
7845 W ("Has_Missing_Return", Flag142 (Id));
7846 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7847 W ("Has_Non_Standard_Rep", Flag75 (Id));
7848 W ("Has_Object_Size_Clause", Flag172 (Id));
7849 W ("Has_Per_Object_Constraint", Flag154 (Id));
7850 W ("Has_Postconditions", Flag240 (Id));
7851 W ("Has_Pragma_Controlled", Flag27 (Id));
7852 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7853 W ("Has_Pragma_Inline", Flag157 (Id));
7854 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7855 W ("Has_Pragma_No_Inline", Flag201 (Id));
7856 W ("Has_Pragma_Ordered", Flag198 (Id));
7857 W ("Has_Pragma_Pack", Flag121 (Id));
7858 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7859 W ("Has_Pragma_Pure", Flag203 (Id));
7860 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7861 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7862 W ("Has_Pragma_Unmodified", Flag233 (Id));
7863 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7864 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7865 W ("Has_Predicates", Flag250 (Id));
7866 W ("Has_Primitive_Operations", Flag120 (Id));
7867 W ("Has_Private_Ancestor", Flag151 (Id));
7868 W ("Has_Private_Declaration", Flag155 (Id));
7869 W ("Has_Qualified_Name", Flag161 (Id));
7870 W ("Has_RACW", Flag214 (Id));
7871 W ("Has_Record_Rep_Clause", Flag65 (Id));
7872 W ("Has_Recursive_Call", Flag143 (Id));
7873 W ("Has_Size_Clause", Flag29 (Id));
7874 W ("Has_Small_Clause", Flag67 (Id));
7875 W ("Has_Specified_Layout", Flag100 (Id));
7876 W ("Has_Specified_Stream_Input", Flag190 (Id));
7877 W ("Has_Specified_Stream_Output", Flag191 (Id));
7878 W ("Has_Specified_Stream_Read", Flag192 (Id));
7879 W ("Has_Specified_Stream_Write", Flag193 (Id));
7880 W ("Has_Static_Discriminants", Flag211 (Id));
7881 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7882 W ("Has_Storage_Size_Clause", Flag23 (Id));
7883 W ("Has_Stream_Size_Clause", Flag184 (Id));
7884 W ("Has_Task", Flag30 (Id));
7885 W ("Has_Thunks", Flag228 (Id));
7886 W ("Has_Unchecked_Union", Flag123 (Id));
7887 W ("Has_Unknown_Discriminants", Flag72 (Id));
7888 W ("Has_Up_Level_Access", Flag215 (Id));
7889 W ("Has_Volatile_Components", Flag87 (Id));
7890 W ("Has_Xref_Entry", Flag182 (Id));
7891 W ("In_Package_Body", Flag48 (Id));
7892 W ("In_Private_Part", Flag45 (Id));
7893 W ("In_Use", Flag8 (Id));
7894 W ("Is_AST_Entry", Flag132 (Id));
7895 W ("Is_Abstract_Subprogram", Flag19 (Id));
7896 W ("Is_Abstract_Type", Flag146 (Id));
7897 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7898 W ("Is_Access_Constant", Flag69 (Id));
7899 W ("Is_Ada_2005_Only", Flag185 (Id));
7900 W ("Is_Ada_2012_Only", Flag199 (Id));
7901 W ("Is_Aliased", Flag15 (Id));
7902 W ("Is_Asynchronous", Flag81 (Id));
7903 W ("Is_Atomic", Flag85 (Id));
7904 W ("Is_Bit_Packed_Array", Flag122 (Id));
7905 W ("Is_CPP_Class", Flag74 (Id));
7906 W ("Is_Called", Flag102 (Id));
7907 W ("Is_Character_Type", Flag63 (Id));
7908 W ("Is_Child_Unit", Flag73 (Id));
7909 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7910 W ("Is_Compilation_Unit", Flag149 (Id));
7911 W ("Is_Completely_Hidden", Flag103 (Id));
7912 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7913 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7914 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7915 W ("Is_Constrained", Flag12 (Id));
7916 W ("Is_Constructor", Flag76 (Id));
7917 W ("Is_Controlled", Flag42 (Id));
7918 W ("Is_Controlling_Formal", Flag97 (Id));
7919 W ("Is_Descendent_Of_Address", Flag223 (Id));
7920 W ("Is_Discrim_SO_Function", Flag176 (Id));
7921 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7922 W ("Is_Dispatching_Operation", Flag6 (Id));
7923 W ("Is_Eliminated", Flag124 (Id));
7924 W ("Is_Entry_Formal", Flag52 (Id));
7925 W ("Is_Exported", Flag99 (Id));
7926 W ("Is_First_Subtype", Flag70 (Id));
7927 W ("Is_For_Access_Subtype", Flag118 (Id));
7928 W ("Is_Formal_Subprogram", Flag111 (Id));
7929 W ("Is_Frozen", Flag4 (Id));
7930 W ("Is_Generic_Actual_Type", Flag94 (Id));
7931 W ("Is_Generic_Instance", Flag130 (Id));
7932 W ("Is_Generic_Type", Flag13 (Id));
7933 W ("Is_Hidden", Flag57 (Id));
7934 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7935 W ("Is_Immediately_Visible", Flag7 (Id));
7936 W ("Is_Implementation_Defined", Flag254 (Id));
7937 W ("Is_Imported", Flag24 (Id));
7938 W ("Is_Inlined", Flag11 (Id));
7939 W ("Is_Instantiated", Flag126 (Id));
7940 W ("Is_Interface", Flag186 (Id));
7941 W ("Is_Internal", Flag17 (Id));
7942 W ("Is_Interrupt_Handler", Flag89 (Id));
7943 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7944 W ("Is_Invariant_Procedure", Flag257 (Id));
7945 W ("Is_Itype", Flag91 (Id));
7946 W ("Is_Known_Non_Null", Flag37 (Id));
7947 W ("Is_Known_Null", Flag204 (Id));
7948 W ("Is_Known_Valid", Flag170 (Id));
7949 W ("Is_Limited_Composite", Flag106 (Id));
7950 W ("Is_Limited_Interface", Flag197 (Id));
7951 W ("Is_Limited_Record", Flag25 (Id));
7952 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7953 W ("Is_Non_Static_Subtype", Flag109 (Id));
7954 W ("Is_Null_Init_Proc", Flag178 (Id));
7955 W ("Is_Obsolescent", Flag153 (Id));
7956 W ("Is_Only_Out_Parameter", Flag226 (Id));
7957 W ("Is_Optional_Parameter", Flag134 (Id));
7958 W ("Is_Package_Body_Entity", Flag160 (Id));
7959 W ("Is_Packed", Flag51 (Id));
7960 W ("Is_Packed_Array_Type", Flag138 (Id));
7961 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7962 W ("Is_Predicate_Function", Flag255 (Id));
7963 W ("Is_Predicate_Function_M", Flag256 (Id));
7964 W ("Is_Preelaborated", Flag59 (Id));
7965 W ("Is_Primitive", Flag218 (Id));
7966 W ("Is_Primitive_Wrapper", Flag195 (Id));
7967 W ("Is_Private_Composite", Flag107 (Id));
7968 W ("Is_Private_Descendant", Flag53 (Id));
7969 W ("Is_Private_Primitive", Flag245 (Id));
7970 W ("Is_Processed_Transient", Flag252 (Id));
7971 W ("Is_Public", Flag10 (Id));
7972 W ("Is_Pure", Flag44 (Id));
7973 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7974 W ("Is_RACW_Stub_Type", Flag244 (Id));
7975 W ("Is_Raised", Flag224 (Id));
7976 W ("Is_Remote_Call_Interface", Flag62 (Id));
7977 W ("Is_Remote_Types", Flag61 (Id));
7978 W ("Is_Renaming_Of_Object", Flag112 (Id));
7979 W ("Is_Return_Object", Flag209 (Id));
7980 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7981 W ("Is_Shared_Passive", Flag60 (Id));
7982 W ("Is_Statically_Allocated", Flag28 (Id));
7983 W ("Is_Tag", Flag78 (Id));
7984 W ("Is_Tagged_Type", Flag55 (Id));
7985 W ("Is_Thunk", Flag225 (Id));
7986 W ("Is_Trivial_Subprogram", Flag235 (Id));
7987 W ("Is_True_Constant", Flag163 (Id));
7988 W ("Is_Unchecked_Union", Flag117 (Id));
7989 W ("Is_Underlying_Record_View", Flag246 (Id));
7990 W ("Is_Unsigned_Type", Flag144 (Id));
7991 W ("Is_VMS_Exception", Flag133 (Id));
7992 W ("Is_Valued_Procedure", Flag127 (Id));
7993 W ("Is_Visible_Formal", Flag206 (Id));
7994 W ("Is_Visible_Lib_Unit", Flag116 (Id));
7995 W ("Is_Volatile", Flag16 (Id));
7996 W ("Itype_Printed", Flag202 (Id));
7997 W ("Kill_Elaboration_Checks", Flag32 (Id));
7998 W ("Kill_Range_Checks", Flag33 (Id));
7999 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8000 W ("Low_Bound_Tested", Flag205 (Id));
8001 W ("Machine_Radix_10", Flag84 (Id));
8002 W ("Materialize_Entity", Flag168 (Id));
8003 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8004 W ("Must_Have_Preelab_Init", Flag208 (Id));
8005 W ("Needs_Debug_Info", Flag147 (Id));
8006 W ("Needs_No_Actuals", Flag22 (Id));
8007 W ("Never_Set_In_Source", Flag115 (Id));
8008 W ("No_Pool_Assigned", Flag131 (Id));
8009 W ("No_Return", Flag113 (Id));
8010 W ("No_Strict_Aliasing", Flag136 (Id));
8011 W ("Non_Binary_Modulus", Flag58 (Id));
8012 W ("Nonzero_Is_True", Flag162 (Id));
8013 W ("OK_To_Rename", Flag247 (Id));
8014 W ("OK_To_Reorder_Components", Flag239 (Id));
8015 W ("Optimize_Alignment_Space", Flag241 (Id));
8016 W ("Optimize_Alignment_Time", Flag242 (Id));
8017 W ("Overlays_Constant", Flag243 (Id));
8018 W ("Reachable", Flag49 (Id));
8019 W ("Referenced", Flag156 (Id));
8020 W ("Referenced_As_LHS", Flag36 (Id));
8021 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8022 W ("Renamed_In_Spec", Flag231 (Id));
8023 W ("Requires_Overriding", Flag213 (Id));
8024 W ("Return_Present", Flag54 (Id));
8025 W ("Returns_By_Ref", Flag90 (Id));
8026 W ("Reverse_Bit_Order", Flag164 (Id));
8027 W ("Reverse_Storage_Order", Flag93 (Id));
8028 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8029 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8030 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8031 W ("Static_Elaboration_Desired", Flag77 (Id));
8032 W ("Strict_Alignment", Flag145 (Id));
8033 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8034 W ("Suppress_Initialization", Flag105 (Id));
8035 W ("Suppress_Style_Checks", Flag165 (Id));
8036 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8037 W ("Treat_As_Volatile", Flag41 (Id));
8038 W ("Universal_Aliasing", Flag216 (Id));
8039 W ("Used_As_Generic_Actual", Flag222 (Id));
8040 W ("Uses_Sec_Stack", Flag95 (Id));
8041 W ("Warnings_Off", Flag96 (Id));
8042 W ("Warnings_Off_Used", Flag236 (Id));
8043 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8044 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8045 W ("Was_Hidden", Flag196 (Id));
8046 end Write_Entity_Flags;
8048 -----------------------
8049 -- Write_Entity_Info --
8050 -----------------------
8052 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8054 procedure Write_Attribute (Which : String; Nam : E);
8055 -- Write attribute value with given string name
8057 procedure Write_Kind (Id : Entity_Id);
8058 -- Write Ekind field of entity
8060 ---------------------
8061 -- Write_Attribute --
8062 ---------------------
8064 procedure Write_Attribute (Which : String; Nam : E) is
8065 begin
8066 Write_Str (Prefix);
8067 Write_Str (Which);
8068 Write_Int (Int (Nam));
8069 Write_Str (" ");
8070 Write_Name (Chars (Nam));
8071 Write_Str (" ");
8072 end Write_Attribute;
8074 ----------------
8075 -- Write_Kind --
8076 ----------------
8078 procedure Write_Kind (Id : Entity_Id) is
8079 K : constant String := Entity_Kind'Image (Ekind (Id));
8081 begin
8082 Write_Str (Prefix);
8083 Write_Str (" Kind ");
8085 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8086 Write_Str ("TAGGED ");
8087 end if;
8089 Write_Str (K (3 .. K'Length));
8090 Write_Str (" ");
8092 if Is_Type (Id) and then Depends_On_Private (Id) then
8093 Write_Str ("Depends_On_Private ");
8094 end if;
8095 end Write_Kind;
8097 -- Start of processing for Write_Entity_Info
8099 begin
8100 Write_Eol;
8101 Write_Attribute ("Name ", Id);
8102 Write_Int (Int (Id));
8103 Write_Eol;
8104 Write_Kind (Id);
8105 Write_Eol;
8106 Write_Attribute (" Type ", Etype (Id));
8107 Write_Eol;
8108 Write_Attribute (" Scope ", Scope (Id));
8109 Write_Eol;
8111 case Ekind (Id) is
8113 when Discrete_Kind =>
8114 Write_Str ("Bounds: Id = ");
8116 if Present (Scalar_Range (Id)) then
8117 Write_Int (Int (Type_Low_Bound (Id)));
8118 Write_Str (" .. Id = ");
8119 Write_Int (Int (Type_High_Bound (Id)));
8120 else
8121 Write_Str ("Empty");
8122 end if;
8124 Write_Eol;
8126 when Array_Kind =>
8127 declare
8128 Index : E;
8130 begin
8131 Write_Attribute
8132 (" Component Type ", Component_Type (Id));
8133 Write_Eol;
8134 Write_Str (Prefix);
8135 Write_Str (" Indexes ");
8137 Index := First_Index (Id);
8138 while Present (Index) loop
8139 Write_Attribute (" ", Etype (Index));
8140 Index := Next_Index (Index);
8141 end loop;
8143 Write_Eol;
8144 end;
8146 when Access_Kind =>
8147 Write_Attribute
8148 (" Directly Designated Type ",
8149 Directly_Designated_Type (Id));
8150 Write_Eol;
8152 when Overloadable_Kind =>
8153 if Present (Homonym (Id)) then
8154 Write_Str (" Homonym ");
8155 Write_Name (Chars (Homonym (Id)));
8156 Write_Str (" ");
8157 Write_Int (Int (Homonym (Id)));
8158 Write_Eol;
8159 end if;
8161 Write_Eol;
8163 when E_Component =>
8164 if Ekind (Scope (Id)) in Record_Kind then
8165 Write_Attribute (
8166 " Original_Record_Component ",
8167 Original_Record_Component (Id));
8168 Write_Int (Int (Original_Record_Component (Id)));
8169 Write_Eol;
8170 end if;
8172 when others => null;
8173 end case;
8174 end Write_Entity_Info;
8176 -----------------------
8177 -- Write_Field6_Name --
8178 -----------------------
8180 procedure Write_Field6_Name (Id : Entity_Id) is
8181 pragma Warnings (Off, Id);
8182 begin
8183 Write_Str ("First_Rep_Item");
8184 end Write_Field6_Name;
8186 -----------------------
8187 -- Write_Field7_Name --
8188 -----------------------
8190 procedure Write_Field7_Name (Id : Entity_Id) is
8191 pragma Warnings (Off, Id);
8192 begin
8193 Write_Str ("Freeze_Node");
8194 end Write_Field7_Name;
8196 -----------------------
8197 -- Write_Field8_Name --
8198 -----------------------
8200 procedure Write_Field8_Name (Id : Entity_Id) is
8201 begin
8202 case Ekind (Id) is
8203 when Type_Kind =>
8204 Write_Str ("Associated_Node_For_Itype");
8206 when E_Package =>
8207 Write_Str ("Dependent_Instances");
8209 when E_Loop =>
8210 Write_Str ("First_Exit_Statement");
8212 when E_Variable =>
8213 Write_Str ("Hiding_Loop_Variable");
8215 when E_Abstract_State =>
8216 Write_Str ("Integrity_Level");
8218 when Formal_Kind |
8219 E_Function |
8220 E_Subprogram_Body =>
8221 Write_Str ("Mechanism");
8223 when E_Component |
8224 E_Discriminant =>
8225 Write_Str ("Normalized_First_Bit");
8227 when E_Procedure =>
8228 Write_Str ("Postcondition_Proc");
8230 when E_Return_Statement =>
8231 Write_Str ("Return_Applies_To");
8233 when others =>
8234 Write_Str ("Field8??");
8235 end case;
8236 end Write_Field8_Name;
8238 -----------------------
8239 -- Write_Field9_Name --
8240 -----------------------
8242 procedure Write_Field9_Name (Id : Entity_Id) is
8243 begin
8244 case Ekind (Id) is
8245 when Type_Kind =>
8246 Write_Str ("Class_Wide_Type");
8248 when Object_Kind =>
8249 Write_Str ("Current_Value");
8251 when E_Abstract_State =>
8252 Write_Str ("Refined_State");
8254 when E_Function |
8255 E_Generic_Function |
8256 E_Generic_Package |
8257 E_Generic_Procedure |
8258 E_Package |
8259 E_Procedure =>
8260 Write_Str ("Renaming_Map");
8262 when others =>
8263 Write_Str ("Field9??");
8264 end case;
8265 end Write_Field9_Name;
8267 ------------------------
8268 -- Write_Field10_Name --
8269 ------------------------
8271 procedure Write_Field10_Name (Id : Entity_Id) is
8272 begin
8273 case Ekind (Id) is
8274 when Class_Wide_Kind |
8275 Incomplete_Kind |
8276 E_Record_Type |
8277 E_Record_Subtype |
8278 Private_Kind |
8279 Concurrent_Kind =>
8280 Write_Str ("Direct_Primitive_Operations");
8282 when Float_Kind =>
8283 Write_Str ("Float_Rep");
8285 when E_In_Parameter |
8286 E_Constant =>
8287 Write_Str ("Discriminal_Link");
8289 when E_Function |
8290 E_Package |
8291 E_Package_Body |
8292 E_Procedure =>
8293 Write_Str ("Handler_Records");
8295 when E_Component |
8296 E_Discriminant =>
8297 Write_Str ("Normalized_Position_Max");
8299 when others =>
8300 Write_Str ("Field10??");
8301 end case;
8302 end Write_Field10_Name;
8304 ------------------------
8305 -- Write_Field11_Name --
8306 ------------------------
8308 procedure Write_Field11_Name (Id : Entity_Id) is
8309 begin
8310 case Ekind (Id) is
8311 when E_Block =>
8312 Write_Str ("Block_Node");
8314 when E_Component |
8315 E_Discriminant =>
8316 Write_Str ("Component_Bit_Offset");
8318 when Formal_Kind =>
8319 Write_Str ("Entry_Component");
8321 when E_Enumeration_Literal =>
8322 Write_Str ("Enumeration_Pos");
8324 when Type_Kind |
8325 E_Constant =>
8326 Write_Str ("Full_View");
8328 when E_Generic_Package =>
8329 Write_Str ("Generic_Homonym");
8331 when E_Function |
8332 E_Procedure |
8333 E_Entry |
8334 E_Entry_Family =>
8335 Write_Str ("Protected_Body_Subprogram");
8337 when others =>
8338 Write_Str ("Field11??");
8339 end case;
8340 end Write_Field11_Name;
8342 ------------------------
8343 -- Write_Field12_Name --
8344 ------------------------
8346 procedure Write_Field12_Name (Id : Entity_Id) is
8347 begin
8348 case Ekind (Id) is
8349 when E_Package =>
8350 Write_Str ("Associated_Formal_Package");
8352 when Entry_Kind =>
8353 Write_Str ("Barrier_Function");
8355 when E_Enumeration_Literal =>
8356 Write_Str ("Enumeration_Rep");
8358 when Type_Kind |
8359 E_Component |
8360 E_Constant |
8361 E_Discriminant |
8362 E_Exception |
8363 E_In_Parameter |
8364 E_In_Out_Parameter |
8365 E_Out_Parameter |
8366 E_Loop_Parameter |
8367 E_Variable =>
8368 Write_Str ("Esize");
8370 when E_Function |
8371 E_Procedure =>
8372 Write_Str ("Next_Inlined_Subprogram");
8374 when others =>
8375 Write_Str ("Field12??");
8376 end case;
8377 end Write_Field12_Name;
8379 ------------------------
8380 -- Write_Field13_Name --
8381 ------------------------
8383 procedure Write_Field13_Name (Id : Entity_Id) is
8384 begin
8385 case Ekind (Id) is
8386 when E_Component |
8387 E_Discriminant =>
8388 Write_Str ("Component_Clause");
8390 when E_Function =>
8391 Write_Str ("Elaboration_Entity");
8393 when E_Procedure |
8394 E_Package |
8395 Generic_Unit_Kind =>
8396 Write_Str ("Elaboration_Entity");
8398 when Formal_Kind |
8399 E_Variable =>
8400 Write_Str ("Extra_Accessibility");
8402 when Type_Kind =>
8403 Write_Str ("RM_Size");
8405 when others =>
8406 Write_Str ("Field13??");
8407 end case;
8408 end Write_Field13_Name;
8410 -----------------------
8411 -- Write_Field14_Name --
8412 -----------------------
8414 procedure Write_Field14_Name (Id : Entity_Id) is
8415 begin
8416 case Ekind (Id) is
8417 when Type_Kind |
8418 Formal_Kind |
8419 E_Constant |
8420 E_Exception |
8421 E_Variable |
8422 E_Loop_Parameter =>
8423 Write_Str ("Alignment");
8425 when E_Function |
8426 E_Procedure =>
8427 Write_Str ("First_Optional_Parameter");
8429 when E_Component |
8430 E_Discriminant =>
8431 Write_Str ("Normalized_Position");
8433 when E_Package |
8434 E_Generic_Package =>
8435 Write_Str ("Shadow_Entities");
8437 when others =>
8438 Write_Str ("Field14??");
8439 end case;
8440 end Write_Field14_Name;
8442 ------------------------
8443 -- Write_Field15_Name --
8444 ------------------------
8446 procedure Write_Field15_Name (Id : Entity_Id) is
8447 begin
8448 case Ekind (Id) is
8449 when E_Discriminant =>
8450 Write_Str ("Discriminant_Number");
8452 when E_Component =>
8453 Write_Str ("DT_Entry_Count");
8455 when E_Function |
8456 E_Procedure =>
8457 Write_Str ("DT_Position");
8459 when E_Protected_Type =>
8460 Write_Str ("Entry_Bodies_Array");
8462 when Entry_Kind =>
8463 Write_Str ("Entry_Parameters_Type");
8465 when Formal_Kind =>
8466 Write_Str ("Extra_Formal");
8468 when Enumeration_Kind =>
8469 Write_Str ("Lit_Indexes");
8471 when E_Package |
8472 E_Package_Body =>
8473 Write_Str ("Related_Instance");
8475 when Decimal_Fixed_Point_Kind =>
8476 Write_Str ("Scale_Value");
8478 when E_Constant |
8479 E_Variable =>
8480 Write_Str ("Status_Flag_Or_Transient_Decl");
8482 when Access_Kind |
8483 Task_Kind =>
8484 Write_Str ("Storage_Size_Variable");
8486 when E_String_Literal_Subtype =>
8487 Write_Str ("String_Literal_Low_Bound");
8489 when others =>
8490 Write_Str ("Field15??");
8491 end case;
8492 end Write_Field15_Name;
8494 ------------------------
8495 -- Write_Field16_Name --
8496 ------------------------
8498 procedure Write_Field16_Name (Id : Entity_Id) is
8499 begin
8500 case Ekind (Id) is
8501 when E_Record_Type |
8502 E_Record_Type_With_Private =>
8503 Write_Str ("Access_Disp_Table");
8505 when E_Record_Subtype |
8506 E_Class_Wide_Subtype =>
8507 Write_Str ("Cloned_Subtype");
8509 when E_Function |
8510 E_Procedure =>
8511 Write_Str ("DTC_Entity");
8513 when E_Component =>
8514 Write_Str ("Entry_Formal");
8516 when E_Package |
8517 E_Generic_Package |
8518 Concurrent_Kind =>
8519 Write_Str ("First_Private_Entity");
8521 when Enumeration_Kind =>
8522 Write_Str ("Lit_Strings");
8524 when E_String_Literal_Subtype =>
8525 Write_Str ("String_Literal_Length");
8527 when E_Variable |
8528 E_Out_Parameter =>
8529 Write_Str ("Unset_Reference");
8531 when others =>
8532 Write_Str ("Field16??");
8533 end case;
8534 end Write_Field16_Name;
8536 ------------------------
8537 -- Write_Field17_Name --
8538 ------------------------
8540 procedure Write_Field17_Name (Id : Entity_Id) is
8541 begin
8542 case Ekind (Id) is
8543 when Formal_Kind |
8544 E_Constant |
8545 E_Generic_In_Out_Parameter |
8546 E_Variable =>
8547 Write_Str ("Actual_Subtype");
8549 when Digits_Kind =>
8550 Write_Str ("Digits_Value");
8552 when E_Discriminant =>
8553 Write_Str ("Discriminal");
8555 when E_Block |
8556 Class_Wide_Kind |
8557 Concurrent_Kind |
8558 Private_Kind |
8559 E_Entry |
8560 E_Entry_Family |
8561 E_Function |
8562 E_Generic_Function |
8563 E_Generic_Package |
8564 E_Generic_Procedure |
8565 E_Loop |
8566 E_Operator |
8567 E_Package |
8568 E_Package_Body |
8569 E_Procedure |
8570 E_Record_Type |
8571 E_Record_Subtype |
8572 E_Return_Statement |
8573 E_Subprogram_Body |
8574 E_Subprogram_Type =>
8575 Write_Str ("First_Entity");
8577 when Array_Kind =>
8578 Write_Str ("First_Index");
8580 when Enumeration_Kind =>
8581 Write_Str ("First_Literal");
8583 when Access_Kind =>
8584 Write_Str ("Master_Id");
8586 when Modular_Integer_Kind =>
8587 Write_Str ("Modulus");
8589 when E_Incomplete_Type =>
8590 Write_Str ("Non_Limited_View");
8592 when E_Incomplete_Subtype =>
8593 if From_With_Type (Id) then
8594 Write_Str ("Non_Limited_View");
8595 end if;
8597 when E_Component =>
8598 Write_Str ("Prival");
8600 when others =>
8601 Write_Str ("Field17??");
8602 end case;
8603 end Write_Field17_Name;
8605 ------------------------
8606 -- Write_Field18_Name --
8607 ------------------------
8609 procedure Write_Field18_Name (Id : Entity_Id) is
8610 begin
8611 case Ekind (Id) is
8612 when E_Enumeration_Literal |
8613 E_Function |
8614 E_Operator |
8615 E_Procedure =>
8616 Write_Str ("Alias");
8618 when E_Record_Type =>
8619 Write_Str ("Corresponding_Concurrent_Type");
8621 when E_Subprogram_Body =>
8622 Write_Str ("Corresponding_Protected_Entry");
8624 when Concurrent_Kind =>
8625 Write_Str ("Corresponding_Record_Type");
8627 when E_Label |
8628 E_Loop |
8629 E_Block =>
8630 Write_Str ("Enclosing_Scope");
8632 when E_Entry_Index_Parameter =>
8633 Write_Str ("Entry_Index_Constant");
8635 when E_Class_Wide_Subtype |
8636 E_Access_Protected_Subprogram_Type |
8637 E_Anonymous_Access_Protected_Subprogram_Type |
8638 E_Access_Subprogram_Type |
8639 E_Exception_Type =>
8640 Write_Str ("Equivalent_Type");
8642 when Fixed_Point_Kind =>
8643 Write_Str ("Delta_Value");
8645 when Incomplete_Or_Private_Kind |
8646 E_Record_Subtype =>
8647 Write_Str ("Private_Dependents");
8649 when Object_Kind =>
8650 Write_Str ("Renamed_Object");
8652 when E_Exception |
8653 E_Package |
8654 E_Generic_Function |
8655 E_Generic_Procedure |
8656 E_Generic_Package =>
8657 Write_Str ("Renamed_Entity");
8659 when others =>
8660 Write_Str ("Field18??");
8661 end case;
8662 end Write_Field18_Name;
8664 -----------------------
8665 -- Write_Field19_Name --
8666 -----------------------
8668 procedure Write_Field19_Name (Id : Entity_Id) is
8669 begin
8670 case Ekind (Id) is
8671 when E_Package |
8672 E_Generic_Package =>
8673 Write_Str ("Body_Entity");
8675 when E_Discriminant =>
8676 Write_Str ("Corresponding_Discriminant");
8678 when Scalar_Kind =>
8679 Write_Str ("Default_Value");
8681 when E_Array_Type =>
8682 Write_Str ("Default_Component_Value");
8684 when E_Record_Type =>
8685 Write_Str ("Parent_Subtype");
8687 when E_Constant |
8688 E_Variable =>
8689 Write_Str ("Size_Check_Code");
8691 when E_Package_Body |
8692 Formal_Kind =>
8693 Write_Str ("Spec_Entity");
8695 when Private_Kind =>
8696 Write_Str ("Underlying_Full_View");
8698 when E_Function | E_Operator | E_Subprogram_Type =>
8699 Write_Str ("Extra_Accessibility_Of_Result");
8701 when others =>
8702 Write_Str ("Field19??");
8703 end case;
8704 end Write_Field19_Name;
8706 -----------------------
8707 -- Write_Field20_Name --
8708 -----------------------
8710 procedure Write_Field20_Name (Id : Entity_Id) is
8711 begin
8712 case Ekind (Id) is
8713 when Array_Kind =>
8714 Write_Str ("Component_Type");
8716 when E_In_Parameter |
8717 E_Generic_In_Parameter =>
8718 Write_Str ("Default_Value");
8720 when Access_Kind =>
8721 Write_Str ("Directly_Designated_Type");
8723 when E_Component =>
8724 Write_Str ("Discriminant_Checking_Func");
8726 when E_Discriminant =>
8727 Write_Str ("Discriminant_Default_Value");
8729 when E_Block |
8730 Class_Wide_Kind |
8731 Concurrent_Kind |
8732 Private_Kind |
8733 E_Entry |
8734 E_Entry_Family |
8735 E_Function |
8736 E_Generic_Function |
8737 E_Generic_Package |
8738 E_Generic_Procedure |
8739 E_Loop |
8740 E_Operator |
8741 E_Package |
8742 E_Package_Body |
8743 E_Procedure |
8744 E_Record_Type |
8745 E_Record_Subtype |
8746 E_Return_Statement |
8747 E_Subprogram_Body |
8748 E_Subprogram_Type =>
8749 Write_Str ("Last_Entity");
8751 when E_Constant |
8752 E_Variable =>
8753 Write_Str ("Prival_Link");
8755 when Scalar_Kind =>
8756 Write_Str ("Scalar_Range");
8758 when E_Exception =>
8759 Write_Str ("Register_Exception_Call");
8761 when others =>
8762 Write_Str ("Field20??");
8763 end case;
8764 end Write_Field20_Name;
8766 -----------------------
8767 -- Write_Field21_Name --
8768 -----------------------
8770 procedure Write_Field21_Name (Id : Entity_Id) is
8771 begin
8772 case Ekind (Id) is
8773 when Entry_Kind =>
8774 Write_Str ("Accept_Address");
8776 when E_In_Parameter =>
8777 Write_Str ("Default_Expr_Function");
8779 when Concurrent_Kind |
8780 Incomplete_Or_Private_Kind |
8781 Class_Wide_Kind |
8782 E_Record_Type |
8783 E_Record_Subtype =>
8784 Write_Str ("Discriminant_Constraint");
8786 when E_Constant |
8787 E_Exception |
8788 E_Function |
8789 E_Generic_Function |
8790 E_Procedure |
8791 E_Generic_Procedure |
8792 E_Variable =>
8793 Write_Str ("Interface_Name");
8795 when Array_Kind |
8796 Modular_Integer_Kind =>
8797 Write_Str ("Original_Array_Type");
8799 when Fixed_Point_Kind =>
8800 Write_Str ("Small_Value");
8802 when others =>
8803 Write_Str ("Field21??");
8804 end case;
8805 end Write_Field21_Name;
8807 -----------------------
8808 -- Write_Field22_Name --
8809 -----------------------
8811 procedure Write_Field22_Name (Id : Entity_Id) is
8812 begin
8813 case Ekind (Id) is
8814 when Access_Kind =>
8815 Write_Str ("Associated_Storage_Pool");
8817 when Array_Kind =>
8818 Write_Str ("Component_Size");
8820 when E_Record_Type =>
8821 Write_Str ("Corresponding_Remote_Type");
8823 when E_Component |
8824 E_Discriminant =>
8825 Write_Str ("Original_Record_Component");
8827 when E_Enumeration_Literal =>
8828 Write_Str ("Enumeration_Rep_Expr");
8830 when E_Exception =>
8831 Write_Str ("Exception_Code");
8833 when E_Record_Type_With_Private |
8834 E_Record_Subtype_With_Private |
8835 E_Private_Type |
8836 E_Private_Subtype |
8837 E_Limited_Private_Type |
8838 E_Limited_Private_Subtype =>
8839 Write_Str ("Private_View");
8841 when Formal_Kind =>
8842 Write_Str ("Protected_Formal");
8844 when E_Block |
8845 E_Entry |
8846 E_Entry_Family |
8847 E_Function |
8848 E_Loop |
8849 E_Package |
8850 E_Package_Body |
8851 E_Generic_Package |
8852 E_Generic_Function |
8853 E_Generic_Procedure |
8854 E_Procedure |
8855 E_Protected_Type |
8856 E_Return_Statement |
8857 E_Subprogram_Body |
8858 E_Task_Type =>
8859 Write_Str ("Scope_Depth_Value");
8861 when E_Variable =>
8862 Write_Str ("Shared_Var_Procs_Instance");
8864 when others =>
8865 Write_Str ("Field22??");
8866 end case;
8867 end Write_Field22_Name;
8869 ------------------------
8870 -- Write_Field23_Name --
8871 ------------------------
8873 procedure Write_Field23_Name (Id : Entity_Id) is
8874 begin
8875 case Ekind (Id) is
8876 when E_Discriminant =>
8877 Write_Str ("CR_Discriminant");
8879 when E_Block =>
8880 Write_Str ("Entry_Cancel_Parameter");
8882 when E_Enumeration_Type =>
8883 Write_Str ("Enum_Pos_To_Rep");
8885 when Formal_Kind |
8886 E_Variable =>
8887 Write_Str ("Extra_Constrained");
8889 when Access_Kind =>
8890 Write_Str ("Finalization_Master");
8892 when E_Generic_Function |
8893 E_Generic_Package |
8894 E_Generic_Procedure =>
8895 Write_Str ("Inner_Instances");
8897 when Array_Kind =>
8898 Write_Str ("Packed_Array_Type");
8900 when Entry_Kind =>
8901 Write_Str ("Protection_Object");
8903 when Concurrent_Kind |
8904 Incomplete_Or_Private_Kind |
8905 Class_Wide_Kind |
8906 E_Record_Type |
8907 E_Record_Subtype =>
8908 Write_Str ("Stored_Constraint");
8910 when E_Function |
8911 E_Procedure =>
8912 if Present (Scope (Id))
8913 and then Is_Protected_Type (Scope (Id))
8914 then
8915 Write_Str ("Protection_Object");
8916 else
8917 Write_Str ("Generic_Renamings");
8918 end if;
8920 when E_Package =>
8921 if Is_Generic_Instance (Id) then
8922 Write_Str ("Generic_Renamings");
8923 else
8924 Write_Str ("Limited_View");
8925 end if;
8927 when others =>
8928 Write_Str ("Field23??");
8929 end case;
8930 end Write_Field23_Name;
8932 ------------------------
8933 -- Write_Field24_Name --
8934 ------------------------
8936 procedure Write_Field24_Name (Id : Entity_Id) is
8937 begin
8938 case Ekind (Id) is
8939 when E_Package |
8940 E_Package_Body =>
8941 Write_Str ("Finalizer");
8943 when E_Constant |
8944 E_Variable |
8945 Type_Kind =>
8946 Write_Str ("Related_Expression");
8948 when E_Entry |
8949 E_Entry_Family |
8950 Subprogram_Kind |
8951 Generic_Subprogram_Kind =>
8952 Write_Str ("Contract");
8954 when others =>
8955 Write_Str ("Field24???");
8956 end case;
8957 end Write_Field24_Name;
8959 ------------------------
8960 -- Write_Field25_Name --
8961 ------------------------
8963 procedure Write_Field25_Name (Id : Entity_Id) is
8964 begin
8965 case Ekind (Id) is
8966 when E_Package =>
8967 Write_Str ("Abstract_States");
8969 when E_Variable =>
8970 Write_Str ("Debug_Renaming_Link");
8972 when E_Component =>
8973 Write_Str ("DT_Offset_To_Top_Func");
8975 when E_Procedure |
8976 E_Function =>
8977 Write_Str ("Interface_Alias");
8979 when E_Record_Type |
8980 E_Record_Subtype |
8981 E_Record_Type_With_Private |
8982 E_Record_Subtype_With_Private =>
8983 Write_Str ("Interfaces");
8985 when E_Array_Type |
8986 E_Array_Subtype =>
8987 Write_Str ("Related_Array_Object");
8989 when Task_Kind =>
8990 Write_Str ("Task_Body_Procedure");
8992 when E_Entry |
8993 E_Entry_Family =>
8994 Write_Str ("PPC_Wrapper");
8996 when E_Enumeration_Subtype |
8997 E_Modular_Integer_Subtype |
8998 E_Signed_Integer_Subtype =>
8999 Write_Str ("Static_Predicate");
9001 when others =>
9002 Write_Str ("Field25??");
9003 end case;
9004 end Write_Field25_Name;
9006 ------------------------
9007 -- Write_Field26_Name --
9008 ------------------------
9010 procedure Write_Field26_Name (Id : Entity_Id) is
9011 begin
9012 case Ekind (Id) is
9013 when E_Record_Type |
9014 E_Record_Type_With_Private =>
9015 Write_Str ("Dispatch_Table_Wrappers");
9017 when E_In_Out_Parameter |
9018 E_Out_Parameter |
9019 E_Variable =>
9020 Write_Str ("Last_Assignment");
9022 when E_Access_Subprogram_Type =>
9023 Write_Str ("Original_Access_Type");
9025 when E_Generic_Package |
9026 E_Package =>
9027 Write_Str ("Package_Instantiation");
9029 when E_Component |
9030 E_Constant =>
9031 Write_Str ("Related_Type");
9033 when Task_Kind =>
9034 Write_Str ("Relative_Deadline_Variable");
9036 when E_Procedure |
9037 E_Function =>
9038 Write_Str ("Overridden_Operation");
9040 when others =>
9041 Write_Str ("Field26??");
9042 end case;
9043 end Write_Field26_Name;
9045 ------------------------
9046 -- Write_Field27_Name --
9047 ------------------------
9049 procedure Write_Field27_Name (Id : Entity_Id) is
9050 begin
9051 case Ekind (Id) is
9052 when E_Package |
9053 Type_Kind =>
9054 Write_Str ("Current_Use_Clause");
9056 when E_Component |
9057 E_Constant |
9058 E_Variable =>
9059 Write_Str ("Related_Type");
9061 when E_Procedure |
9062 E_Function =>
9063 Write_Str ("Wrapped_Entity");
9065 when others =>
9066 Write_Str ("Field27??");
9067 end case;
9068 end Write_Field27_Name;
9070 ------------------------
9071 -- Write_Field28_Name --
9072 ------------------------
9074 procedure Write_Field28_Name (Id : Entity_Id) is
9075 begin
9076 case Ekind (Id) is
9077 when E_Entry |
9078 E_Entry_Family |
9079 E_Function |
9080 E_Procedure |
9081 E_Subprogram_Body |
9082 E_Subprogram_Type =>
9083 Write_Str ("Extra_Formals");
9085 when E_Constant | E_Variable =>
9086 Write_Str ("Initialization_Statements");
9088 when E_Record_Type =>
9089 Write_Str ("Underlying_Record_View");
9091 when others =>
9092 Write_Str ("Field28??");
9093 end case;
9094 end Write_Field28_Name;
9096 ------------------------
9097 -- Write_Field29_Name --
9098 ------------------------
9100 procedure Write_Field29_Name (Id : Entity_Id) is
9101 begin
9102 case Ekind (Id) is
9103 when Type_Kind =>
9104 Write_Str ("Subprograms_For_Type");
9106 when others =>
9107 Write_Str ("Field29??");
9108 end case;
9109 end Write_Field29_Name;
9111 ------------------------
9112 -- Write_Field30_Name --
9113 ------------------------
9115 procedure Write_Field30_Name (Id : Entity_Id) is
9116 begin
9117 case Ekind (Id) is
9118 when E_Function =>
9119 Write_Str ("Corresponding_Equality");
9121 when E_Procedure =>
9122 Write_Str ("Static_Initialization");
9124 when others =>
9125 Write_Str ("Field30??");
9126 end case;
9127 end Write_Field30_Name;
9129 ------------------------
9130 -- Write_Field31_Name --
9131 ------------------------
9133 procedure Write_Field31_Name (Id : Entity_Id) is
9134 begin
9135 case Ekind (Id) is
9136 when E_Procedure |
9137 E_Function =>
9138 Write_Str ("Thunk_Entity");
9140 when others =>
9141 Write_Str ("Field31??");
9142 end case;
9143 end Write_Field31_Name;
9145 ------------------------
9146 -- Write_Field32_Name --
9147 ------------------------
9149 procedure Write_Field32_Name (Id : Entity_Id) is
9150 begin
9151 case Ekind (Id) is
9152 when others =>
9153 Write_Str ("Field32??");
9154 end case;
9155 end Write_Field32_Name;
9157 ------------------------
9158 -- Write_Field33_Name --
9159 ------------------------
9161 procedure Write_Field33_Name (Id : Entity_Id) is
9162 begin
9163 case Ekind (Id) is
9164 when others =>
9165 Write_Str ("Field33??");
9166 end case;
9167 end Write_Field33_Name;
9169 ------------------------
9170 -- Write_Field34_Name --
9171 ------------------------
9173 procedure Write_Field34_Name (Id : Entity_Id) is
9174 begin
9175 case Ekind (Id) is
9176 when others =>
9177 Write_Str ("Field34??");
9178 end case;
9179 end Write_Field34_Name;
9181 ------------------------
9182 -- Write_Field35_Name --
9183 ------------------------
9185 procedure Write_Field35_Name (Id : Entity_Id) is
9186 begin
9187 case Ekind (Id) is
9188 when others =>
9189 Write_Str ("Field35??");
9190 end case;
9191 end Write_Field35_Name;
9193 -------------------------
9194 -- Iterator Procedures --
9195 -------------------------
9197 procedure Proc_Next_Component (N : in out Node_Id) is
9198 begin
9199 N := Next_Component (N);
9200 end Proc_Next_Component;
9202 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9203 begin
9204 N := Next_Entity (N);
9205 while Present (N) loop
9206 exit when Ekind_In (N, E_Component, E_Discriminant);
9207 N := Next_Entity (N);
9208 end loop;
9209 end Proc_Next_Component_Or_Discriminant;
9211 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9212 begin
9213 N := Next_Discriminant (N);
9214 end Proc_Next_Discriminant;
9216 procedure Proc_Next_Formal (N : in out Node_Id) is
9217 begin
9218 N := Next_Formal (N);
9219 end Proc_Next_Formal;
9221 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9222 begin
9223 N := Next_Formal_With_Extras (N);
9224 end Proc_Next_Formal_With_Extras;
9226 procedure Proc_Next_Index (N : in out Node_Id) is
9227 begin
9228 N := Next_Index (N);
9229 end Proc_Next_Index;
9231 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9232 begin
9233 N := Next_Inlined_Subprogram (N);
9234 end Proc_Next_Inlined_Subprogram;
9236 procedure Proc_Next_Literal (N : in out Node_Id) is
9237 begin
9238 N := Next_Literal (N);
9239 end Proc_Next_Literal;
9241 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9242 begin
9243 N := Next_Stored_Discriminant (N);
9244 end Proc_Next_Stored_Discriminant;
9246 end Einfo;