2010-07-22 Andi Kleen <ak@linux.intel.com>
[official-gcc.git] / gcc / ada / einfo.adb
blobf1145a1ac0738a414f295028ae38b6c6f2fbae82
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2010, 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 Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
41 package body Einfo is
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
59 -- Chars Name1
60 -- Next_Entity Node2
61 -- Scope Node3
62 -- Etype Node5
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
68 -- Homonym Node4
69 -- First_Rep_Item Node6
70 -- Freeze_Node Node7
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
86 -- Renaming_Map Uint9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
94 -- Full_View Node11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
99 -- Block_Node Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
103 -- Esize Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Elaboration_Entity Node13
109 -- Extra_Accessibility Node13
110 -- RM_Size Uint13
112 -- Alignment Uint14
113 -- First_Optional_Parameter Node14
114 -- Normalized_Position Uint14
115 -- Shadow_Entities List14
117 -- Discriminant_Number Uint15
118 -- DT_Position Uint15
119 -- DT_Entry_Count Uint15
120 -- Entry_Bodies_Array Node15
121 -- Entry_Parameters_Type Node15
122 -- Extra_Formal Node15
123 -- Lit_Indexes Node15
124 -- Primitive_Operations Elist15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
130 -- Access_Disp_Table Elist16
131 -- Cloned_Subtype Node16
132 -- DTC_Entity Node16
133 -- Entry_Formal Node16
134 -- First_Private_Entity Node16
135 -- Lit_Strings Node16
136 -- String_Literal_Length Uint16
137 -- Unset_Reference Node16
139 -- Actual_Subtype Node17
140 -- Digits_Value Uint17
141 -- Discriminal Node17
142 -- First_Entity Node17
143 -- First_Index Node17
144 -- First_Literal Node17
145 -- Master_Id Node17
146 -- Modulus Uint17
147 -- Non_Limited_View Node17
148 -- Prival Node17
150 -- Alias Node18
151 -- Corresponding_Concurrent_Type Node18
152 -- Corresponding_Record_Type Node18
153 -- Delta_Value Ureal18
154 -- Enclosing_Scope Node18
155 -- Equivalent_Type Node18
156 -- Private_Dependents Elist18
157 -- Renamed_Entity Node18
158 -- Renamed_Object Node18
160 -- Body_Entity Node19
161 -- Corresponding_Discriminant Node19
162 -- Finalization_Chain_Entity Node19
163 -- Parent_Subtype Node19
164 -- Related_Array_Object Node19
165 -- Size_Check_Code Node19
166 -- Spec_Entity Node19
167 -- Underlying_Full_View Node19
169 -- Component_Type Node20
170 -- Default_Value Node20
171 -- Directly_Designated_Type Node20
172 -- Discriminant_Checking_Func Node20
173 -- Discriminant_Default_Value Node20
174 -- Last_Entity Node20
175 -- Prival_Link Node20
176 -- Register_Exception_Call Node20
177 -- Scalar_Range Node20
179 -- Accept_Address Elist21
180 -- Default_Expr_Function Node21
181 -- Discriminant_Constraint Elist21
182 -- Interface_Name Node21
183 -- Original_Array_Type Node21
184 -- Small_Value Ureal21
186 -- Associated_Storage_Pool Node22
187 -- Component_Size Uint22
188 -- Corresponding_Remote_Type Node22
189 -- Enumeration_Rep_Expr Node22
190 -- Exception_Code Uint22
191 -- Original_Record_Component Node22
192 -- Private_View Node22
193 -- Protected_Formal Node22
194 -- Scope_Depth_Value Uint22
195 -- Shared_Var_Procs_Instance Node22
197 -- Associated_Final_Chain Node23
198 -- CR_Discriminant Node23
199 -- Entry_Cancel_Parameter Node23
200 -- Enum_Pos_To_Rep Node23
201 -- Extra_Constrained Node23
202 -- Generic_Renamings Elist23
203 -- Inner_Instances Elist23
204 -- Limited_View Node23
205 -- Packed_Array_Type Node23
206 -- Protection_Object Node23
207 -- Stored_Constraint Elist23
209 -- Related_Expression Node24
210 -- Spec_PPC_List Node24
212 -- Interface_Alias Node25
213 -- Interfaces Elist25
214 -- Debug_Renaming_Link Node25
215 -- DT_Offset_To_Top_Func Node25
216 -- Task_Body_Procedure Node25
218 -- Dispatch_Table_Wrappers Elist26
219 -- Last_Assignment Node26
220 -- Overridden_Operation Node26
221 -- Package_Instantiation Node26
222 -- Related_Type Node26
223 -- Relative_Deadline_Variable Node26
224 -- Static_Initialization Node26
226 -- Current_Use_Clause Node27
227 -- Wrapped_Entity Node27
229 -- Extra_Formals Node28
230 -- Underlying_Record_View Node28
232 ---------------------------------------------
233 -- Usage of Flags in Defining Entity Nodes --
234 ---------------------------------------------
236 -- All flags are unique, there is no overlaying, so each flag is physically
237 -- present in every entity. However, for many of the flags, it only makes
238 -- sense for them to be set true for certain subsets of entity kinds. See
239 -- the spec of Einfo for further details.
241 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
242 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
243 -- which are common to all nodes, including entity nodes.
245 -- Is_Frozen Flag4
246 -- Has_Discriminants Flag5
247 -- Is_Dispatching_Operation Flag6
248 -- Is_Immediately_Visible Flag7
249 -- In_Use Flag8
250 -- Is_Potentially_Use_Visible Flag9
251 -- Is_Public Flag10
253 -- Is_Inlined Flag11
254 -- Is_Constrained Flag12
255 -- Is_Generic_Type Flag13
256 -- Depends_On_Private Flag14
257 -- Is_Aliased Flag15
258 -- Is_Volatile Flag16
259 -- Is_Internal Flag17
260 -- Has_Delayed_Freeze Flag18
261 -- Is_Abstract_Subprogram Flag19
262 -- Is_Concurrent_Record_Type Flag20
264 -- Has_Master_Entity Flag21
265 -- Needs_No_Actuals Flag22
266 -- Has_Storage_Size_Clause Flag23
267 -- Is_Imported Flag24
268 -- Is_Limited_Record Flag25
269 -- Has_Completion Flag26
270 -- Has_Pragma_Controlled Flag27
271 -- Is_Statically_Allocated Flag28
272 -- Has_Size_Clause Flag29
273 -- Has_Task Flag30
275 -- Checks_May_Be_Suppressed Flag31
276 -- Kill_Elaboration_Checks Flag32
277 -- Kill_Range_Checks Flag33
278 -- Kill_Tag_Checks Flag34
279 -- Is_Class_Wide_Equivalent_Type Flag35
280 -- Referenced_As_LHS Flag36
281 -- Is_Known_Non_Null Flag37
282 -- Can_Never_Be_Null Flag38
283 -- Is_Overriding_Operation Flag39
284 -- Body_Needed_For_SAL Flag40
286 -- Treat_As_Volatile Flag41
287 -- Is_Controlled Flag42
288 -- Has_Controlled_Component Flag43
289 -- Is_Pure Flag44
290 -- In_Private_Part Flag45
291 -- Has_Alignment_Clause Flag46
292 -- Has_Exit Flag47
293 -- In_Package_Body Flag48
294 -- Reachable Flag49
295 -- Delay_Subprogram_Descriptors Flag50
297 -- Is_Packed Flag51
298 -- Is_Entry_Formal Flag52
299 -- Is_Private_Descendant Flag53
300 -- Return_Present Flag54
301 -- Is_Tagged_Type Flag55
302 -- Has_Homonym Flag56
303 -- Is_Hidden Flag57
304 -- Non_Binary_Modulus Flag58
305 -- Is_Preelaborated Flag59
306 -- Is_Shared_Passive Flag60
308 -- Is_Remote_Types Flag61
309 -- Is_Remote_Call_Interface Flag62
310 -- Is_Character_Type Flag63
311 -- Is_Intrinsic_Subprogram Flag64
312 -- Has_Record_Rep_Clause Flag65
313 -- Has_Enumeration_Rep_Clause Flag66
314 -- Has_Small_Clause Flag67
315 -- Has_Component_Size_Clause Flag68
316 -- Is_Access_Constant Flag69
317 -- Is_First_Subtype Flag70
319 -- Has_Completion_In_Body Flag71
320 -- Has_Unknown_Discriminants Flag72
321 -- Is_Child_Unit Flag73
322 -- Is_CPP_Class Flag74
323 -- Has_Non_Standard_Rep Flag75
324 -- Is_Constructor Flag76
325 -- Static_Elaboration_Desired Flag77
326 -- Is_Tag Flag78
327 -- Has_All_Calls_Remote Flag79
328 -- Is_Constr_Subt_For_U_Nominal Flag80
330 -- Is_Asynchronous Flag81
331 -- Has_Gigi_Rep_Item Flag82
332 -- Has_Machine_Radix_Clause Flag83
333 -- Machine_Radix_10 Flag84
334 -- Is_Atomic Flag85
335 -- Has_Atomic_Components Flag86
336 -- Has_Volatile_Components Flag87
337 -- Discard_Names Flag88
338 -- Is_Interrupt_Handler Flag89
339 -- Returns_By_Ref Flag90
341 -- Is_Itype Flag91
342 -- Size_Known_At_Compile_Time Flag92
343 -- Has_Subprogram_Descriptor Flag93
344 -- Is_Generic_Actual_Type Flag94
345 -- Uses_Sec_Stack Flag95
346 -- Warnings_Off Flag96
347 -- Is_Controlling_Formal Flag97
348 -- Has_Controlling_Result Flag98
349 -- Is_Exported Flag99
350 -- Has_Specified_Layout Flag100
352 -- Has_Nested_Block_With_Handler Flag101
353 -- Is_Called Flag102
354 -- Is_Completely_Hidden Flag103
355 -- Address_Taken Flag104
356 -- Suppress_Init_Proc Flag105
357 -- Is_Limited_Composite Flag106
358 -- Is_Private_Composite Flag107
359 -- Default_Expressions_Processed Flag108
360 -- Is_Non_Static_Subtype Flag109
361 -- Has_External_Tag_Rep_Clause Flag110
363 -- Is_Formal_Subprogram Flag111
364 -- Is_Renaming_Of_Object Flag112
365 -- No_Return Flag113
366 -- Delay_Cleanups Flag114
367 -- Never_Set_In_Source Flag115
368 -- Is_Visible_Child_Unit Flag116
369 -- Is_Unchecked_Union Flag117
370 -- Is_For_Access_Subtype Flag118
371 -- Has_Convention_Pragma Flag119
372 -- Has_Primitive_Operations Flag120
374 -- Has_Pragma_Pack Flag121
375 -- Is_Bit_Packed_Array Flag122
376 -- Has_Unchecked_Union Flag123
377 -- Is_Eliminated Flag124
378 -- C_Pass_By_Copy Flag125
379 -- Is_Instantiated Flag126
380 -- Is_Valued_Procedure Flag127
381 -- (used for Component_Alignment) Flag128
382 -- (used for Component_Alignment) Flag129
383 -- Is_Generic_Instance Flag130
385 -- No_Pool_Assigned Flag131
386 -- Is_AST_Entry Flag132
387 -- Is_VMS_Exception Flag133
388 -- Is_Optional_Parameter Flag134
389 -- Has_Aliased_Components Flag135
390 -- No_Strict_Aliasing Flag136
391 -- Is_Machine_Code_Subprogram Flag137
392 -- Is_Packed_Array_Type Flag138
393 -- Has_Biased_Representation Flag139
394 -- Has_Complex_Representation Flag140
396 -- Is_Constr_Subt_For_UN_Aliased Flag141
397 -- Has_Missing_Return Flag142
398 -- Has_Recursive_Call Flag143
399 -- Is_Unsigned_Type Flag144
400 -- Strict_Alignment Flag145
401 -- Is_Abstract_Type Flag146
402 -- Needs_Debug_Info Flag147
403 -- Suppress_Elaboration_Warnings Flag148
404 -- Is_Compilation_Unit Flag149
405 -- Has_Pragma_Elaborate_Body Flag150
407 -- Vax_Float Flag151
408 -- Entry_Accepted Flag152
409 -- Is_Obsolescent Flag153
410 -- Has_Per_Object_Constraint Flag154
411 -- Has_Private_Declaration Flag155
412 -- Referenced Flag156
413 -- Has_Pragma_Inline Flag157
414 -- Finalize_Storage_Only Flag158
415 -- From_With_Type Flag159
416 -- Is_Package_Body_Entity Flag160
418 -- Has_Qualified_Name Flag161
419 -- Nonzero_Is_True Flag162
420 -- Is_True_Constant Flag163
421 -- Reverse_Bit_Order Flag164
422 -- Suppress_Style_Checks Flag165
423 -- Debug_Info_Off Flag166
424 -- Sec_Stack_Needed_For_Return Flag167
425 -- Materialize_Entity Flag168
426 -- Has_Pragma_Thread_Local_Storage Flag169
427 -- Is_Known_Valid Flag170
429 -- Is_Hidden_Open_Scope Flag171
430 -- Has_Object_Size_Clause Flag172
431 -- Has_Fully_Qualified_Name Flag173
432 -- Elaboration_Entity_Required Flag174
433 -- Has_Forward_Instantiation Flag175
434 -- Is_Discrim_SO_Function Flag176
435 -- Size_Depends_On_Discriminant Flag177
436 -- Is_Null_Init_Proc Flag178
437 -- Has_Pragma_Pure_Function Flag179
438 -- Has_Pragma_Unreferenced Flag180
440 -- Has_Contiguous_Rep Flag181
441 -- Has_Xref_Entry Flag182
442 -- Must_Be_On_Byte_Boundary Flag183
443 -- Has_Stream_Size_Clause Flag184
444 -- Is_Ada_2005_Only Flag185
445 -- Is_Interface Flag186
446 -- Has_Constrained_Partial_View Flag187
447 -- Has_Persistent_BSS Flag188
448 -- Is_Pure_Unit_Access_Type Flag189
449 -- Has_Specified_Stream_Input Flag190
451 -- Has_Specified_Stream_Output Flag191
452 -- Has_Specified_Stream_Read Flag192
453 -- Has_Specified_Stream_Write Flag193
454 -- Is_Local_Anonymous_Access Flag194
455 -- Is_Primitive_Wrapper Flag195
456 -- Was_Hidden Flag196
457 -- Is_Limited_Interface Flag197
459 -- Has_Anon_Block_Suffix Flag201
460 -- Itype_Printed Flag202
461 -- Has_Pragma_Pure Flag203
462 -- Is_Known_Null Flag204
463 -- Low_Bound_Tested Flag205
464 -- Is_Visible_Formal Flag206
465 -- Known_To_Have_Preelab_Init Flag207
466 -- Must_Have_Preelab_Init Flag208
467 -- Is_Return_Object Flag209
468 -- Elaborate_Body_Desirable Flag210
470 -- Has_Static_Discriminants Flag211
471 -- Has_Pragma_Unreferenced_Objects Flag212
472 -- Requires_Overriding Flag213
473 -- Has_RACW Flag214
474 -- Has_Up_Level_Access Flag215
475 -- Universal_Aliasing Flag216
476 -- Suppress_Value_Tracking_On_Call Flag217
477 -- Is_Primitive Flag218
478 -- Has_Initial_Value Flag219
479 -- Has_Dispatch_Table Flag220
481 -- Has_Pragma_Preelab_Init Flag221
482 -- Used_As_Generic_Actual Flag222
483 -- Is_Descendent_Of_Address Flag223
484 -- Is_Raised Flag224
485 -- Is_Thunk Flag225
486 -- Is_Only_Out_Parameter Flag226
487 -- Referenced_As_Out_Parameter Flag227
488 -- Has_Thunks Flag228
489 -- Can_Use_Internal_Rep Flag229
490 -- Has_Pragma_Inline_Always Flag230
492 -- Renamed_In_Spec Flag231
493 -- Implemented_By_Entry Flag232
494 -- Has_Pragma_Unmodified Flag233
495 -- Is_Dispatch_Table_Entity Flag234
496 -- Is_Trivial_Subprogram Flag235
497 -- Warnings_Off_Used Flag236
498 -- Warnings_Off_Used_Unmodified Flag237
499 -- Warnings_Off_Used_Unreferenced Flag238
500 -- OK_To_Reorder_Components Flag239
501 -- Has_Postconditions Flag240
503 -- Optimize_Alignment_Space Flag241
504 -- Optimize_Alignment_Time Flag242
505 -- Overlays_Constant Flag243
506 -- Is_RACW_Stub_Type Flag244
507 -- Is_Private_Primitive Flag245
508 -- Is_Underlying_Record_View Flag246
509 -- OK_To_Rename Flag247
511 -- (unused) Flag198
512 -- (unused) Flag199
513 -- (unused) Flag200
515 -----------------------
516 -- Local subprograms --
517 -----------------------
519 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
520 -- Returns the attribute definition clause for Id whose name is Rep_Name.
521 -- Returns Empty if no matching attribute definition clause found for Id.
523 ----------------
524 -- Rep_Clause --
525 ----------------
527 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
528 Ritem : Node_Id;
530 begin
531 Ritem := First_Rep_Item (Id);
532 while Present (Ritem) loop
533 if Nkind (Ritem) = N_Attribute_Definition_Clause
534 and then Chars (Ritem) = Rep_Name
535 then
536 return Ritem;
537 else
538 Ritem := Next_Rep_Item (Ritem);
539 end if;
540 end loop;
542 return Empty;
543 end Rep_Clause;
545 --------------------------------
546 -- Attribute Access Functions --
547 --------------------------------
549 function Accept_Address (Id : E) return L is
550 begin
551 return Elist21 (Id);
552 end Accept_Address;
554 function Access_Disp_Table (Id : E) return L is
555 begin
556 pragma Assert (Is_Tagged_Type (Id));
557 return Elist16 (Implementation_Base_Type (Id));
558 end Access_Disp_Table;
560 function Actual_Subtype (Id : E) return E is
561 begin
562 pragma Assert
563 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
564 or else Is_Formal (Id));
565 return Node17 (Id);
566 end Actual_Subtype;
568 function Address_Taken (Id : E) return B is
569 begin
570 return Flag104 (Id);
571 end Address_Taken;
573 function Aft_Value (Id : E) return U is
574 Result : Nat := 1;
575 Delta_Val : Ureal := Delta_Value (Id);
576 begin
577 while Delta_Val < Ureal_Tenth loop
578 Delta_Val := Delta_Val * Ureal_10;
579 Result := Result + 1;
580 end loop;
582 return UI_From_Int (Result);
583 end Aft_Value;
585 function Alias (Id : E) return E is
586 begin
587 pragma Assert
588 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
589 return Node18 (Id);
590 end Alias;
592 function Alignment (Id : E) return U is
593 begin
594 pragma Assert (Is_Type (Id)
595 or else Is_Formal (Id)
596 or else Ekind_In (Id, E_Loop_Parameter,
597 E_Constant,
598 E_Exception,
599 E_Variable));
600 return Uint14 (Id);
601 end Alignment;
603 function Associated_Final_Chain (Id : E) return E is
604 begin
605 pragma Assert (Is_Access_Type (Id));
606 return Node23 (Id);
607 end Associated_Final_Chain;
609 function Associated_Formal_Package (Id : E) return E is
610 begin
611 pragma Assert (Ekind (Id) = E_Package);
612 return Node12 (Id);
613 end Associated_Formal_Package;
615 function Associated_Node_For_Itype (Id : E) return N is
616 begin
617 return Node8 (Id);
618 end Associated_Node_For_Itype;
620 function Associated_Storage_Pool (Id : E) return E is
621 begin
622 pragma Assert (Is_Access_Type (Id));
623 return Node22 (Root_Type (Id));
624 end Associated_Storage_Pool;
626 function Barrier_Function (Id : E) return N is
627 begin
628 pragma Assert (Is_Entry (Id));
629 return Node12 (Id);
630 end Barrier_Function;
632 function Block_Node (Id : E) return N is
633 begin
634 pragma Assert (Ekind (Id) = E_Block);
635 return Node11 (Id);
636 end Block_Node;
638 function Body_Entity (Id : E) return E is
639 begin
640 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
641 return Node19 (Id);
642 end Body_Entity;
644 function Body_Needed_For_SAL (Id : E) return B is
645 begin
646 pragma Assert
647 (Ekind (Id) = E_Package
648 or else Is_Subprogram (Id)
649 or else Is_Generic_Unit (Id));
650 return Flag40 (Id);
651 end Body_Needed_For_SAL;
653 function C_Pass_By_Copy (Id : E) return B is
654 begin
655 pragma Assert (Is_Record_Type (Id));
656 return Flag125 (Implementation_Base_Type (Id));
657 end C_Pass_By_Copy;
659 function Can_Never_Be_Null (Id : E) return B is
660 begin
661 return Flag38 (Id);
662 end Can_Never_Be_Null;
664 function Checks_May_Be_Suppressed (Id : E) return B is
665 begin
666 return Flag31 (Id);
667 end Checks_May_Be_Suppressed;
669 function Class_Wide_Type (Id : E) return E is
670 begin
671 pragma Assert (Is_Type (Id));
672 return Node9 (Id);
673 end Class_Wide_Type;
675 function Cloned_Subtype (Id : E) return E is
676 begin
677 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
678 return Node16 (Id);
679 end Cloned_Subtype;
681 function Component_Bit_Offset (Id : E) return U is
682 begin
683 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
684 return Uint11 (Id);
685 end Component_Bit_Offset;
687 function Component_Clause (Id : E) return N is
688 begin
689 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
690 return Node13 (Id);
691 end Component_Clause;
693 function Component_Size (Id : E) return U is
694 begin
695 pragma Assert (Is_Array_Type (Id));
696 return Uint22 (Implementation_Base_Type (Id));
697 end Component_Size;
699 function Component_Type (Id : E) return E is
700 begin
701 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
702 return Node20 (Implementation_Base_Type (Id));
703 end Component_Type;
705 function Corresponding_Concurrent_Type (Id : E) return E is
706 begin
707 pragma Assert (Ekind (Id) = E_Record_Type);
708 return Node18 (Id);
709 end Corresponding_Concurrent_Type;
711 function Corresponding_Discriminant (Id : E) return E is
712 begin
713 pragma Assert (Ekind (Id) = E_Discriminant);
714 return Node19 (Id);
715 end Corresponding_Discriminant;
717 function Corresponding_Equality (Id : E) return E is
718 begin
719 pragma Assert
720 (Ekind (Id) = E_Function
721 and then not Comes_From_Source (Id)
722 and then Chars (Id) = Name_Op_Ne);
723 return Node13 (Id);
724 end Corresponding_Equality;
726 function Corresponding_Record_Type (Id : E) return E is
727 begin
728 pragma Assert (Is_Concurrent_Type (Id));
729 return Node18 (Id);
730 end Corresponding_Record_Type;
732 function Corresponding_Remote_Type (Id : E) return E is
733 begin
734 return Node22 (Id);
735 end Corresponding_Remote_Type;
737 function Current_Use_Clause (Id : E) return E is
738 begin
739 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
740 return Node27 (Id);
741 end Current_Use_Clause;
743 function Current_Value (Id : E) return N is
744 begin
745 pragma Assert (Ekind (Id) in Object_Kind);
746 return Node9 (Id);
747 end Current_Value;
749 function CR_Discriminant (Id : E) return E is
750 begin
751 return Node23 (Id);
752 end CR_Discriminant;
754 function Debug_Info_Off (Id : E) return B is
755 begin
756 return Flag166 (Id);
757 end Debug_Info_Off;
759 function Debug_Renaming_Link (Id : E) return E is
760 begin
761 return Node25 (Id);
762 end Debug_Renaming_Link;
764 function Default_Expr_Function (Id : E) return E is
765 begin
766 pragma Assert (Is_Formal (Id));
767 return Node21 (Id);
768 end Default_Expr_Function;
770 function Default_Expressions_Processed (Id : E) return B is
771 begin
772 return Flag108 (Id);
773 end Default_Expressions_Processed;
775 function Default_Value (Id : E) return N is
776 begin
777 pragma Assert (Is_Formal (Id));
778 return Node20 (Id);
779 end Default_Value;
781 function Delay_Cleanups (Id : E) return B is
782 begin
783 return Flag114 (Id);
784 end Delay_Cleanups;
786 function Delay_Subprogram_Descriptors (Id : E) return B is
787 begin
788 return Flag50 (Id);
789 end Delay_Subprogram_Descriptors;
791 function Delta_Value (Id : E) return R is
792 begin
793 pragma Assert (Is_Fixed_Point_Type (Id));
794 return Ureal18 (Id);
795 end Delta_Value;
797 function Dependent_Instances (Id : E) return L is
798 begin
799 pragma Assert (Is_Generic_Instance (Id));
800 return Elist8 (Id);
801 end Dependent_Instances;
803 function Depends_On_Private (Id : E) return B is
804 begin
805 pragma Assert (Nkind (Id) in N_Entity);
806 return Flag14 (Id);
807 end Depends_On_Private;
809 function Digits_Value (Id : E) return U is
810 begin
811 pragma Assert
812 (Is_Floating_Point_Type (Id)
813 or else Is_Decimal_Fixed_Point_Type (Id));
814 return Uint17 (Id);
815 end Digits_Value;
817 function Directly_Designated_Type (Id : E) return E is
818 begin
819 pragma Assert (Is_Access_Type (Id));
820 return Node20 (Id);
821 end Directly_Designated_Type;
823 function Discard_Names (Id : E) return B is
824 begin
825 return Flag88 (Id);
826 end Discard_Names;
828 function Discriminal (Id : E) return E is
829 begin
830 pragma Assert (Ekind (Id) = E_Discriminant);
831 return Node17 (Id);
832 end Discriminal;
834 function Discriminal_Link (Id : E) return N is
835 begin
836 return Node10 (Id);
837 end Discriminal_Link;
839 function Discriminant_Checking_Func (Id : E) return E is
840 begin
841 pragma Assert (Ekind (Id) = E_Component);
842 return Node20 (Id);
843 end Discriminant_Checking_Func;
845 function Discriminant_Constraint (Id : E) return L is
846 begin
847 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
848 return Elist21 (Id);
849 end Discriminant_Constraint;
851 function Discriminant_Default_Value (Id : E) return N is
852 begin
853 pragma Assert (Ekind (Id) = E_Discriminant);
854 return Node20 (Id);
855 end Discriminant_Default_Value;
857 function Discriminant_Number (Id : E) return U is
858 begin
859 pragma Assert (Ekind (Id) = E_Discriminant);
860 return Uint15 (Id);
861 end Discriminant_Number;
863 function Dispatch_Table_Wrappers (Id : E) return L is
864 begin
865 pragma Assert (Is_Tagged_Type (Id));
866 return Elist26 (Implementation_Base_Type (Id));
867 end Dispatch_Table_Wrappers;
869 function DT_Entry_Count (Id : E) return U is
870 begin
871 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
872 return Uint15 (Id);
873 end DT_Entry_Count;
875 function DT_Offset_To_Top_Func (Id : E) return E is
876 begin
877 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
878 return Node25 (Id);
879 end DT_Offset_To_Top_Func;
881 function DT_Position (Id : E) return U is
882 begin
883 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
884 and then Present (DTC_Entity (Id)));
885 return Uint15 (Id);
886 end DT_Position;
888 function DTC_Entity (Id : E) return E is
889 begin
890 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
891 return Node16 (Id);
892 end DTC_Entity;
894 function Elaborate_Body_Desirable (Id : E) return B is
895 begin
896 pragma Assert (Ekind (Id) = E_Package);
897 return Flag210 (Id);
898 end Elaborate_Body_Desirable;
900 function Elaboration_Entity (Id : E) return E is
901 begin
902 pragma Assert
903 (Is_Subprogram (Id)
904 or else
905 Ekind (Id) = E_Package
906 or else
907 Is_Generic_Unit (Id));
908 return Node13 (Id);
909 end Elaboration_Entity;
911 function Elaboration_Entity_Required (Id : E) return B is
912 begin
913 pragma Assert
914 (Is_Subprogram (Id)
915 or else
916 Ekind (Id) = E_Package
917 or else
918 Is_Generic_Unit (Id));
919 return Flag174 (Id);
920 end Elaboration_Entity_Required;
922 function Enclosing_Scope (Id : E) return E is
923 begin
924 return Node18 (Id);
925 end Enclosing_Scope;
927 function Entry_Accepted (Id : E) return B is
928 begin
929 pragma Assert (Is_Entry (Id));
930 return Flag152 (Id);
931 end Entry_Accepted;
933 function Entry_Bodies_Array (Id : E) return E is
934 begin
935 return Node15 (Id);
936 end Entry_Bodies_Array;
938 function Entry_Cancel_Parameter (Id : E) return E is
939 begin
940 return Node23 (Id);
941 end Entry_Cancel_Parameter;
943 function Entry_Component (Id : E) return E is
944 begin
945 return Node11 (Id);
946 end Entry_Component;
948 function Entry_Formal (Id : E) return E is
949 begin
950 return Node16 (Id);
951 end Entry_Formal;
953 function Entry_Index_Constant (Id : E) return N is
954 begin
955 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
956 return Node18 (Id);
957 end Entry_Index_Constant;
959 function Entry_Parameters_Type (Id : E) return E is
960 begin
961 return Node15 (Id);
962 end Entry_Parameters_Type;
964 function Enum_Pos_To_Rep (Id : E) return E is
965 begin
966 pragma Assert (Ekind (Id) = E_Enumeration_Type);
967 return Node23 (Id);
968 end Enum_Pos_To_Rep;
970 function Enumeration_Pos (Id : E) return Uint is
971 begin
972 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
973 return Uint11 (Id);
974 end Enumeration_Pos;
976 function Enumeration_Rep (Id : E) return U is
977 begin
978 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
979 return Uint12 (Id);
980 end Enumeration_Rep;
982 function Enumeration_Rep_Expr (Id : E) return N is
983 begin
984 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
985 return Node22 (Id);
986 end Enumeration_Rep_Expr;
988 function Equivalent_Type (Id : E) return E is
989 begin
990 pragma Assert
991 (Ekind_In (Id, E_Class_Wide_Type,
992 E_Class_Wide_Subtype,
993 E_Access_Protected_Subprogram_Type,
994 E_Anonymous_Access_Protected_Subprogram_Type,
995 E_Access_Subprogram_Type,
996 E_Exception_Type));
997 return Node18 (Id);
998 end Equivalent_Type;
1000 function Esize (Id : E) return Uint is
1001 begin
1002 return Uint12 (Id);
1003 end Esize;
1005 function Exception_Code (Id : E) return Uint is
1006 begin
1007 pragma Assert (Ekind (Id) = E_Exception);
1008 return Uint22 (Id);
1009 end Exception_Code;
1011 function Extra_Accessibility (Id : E) return E is
1012 begin
1013 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1014 return Node13 (Id);
1015 end Extra_Accessibility;
1017 function Extra_Constrained (Id : E) return E is
1018 begin
1019 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1020 return Node23 (Id);
1021 end Extra_Constrained;
1023 function Extra_Formal (Id : E) return E is
1024 begin
1025 return Node15 (Id);
1026 end Extra_Formal;
1028 function Extra_Formals (Id : E) return E is
1029 begin
1030 pragma Assert
1031 (Is_Overloadable (Id)
1032 or else Ekind_In (Id, E_Entry_Family,
1033 E_Subprogram_Body,
1034 E_Subprogram_Type));
1035 return Node28 (Id);
1036 end Extra_Formals;
1038 function Can_Use_Internal_Rep (Id : E) return B is
1039 begin
1040 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1041 return Flag229 (Base_Type (Id));
1042 end Can_Use_Internal_Rep;
1044 function Finalization_Chain_Entity (Id : E) return E is
1045 begin
1046 return Node19 (Id);
1047 end Finalization_Chain_Entity;
1049 function Finalize_Storage_Only (Id : E) return B is
1050 begin
1051 pragma Assert (Is_Type (Id));
1052 return Flag158 (Base_Type (Id));
1053 end Finalize_Storage_Only;
1055 function First_Entity (Id : E) return E is
1056 begin
1057 return Node17 (Id);
1058 end First_Entity;
1060 function First_Exit_Statement (Id : E) return N is
1061 begin
1062 pragma Assert (Ekind (Id) = E_Loop);
1063 return Node8 (Id);
1064 end First_Exit_Statement;
1066 function First_Index (Id : E) return N is
1067 begin
1068 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1069 return Node17 (Id);
1070 end First_Index;
1072 function First_Literal (Id : E) return E is
1073 begin
1074 pragma Assert (Is_Enumeration_Type (Id));
1075 return Node17 (Id);
1076 end First_Literal;
1078 function First_Optional_Parameter (Id : E) return E is
1079 begin
1080 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1081 return Node14 (Id);
1082 end First_Optional_Parameter;
1084 function First_Private_Entity (Id : E) return E is
1085 begin
1086 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1087 or else Ekind (Id) in Concurrent_Kind);
1088 return Node16 (Id);
1089 end First_Private_Entity;
1091 function First_Rep_Item (Id : E) return E is
1092 begin
1093 return Node6 (Id);
1094 end First_Rep_Item;
1096 function Freeze_Node (Id : E) return N is
1097 begin
1098 return Node7 (Id);
1099 end Freeze_Node;
1101 function From_With_Type (Id : E) return B is
1102 begin
1103 return Flag159 (Id);
1104 end From_With_Type;
1106 function Full_View (Id : E) return E is
1107 begin
1108 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1109 return Node11 (Id);
1110 end Full_View;
1112 function Generic_Homonym (Id : E) return E is
1113 begin
1114 pragma Assert (Ekind (Id) = E_Generic_Package);
1115 return Node11 (Id);
1116 end Generic_Homonym;
1118 function Generic_Renamings (Id : E) return L is
1119 begin
1120 return Elist23 (Id);
1121 end Generic_Renamings;
1123 function Handler_Records (Id : E) return S is
1124 begin
1125 return List10 (Id);
1126 end Handler_Records;
1128 function Has_Aliased_Components (Id : E) return B is
1129 begin
1130 return Flag135 (Implementation_Base_Type (Id));
1131 end Has_Aliased_Components;
1133 function Has_Alignment_Clause (Id : E) return B is
1134 begin
1135 return Flag46 (Id);
1136 end Has_Alignment_Clause;
1138 function Has_All_Calls_Remote (Id : E) return B is
1139 begin
1140 return Flag79 (Id);
1141 end Has_All_Calls_Remote;
1143 function Has_Anon_Block_Suffix (Id : E) return B is
1144 begin
1145 return Flag201 (Id);
1146 end Has_Anon_Block_Suffix;
1148 function Has_Atomic_Components (Id : E) return B is
1149 begin
1150 return Flag86 (Implementation_Base_Type (Id));
1151 end Has_Atomic_Components;
1153 function Has_Biased_Representation (Id : E) return B is
1154 begin
1155 return Flag139 (Id);
1156 end Has_Biased_Representation;
1158 function Has_Completion (Id : E) return B is
1159 begin
1160 return Flag26 (Id);
1161 end Has_Completion;
1163 function Has_Completion_In_Body (Id : E) return B is
1164 begin
1165 pragma Assert (Is_Type (Id));
1166 return Flag71 (Id);
1167 end Has_Completion_In_Body;
1169 function Has_Complex_Representation (Id : E) return B is
1170 begin
1171 pragma Assert (Is_Type (Id));
1172 return Flag140 (Implementation_Base_Type (Id));
1173 end Has_Complex_Representation;
1175 function Has_Component_Size_Clause (Id : E) return B is
1176 begin
1177 pragma Assert (Is_Array_Type (Id));
1178 return Flag68 (Implementation_Base_Type (Id));
1179 end Has_Component_Size_Clause;
1181 function Has_Constrained_Partial_View (Id : E) return B is
1182 begin
1183 pragma Assert (Is_Type (Id));
1184 return Flag187 (Id);
1185 end Has_Constrained_Partial_View;
1187 function Has_Controlled_Component (Id : E) return B is
1188 begin
1189 return Flag43 (Base_Type (Id));
1190 end Has_Controlled_Component;
1192 function Has_Contiguous_Rep (Id : E) return B is
1193 begin
1194 return Flag181 (Id);
1195 end Has_Contiguous_Rep;
1197 function Has_Controlling_Result (Id : E) return B is
1198 begin
1199 return Flag98 (Id);
1200 end Has_Controlling_Result;
1202 function Has_Convention_Pragma (Id : E) return B is
1203 begin
1204 return Flag119 (Id);
1205 end Has_Convention_Pragma;
1207 function Has_Delayed_Freeze (Id : E) return B is
1208 begin
1209 pragma Assert (Nkind (Id) in N_Entity);
1210 return Flag18 (Id);
1211 end Has_Delayed_Freeze;
1213 function Has_Discriminants (Id : E) return B is
1214 begin
1215 pragma Assert (Nkind (Id) in N_Entity);
1216 return Flag5 (Id);
1217 end Has_Discriminants;
1219 function Has_Dispatch_Table (Id : E) return B is
1220 begin
1221 pragma Assert (Is_Tagged_Type (Id));
1222 return Flag220 (Id);
1223 end Has_Dispatch_Table;
1225 function Has_Enumeration_Rep_Clause (Id : E) return B is
1226 begin
1227 pragma Assert (Is_Enumeration_Type (Id));
1228 return Flag66 (Id);
1229 end Has_Enumeration_Rep_Clause;
1231 function Has_Exit (Id : E) return B is
1232 begin
1233 return Flag47 (Id);
1234 end Has_Exit;
1236 function Has_External_Tag_Rep_Clause (Id : E) return B is
1237 begin
1238 pragma Assert (Is_Tagged_Type (Id));
1239 return Flag110 (Id);
1240 end Has_External_Tag_Rep_Clause;
1242 function Has_Forward_Instantiation (Id : E) return B is
1243 begin
1244 return Flag175 (Id);
1245 end Has_Forward_Instantiation;
1247 function Has_Fully_Qualified_Name (Id : E) return B is
1248 begin
1249 return Flag173 (Id);
1250 end Has_Fully_Qualified_Name;
1252 function Has_Gigi_Rep_Item (Id : E) return B is
1253 begin
1254 return Flag82 (Id);
1255 end Has_Gigi_Rep_Item;
1257 function Has_Homonym (Id : E) return B is
1258 begin
1259 return Flag56 (Id);
1260 end Has_Homonym;
1262 function Has_Initial_Value (Id : E) return B is
1263 begin
1264 pragma Assert
1265 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1266 return Flag219 (Id);
1267 end Has_Initial_Value;
1269 function Has_Machine_Radix_Clause (Id : E) return B is
1270 begin
1271 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1272 return Flag83 (Id);
1273 end Has_Machine_Radix_Clause;
1275 function Has_Master_Entity (Id : E) return B is
1276 begin
1277 return Flag21 (Id);
1278 end Has_Master_Entity;
1280 function Has_Missing_Return (Id : E) return B is
1281 begin
1282 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1283 return Flag142 (Id);
1284 end Has_Missing_Return;
1286 function Has_Nested_Block_With_Handler (Id : E) return B is
1287 begin
1288 return Flag101 (Id);
1289 end Has_Nested_Block_With_Handler;
1291 function Has_Non_Standard_Rep (Id : E) return B is
1292 begin
1293 return Flag75 (Implementation_Base_Type (Id));
1294 end Has_Non_Standard_Rep;
1296 function Has_Object_Size_Clause (Id : E) return B is
1297 begin
1298 pragma Assert (Is_Type (Id));
1299 return Flag172 (Id);
1300 end Has_Object_Size_Clause;
1302 function Has_Per_Object_Constraint (Id : E) return B is
1303 begin
1304 return Flag154 (Id);
1305 end Has_Per_Object_Constraint;
1307 function Has_Persistent_BSS (Id : E) return B is
1308 begin
1309 return Flag188 (Id);
1310 end Has_Persistent_BSS;
1312 function Has_Postconditions (Id : E) return B is
1313 begin
1314 pragma Assert (Is_Subprogram (Id));
1315 return Flag240 (Id);
1316 end Has_Postconditions;
1318 function Has_Pragma_Controlled (Id : E) return B is
1319 begin
1320 pragma Assert (Is_Access_Type (Id));
1321 return Flag27 (Implementation_Base_Type (Id));
1322 end Has_Pragma_Controlled;
1324 function Has_Pragma_Elaborate_Body (Id : E) return B is
1325 begin
1326 return Flag150 (Id);
1327 end Has_Pragma_Elaborate_Body;
1329 function Has_Pragma_Inline (Id : E) return B is
1330 begin
1331 return Flag157 (Id);
1332 end Has_Pragma_Inline;
1334 function Has_Pragma_Inline_Always (Id : E) return B is
1335 begin
1336 return Flag230 (Id);
1337 end Has_Pragma_Inline_Always;
1339 function Has_Pragma_Pack (Id : E) return B is
1340 begin
1341 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1342 return Flag121 (Implementation_Base_Type (Id));
1343 end Has_Pragma_Pack;
1345 function Has_Pragma_Preelab_Init (Id : E) return B is
1346 begin
1347 return Flag221 (Id);
1348 end Has_Pragma_Preelab_Init;
1350 function Has_Pragma_Pure (Id : E) return B is
1351 begin
1352 return Flag203 (Id);
1353 end Has_Pragma_Pure;
1355 function Has_Pragma_Pure_Function (Id : E) return B is
1356 begin
1357 return Flag179 (Id);
1358 end Has_Pragma_Pure_Function;
1360 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1361 begin
1362 return Flag169 (Id);
1363 end Has_Pragma_Thread_Local_Storage;
1365 function Has_Pragma_Unmodified (Id : E) return B is
1366 begin
1367 return Flag233 (Id);
1368 end Has_Pragma_Unmodified;
1370 function Has_Pragma_Unreferenced (Id : E) return B is
1371 begin
1372 return Flag180 (Id);
1373 end Has_Pragma_Unreferenced;
1375 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1376 begin
1377 pragma Assert (Is_Type (Id));
1378 return Flag212 (Id);
1379 end Has_Pragma_Unreferenced_Objects;
1381 function Has_Primitive_Operations (Id : E) return B is
1382 begin
1383 pragma Assert (Is_Type (Id));
1384 return Flag120 (Base_Type (Id));
1385 end Has_Primitive_Operations;
1387 function Has_Private_Declaration (Id : E) return B is
1388 begin
1389 return Flag155 (Id);
1390 end Has_Private_Declaration;
1392 function Has_Qualified_Name (Id : E) return B is
1393 begin
1394 return Flag161 (Id);
1395 end Has_Qualified_Name;
1397 function Has_RACW (Id : E) return B is
1398 begin
1399 pragma Assert (Ekind (Id) = E_Package);
1400 return Flag214 (Id);
1401 end Has_RACW;
1403 function Has_Record_Rep_Clause (Id : E) return B is
1404 begin
1405 pragma Assert (Is_Record_Type (Id));
1406 return Flag65 (Implementation_Base_Type (Id));
1407 end Has_Record_Rep_Clause;
1409 function Has_Recursive_Call (Id : E) return B is
1410 begin
1411 pragma Assert (Is_Subprogram (Id));
1412 return Flag143 (Id);
1413 end Has_Recursive_Call;
1415 function Has_Size_Clause (Id : E) return B is
1416 begin
1417 return Flag29 (Id);
1418 end Has_Size_Clause;
1420 function Has_Small_Clause (Id : E) return B is
1421 begin
1422 return Flag67 (Id);
1423 end Has_Small_Clause;
1425 function Has_Specified_Layout (Id : E) return B is
1426 begin
1427 pragma Assert (Is_Type (Id));
1428 return Flag100 (Implementation_Base_Type (Id));
1429 end Has_Specified_Layout;
1431 function Has_Specified_Stream_Input (Id : E) return B is
1432 begin
1433 pragma Assert (Is_Type (Id));
1434 return Flag190 (Id);
1435 end Has_Specified_Stream_Input;
1437 function Has_Specified_Stream_Output (Id : E) return B is
1438 begin
1439 pragma Assert (Is_Type (Id));
1440 return Flag191 (Id);
1441 end Has_Specified_Stream_Output;
1443 function Has_Specified_Stream_Read (Id : E) return B is
1444 begin
1445 pragma Assert (Is_Type (Id));
1446 return Flag192 (Id);
1447 end Has_Specified_Stream_Read;
1449 function Has_Specified_Stream_Write (Id : E) return B is
1450 begin
1451 pragma Assert (Is_Type (Id));
1452 return Flag193 (Id);
1453 end Has_Specified_Stream_Write;
1455 function Has_Static_Discriminants (Id : E) return B is
1456 begin
1457 pragma Assert (Is_Type (Id));
1458 return Flag211 (Id);
1459 end Has_Static_Discriminants;
1461 function Has_Storage_Size_Clause (Id : E) return B is
1462 begin
1463 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1464 return Flag23 (Implementation_Base_Type (Id));
1465 end Has_Storage_Size_Clause;
1467 function Has_Stream_Size_Clause (Id : E) return B is
1468 begin
1469 return Flag184 (Id);
1470 end Has_Stream_Size_Clause;
1472 function Has_Subprogram_Descriptor (Id : E) return B is
1473 begin
1474 return Flag93 (Id);
1475 end Has_Subprogram_Descriptor;
1477 function Has_Task (Id : E) return B is
1478 begin
1479 return Flag30 (Base_Type (Id));
1480 end Has_Task;
1482 function Has_Thunks (Id : E) return B is
1483 begin
1484 pragma Assert (Ekind (Id) = E_Constant);
1485 return Flag228 (Id);
1486 end Has_Thunks;
1488 function Has_Unchecked_Union (Id : E) return B is
1489 begin
1490 return Flag123 (Base_Type (Id));
1491 end Has_Unchecked_Union;
1493 function Has_Unknown_Discriminants (Id : E) return B is
1494 begin
1495 pragma Assert (Is_Type (Id));
1496 return Flag72 (Id);
1497 end Has_Unknown_Discriminants;
1499 function Has_Up_Level_Access (Id : E) return B is
1500 begin
1501 pragma Assert
1502 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1503 return Flag215 (Id);
1504 end Has_Up_Level_Access;
1506 function Has_Volatile_Components (Id : E) return B is
1507 begin
1508 return Flag87 (Implementation_Base_Type (Id));
1509 end Has_Volatile_Components;
1511 function Has_Xref_Entry (Id : E) return B is
1512 begin
1513 return Flag182 (Implementation_Base_Type (Id));
1514 end Has_Xref_Entry;
1516 function Hiding_Loop_Variable (Id : E) return E is
1517 begin
1518 pragma Assert (Ekind (Id) = E_Variable);
1519 return Node8 (Id);
1520 end Hiding_Loop_Variable;
1522 function Homonym (Id : E) return E is
1523 begin
1524 return Node4 (Id);
1525 end Homonym;
1527 function Implemented_By_Entry (Id : E) return B is
1528 begin
1529 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1530 return Flag232 (Id);
1531 end Implemented_By_Entry;
1533 function Interfaces (Id : E) return L is
1534 begin
1535 pragma Assert (Is_Record_Type (Id));
1536 return Elist25 (Id);
1537 end Interfaces;
1539 function Interface_Alias (Id : E) return E is
1540 begin
1541 pragma Assert (Is_Subprogram (Id));
1542 return Node25 (Id);
1543 end Interface_Alias;
1545 function In_Package_Body (Id : E) return B is
1546 begin
1547 return Flag48 (Id);
1548 end In_Package_Body;
1550 function In_Private_Part (Id : E) return B is
1551 begin
1552 return Flag45 (Id);
1553 end In_Private_Part;
1555 function In_Use (Id : E) return B is
1556 begin
1557 pragma Assert (Nkind (Id) in N_Entity);
1558 return Flag8 (Id);
1559 end In_Use;
1561 function Inner_Instances (Id : E) return L is
1562 begin
1563 return Elist23 (Id);
1564 end Inner_Instances;
1566 function Interface_Name (Id : E) return N is
1567 begin
1568 return Node21 (Id);
1569 end Interface_Name;
1571 function Is_Abstract_Subprogram (Id : E) return B is
1572 begin
1573 pragma Assert (Is_Overloadable (Id));
1574 return Flag19 (Id);
1575 end Is_Abstract_Subprogram;
1577 function Is_Abstract_Type (Id : E) return B is
1578 begin
1579 pragma Assert (Is_Type (Id));
1580 return Flag146 (Id);
1581 end Is_Abstract_Type;
1583 function Is_Local_Anonymous_Access (Id : E) return B is
1584 begin
1585 pragma Assert (Is_Access_Type (Id));
1586 return Flag194 (Id);
1587 end Is_Local_Anonymous_Access;
1589 function Is_Access_Constant (Id : E) return B is
1590 begin
1591 pragma Assert (Is_Access_Type (Id));
1592 return Flag69 (Id);
1593 end Is_Access_Constant;
1595 function Is_Ada_2005_Only (Id : E) return B is
1596 begin
1597 return Flag185 (Id);
1598 end Is_Ada_2005_Only;
1600 function Is_Aliased (Id : E) return B is
1601 begin
1602 pragma Assert (Nkind (Id) in N_Entity);
1603 return Flag15 (Id);
1604 end Is_Aliased;
1606 function Is_AST_Entry (Id : E) return B is
1607 begin
1608 pragma Assert (Is_Entry (Id));
1609 return Flag132 (Id);
1610 end Is_AST_Entry;
1612 function Is_Asynchronous (Id : E) return B is
1613 begin
1614 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1615 return Flag81 (Id);
1616 end Is_Asynchronous;
1618 function Is_Atomic (Id : E) return B is
1619 begin
1620 return Flag85 (Id);
1621 end Is_Atomic;
1623 function Is_Bit_Packed_Array (Id : E) return B is
1624 begin
1625 return Flag122 (Implementation_Base_Type (Id));
1626 end Is_Bit_Packed_Array;
1628 function Is_Called (Id : E) return B is
1629 begin
1630 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1631 return Flag102 (Id);
1632 end Is_Called;
1634 function Is_Character_Type (Id : E) return B is
1635 begin
1636 return Flag63 (Id);
1637 end Is_Character_Type;
1639 function Is_Child_Unit (Id : E) return B is
1640 begin
1641 return Flag73 (Id);
1642 end Is_Child_Unit;
1644 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1645 begin
1646 return Flag35 (Id);
1647 end Is_Class_Wide_Equivalent_Type;
1649 function Is_Compilation_Unit (Id : E) return B is
1650 begin
1651 return Flag149 (Id);
1652 end Is_Compilation_Unit;
1654 function Is_Completely_Hidden (Id : E) return B is
1655 begin
1656 pragma Assert (Ekind (Id) = E_Discriminant);
1657 return Flag103 (Id);
1658 end Is_Completely_Hidden;
1660 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1661 begin
1662 return Flag80 (Id);
1663 end Is_Constr_Subt_For_U_Nominal;
1665 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1666 begin
1667 return Flag141 (Id);
1668 end Is_Constr_Subt_For_UN_Aliased;
1670 function Is_Constrained (Id : E) return B is
1671 begin
1672 pragma Assert (Nkind (Id) in N_Entity);
1673 return Flag12 (Id);
1674 end Is_Constrained;
1676 function Is_Constructor (Id : E) return B is
1677 begin
1678 return Flag76 (Id);
1679 end Is_Constructor;
1681 function Is_Controlled (Id : E) return B is
1682 begin
1683 return Flag42 (Base_Type (Id));
1684 end Is_Controlled;
1686 function Is_Controlling_Formal (Id : E) return B is
1687 begin
1688 pragma Assert (Is_Formal (Id));
1689 return Flag97 (Id);
1690 end Is_Controlling_Formal;
1692 function Is_CPP_Class (Id : E) return B is
1693 begin
1694 return Flag74 (Id);
1695 end Is_CPP_Class;
1697 function Is_Descendent_Of_Address (Id : E) return B is
1698 begin
1699 pragma Assert (Is_Type (Id));
1700 return Flag223 (Id);
1701 end Is_Descendent_Of_Address;
1703 function Is_Discrim_SO_Function (Id : E) return B is
1704 begin
1705 return Flag176 (Id);
1706 end Is_Discrim_SO_Function;
1708 function Is_Dispatch_Table_Entity (Id : E) return B is
1709 begin
1710 return Flag234 (Id);
1711 end Is_Dispatch_Table_Entity;
1713 function Is_Dispatching_Operation (Id : E) return B is
1714 begin
1715 pragma Assert (Nkind (Id) in N_Entity);
1716 return Flag6 (Id);
1717 end Is_Dispatching_Operation;
1719 function Is_Eliminated (Id : E) return B is
1720 begin
1721 return Flag124 (Id);
1722 end Is_Eliminated;
1724 function Is_Entry_Formal (Id : E) return B is
1725 begin
1726 return Flag52 (Id);
1727 end Is_Entry_Formal;
1729 function Is_Exported (Id : E) return B is
1730 begin
1731 return Flag99 (Id);
1732 end Is_Exported;
1734 function Is_First_Subtype (Id : E) return B is
1735 begin
1736 return Flag70 (Id);
1737 end Is_First_Subtype;
1739 function Is_For_Access_Subtype (Id : E) return B is
1740 begin
1741 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1742 return Flag118 (Id);
1743 end Is_For_Access_Subtype;
1745 function Is_Formal_Subprogram (Id : E) return B is
1746 begin
1747 return Flag111 (Id);
1748 end Is_Formal_Subprogram;
1750 function Is_Frozen (Id : E) return B is
1751 begin
1752 return Flag4 (Id);
1753 end Is_Frozen;
1755 function Is_Generic_Actual_Type (Id : E) return B is
1756 begin
1757 pragma Assert (Is_Type (Id));
1758 return Flag94 (Id);
1759 end Is_Generic_Actual_Type;
1761 function Is_Generic_Instance (Id : E) return B is
1762 begin
1763 return Flag130 (Id);
1764 end Is_Generic_Instance;
1766 function Is_Generic_Type (Id : E) return B is
1767 begin
1768 pragma Assert (Nkind (Id) in N_Entity);
1769 return Flag13 (Id);
1770 end Is_Generic_Type;
1772 function Is_Hidden (Id : E) return B is
1773 begin
1774 return Flag57 (Id);
1775 end Is_Hidden;
1777 function Is_Hidden_Open_Scope (Id : E) return B is
1778 begin
1779 return Flag171 (Id);
1780 end Is_Hidden_Open_Scope;
1782 function Is_Immediately_Visible (Id : E) return B is
1783 begin
1784 pragma Assert (Nkind (Id) in N_Entity);
1785 return Flag7 (Id);
1786 end Is_Immediately_Visible;
1788 function Is_Imported (Id : E) return B is
1789 begin
1790 return Flag24 (Id);
1791 end Is_Imported;
1793 function Is_Inlined (Id : E) return B is
1794 begin
1795 return Flag11 (Id);
1796 end Is_Inlined;
1798 function Is_Interface (Id : E) return B is
1799 begin
1800 return Flag186 (Id);
1801 end Is_Interface;
1803 function Is_Instantiated (Id : E) return B is
1804 begin
1805 return Flag126 (Id);
1806 end Is_Instantiated;
1808 function Is_Internal (Id : E) return B is
1809 begin
1810 pragma Assert (Nkind (Id) in N_Entity);
1811 return Flag17 (Id);
1812 end Is_Internal;
1814 function Is_Interrupt_Handler (Id : E) return B is
1815 begin
1816 pragma Assert (Nkind (Id) in N_Entity);
1817 return Flag89 (Id);
1818 end Is_Interrupt_Handler;
1820 function Is_Intrinsic_Subprogram (Id : E) return B is
1821 begin
1822 return Flag64 (Id);
1823 end Is_Intrinsic_Subprogram;
1825 function Is_Itype (Id : E) return B is
1826 begin
1827 return Flag91 (Id);
1828 end Is_Itype;
1830 function Is_Known_Non_Null (Id : E) return B is
1831 begin
1832 return Flag37 (Id);
1833 end Is_Known_Non_Null;
1835 function Is_Known_Null (Id : E) return B is
1836 begin
1837 return Flag204 (Id);
1838 end Is_Known_Null;
1840 function Is_Known_Valid (Id : E) return B is
1841 begin
1842 return Flag170 (Id);
1843 end Is_Known_Valid;
1845 function Is_Limited_Composite (Id : E) return B is
1846 begin
1847 return Flag106 (Id);
1848 end Is_Limited_Composite;
1850 function Is_Limited_Interface (Id : E) return B is
1851 begin
1852 return Flag197 (Id);
1853 end Is_Limited_Interface;
1855 function Is_Limited_Record (Id : E) return B is
1856 begin
1857 return Flag25 (Id);
1858 end Is_Limited_Record;
1860 function Is_Machine_Code_Subprogram (Id : E) return B is
1861 begin
1862 pragma Assert (Is_Subprogram (Id));
1863 return Flag137 (Id);
1864 end Is_Machine_Code_Subprogram;
1866 function Is_Non_Static_Subtype (Id : E) return B is
1867 begin
1868 pragma Assert (Is_Type (Id));
1869 return Flag109 (Id);
1870 end Is_Non_Static_Subtype;
1872 function Is_Null_Init_Proc (Id : E) return B is
1873 begin
1874 pragma Assert (Ekind (Id) = E_Procedure);
1875 return Flag178 (Id);
1876 end Is_Null_Init_Proc;
1878 function Is_Obsolescent (Id : E) return B is
1879 begin
1880 return Flag153 (Id);
1881 end Is_Obsolescent;
1883 function Is_Only_Out_Parameter (Id : E) return B is
1884 begin
1885 pragma Assert (Is_Formal (Id));
1886 return Flag226 (Id);
1887 end Is_Only_Out_Parameter;
1889 function Is_Optional_Parameter (Id : E) return B is
1890 begin
1891 pragma Assert (Is_Formal (Id));
1892 return Flag134 (Id);
1893 end Is_Optional_Parameter;
1895 function Is_Overriding_Operation (Id : E) return B is
1896 begin
1897 pragma Assert (Is_Subprogram (Id));
1898 return Flag39 (Id);
1899 end Is_Overriding_Operation;
1901 function Is_Package_Body_Entity (Id : E) return B is
1902 begin
1903 return Flag160 (Id);
1904 end Is_Package_Body_Entity;
1906 function Is_Packed (Id : E) return B is
1907 begin
1908 return Flag51 (Implementation_Base_Type (Id));
1909 end Is_Packed;
1911 function Is_Packed_Array_Type (Id : E) return B is
1912 begin
1913 return Flag138 (Id);
1914 end Is_Packed_Array_Type;
1916 function Is_Potentially_Use_Visible (Id : E) return B is
1917 begin
1918 pragma Assert (Nkind (Id) in N_Entity);
1919 return Flag9 (Id);
1920 end Is_Potentially_Use_Visible;
1922 function Is_Preelaborated (Id : E) return B is
1923 begin
1924 return Flag59 (Id);
1925 end Is_Preelaborated;
1927 function Is_Primitive (Id : E) return B is
1928 begin
1929 pragma Assert
1930 (Is_Overloadable (Id)
1931 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1932 return Flag218 (Id);
1933 end Is_Primitive;
1935 function Is_Primitive_Wrapper (Id : E) return B is
1936 begin
1937 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1938 return Flag195 (Id);
1939 end Is_Primitive_Wrapper;
1941 function Is_Private_Composite (Id : E) return B is
1942 begin
1943 pragma Assert (Is_Type (Id));
1944 return Flag107 (Id);
1945 end Is_Private_Composite;
1947 function Is_Private_Descendant (Id : E) return B is
1948 begin
1949 return Flag53 (Id);
1950 end Is_Private_Descendant;
1952 function Is_Private_Primitive (Id : E) return B is
1953 begin
1954 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1955 return Flag245 (Id);
1956 end Is_Private_Primitive;
1958 function Is_Public (Id : E) return B is
1959 begin
1960 pragma Assert (Nkind (Id) in N_Entity);
1961 return Flag10 (Id);
1962 end Is_Public;
1964 function Is_Pure (Id : E) return B is
1965 begin
1966 return Flag44 (Id);
1967 end Is_Pure;
1969 function Is_Pure_Unit_Access_Type (Id : E) return B is
1970 begin
1971 pragma Assert (Is_Access_Type (Id));
1972 return Flag189 (Id);
1973 end Is_Pure_Unit_Access_Type;
1975 function Is_RACW_Stub_Type (Id : E) return B is
1976 begin
1977 pragma Assert (Is_Type (Id));
1978 return Flag244 (Id);
1979 end Is_RACW_Stub_Type;
1981 function Is_Raised (Id : E) return B is
1982 begin
1983 pragma Assert (Ekind (Id) = E_Exception);
1984 return Flag224 (Id);
1985 end Is_Raised;
1987 function Is_Remote_Call_Interface (Id : E) return B is
1988 begin
1989 return Flag62 (Id);
1990 end Is_Remote_Call_Interface;
1992 function Is_Remote_Types (Id : E) return B is
1993 begin
1994 return Flag61 (Id);
1995 end Is_Remote_Types;
1997 function Is_Renaming_Of_Object (Id : E) return B is
1998 begin
1999 return Flag112 (Id);
2000 end Is_Renaming_Of_Object;
2002 function Is_Return_Object (Id : E) return B is
2003 begin
2004 return Flag209 (Id);
2005 end Is_Return_Object;
2007 function Is_Shared_Passive (Id : E) return B is
2008 begin
2009 return Flag60 (Id);
2010 end Is_Shared_Passive;
2012 function Is_Statically_Allocated (Id : E) return B is
2013 begin
2014 return Flag28 (Id);
2015 end Is_Statically_Allocated;
2017 function Is_Tag (Id : E) return B is
2018 begin
2019 pragma Assert (Nkind (Id) in N_Entity);
2020 return Flag78 (Id);
2021 end Is_Tag;
2023 function Is_Tagged_Type (Id : E) return B is
2024 begin
2025 return Flag55 (Id);
2026 end Is_Tagged_Type;
2028 function Is_Thunk (Id : E) return B is
2029 begin
2030 pragma Assert (Is_Subprogram (Id));
2031 return Flag225 (Id);
2032 end Is_Thunk;
2034 function Is_Trivial_Subprogram (Id : E) return B is
2035 begin
2036 return Flag235 (Id);
2037 end Is_Trivial_Subprogram;
2039 function Is_True_Constant (Id : E) return B is
2040 begin
2041 return Flag163 (Id);
2042 end Is_True_Constant;
2044 function Is_Unchecked_Union (Id : E) return B is
2045 begin
2046 return Flag117 (Implementation_Base_Type (Id));
2047 end Is_Unchecked_Union;
2049 function Is_Underlying_Record_View (Id : E) return B is
2050 begin
2051 return Flag246 (Id);
2052 end Is_Underlying_Record_View;
2054 function Is_Unsigned_Type (Id : E) return B is
2055 begin
2056 pragma Assert (Is_Type (Id));
2057 return Flag144 (Id);
2058 end Is_Unsigned_Type;
2060 function Is_Valued_Procedure (Id : E) return B is
2061 begin
2062 pragma Assert (Ekind (Id) = E_Procedure);
2063 return Flag127 (Id);
2064 end Is_Valued_Procedure;
2066 function Is_Visible_Child_Unit (Id : E) return B is
2067 begin
2068 pragma Assert (Is_Child_Unit (Id));
2069 return Flag116 (Id);
2070 end Is_Visible_Child_Unit;
2072 function Is_Visible_Formal (Id : E) return B is
2073 begin
2074 return Flag206 (Id);
2075 end Is_Visible_Formal;
2077 function Is_VMS_Exception (Id : E) return B is
2078 begin
2079 return Flag133 (Id);
2080 end Is_VMS_Exception;
2082 function Is_Volatile (Id : E) return B is
2083 begin
2084 pragma Assert (Nkind (Id) in N_Entity);
2086 if Is_Type (Id) then
2087 return Flag16 (Base_Type (Id));
2088 else
2089 return Flag16 (Id);
2090 end if;
2091 end Is_Volatile;
2093 function Itype_Printed (Id : E) return B is
2094 begin
2095 pragma Assert (Is_Itype (Id));
2096 return Flag202 (Id);
2097 end Itype_Printed;
2099 function Kill_Elaboration_Checks (Id : E) return B is
2100 begin
2101 return Flag32 (Id);
2102 end Kill_Elaboration_Checks;
2104 function Kill_Range_Checks (Id : E) return B is
2105 begin
2106 return Flag33 (Id);
2107 end Kill_Range_Checks;
2109 function Kill_Tag_Checks (Id : E) return B is
2110 begin
2111 return Flag34 (Id);
2112 end Kill_Tag_Checks;
2114 function Known_To_Have_Preelab_Init (Id : E) return B is
2115 begin
2116 pragma Assert (Is_Type (Id));
2117 return Flag207 (Id);
2118 end Known_To_Have_Preelab_Init;
2120 function Last_Assignment (Id : E) return N is
2121 begin
2122 pragma Assert (Is_Assignable (Id));
2123 return Node26 (Id);
2124 end Last_Assignment;
2126 function Last_Entity (Id : E) return E is
2127 begin
2128 return Node20 (Id);
2129 end Last_Entity;
2131 function Limited_View (Id : E) return E is
2132 begin
2133 pragma Assert (Ekind (Id) = E_Package);
2134 return Node23 (Id);
2135 end Limited_View;
2137 function Lit_Indexes (Id : E) return E is
2138 begin
2139 pragma Assert (Is_Enumeration_Type (Id));
2140 return Node15 (Id);
2141 end Lit_Indexes;
2143 function Lit_Strings (Id : E) return E is
2144 begin
2145 pragma Assert (Is_Enumeration_Type (Id));
2146 return Node16 (Id);
2147 end Lit_Strings;
2149 function Low_Bound_Tested (Id : E) return B is
2150 begin
2151 return Flag205 (Id);
2152 end Low_Bound_Tested;
2154 function Machine_Radix_10 (Id : E) return B is
2155 begin
2156 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2157 return Flag84 (Id);
2158 end Machine_Radix_10;
2160 function Master_Id (Id : E) return E is
2161 begin
2162 pragma Assert (Is_Access_Type (Id));
2163 return Node17 (Id);
2164 end Master_Id;
2166 function Materialize_Entity (Id : E) return B is
2167 begin
2168 return Flag168 (Id);
2169 end Materialize_Entity;
2171 function Mechanism (Id : E) return M is
2172 begin
2173 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2174 return UI_To_Int (Uint8 (Id));
2175 end Mechanism;
2177 function Modulus (Id : E) return Uint is
2178 begin
2179 pragma Assert (Is_Modular_Integer_Type (Id));
2180 return Uint17 (Base_Type (Id));
2181 end Modulus;
2183 function Must_Be_On_Byte_Boundary (Id : E) return B is
2184 begin
2185 pragma Assert (Is_Type (Id));
2186 return Flag183 (Id);
2187 end Must_Be_On_Byte_Boundary;
2189 function Must_Have_Preelab_Init (Id : E) return B is
2190 begin
2191 pragma Assert (Is_Type (Id));
2192 return Flag208 (Id);
2193 end Must_Have_Preelab_Init;
2195 function Needs_Debug_Info (Id : E) return B is
2196 begin
2197 return Flag147 (Id);
2198 end Needs_Debug_Info;
2200 function Needs_No_Actuals (Id : E) return B is
2201 begin
2202 pragma Assert
2203 (Is_Overloadable (Id)
2204 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2205 return Flag22 (Id);
2206 end Needs_No_Actuals;
2208 function Never_Set_In_Source (Id : E) return B is
2209 begin
2210 return Flag115 (Id);
2211 end Never_Set_In_Source;
2213 function Next_Inlined_Subprogram (Id : E) return E is
2214 begin
2215 return Node12 (Id);
2216 end Next_Inlined_Subprogram;
2218 function No_Pool_Assigned (Id : E) return B is
2219 begin
2220 pragma Assert (Is_Access_Type (Id));
2221 return Flag131 (Root_Type (Id));
2222 end No_Pool_Assigned;
2224 function No_Return (Id : E) return B is
2225 begin
2226 return Flag113 (Id);
2227 end No_Return;
2229 function No_Strict_Aliasing (Id : E) return B is
2230 begin
2231 pragma Assert (Is_Access_Type (Id));
2232 return Flag136 (Base_Type (Id));
2233 end No_Strict_Aliasing;
2235 function Non_Binary_Modulus (Id : E) return B is
2236 begin
2237 pragma Assert (Is_Type (Id));
2238 return Flag58 (Base_Type (Id));
2239 end Non_Binary_Modulus;
2241 function Non_Limited_View (Id : E) return E is
2242 begin
2243 pragma Assert (Ekind (Id) in Incomplete_Kind);
2244 return Node17 (Id);
2245 end Non_Limited_View;
2247 function Nonzero_Is_True (Id : E) return B is
2248 begin
2249 pragma Assert (Root_Type (Id) = Standard_Boolean);
2250 return Flag162 (Base_Type (Id));
2251 end Nonzero_Is_True;
2253 function Normalized_First_Bit (Id : E) return U is
2254 begin
2255 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2256 return Uint8 (Id);
2257 end Normalized_First_Bit;
2259 function Normalized_Position (Id : E) return U is
2260 begin
2261 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2262 return Uint14 (Id);
2263 end Normalized_Position;
2265 function Normalized_Position_Max (Id : E) return U is
2266 begin
2267 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2268 return Uint10 (Id);
2269 end Normalized_Position_Max;
2271 function OK_To_Rename (Id : E) return B is
2272 begin
2273 pragma Assert (Ekind (Id) = E_Variable);
2274 return Flag247 (Id);
2275 end OK_To_Rename;
2277 function OK_To_Reorder_Components (Id : E) return B is
2278 begin
2279 pragma Assert (Is_Record_Type (Id));
2280 return Flag239 (Base_Type (Id));
2281 end OK_To_Reorder_Components;
2283 function Optimize_Alignment_Space (Id : E) return B is
2284 begin
2285 pragma Assert
2286 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2287 return Flag241 (Id);
2288 end Optimize_Alignment_Space;
2290 function Optimize_Alignment_Time (Id : E) return B is
2291 begin
2292 pragma Assert
2293 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2294 return Flag242 (Id);
2295 end Optimize_Alignment_Time;
2297 function Original_Array_Type (Id : E) return E is
2298 begin
2299 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2300 return Node21 (Id);
2301 end Original_Array_Type;
2303 function Original_Record_Component (Id : E) return E is
2304 begin
2305 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2306 return Node22 (Id);
2307 end Original_Record_Component;
2309 function Overlays_Constant (Id : E) return B is
2310 begin
2311 return Flag243 (Id);
2312 end Overlays_Constant;
2314 function Overridden_Operation (Id : E) return E is
2315 begin
2316 return Node26 (Id);
2317 end Overridden_Operation;
2319 function Package_Instantiation (Id : E) return N is
2320 begin
2321 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2322 return Node26 (Id);
2323 end Package_Instantiation;
2325 function Packed_Array_Type (Id : E) return E is
2326 begin
2327 pragma Assert (Is_Array_Type (Id));
2328 return Node23 (Id);
2329 end Packed_Array_Type;
2331 function Parent_Subtype (Id : E) return E is
2332 begin
2333 pragma Assert (Is_Record_Type (Id));
2334 return Node19 (Base_Type (Id));
2335 end Parent_Subtype;
2337 function Postcondition_Proc (Id : E) return E is
2338 begin
2339 pragma Assert (Ekind (Id) = E_Procedure);
2340 return Node8 (Id);
2341 end Postcondition_Proc;
2343 function Primitive_Operations (Id : E) return L is
2344 begin
2345 pragma Assert (Is_Tagged_Type (Id));
2346 return Elist15 (Id);
2347 end Primitive_Operations;
2349 function Prival (Id : E) return E is
2350 begin
2351 pragma Assert (Is_Protected_Component (Id));
2352 return Node17 (Id);
2353 end Prival;
2355 function Prival_Link (Id : E) return E is
2356 begin
2357 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2358 return Node20 (Id);
2359 end Prival_Link;
2361 function Private_Dependents (Id : E) return L is
2362 begin
2363 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2364 return Elist18 (Id);
2365 end Private_Dependents;
2367 function Private_View (Id : E) return N is
2368 begin
2369 pragma Assert (Is_Private_Type (Id));
2370 return Node22 (Id);
2371 end Private_View;
2373 function Protected_Body_Subprogram (Id : E) return E is
2374 begin
2375 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2376 return Node11 (Id);
2377 end Protected_Body_Subprogram;
2379 function Protected_Formal (Id : E) return E is
2380 begin
2381 pragma Assert (Is_Formal (Id));
2382 return Node22 (Id);
2383 end Protected_Formal;
2385 function Protection_Object (Id : E) return E is
2386 begin
2387 pragma Assert
2388 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2389 return Node23 (Id);
2390 end Protection_Object;
2392 function Reachable (Id : E) return B is
2393 begin
2394 return Flag49 (Id);
2395 end Reachable;
2397 function Referenced (Id : E) return B is
2398 begin
2399 return Flag156 (Id);
2400 end Referenced;
2402 function Referenced_As_LHS (Id : E) return B is
2403 begin
2404 return Flag36 (Id);
2405 end Referenced_As_LHS;
2407 function Referenced_As_Out_Parameter (Id : E) return B is
2408 begin
2409 return Flag227 (Id);
2410 end Referenced_As_Out_Parameter;
2412 function Referenced_Object (Id : E) return N is
2413 begin
2414 pragma Assert (Is_Type (Id));
2415 return Node10 (Id);
2416 end Referenced_Object;
2418 function Register_Exception_Call (Id : E) return N is
2419 begin
2420 pragma Assert (Ekind (Id) = E_Exception);
2421 return Node20 (Id);
2422 end Register_Exception_Call;
2424 function Related_Array_Object (Id : E) return E is
2425 begin
2426 pragma Assert (Is_Array_Type (Id));
2427 return Node19 (Id);
2428 end Related_Array_Object;
2430 function Related_Expression (Id : E) return N is
2431 begin
2432 pragma Assert (Ekind (Id) in Type_Kind
2433 or else Ekind_In (Id, E_Constant, E_Variable));
2434 return Node24 (Id);
2435 end Related_Expression;
2437 function Related_Instance (Id : E) return E is
2438 begin
2439 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2440 return Node15 (Id);
2441 end Related_Instance;
2443 function Related_Type (Id : E) return E is
2444 begin
2445 pragma Assert (Ekind_In (Id, E_Component, E_Constant));
2446 return Node26 (Id);
2447 end Related_Type;
2449 function Relative_Deadline_Variable (Id : E) return E is
2450 begin
2451 pragma Assert (Is_Task_Type (Id));
2452 return Node26 (Implementation_Base_Type (Id));
2453 end Relative_Deadline_Variable;
2455 function Renamed_Entity (Id : E) return N is
2456 begin
2457 return Node18 (Id);
2458 end Renamed_Entity;
2460 function Renamed_In_Spec (Id : E) return B is
2461 begin
2462 pragma Assert (Ekind (Id) = E_Package);
2463 return Flag231 (Id);
2464 end Renamed_In_Spec;
2466 function Renamed_Object (Id : E) return N is
2467 begin
2468 return Node18 (Id);
2469 end Renamed_Object;
2471 function Renaming_Map (Id : E) return U is
2472 begin
2473 return Uint9 (Id);
2474 end Renaming_Map;
2476 function Requires_Overriding (Id : E) return B is
2477 begin
2478 pragma Assert (Is_Overloadable (Id));
2479 return Flag213 (Id);
2480 end Requires_Overriding;
2482 function Return_Present (Id : E) return B is
2483 begin
2484 return Flag54 (Id);
2485 end Return_Present;
2487 function Return_Applies_To (Id : E) return N is
2488 begin
2489 return Node8 (Id);
2490 end Return_Applies_To;
2492 function Returns_By_Ref (Id : E) return B is
2493 begin
2494 return Flag90 (Id);
2495 end Returns_By_Ref;
2497 function Reverse_Bit_Order (Id : E) return B is
2498 begin
2499 pragma Assert (Is_Record_Type (Id));
2500 return Flag164 (Base_Type (Id));
2501 end Reverse_Bit_Order;
2503 function RM_Size (Id : E) return U is
2504 begin
2505 pragma Assert (Is_Type (Id));
2506 return Uint13 (Id);
2507 end RM_Size;
2509 function Scalar_Range (Id : E) return N is
2510 begin
2511 return Node20 (Id);
2512 end Scalar_Range;
2514 function Scale_Value (Id : E) return U is
2515 begin
2516 return Uint15 (Id);
2517 end Scale_Value;
2519 function Scope_Depth_Value (Id : E) return U is
2520 begin
2521 return Uint22 (Id);
2522 end Scope_Depth_Value;
2524 function Sec_Stack_Needed_For_Return (Id : E) return B is
2525 begin
2526 return Flag167 (Id);
2527 end Sec_Stack_Needed_For_Return;
2529 function Shadow_Entities (Id : E) return S is
2530 begin
2531 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2532 return List14 (Id);
2533 end Shadow_Entities;
2535 function Shared_Var_Procs_Instance (Id : E) return E is
2536 begin
2537 pragma Assert (Ekind (Id) = E_Variable);
2538 return Node22 (Id);
2539 end Shared_Var_Procs_Instance;
2541 function Size_Check_Code (Id : E) return N is
2542 begin
2543 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2544 return Node19 (Id);
2545 end Size_Check_Code;
2547 function Size_Depends_On_Discriminant (Id : E) return B is
2548 begin
2549 return Flag177 (Id);
2550 end Size_Depends_On_Discriminant;
2552 function Size_Known_At_Compile_Time (Id : E) return B is
2553 begin
2554 return Flag92 (Id);
2555 end Size_Known_At_Compile_Time;
2557 function Small_Value (Id : E) return R is
2558 begin
2559 pragma Assert (Is_Fixed_Point_Type (Id));
2560 return Ureal21 (Id);
2561 end Small_Value;
2563 function Spec_Entity (Id : E) return E is
2564 begin
2565 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2566 return Node19 (Id);
2567 end Spec_Entity;
2569 function Spec_PPC_List (Id : E) return N is
2570 begin
2571 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
2572 return Node24 (Id);
2573 end Spec_PPC_List;
2575 function Storage_Size_Variable (Id : E) return E is
2576 begin
2577 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2578 return Node15 (Implementation_Base_Type (Id));
2579 end Storage_Size_Variable;
2581 function Static_Elaboration_Desired (Id : E) return B is
2582 begin
2583 pragma Assert (Ekind (Id) = E_Package);
2584 return Flag77 (Id);
2585 end Static_Elaboration_Desired;
2587 function Static_Initialization (Id : E) return N is
2588 begin
2589 pragma Assert
2590 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2591 return Node26 (Id);
2592 end Static_Initialization;
2594 function Stored_Constraint (Id : E) return L is
2595 begin
2596 pragma Assert
2597 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2598 return Elist23 (Id);
2599 end Stored_Constraint;
2601 function Strict_Alignment (Id : E) return B is
2602 begin
2603 return Flag145 (Implementation_Base_Type (Id));
2604 end Strict_Alignment;
2606 function String_Literal_Length (Id : E) return U is
2607 begin
2608 return Uint16 (Id);
2609 end String_Literal_Length;
2611 function String_Literal_Low_Bound (Id : E) return N is
2612 begin
2613 return Node15 (Id);
2614 end String_Literal_Low_Bound;
2616 function Suppress_Elaboration_Warnings (Id : E) return B is
2617 begin
2618 return Flag148 (Id);
2619 end Suppress_Elaboration_Warnings;
2621 function Suppress_Init_Proc (Id : E) return B is
2622 begin
2623 return Flag105 (Base_Type (Id));
2624 end Suppress_Init_Proc;
2626 function Suppress_Style_Checks (Id : E) return B is
2627 begin
2628 return Flag165 (Id);
2629 end Suppress_Style_Checks;
2631 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2632 begin
2633 return Flag217 (Id);
2634 end Suppress_Value_Tracking_On_Call;
2636 function Task_Body_Procedure (Id : E) return N is
2637 begin
2638 pragma Assert (Ekind (Id) in Task_Kind);
2639 return Node25 (Id);
2640 end Task_Body_Procedure;
2642 function Treat_As_Volatile (Id : E) return B is
2643 begin
2644 return Flag41 (Id);
2645 end Treat_As_Volatile;
2647 function Underlying_Full_View (Id : E) return E is
2648 begin
2649 pragma Assert (Ekind (Id) in Private_Kind);
2650 return Node19 (Id);
2651 end Underlying_Full_View;
2653 function Underlying_Record_View (Id : E) return E is
2654 begin
2655 return Node28 (Id);
2656 end Underlying_Record_View;
2658 function Universal_Aliasing (Id : E) return B is
2659 begin
2660 pragma Assert (Is_Type (Id));
2661 return Flag216 (Base_Type (Id));
2662 end Universal_Aliasing;
2664 function Unset_Reference (Id : E) return N is
2665 begin
2666 return Node16 (Id);
2667 end Unset_Reference;
2669 function Used_As_Generic_Actual (Id : E) return B is
2670 begin
2671 return Flag222 (Id);
2672 end Used_As_Generic_Actual;
2674 function Uses_Sec_Stack (Id : E) return B is
2675 begin
2676 return Flag95 (Id);
2677 end Uses_Sec_Stack;
2679 function Vax_Float (Id : E) return B is
2680 begin
2681 return Flag151 (Base_Type (Id));
2682 end Vax_Float;
2684 function Warnings_Off (Id : E) return B is
2685 begin
2686 return Flag96 (Id);
2687 end Warnings_Off;
2689 function Warnings_Off_Used (Id : E) return B is
2690 begin
2691 return Flag236 (Id);
2692 end Warnings_Off_Used;
2694 function Warnings_Off_Used_Unmodified (Id : E) return B is
2695 begin
2696 return Flag237 (Id);
2697 end Warnings_Off_Used_Unmodified;
2699 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2700 begin
2701 return Flag238 (Id);
2702 end Warnings_Off_Used_Unreferenced;
2704 function Wrapped_Entity (Id : E) return E is
2705 begin
2706 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2707 and then Is_Primitive_Wrapper (Id));
2708 return Node27 (Id);
2709 end Wrapped_Entity;
2711 function Was_Hidden (Id : E) return B is
2712 begin
2713 return Flag196 (Id);
2714 end Was_Hidden;
2716 ------------------------------
2717 -- Classification Functions --
2718 ------------------------------
2720 function Is_Access_Type (Id : E) return B is
2721 begin
2722 return Ekind (Id) in Access_Kind;
2723 end Is_Access_Type;
2725 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2726 begin
2727 return Ekind (Id) in Access_Protected_Kind;
2728 end Is_Access_Protected_Subprogram_Type;
2730 function Is_Access_Subprogram_Type (Id : E) return B is
2731 begin
2732 return Ekind (Id) in Access_Subprogram_Kind;
2733 end Is_Access_Subprogram_Type;
2735 function Is_Array_Type (Id : E) return B is
2736 begin
2737 return Ekind (Id) in Array_Kind;
2738 end Is_Array_Type;
2740 function Is_Assignable (Id : E) return B is
2741 begin
2742 return Ekind (Id) in Assignable_Kind;
2743 end Is_Assignable;
2745 function Is_Class_Wide_Type (Id : E) return B is
2746 begin
2747 return Ekind (Id) in Class_Wide_Kind;
2748 end Is_Class_Wide_Type;
2750 function Is_Composite_Type (Id : E) return B is
2751 begin
2752 return Ekind (Id) in Composite_Kind;
2753 end Is_Composite_Type;
2755 function Is_Concurrent_Body (Id : E) return B is
2756 begin
2757 return Ekind (Id) in
2758 Concurrent_Body_Kind;
2759 end Is_Concurrent_Body;
2761 function Is_Concurrent_Record_Type (Id : E) return B is
2762 begin
2763 return Flag20 (Id);
2764 end Is_Concurrent_Record_Type;
2766 function Is_Concurrent_Type (Id : E) return B is
2767 begin
2768 return Ekind (Id) in Concurrent_Kind;
2769 end Is_Concurrent_Type;
2771 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2772 begin
2773 return Ekind (Id) in
2774 Decimal_Fixed_Point_Kind;
2775 end Is_Decimal_Fixed_Point_Type;
2777 function Is_Digits_Type (Id : E) return B is
2778 begin
2779 return Ekind (Id) in Digits_Kind;
2780 end Is_Digits_Type;
2782 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2783 begin
2784 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2785 end Is_Discrete_Or_Fixed_Point_Type;
2787 function Is_Discrete_Type (Id : E) return B is
2788 begin
2789 return Ekind (Id) in Discrete_Kind;
2790 end Is_Discrete_Type;
2792 function Is_Elementary_Type (Id : E) return B is
2793 begin
2794 return Ekind (Id) in Elementary_Kind;
2795 end Is_Elementary_Type;
2797 function Is_Entry (Id : E) return B is
2798 begin
2799 return Ekind (Id) in Entry_Kind;
2800 end Is_Entry;
2802 function Is_Enumeration_Type (Id : E) return B is
2803 begin
2804 return Ekind (Id) in
2805 Enumeration_Kind;
2806 end Is_Enumeration_Type;
2808 function Is_Fixed_Point_Type (Id : E) return B is
2809 begin
2810 return Ekind (Id) in
2811 Fixed_Point_Kind;
2812 end Is_Fixed_Point_Type;
2814 function Is_Floating_Point_Type (Id : E) return B is
2815 begin
2816 return Ekind (Id) in Float_Kind;
2817 end Is_Floating_Point_Type;
2819 function Is_Formal (Id : E) return B is
2820 begin
2821 return Ekind (Id) in Formal_Kind;
2822 end Is_Formal;
2824 function Is_Formal_Object (Id : E) return B is
2825 begin
2826 return Ekind (Id) in Formal_Object_Kind;
2827 end Is_Formal_Object;
2829 function Is_Generic_Subprogram (Id : E) return B is
2830 begin
2831 return Ekind (Id) in Generic_Subprogram_Kind;
2832 end Is_Generic_Subprogram;
2834 function Is_Generic_Unit (Id : E) return B is
2835 begin
2836 return Ekind (Id) in Generic_Unit_Kind;
2837 end Is_Generic_Unit;
2839 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2840 begin
2841 return Ekind (Id) in
2842 Incomplete_Or_Private_Kind;
2843 end Is_Incomplete_Or_Private_Type;
2845 function Is_Incomplete_Type (Id : E) return B is
2846 begin
2847 return Ekind (Id) in
2848 Incomplete_Kind;
2849 end Is_Incomplete_Type;
2851 function Is_Integer_Type (Id : E) return B is
2852 begin
2853 return Ekind (Id) in Integer_Kind;
2854 end Is_Integer_Type;
2856 function Is_Modular_Integer_Type (Id : E) return B is
2857 begin
2858 return Ekind (Id) in
2859 Modular_Integer_Kind;
2860 end Is_Modular_Integer_Type;
2862 function Is_Named_Number (Id : E) return B is
2863 begin
2864 return Ekind (Id) in Named_Kind;
2865 end Is_Named_Number;
2867 function Is_Numeric_Type (Id : E) return B is
2868 begin
2869 return Ekind (Id) in Numeric_Kind;
2870 end Is_Numeric_Type;
2872 function Is_Object (Id : E) return B is
2873 begin
2874 return Ekind (Id) in Object_Kind;
2875 end Is_Object;
2877 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2878 begin
2879 return Ekind (Id) in
2880 Ordinary_Fixed_Point_Kind;
2881 end Is_Ordinary_Fixed_Point_Type;
2883 function Is_Overloadable (Id : E) return B is
2884 begin
2885 return Ekind (Id) in Overloadable_Kind;
2886 end Is_Overloadable;
2888 function Is_Private_Type (Id : E) return B is
2889 begin
2890 return Ekind (Id) in Private_Kind;
2891 end Is_Private_Type;
2893 function Is_Protected_Type (Id : E) return B is
2894 begin
2895 return Ekind (Id) in Protected_Kind;
2896 end Is_Protected_Type;
2898 function Is_Real_Type (Id : E) return B is
2899 begin
2900 return Ekind (Id) in Real_Kind;
2901 end Is_Real_Type;
2903 function Is_Record_Type (Id : E) return B is
2904 begin
2905 return Ekind (Id) in Record_Kind;
2906 end Is_Record_Type;
2908 function Is_Scalar_Type (Id : E) return B is
2909 begin
2910 return Ekind (Id) in Scalar_Kind;
2911 end Is_Scalar_Type;
2913 function Is_Signed_Integer_Type (Id : E) return B is
2914 begin
2915 return Ekind (Id) in Signed_Integer_Kind;
2916 end Is_Signed_Integer_Type;
2918 function Is_Subprogram (Id : E) return B is
2919 begin
2920 return Ekind (Id) in Subprogram_Kind;
2921 end Is_Subprogram;
2923 function Is_Task_Type (Id : E) return B is
2924 begin
2925 return Ekind (Id) in Task_Kind;
2926 end Is_Task_Type;
2928 function Is_Type (Id : E) return B is
2929 begin
2930 return Ekind (Id) in Type_Kind;
2931 end Is_Type;
2933 ------------------------------
2934 -- Attribute Set Procedures --
2935 ------------------------------
2937 -- Note: in many of these set procedures an "obvious" assertion is missing.
2938 -- The reason for this is that in many cases, a field is set before the
2939 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
2940 -- it is possible to add assertions that specifically include the E_Void
2941 -- possibility, but in some cases, we just omit the assertions.
2943 procedure Set_Accept_Address (Id : E; V : L) is
2944 begin
2945 Set_Elist21 (Id, V);
2946 end Set_Accept_Address;
2948 procedure Set_Access_Disp_Table (Id : E; V : L) is
2949 begin
2950 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2951 Set_Elist16 (Id, V);
2952 end Set_Access_Disp_Table;
2954 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2955 begin
2956 pragma Assert (Is_Access_Type (Id));
2957 Set_Node23 (Id, V);
2958 end Set_Associated_Final_Chain;
2960 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2961 begin
2962 Set_Node12 (Id, V);
2963 end Set_Associated_Formal_Package;
2965 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2966 begin
2967 Set_Node8 (Id, V);
2968 end Set_Associated_Node_For_Itype;
2970 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2971 begin
2972 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2973 Set_Node22 (Id, V);
2974 end Set_Associated_Storage_Pool;
2976 procedure Set_Actual_Subtype (Id : E; V : E) is
2977 begin
2978 pragma Assert
2979 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
2980 or else Is_Formal (Id));
2981 Set_Node17 (Id, V);
2982 end Set_Actual_Subtype;
2984 procedure Set_Address_Taken (Id : E; V : B := True) is
2985 begin
2986 Set_Flag104 (Id, V);
2987 end Set_Address_Taken;
2989 procedure Set_Alias (Id : E; V : E) is
2990 begin
2991 pragma Assert
2992 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2993 Set_Node18 (Id, V);
2994 end Set_Alias;
2996 procedure Set_Alignment (Id : E; V : U) is
2997 begin
2998 pragma Assert (Is_Type (Id)
2999 or else Is_Formal (Id)
3000 or else Ekind_In (Id, E_Loop_Parameter,
3001 E_Constant,
3002 E_Exception,
3003 E_Variable));
3004 Set_Uint14 (Id, V);
3005 end Set_Alignment;
3007 procedure Set_Barrier_Function (Id : E; V : N) is
3008 begin
3009 pragma Assert (Is_Entry (Id));
3010 Set_Node12 (Id, V);
3011 end Set_Barrier_Function;
3013 procedure Set_Block_Node (Id : E; V : N) is
3014 begin
3015 pragma Assert (Ekind (Id) = E_Block);
3016 Set_Node11 (Id, V);
3017 end Set_Block_Node;
3019 procedure Set_Body_Entity (Id : E; V : E) is
3020 begin
3021 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3022 Set_Node19 (Id, V);
3023 end Set_Body_Entity;
3025 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3026 begin
3027 pragma Assert
3028 (Ekind (Id) = E_Package
3029 or else Is_Subprogram (Id)
3030 or else Is_Generic_Unit (Id));
3031 Set_Flag40 (Id, V);
3032 end Set_Body_Needed_For_SAL;
3034 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3035 begin
3036 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3037 Set_Flag125 (Id, V);
3038 end Set_C_Pass_By_Copy;
3040 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3041 begin
3042 Set_Flag38 (Id, V);
3043 end Set_Can_Never_Be_Null;
3045 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3046 begin
3047 Set_Flag31 (Id, V);
3048 end Set_Checks_May_Be_Suppressed;
3050 procedure Set_Class_Wide_Type (Id : E; V : E) is
3051 begin
3052 pragma Assert (Is_Type (Id));
3053 Set_Node9 (Id, V);
3054 end Set_Class_Wide_Type;
3056 procedure Set_Cloned_Subtype (Id : E; V : E) is
3057 begin
3058 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3059 Set_Node16 (Id, V);
3060 end Set_Cloned_Subtype;
3062 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3063 begin
3064 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3065 Set_Uint11 (Id, V);
3066 end Set_Component_Bit_Offset;
3068 procedure Set_Component_Clause (Id : E; V : N) is
3069 begin
3070 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3071 Set_Node13 (Id, V);
3072 end Set_Component_Clause;
3074 procedure Set_Component_Size (Id : E; V : U) is
3075 begin
3076 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3077 Set_Uint22 (Id, V);
3078 end Set_Component_Size;
3080 procedure Set_Component_Type (Id : E; V : E) is
3081 begin
3082 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3083 Set_Node20 (Id, V);
3084 end Set_Component_Type;
3086 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3087 begin
3088 pragma Assert
3089 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3090 Set_Node18 (Id, V);
3091 end Set_Corresponding_Concurrent_Type;
3093 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3094 begin
3095 pragma Assert (Ekind (Id) = E_Discriminant);
3096 Set_Node19 (Id, V);
3097 end Set_Corresponding_Discriminant;
3099 procedure Set_Corresponding_Equality (Id : E; V : E) is
3100 begin
3101 pragma Assert
3102 (Ekind (Id) = E_Function
3103 and then not Comes_From_Source (Id)
3104 and then Chars (Id) = Name_Op_Ne);
3105 Set_Node13 (Id, V);
3106 end Set_Corresponding_Equality;
3108 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3109 begin
3110 pragma Assert (Is_Concurrent_Type (Id));
3111 Set_Node18 (Id, V);
3112 end Set_Corresponding_Record_Type;
3114 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3115 begin
3116 Set_Node22 (Id, V);
3117 end Set_Corresponding_Remote_Type;
3119 procedure Set_Current_Use_Clause (Id : E; V : E) is
3120 begin
3121 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3122 Set_Node27 (Id, V);
3123 end Set_Current_Use_Clause;
3125 procedure Set_Current_Value (Id : E; V : N) is
3126 begin
3127 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3128 Set_Node9 (Id, V);
3129 end Set_Current_Value;
3131 procedure Set_CR_Discriminant (Id : E; V : E) is
3132 begin
3133 Set_Node23 (Id, V);
3134 end Set_CR_Discriminant;
3136 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3137 begin
3138 Set_Flag166 (Id, V);
3139 end Set_Debug_Info_Off;
3141 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3142 begin
3143 Set_Node25 (Id, V);
3144 end Set_Debug_Renaming_Link;
3146 procedure Set_Default_Expr_Function (Id : E; V : E) is
3147 begin
3148 pragma Assert (Is_Formal (Id));
3149 Set_Node21 (Id, V);
3150 end Set_Default_Expr_Function;
3152 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3153 begin
3154 Set_Flag108 (Id, V);
3155 end Set_Default_Expressions_Processed;
3157 procedure Set_Default_Value (Id : E; V : N) is
3158 begin
3159 pragma Assert (Is_Formal (Id));
3160 Set_Node20 (Id, V);
3161 end Set_Default_Value;
3163 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3164 begin
3165 pragma Assert
3166 (Is_Subprogram (Id)
3167 or else Is_Task_Type (Id)
3168 or else Ekind (Id) = E_Block);
3169 Set_Flag114 (Id, V);
3170 end Set_Delay_Cleanups;
3172 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3173 begin
3174 pragma Assert
3175 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3176 Set_Flag50 (Id, V);
3177 end Set_Delay_Subprogram_Descriptors;
3179 procedure Set_Delta_Value (Id : E; V : R) is
3180 begin
3181 pragma Assert (Is_Fixed_Point_Type (Id));
3182 Set_Ureal18 (Id, V);
3183 end Set_Delta_Value;
3185 procedure Set_Dependent_Instances (Id : E; V : L) is
3186 begin
3187 pragma Assert (Is_Generic_Instance (Id));
3188 Set_Elist8 (Id, V);
3189 end Set_Dependent_Instances;
3191 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3192 begin
3193 pragma Assert (Nkind (Id) in N_Entity);
3194 Set_Flag14 (Id, V);
3195 end Set_Depends_On_Private;
3197 procedure Set_Digits_Value (Id : E; V : U) is
3198 begin
3199 pragma Assert
3200 (Is_Floating_Point_Type (Id)
3201 or else Is_Decimal_Fixed_Point_Type (Id));
3202 Set_Uint17 (Id, V);
3203 end Set_Digits_Value;
3205 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3206 begin
3207 Set_Node20 (Id, V);
3208 end Set_Directly_Designated_Type;
3210 procedure Set_Discard_Names (Id : E; V : B := True) is
3211 begin
3212 Set_Flag88 (Id, V);
3213 end Set_Discard_Names;
3215 procedure Set_Discriminal (Id : E; V : E) is
3216 begin
3217 pragma Assert (Ekind (Id) = E_Discriminant);
3218 Set_Node17 (Id, V);
3219 end Set_Discriminal;
3221 procedure Set_Discriminal_Link (Id : E; V : E) is
3222 begin
3223 Set_Node10 (Id, V);
3224 end Set_Discriminal_Link;
3226 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3227 begin
3228 pragma Assert (Ekind (Id) = E_Component);
3229 Set_Node20 (Id, V);
3230 end Set_Discriminant_Checking_Func;
3232 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3233 begin
3234 pragma Assert (Nkind (Id) in N_Entity);
3235 Set_Elist21 (Id, V);
3236 end Set_Discriminant_Constraint;
3238 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3239 begin
3240 Set_Node20 (Id, V);
3241 end Set_Discriminant_Default_Value;
3243 procedure Set_Discriminant_Number (Id : E; V : U) is
3244 begin
3245 Set_Uint15 (Id, V);
3246 end Set_Discriminant_Number;
3248 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3249 begin
3250 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3251 Set_Elist26 (Id, V);
3252 end Set_Dispatch_Table_Wrappers;
3254 procedure Set_DT_Entry_Count (Id : E; V : U) is
3255 begin
3256 pragma Assert (Ekind (Id) = E_Component);
3257 Set_Uint15 (Id, V);
3258 end Set_DT_Entry_Count;
3260 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3261 begin
3262 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3263 Set_Node25 (Id, V);
3264 end Set_DT_Offset_To_Top_Func;
3266 procedure Set_DT_Position (Id : E; V : U) is
3267 begin
3268 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3269 Set_Uint15 (Id, V);
3270 end Set_DT_Position;
3272 procedure Set_DTC_Entity (Id : E; V : E) is
3273 begin
3274 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3275 Set_Node16 (Id, V);
3276 end Set_DTC_Entity;
3278 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3279 begin
3280 pragma Assert (Ekind (Id) = E_Package);
3281 Set_Flag210 (Id, V);
3282 end Set_Elaborate_Body_Desirable;
3284 procedure Set_Elaboration_Entity (Id : E; V : E) is
3285 begin
3286 pragma Assert
3287 (Is_Subprogram (Id)
3288 or else
3289 Ekind (Id) = E_Package
3290 or else
3291 Is_Generic_Unit (Id));
3292 Set_Node13 (Id, V);
3293 end Set_Elaboration_Entity;
3295 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3296 begin
3297 pragma Assert
3298 (Is_Subprogram (Id)
3299 or else
3300 Ekind (Id) = E_Package
3301 or else
3302 Is_Generic_Unit (Id));
3303 Set_Flag174 (Id, V);
3304 end Set_Elaboration_Entity_Required;
3306 procedure Set_Enclosing_Scope (Id : E; V : E) is
3307 begin
3308 Set_Node18 (Id, V);
3309 end Set_Enclosing_Scope;
3311 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3312 begin
3313 pragma Assert (Is_Entry (Id));
3314 Set_Flag152 (Id, V);
3315 end Set_Entry_Accepted;
3317 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3318 begin
3319 Set_Node15 (Id, V);
3320 end Set_Entry_Bodies_Array;
3322 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3323 begin
3324 Set_Node23 (Id, V);
3325 end Set_Entry_Cancel_Parameter;
3327 procedure Set_Entry_Component (Id : E; V : E) is
3328 begin
3329 Set_Node11 (Id, V);
3330 end Set_Entry_Component;
3332 procedure Set_Entry_Formal (Id : E; V : E) is
3333 begin
3334 Set_Node16 (Id, V);
3335 end Set_Entry_Formal;
3337 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3338 begin
3339 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3340 Set_Node18 (Id, V);
3341 end Set_Entry_Index_Constant;
3343 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3344 begin
3345 Set_Node15 (Id, V);
3346 end Set_Entry_Parameters_Type;
3348 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3349 begin
3350 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3351 Set_Node23 (Id, V);
3352 end Set_Enum_Pos_To_Rep;
3354 procedure Set_Enumeration_Pos (Id : E; V : U) is
3355 begin
3356 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3357 Set_Uint11 (Id, V);
3358 end Set_Enumeration_Pos;
3360 procedure Set_Enumeration_Rep (Id : E; V : U) is
3361 begin
3362 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3363 Set_Uint12 (Id, V);
3364 end Set_Enumeration_Rep;
3366 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3367 begin
3368 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3369 Set_Node22 (Id, V);
3370 end Set_Enumeration_Rep_Expr;
3372 procedure Set_Equivalent_Type (Id : E; V : E) is
3373 begin
3374 pragma Assert
3375 (Ekind_In (Id, E_Class_Wide_Type,
3376 E_Class_Wide_Subtype,
3377 E_Access_Protected_Subprogram_Type,
3378 E_Anonymous_Access_Protected_Subprogram_Type,
3379 E_Access_Subprogram_Type,
3380 E_Exception_Type));
3381 Set_Node18 (Id, V);
3382 end Set_Equivalent_Type;
3384 procedure Set_Esize (Id : E; V : U) is
3385 begin
3386 Set_Uint12 (Id, V);
3387 end Set_Esize;
3389 procedure Set_Exception_Code (Id : E; V : U) is
3390 begin
3391 pragma Assert (Ekind (Id) = E_Exception);
3392 Set_Uint22 (Id, V);
3393 end Set_Exception_Code;
3395 procedure Set_Extra_Accessibility (Id : E; V : E) is
3396 begin
3397 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3398 Set_Node13 (Id, V);
3399 end Set_Extra_Accessibility;
3401 procedure Set_Extra_Constrained (Id : E; V : E) is
3402 begin
3403 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3404 Set_Node23 (Id, V);
3405 end Set_Extra_Constrained;
3407 procedure Set_Extra_Formal (Id : E; V : E) is
3408 begin
3409 Set_Node15 (Id, V);
3410 end Set_Extra_Formal;
3412 procedure Set_Extra_Formals (Id : E; V : E) is
3413 begin
3414 pragma Assert
3415 (Is_Overloadable (Id)
3416 or else Ekind_In (Id, E_Entry_Family,
3417 E_Subprogram_Body,
3418 E_Subprogram_Type));
3419 Set_Node28 (Id, V);
3420 end Set_Extra_Formals;
3422 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3423 begin
3424 pragma Assert
3425 (Is_Access_Subprogram_Type (Id)
3426 and then Id = Base_Type (Id));
3427 Set_Flag229 (Id, V);
3428 end Set_Can_Use_Internal_Rep;
3430 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3431 begin
3432 Set_Node19 (Id, V);
3433 end Set_Finalization_Chain_Entity;
3435 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3436 begin
3437 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3438 Set_Flag158 (Id, V);
3439 end Set_Finalize_Storage_Only;
3441 procedure Set_First_Entity (Id : E; V : E) is
3442 begin
3443 Set_Node17 (Id, V);
3444 end Set_First_Entity;
3446 procedure Set_First_Exit_Statement (Id : E; V : N) is
3447 begin
3448 pragma Assert (Ekind (Id) = E_Loop);
3449 Set_Node8 (Id, V);
3450 end Set_First_Exit_Statement;
3452 procedure Set_First_Index (Id : E; V : N) is
3453 begin
3454 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3455 Set_Node17 (Id, V);
3456 end Set_First_Index;
3458 procedure Set_First_Literal (Id : E; V : E) is
3459 begin
3460 pragma Assert (Is_Enumeration_Type (Id));
3461 Set_Node17 (Id, V);
3462 end Set_First_Literal;
3464 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3465 begin
3466 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3467 Set_Node14 (Id, V);
3468 end Set_First_Optional_Parameter;
3470 procedure Set_First_Private_Entity (Id : E; V : E) is
3471 begin
3472 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3473 or else Ekind (Id) in Concurrent_Kind);
3474 Set_Node16 (Id, V);
3475 end Set_First_Private_Entity;
3477 procedure Set_First_Rep_Item (Id : E; V : N) is
3478 begin
3479 Set_Node6 (Id, V);
3480 end Set_First_Rep_Item;
3482 procedure Set_Freeze_Node (Id : E; V : N) is
3483 begin
3484 Set_Node7 (Id, V);
3485 end Set_Freeze_Node;
3487 procedure Set_From_With_Type (Id : E; V : B := True) is
3488 begin
3489 pragma Assert
3490 (Is_Type (Id)
3491 or else Ekind (Id) = E_Package);
3492 Set_Flag159 (Id, V);
3493 end Set_From_With_Type;
3495 procedure Set_Full_View (Id : E; V : E) is
3496 begin
3497 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3498 Set_Node11 (Id, V);
3499 end Set_Full_View;
3501 procedure Set_Generic_Homonym (Id : E; V : E) is
3502 begin
3503 Set_Node11 (Id, V);
3504 end Set_Generic_Homonym;
3506 procedure Set_Generic_Renamings (Id : E; V : L) is
3507 begin
3508 Set_Elist23 (Id, V);
3509 end Set_Generic_Renamings;
3511 procedure Set_Handler_Records (Id : E; V : S) is
3512 begin
3513 Set_List10 (Id, V);
3514 end Set_Handler_Records;
3516 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3517 begin
3518 pragma Assert (Id = Base_Type (Id));
3519 Set_Flag135 (Id, V);
3520 end Set_Has_Aliased_Components;
3522 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3523 begin
3524 Set_Flag46 (Id, V);
3525 end Set_Has_Alignment_Clause;
3527 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3528 begin
3529 Set_Flag79 (Id, V);
3530 end Set_Has_All_Calls_Remote;
3532 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3533 begin
3534 Set_Flag201 (Id, V);
3535 end Set_Has_Anon_Block_Suffix;
3537 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3538 begin
3539 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3540 Set_Flag86 (Id, V);
3541 end Set_Has_Atomic_Components;
3543 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3544 begin
3545 pragma Assert
3546 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3547 Set_Flag139 (Id, V);
3548 end Set_Has_Biased_Representation;
3550 procedure Set_Has_Completion (Id : E; V : B := True) is
3551 begin
3552 Set_Flag26 (Id, V);
3553 end Set_Has_Completion;
3555 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3556 begin
3557 pragma Assert (Is_Type (Id));
3558 Set_Flag71 (Id, V);
3559 end Set_Has_Completion_In_Body;
3561 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3562 begin
3563 pragma Assert (Ekind (Id) = E_Record_Type);
3564 Set_Flag140 (Id, V);
3565 end Set_Has_Complex_Representation;
3567 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3568 begin
3569 pragma Assert (Ekind (Id) = E_Array_Type);
3570 Set_Flag68 (Id, V);
3571 end Set_Has_Component_Size_Clause;
3573 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3574 begin
3575 pragma Assert (Is_Type (Id));
3576 Set_Flag187 (Id, V);
3577 end Set_Has_Constrained_Partial_View;
3579 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3580 begin
3581 Set_Flag181 (Id, V);
3582 end Set_Has_Contiguous_Rep;
3584 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3585 begin
3586 pragma Assert (Id = Base_Type (Id));
3587 Set_Flag43 (Id, V);
3588 end Set_Has_Controlled_Component;
3590 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3591 begin
3592 Set_Flag98 (Id, V);
3593 end Set_Has_Controlling_Result;
3595 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3596 begin
3597 Set_Flag119 (Id, V);
3598 end Set_Has_Convention_Pragma;
3600 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3601 begin
3602 pragma Assert (Nkind (Id) in N_Entity);
3603 Set_Flag18 (Id, V);
3604 end Set_Has_Delayed_Freeze;
3606 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3607 begin
3608 pragma Assert (Nkind (Id) in N_Entity);
3609 Set_Flag5 (Id, V);
3610 end Set_Has_Discriminants;
3612 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3613 begin
3614 pragma Assert (Ekind (Id) = E_Record_Type
3615 and then Is_Tagged_Type (Id));
3616 Set_Flag220 (Id, V);
3617 end Set_Has_Dispatch_Table;
3619 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3620 begin
3621 pragma Assert (Is_Enumeration_Type (Id));
3622 Set_Flag66 (Id, V);
3623 end Set_Has_Enumeration_Rep_Clause;
3625 procedure Set_Has_Exit (Id : E; V : B := True) is
3626 begin
3627 Set_Flag47 (Id, V);
3628 end Set_Has_Exit;
3630 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3631 begin
3632 pragma Assert (Is_Tagged_Type (Id));
3633 Set_Flag110 (Id, V);
3634 end Set_Has_External_Tag_Rep_Clause;
3636 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3637 begin
3638 Set_Flag175 (Id, V);
3639 end Set_Has_Forward_Instantiation;
3641 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3642 begin
3643 Set_Flag173 (Id, V);
3644 end Set_Has_Fully_Qualified_Name;
3646 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3647 begin
3648 Set_Flag82 (Id, V);
3649 end Set_Has_Gigi_Rep_Item;
3651 procedure Set_Has_Homonym (Id : E; V : B := True) is
3652 begin
3653 Set_Flag56 (Id, V);
3654 end Set_Has_Homonym;
3656 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3657 begin
3658 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3659 Set_Flag219 (Id, V);
3660 end Set_Has_Initial_Value;
3662 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3663 begin
3664 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3665 Set_Flag83 (Id, V);
3666 end Set_Has_Machine_Radix_Clause;
3668 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3669 begin
3670 Set_Flag21 (Id, V);
3671 end Set_Has_Master_Entity;
3673 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3674 begin
3675 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3676 Set_Flag142 (Id, V);
3677 end Set_Has_Missing_Return;
3679 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3680 begin
3681 Set_Flag101 (Id, V);
3682 end Set_Has_Nested_Block_With_Handler;
3684 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3685 begin
3686 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3687 Set_Flag215 (Id, V);
3688 end Set_Has_Up_Level_Access;
3690 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3691 begin
3692 pragma Assert (Id = Base_Type (Id));
3693 Set_Flag75 (Id, V);
3694 end Set_Has_Non_Standard_Rep;
3696 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3697 begin
3698 pragma Assert (Is_Type (Id));
3699 Set_Flag172 (Id, V);
3700 end Set_Has_Object_Size_Clause;
3702 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3703 begin
3704 Set_Flag154 (Id, V);
3705 end Set_Has_Per_Object_Constraint;
3707 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3708 begin
3709 Set_Flag188 (Id, V);
3710 end Set_Has_Persistent_BSS;
3712 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3713 begin
3714 pragma Assert (Is_Subprogram (Id));
3715 Set_Flag240 (Id, V);
3716 end Set_Has_Postconditions;
3718 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3719 begin
3720 pragma Assert (Is_Access_Type (Id));
3721 Set_Flag27 (Base_Type (Id), V);
3722 end Set_Has_Pragma_Controlled;
3724 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3725 begin
3726 Set_Flag150 (Id, V);
3727 end Set_Has_Pragma_Elaborate_Body;
3729 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3730 begin
3731 Set_Flag157 (Id, V);
3732 end Set_Has_Pragma_Inline;
3734 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3735 begin
3736 Set_Flag230 (Id, V);
3737 end Set_Has_Pragma_Inline_Always;
3739 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3740 begin
3741 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3742 pragma Assert (Id = Base_Type (Id));
3743 Set_Flag121 (Id, V);
3744 end Set_Has_Pragma_Pack;
3746 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3747 begin
3748 Set_Flag221 (Id, V);
3749 end Set_Has_Pragma_Preelab_Init;
3751 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3752 begin
3753 Set_Flag203 (Id, V);
3754 end Set_Has_Pragma_Pure;
3756 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3757 begin
3758 Set_Flag179 (Id, V);
3759 end Set_Has_Pragma_Pure_Function;
3761 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3762 begin
3763 Set_Flag169 (Id, V);
3764 end Set_Has_Pragma_Thread_Local_Storage;
3766 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3767 begin
3768 Set_Flag233 (Id, V);
3769 end Set_Has_Pragma_Unmodified;
3771 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3772 begin
3773 Set_Flag180 (Id, V);
3774 end Set_Has_Pragma_Unreferenced;
3776 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3777 begin
3778 pragma Assert (Is_Type (Id));
3779 Set_Flag212 (Id, V);
3780 end Set_Has_Pragma_Unreferenced_Objects;
3782 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3783 begin
3784 pragma Assert (Id = Base_Type (Id));
3785 Set_Flag120 (Id, V);
3786 end Set_Has_Primitive_Operations;
3788 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3789 begin
3790 Set_Flag155 (Id, V);
3791 end Set_Has_Private_Declaration;
3793 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3794 begin
3795 Set_Flag161 (Id, V);
3796 end Set_Has_Qualified_Name;
3798 procedure Set_Has_RACW (Id : E; V : B := True) is
3799 begin
3800 pragma Assert (Ekind (Id) = E_Package);
3801 Set_Flag214 (Id, V);
3802 end Set_Has_RACW;
3804 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3805 begin
3806 pragma Assert (Id = Base_Type (Id));
3807 Set_Flag65 (Id, V);
3808 end Set_Has_Record_Rep_Clause;
3810 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3811 begin
3812 pragma Assert (Is_Subprogram (Id));
3813 Set_Flag143 (Id, V);
3814 end Set_Has_Recursive_Call;
3816 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3817 begin
3818 Set_Flag29 (Id, V);
3819 end Set_Has_Size_Clause;
3821 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3822 begin
3823 Set_Flag67 (Id, V);
3824 end Set_Has_Small_Clause;
3826 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3827 begin
3828 pragma Assert (Id = Base_Type (Id));
3829 Set_Flag100 (Id, V);
3830 end Set_Has_Specified_Layout;
3832 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3833 begin
3834 pragma Assert (Is_Type (Id));
3835 Set_Flag190 (Id, V);
3836 end Set_Has_Specified_Stream_Input;
3838 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3839 begin
3840 pragma Assert (Is_Type (Id));
3841 Set_Flag191 (Id, V);
3842 end Set_Has_Specified_Stream_Output;
3844 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3845 begin
3846 pragma Assert (Is_Type (Id));
3847 Set_Flag192 (Id, V);
3848 end Set_Has_Specified_Stream_Read;
3850 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3851 begin
3852 pragma Assert (Is_Type (Id));
3853 Set_Flag193 (Id, V);
3854 end Set_Has_Specified_Stream_Write;
3856 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3857 begin
3858 Set_Flag211 (Id, V);
3859 end Set_Has_Static_Discriminants;
3861 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3862 begin
3863 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3864 pragma Assert (Id = Base_Type (Id));
3865 Set_Flag23 (Id, V);
3866 end Set_Has_Storage_Size_Clause;
3868 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3869 begin
3870 pragma Assert (Is_Elementary_Type (Id));
3871 Set_Flag184 (Id, V);
3872 end Set_Has_Stream_Size_Clause;
3874 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3875 begin
3876 Set_Flag93 (Id, V);
3877 end Set_Has_Subprogram_Descriptor;
3879 procedure Set_Has_Task (Id : E; V : B := True) is
3880 begin
3881 pragma Assert (Id = Base_Type (Id));
3882 Set_Flag30 (Id, V);
3883 end Set_Has_Task;
3885 procedure Set_Has_Thunks (Id : E; V : B := True) is
3886 begin
3887 pragma Assert (Is_Tag (Id)
3888 and then Ekind (Id) = E_Constant);
3889 Set_Flag228 (Id, V);
3890 end Set_Has_Thunks;
3892 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3893 begin
3894 pragma Assert (Id = Base_Type (Id));
3895 Set_Flag123 (Id, V);
3896 end Set_Has_Unchecked_Union;
3898 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3899 begin
3900 pragma Assert (Is_Type (Id));
3901 Set_Flag72 (Id, V);
3902 end Set_Has_Unknown_Discriminants;
3904 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3905 begin
3906 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3907 Set_Flag87 (Id, V);
3908 end Set_Has_Volatile_Components;
3910 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3911 begin
3912 Set_Flag182 (Id, V);
3913 end Set_Has_Xref_Entry;
3915 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3916 begin
3917 pragma Assert (Ekind (Id) = E_Variable);
3918 Set_Node8 (Id, V);
3919 end Set_Hiding_Loop_Variable;
3921 procedure Set_Homonym (Id : E; V : E) is
3922 begin
3923 pragma Assert (Id /= V);
3924 Set_Node4 (Id, V);
3925 end Set_Homonym;
3927 procedure Set_Implemented_By_Entry (Id : E; V : B := True) is
3928 begin
3929 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3930 Set_Flag232 (Id, V);
3931 end Set_Implemented_By_Entry;
3933 procedure Set_Interfaces (Id : E; V : L) is
3934 begin
3935 pragma Assert (Is_Record_Type (Id));
3936 Set_Elist25 (Id, V);
3937 end Set_Interfaces;
3939 procedure Set_Interface_Alias (Id : E; V : E) is
3940 begin
3941 pragma Assert
3942 (Is_Internal (Id)
3943 and then Is_Hidden (Id)
3944 and then (Ekind_In (Id, E_Procedure, E_Function)));
3945 Set_Node25 (Id, V);
3946 end Set_Interface_Alias;
3948 procedure Set_In_Package_Body (Id : E; V : B := True) is
3949 begin
3950 Set_Flag48 (Id, V);
3951 end Set_In_Package_Body;
3953 procedure Set_In_Private_Part (Id : E; V : B := True) is
3954 begin
3955 Set_Flag45 (Id, V);
3956 end Set_In_Private_Part;
3958 procedure Set_In_Use (Id : E; V : B := True) is
3959 begin
3960 pragma Assert (Nkind (Id) in N_Entity);
3961 Set_Flag8 (Id, V);
3962 end Set_In_Use;
3964 procedure Set_Inner_Instances (Id : E; V : L) is
3965 begin
3966 Set_Elist23 (Id, V);
3967 end Set_Inner_Instances;
3969 procedure Set_Interface_Name (Id : E; V : N) is
3970 begin
3971 Set_Node21 (Id, V);
3972 end Set_Interface_Name;
3974 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3975 begin
3976 pragma Assert (Is_Overloadable (Id));
3977 Set_Flag19 (Id, V);
3978 end Set_Is_Abstract_Subprogram;
3980 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3981 begin
3982 pragma Assert (Is_Type (Id));
3983 Set_Flag146 (Id, V);
3984 end Set_Is_Abstract_Type;
3986 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3987 begin
3988 pragma Assert (Is_Access_Type (Id));
3989 Set_Flag194 (Id, V);
3990 end Set_Is_Local_Anonymous_Access;
3992 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3993 begin
3994 pragma Assert (Is_Access_Type (Id));
3995 Set_Flag69 (Id, V);
3996 end Set_Is_Access_Constant;
3998 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3999 begin
4000 Set_Flag185 (Id, V);
4001 end Set_Is_Ada_2005_Only;
4003 procedure Set_Is_Aliased (Id : E; V : B := True) is
4004 begin
4005 pragma Assert (Nkind (Id) in N_Entity);
4006 Set_Flag15 (Id, V);
4007 end Set_Is_Aliased;
4009 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4010 begin
4011 pragma Assert (Is_Entry (Id));
4012 Set_Flag132 (Id, V);
4013 end Set_Is_AST_Entry;
4015 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4016 begin
4017 pragma Assert
4018 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4019 Set_Flag81 (Id, V);
4020 end Set_Is_Asynchronous;
4022 procedure Set_Is_Atomic (Id : E; V : B := True) is
4023 begin
4024 Set_Flag85 (Id, V);
4025 end Set_Is_Atomic;
4027 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4028 begin
4029 pragma Assert ((not V)
4030 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4032 Set_Flag122 (Id, V);
4033 end Set_Is_Bit_Packed_Array;
4035 procedure Set_Is_Called (Id : E; V : B := True) is
4036 begin
4037 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4038 Set_Flag102 (Id, V);
4039 end Set_Is_Called;
4041 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4042 begin
4043 Set_Flag63 (Id, V);
4044 end Set_Is_Character_Type;
4046 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4047 begin
4048 Set_Flag73 (Id, V);
4049 end Set_Is_Child_Unit;
4051 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4052 begin
4053 Set_Flag35 (Id, V);
4054 end Set_Is_Class_Wide_Equivalent_Type;
4056 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4057 begin
4058 Set_Flag149 (Id, V);
4059 end Set_Is_Compilation_Unit;
4061 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4062 begin
4063 pragma Assert (Ekind (Id) = E_Discriminant);
4064 Set_Flag103 (Id, V);
4065 end Set_Is_Completely_Hidden;
4067 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4068 begin
4069 Set_Flag20 (Id, V);
4070 end Set_Is_Concurrent_Record_Type;
4072 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4073 begin
4074 Set_Flag80 (Id, V);
4075 end Set_Is_Constr_Subt_For_U_Nominal;
4077 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4078 begin
4079 Set_Flag141 (Id, V);
4080 end Set_Is_Constr_Subt_For_UN_Aliased;
4082 procedure Set_Is_Constrained (Id : E; V : B := True) is
4083 begin
4084 pragma Assert (Nkind (Id) in N_Entity);
4085 Set_Flag12 (Id, V);
4086 end Set_Is_Constrained;
4088 procedure Set_Is_Constructor (Id : E; V : B := True) is
4089 begin
4090 Set_Flag76 (Id, V);
4091 end Set_Is_Constructor;
4093 procedure Set_Is_Controlled (Id : E; V : B := True) is
4094 begin
4095 pragma Assert (Id = Base_Type (Id));
4096 Set_Flag42 (Id, V);
4097 end Set_Is_Controlled;
4099 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4100 begin
4101 pragma Assert (Is_Formal (Id));
4102 Set_Flag97 (Id, V);
4103 end Set_Is_Controlling_Formal;
4105 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4106 begin
4107 Set_Flag74 (Id, V);
4108 end Set_Is_CPP_Class;
4110 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4111 begin
4112 pragma Assert (Is_Type (Id));
4113 Set_Flag223 (Id, V);
4114 end Set_Is_Descendent_Of_Address;
4116 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4117 begin
4118 Set_Flag176 (Id, V);
4119 end Set_Is_Discrim_SO_Function;
4121 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4122 begin
4123 Set_Flag234 (Id, V);
4124 end Set_Is_Dispatch_Table_Entity;
4126 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4127 begin
4128 pragma Assert
4129 (V = False
4130 or else
4131 Is_Overloadable (Id)
4132 or else
4133 Ekind (Id) = E_Subprogram_Type);
4135 Set_Flag6 (Id, V);
4136 end Set_Is_Dispatching_Operation;
4138 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4139 begin
4140 Set_Flag124 (Id, V);
4141 end Set_Is_Eliminated;
4143 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4144 begin
4145 Set_Flag52 (Id, V);
4146 end Set_Is_Entry_Formal;
4148 procedure Set_Is_Exported (Id : E; V : B := True) is
4149 begin
4150 Set_Flag99 (Id, V);
4151 end Set_Is_Exported;
4153 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4154 begin
4155 Set_Flag70 (Id, V);
4156 end Set_Is_First_Subtype;
4158 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4159 begin
4160 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4161 Set_Flag118 (Id, V);
4162 end Set_Is_For_Access_Subtype;
4164 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4165 begin
4166 Set_Flag111 (Id, V);
4167 end Set_Is_Formal_Subprogram;
4169 procedure Set_Is_Frozen (Id : E; V : B := True) is
4170 begin
4171 pragma Assert (Nkind (Id) in N_Entity);
4172 Set_Flag4 (Id, V);
4173 end Set_Is_Frozen;
4175 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4176 begin
4177 pragma Assert (Is_Type (Id));
4178 Set_Flag94 (Id, V);
4179 end Set_Is_Generic_Actual_Type;
4181 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4182 begin
4183 Set_Flag130 (Id, V);
4184 end Set_Is_Generic_Instance;
4186 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4187 begin
4188 pragma Assert (Nkind (Id) in N_Entity);
4189 Set_Flag13 (Id, V);
4190 end Set_Is_Generic_Type;
4192 procedure Set_Is_Hidden (Id : E; V : B := True) is
4193 begin
4194 Set_Flag57 (Id, V);
4195 end Set_Is_Hidden;
4197 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4198 begin
4199 Set_Flag171 (Id, V);
4200 end Set_Is_Hidden_Open_Scope;
4202 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4203 begin
4204 pragma Assert (Nkind (Id) in N_Entity);
4205 Set_Flag7 (Id, V);
4206 end Set_Is_Immediately_Visible;
4208 procedure Set_Is_Imported (Id : E; V : B := True) is
4209 begin
4210 Set_Flag24 (Id, V);
4211 end Set_Is_Imported;
4213 procedure Set_Is_Inlined (Id : E; V : B := True) is
4214 begin
4215 Set_Flag11 (Id, V);
4216 end Set_Is_Inlined;
4218 procedure Set_Is_Interface (Id : E; V : B := True) is
4219 begin
4220 pragma Assert
4221 (Ekind_In (Id, E_Record_Type,
4222 E_Record_Subtype,
4223 E_Record_Type_With_Private,
4224 E_Record_Subtype_With_Private,
4225 E_Class_Wide_Type,
4226 E_Class_Wide_Subtype));
4227 Set_Flag186 (Id, V);
4228 end Set_Is_Interface;
4230 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4231 begin
4232 Set_Flag126 (Id, V);
4233 end Set_Is_Instantiated;
4235 procedure Set_Is_Internal (Id : E; V : B := True) is
4236 begin
4237 pragma Assert (Nkind (Id) in N_Entity);
4238 Set_Flag17 (Id, V);
4239 end Set_Is_Internal;
4241 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4242 begin
4243 pragma Assert (Nkind (Id) in N_Entity);
4244 Set_Flag89 (Id, V);
4245 end Set_Is_Interrupt_Handler;
4247 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4248 begin
4249 Set_Flag64 (Id, V);
4250 end Set_Is_Intrinsic_Subprogram;
4252 procedure Set_Is_Itype (Id : E; V : B := True) is
4253 begin
4254 Set_Flag91 (Id, V);
4255 end Set_Is_Itype;
4257 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4258 begin
4259 Set_Flag37 (Id, V);
4260 end Set_Is_Known_Non_Null;
4262 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4263 begin
4264 Set_Flag204 (Id, V);
4265 end Set_Is_Known_Null;
4267 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4268 begin
4269 Set_Flag170 (Id, V);
4270 end Set_Is_Known_Valid;
4272 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4273 begin
4274 pragma Assert (Is_Type (Id));
4275 Set_Flag106 (Id, V);
4276 end Set_Is_Limited_Composite;
4278 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4279 begin
4280 pragma Assert (Is_Interface (Id));
4281 Set_Flag197 (Id, V);
4282 end Set_Is_Limited_Interface;
4284 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4285 begin
4286 Set_Flag25 (Id, V);
4287 end Set_Is_Limited_Record;
4289 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4290 begin
4291 pragma Assert (Is_Subprogram (Id));
4292 Set_Flag137 (Id, V);
4293 end Set_Is_Machine_Code_Subprogram;
4295 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4296 begin
4297 pragma Assert (Is_Type (Id));
4298 Set_Flag109 (Id, V);
4299 end Set_Is_Non_Static_Subtype;
4301 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4302 begin
4303 pragma Assert (Ekind (Id) = E_Procedure);
4304 Set_Flag178 (Id, V);
4305 end Set_Is_Null_Init_Proc;
4307 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4308 begin
4309 Set_Flag153 (Id, V);
4310 end Set_Is_Obsolescent;
4312 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4313 begin
4314 pragma Assert (Ekind (Id) = E_Out_Parameter);
4315 Set_Flag226 (Id, V);
4316 end Set_Is_Only_Out_Parameter;
4318 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4319 begin
4320 pragma Assert (Is_Formal (Id));
4321 Set_Flag134 (Id, V);
4322 end Set_Is_Optional_Parameter;
4324 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4325 begin
4326 pragma Assert (Is_Subprogram (Id));
4327 Set_Flag39 (Id, V);
4328 end Set_Is_Overriding_Operation;
4330 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4331 begin
4332 Set_Flag160 (Id, V);
4333 end Set_Is_Package_Body_Entity;
4335 procedure Set_Is_Packed (Id : E; V : B := True) is
4336 begin
4337 pragma Assert (Id = Base_Type (Id));
4338 Set_Flag51 (Id, V);
4339 end Set_Is_Packed;
4341 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4342 begin
4343 Set_Flag138 (Id, V);
4344 end Set_Is_Packed_Array_Type;
4346 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4347 begin
4348 pragma Assert (Nkind (Id) in N_Entity);
4349 Set_Flag9 (Id, V);
4350 end Set_Is_Potentially_Use_Visible;
4352 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4353 begin
4354 Set_Flag59 (Id, V);
4355 end Set_Is_Preelaborated;
4357 procedure Set_Is_Primitive (Id : E; V : B := True) is
4358 begin
4359 pragma Assert
4360 (Is_Overloadable (Id)
4361 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4362 Set_Flag218 (Id, V);
4363 end Set_Is_Primitive;
4365 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4366 begin
4367 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4368 Set_Flag195 (Id, V);
4369 end Set_Is_Primitive_Wrapper;
4371 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4372 begin
4373 pragma Assert (Is_Type (Id));
4374 Set_Flag107 (Id, V);
4375 end Set_Is_Private_Composite;
4377 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4378 begin
4379 Set_Flag53 (Id, V);
4380 end Set_Is_Private_Descendant;
4382 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4383 begin
4384 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4385 Set_Flag245 (Id, V);
4386 end Set_Is_Private_Primitive;
4388 procedure Set_Is_Public (Id : E; V : B := True) is
4389 begin
4390 pragma Assert (Nkind (Id) in N_Entity);
4391 Set_Flag10 (Id, V);
4392 end Set_Is_Public;
4394 procedure Set_Is_Pure (Id : E; V : B := True) is
4395 begin
4396 Set_Flag44 (Id, V);
4397 end Set_Is_Pure;
4399 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4400 begin
4401 pragma Assert (Is_Access_Type (Id));
4402 Set_Flag189 (Id, V);
4403 end Set_Is_Pure_Unit_Access_Type;
4405 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4406 begin
4407 pragma Assert (Is_Type (Id));
4408 Set_Flag244 (Id, V);
4409 end Set_Is_RACW_Stub_Type;
4411 procedure Set_Is_Raised (Id : E; V : B := True) is
4412 begin
4413 pragma Assert (Ekind (Id) = E_Exception);
4414 Set_Flag224 (Id, V);
4415 end Set_Is_Raised;
4417 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4418 begin
4419 Set_Flag62 (Id, V);
4420 end Set_Is_Remote_Call_Interface;
4422 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4423 begin
4424 Set_Flag61 (Id, V);
4425 end Set_Is_Remote_Types;
4427 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4428 begin
4429 Set_Flag112 (Id, V);
4430 end Set_Is_Renaming_Of_Object;
4432 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4433 begin
4434 Set_Flag209 (Id, V);
4435 end Set_Is_Return_Object;
4437 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4438 begin
4439 Set_Flag60 (Id, V);
4440 end Set_Is_Shared_Passive;
4442 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4443 begin
4444 pragma Assert
4445 (Is_Type (Id)
4446 or else Ekind_In (Id, E_Exception,
4447 E_Variable,
4448 E_Constant,
4449 E_Void));
4450 Set_Flag28 (Id, V);
4451 end Set_Is_Statically_Allocated;
4453 procedure Set_Is_Tag (Id : E; V : B := True) is
4454 begin
4455 pragma Assert (Ekind_In (Id, E_Component, E_Constant));
4456 Set_Flag78 (Id, V);
4457 end Set_Is_Tag;
4459 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4460 begin
4461 Set_Flag55 (Id, V);
4462 end Set_Is_Tagged_Type;
4464 procedure Set_Is_Thunk (Id : E; V : B := True) is
4465 begin
4466 Set_Flag225 (Id, V);
4467 end Set_Is_Thunk;
4469 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4470 begin
4471 Set_Flag235 (Id, V);
4472 end Set_Is_Trivial_Subprogram;
4474 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4475 begin
4476 Set_Flag163 (Id, V);
4477 end Set_Is_True_Constant;
4479 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4480 begin
4481 pragma Assert (Id = Base_Type (Id));
4482 Set_Flag117 (Id, V);
4483 end Set_Is_Unchecked_Union;
4485 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4486 begin
4487 pragma Assert (Ekind (Id) = E_Record_Type);
4488 Set_Flag246 (Id, V);
4489 end Set_Is_Underlying_Record_View;
4491 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4492 begin
4493 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4494 Set_Flag144 (Id, V);
4495 end Set_Is_Unsigned_Type;
4497 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4498 begin
4499 pragma Assert (Ekind (Id) = E_Procedure);
4500 Set_Flag127 (Id, V);
4501 end Set_Is_Valued_Procedure;
4503 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4504 begin
4505 pragma Assert (Is_Child_Unit (Id));
4506 Set_Flag116 (Id, V);
4507 end Set_Is_Visible_Child_Unit;
4509 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4510 begin
4511 Set_Flag206 (Id, V);
4512 end Set_Is_Visible_Formal;
4514 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4515 begin
4516 pragma Assert (Ekind (Id) = E_Exception);
4517 Set_Flag133 (Id, V);
4518 end Set_Is_VMS_Exception;
4520 procedure Set_Is_Volatile (Id : E; V : B := True) is
4521 begin
4522 pragma Assert (Nkind (Id) in N_Entity);
4523 Set_Flag16 (Id, V);
4524 end Set_Is_Volatile;
4526 procedure Set_Itype_Printed (Id : E; V : B := True) is
4527 begin
4528 pragma Assert (Is_Itype (Id));
4529 Set_Flag202 (Id, V);
4530 end Set_Itype_Printed;
4532 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4533 begin
4534 Set_Flag32 (Id, V);
4535 end Set_Kill_Elaboration_Checks;
4537 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4538 begin
4539 Set_Flag33 (Id, V);
4540 end Set_Kill_Range_Checks;
4542 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4543 begin
4544 Set_Flag34 (Id, V);
4545 end Set_Kill_Tag_Checks;
4547 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4548 begin
4549 pragma Assert (Is_Type (Id));
4550 Set_Flag207 (Id, V);
4551 end Set_Known_To_Have_Preelab_Init;
4553 procedure Set_Last_Assignment (Id : E; V : N) is
4554 begin
4555 pragma Assert (Is_Assignable (Id));
4556 Set_Node26 (Id, V);
4557 end Set_Last_Assignment;
4559 procedure Set_Last_Entity (Id : E; V : E) is
4560 begin
4561 Set_Node20 (Id, V);
4562 end Set_Last_Entity;
4564 procedure Set_Limited_View (Id : E; V : E) is
4565 begin
4566 pragma Assert (Ekind (Id) = E_Package);
4567 Set_Node23 (Id, V);
4568 end Set_Limited_View;
4570 procedure Set_Lit_Indexes (Id : E; V : E) is
4571 begin
4572 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4573 Set_Node15 (Id, V);
4574 end Set_Lit_Indexes;
4576 procedure Set_Lit_Strings (Id : E; V : E) is
4577 begin
4578 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4579 Set_Node16 (Id, V);
4580 end Set_Lit_Strings;
4582 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4583 begin
4584 pragma Assert (Is_Formal (Id));
4585 Set_Flag205 (Id, V);
4586 end Set_Low_Bound_Tested;
4588 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4589 begin
4590 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4591 Set_Flag84 (Id, V);
4592 end Set_Machine_Radix_10;
4594 procedure Set_Master_Id (Id : E; V : E) is
4595 begin
4596 pragma Assert (Is_Access_Type (Id));
4597 Set_Node17 (Id, V);
4598 end Set_Master_Id;
4600 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4601 begin
4602 Set_Flag168 (Id, V);
4603 end Set_Materialize_Entity;
4605 procedure Set_Mechanism (Id : E; V : M) is
4606 begin
4607 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4608 Set_Uint8 (Id, UI_From_Int (V));
4609 end Set_Mechanism;
4611 procedure Set_Modulus (Id : E; V : U) is
4612 begin
4613 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4614 Set_Uint17 (Id, V);
4615 end Set_Modulus;
4617 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4618 begin
4619 pragma Assert (Is_Type (Id));
4620 Set_Flag183 (Id, V);
4621 end Set_Must_Be_On_Byte_Boundary;
4623 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4624 begin
4625 pragma Assert (Is_Type (Id));
4626 Set_Flag208 (Id, V);
4627 end Set_Must_Have_Preelab_Init;
4629 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4630 begin
4631 Set_Flag147 (Id, V);
4632 end Set_Needs_Debug_Info;
4634 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4635 begin
4636 pragma Assert
4637 (Is_Overloadable (Id)
4638 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4639 Set_Flag22 (Id, V);
4640 end Set_Needs_No_Actuals;
4642 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4643 begin
4644 Set_Flag115 (Id, V);
4645 end Set_Never_Set_In_Source;
4647 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4648 begin
4649 Set_Node12 (Id, V);
4650 end Set_Next_Inlined_Subprogram;
4652 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4653 begin
4654 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4655 Set_Flag131 (Id, V);
4656 end Set_No_Pool_Assigned;
4658 procedure Set_No_Return (Id : E; V : B := True) is
4659 begin
4660 pragma Assert
4661 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4662 Set_Flag113 (Id, V);
4663 end Set_No_Return;
4665 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4666 begin
4667 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4668 Set_Flag136 (Id, V);
4669 end Set_No_Strict_Aliasing;
4671 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4672 begin
4673 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4674 Set_Flag58 (Id, V);
4675 end Set_Non_Binary_Modulus;
4677 procedure Set_Non_Limited_View (Id : E; V : E) is
4678 begin
4679 pragma Assert (Ekind (Id) in Incomplete_Kind);
4680 Set_Node17 (Id, V);
4681 end Set_Non_Limited_View;
4683 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4684 begin
4685 pragma Assert
4686 (Root_Type (Id) = Standard_Boolean
4687 and then Ekind (Id) = E_Enumeration_Type);
4688 Set_Flag162 (Id, V);
4689 end Set_Nonzero_Is_True;
4691 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4692 begin
4693 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4694 Set_Uint8 (Id, V);
4695 end Set_Normalized_First_Bit;
4697 procedure Set_Normalized_Position (Id : E; V : U) is
4698 begin
4699 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4700 Set_Uint14 (Id, V);
4701 end Set_Normalized_Position;
4703 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4704 begin
4705 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4706 Set_Uint10 (Id, V);
4707 end Set_Normalized_Position_Max;
4709 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4710 begin
4711 pragma Assert (Ekind (Id) = E_Variable);
4712 Set_Flag247 (Id, V);
4713 end Set_OK_To_Rename;
4715 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4716 begin
4717 pragma Assert
4718 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4719 Set_Flag239 (Id, V);
4720 end Set_OK_To_Reorder_Components;
4722 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4723 begin
4724 pragma Assert
4725 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4726 Set_Flag241 (Id, V);
4727 end Set_Optimize_Alignment_Space;
4729 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4730 begin
4731 pragma Assert
4732 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4733 Set_Flag242 (Id, V);
4734 end Set_Optimize_Alignment_Time;
4736 procedure Set_Original_Array_Type (Id : E; V : E) is
4737 begin
4738 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4739 Set_Node21 (Id, V);
4740 end Set_Original_Array_Type;
4742 procedure Set_Original_Record_Component (Id : E; V : E) is
4743 begin
4744 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4745 Set_Node22 (Id, V);
4746 end Set_Original_Record_Component;
4748 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4749 begin
4750 Set_Flag243 (Id, V);
4751 end Set_Overlays_Constant;
4753 procedure Set_Overridden_Operation (Id : E; V : E) is
4754 begin
4755 Set_Node26 (Id, V);
4756 end Set_Overridden_Operation;
4758 procedure Set_Package_Instantiation (Id : E; V : N) is
4759 begin
4760 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4761 Set_Node26 (Id, V);
4762 end Set_Package_Instantiation;
4764 procedure Set_Packed_Array_Type (Id : E; V : E) is
4765 begin
4766 pragma Assert (Is_Array_Type (Id));
4767 Set_Node23 (Id, V);
4768 end Set_Packed_Array_Type;
4770 procedure Set_Parent_Subtype (Id : E; V : E) is
4771 begin
4772 pragma Assert (Ekind (Id) = E_Record_Type);
4773 Set_Node19 (Id, V);
4774 end Set_Parent_Subtype;
4776 procedure Set_Postcondition_Proc (Id : E; V : E) is
4777 begin
4778 pragma Assert (Ekind (Id) = E_Procedure);
4779 Set_Node8 (Id, V);
4780 end Set_Postcondition_Proc;
4782 procedure Set_Primitive_Operations (Id : E; V : L) is
4783 begin
4784 pragma Assert (Is_Tagged_Type (Id));
4785 Set_Elist15 (Id, V);
4786 end Set_Primitive_Operations;
4788 procedure Set_Prival (Id : E; V : E) is
4789 begin
4790 pragma Assert (Is_Protected_Component (Id));
4791 Set_Node17 (Id, V);
4792 end Set_Prival;
4794 procedure Set_Prival_Link (Id : E; V : E) is
4795 begin
4796 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4797 Set_Node20 (Id, V);
4798 end Set_Prival_Link;
4800 procedure Set_Private_Dependents (Id : E; V : L) is
4801 begin
4802 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4803 Set_Elist18 (Id, V);
4804 end Set_Private_Dependents;
4806 procedure Set_Private_View (Id : E; V : N) is
4807 begin
4808 pragma Assert (Is_Private_Type (Id));
4809 Set_Node22 (Id, V);
4810 end Set_Private_View;
4812 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4813 begin
4814 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4815 Set_Node11 (Id, V);
4816 end Set_Protected_Body_Subprogram;
4818 procedure Set_Protected_Formal (Id : E; V : E) is
4819 begin
4820 pragma Assert (Is_Formal (Id));
4821 Set_Node22 (Id, V);
4822 end Set_Protected_Formal;
4824 procedure Set_Protection_Object (Id : E; V : E) is
4825 begin
4826 pragma Assert (Ekind_In (Id, E_Entry,
4827 E_Entry_Family,
4828 E_Function,
4829 E_Procedure));
4830 Set_Node23 (Id, V);
4831 end Set_Protection_Object;
4833 procedure Set_Reachable (Id : E; V : B := True) is
4834 begin
4835 Set_Flag49 (Id, V);
4836 end Set_Reachable;
4838 procedure Set_Referenced (Id : E; V : B := True) is
4839 begin
4840 Set_Flag156 (Id, V);
4841 end Set_Referenced;
4843 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4844 begin
4845 Set_Flag36 (Id, V);
4846 end Set_Referenced_As_LHS;
4848 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4849 begin
4850 Set_Flag227 (Id, V);
4851 end Set_Referenced_As_Out_Parameter;
4853 procedure Set_Referenced_Object (Id : E; V : N) is
4854 begin
4855 pragma Assert (Is_Type (Id));
4856 Set_Node10 (Id, V);
4857 end Set_Referenced_Object;
4859 procedure Set_Register_Exception_Call (Id : E; V : N) is
4860 begin
4861 pragma Assert (Ekind (Id) = E_Exception);
4862 Set_Node20 (Id, V);
4863 end Set_Register_Exception_Call;
4865 procedure Set_Related_Array_Object (Id : E; V : E) is
4866 begin
4867 pragma Assert (Is_Array_Type (Id));
4868 Set_Node19 (Id, V);
4869 end Set_Related_Array_Object;
4871 procedure Set_Related_Expression (Id : E; V : N) is
4872 begin
4873 pragma Assert (Ekind (Id) in Type_Kind
4874 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4875 Set_Node24 (Id, V);
4876 end Set_Related_Expression;
4878 procedure Set_Related_Instance (Id : E; V : E) is
4879 begin
4880 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4881 Set_Node15 (Id, V);
4882 end Set_Related_Instance;
4884 procedure Set_Related_Type (Id : E; V : E) is
4885 begin
4886 pragma Assert (Ekind_In (Id, E_Component, E_Constant));
4887 Set_Node26 (Id, V);
4888 end Set_Related_Type;
4890 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4891 begin
4892 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4893 Set_Node26 (Id, V);
4894 end Set_Relative_Deadline_Variable;
4896 procedure Set_Renamed_Entity (Id : E; V : N) is
4897 begin
4898 Set_Node18 (Id, V);
4899 end Set_Renamed_Entity;
4901 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4902 begin
4903 pragma Assert (Ekind (Id) = E_Package);
4904 Set_Flag231 (Id, V);
4905 end Set_Renamed_In_Spec;
4907 procedure Set_Renamed_Object (Id : E; V : N) is
4908 begin
4909 Set_Node18 (Id, V);
4910 end Set_Renamed_Object;
4912 procedure Set_Renaming_Map (Id : E; V : U) is
4913 begin
4914 Set_Uint9 (Id, V);
4915 end Set_Renaming_Map;
4917 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4918 begin
4919 pragma Assert (Is_Overloadable (Id));
4920 Set_Flag213 (Id, V);
4921 end Set_Requires_Overriding;
4923 procedure Set_Return_Present (Id : E; V : B := True) is
4924 begin
4925 Set_Flag54 (Id, V);
4926 end Set_Return_Present;
4928 procedure Set_Return_Applies_To (Id : E; V : N) is
4929 begin
4930 Set_Node8 (Id, V);
4931 end Set_Return_Applies_To;
4933 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4934 begin
4935 Set_Flag90 (Id, V);
4936 end Set_Returns_By_Ref;
4938 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4939 begin
4940 pragma Assert
4941 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4942 Set_Flag164 (Id, V);
4943 end Set_Reverse_Bit_Order;
4945 procedure Set_RM_Size (Id : E; V : U) is
4946 begin
4947 pragma Assert (Is_Type (Id));
4948 Set_Uint13 (Id, V);
4949 end Set_RM_Size;
4951 procedure Set_Scalar_Range (Id : E; V : N) is
4952 begin
4953 Set_Node20 (Id, V);
4954 end Set_Scalar_Range;
4956 procedure Set_Scale_Value (Id : E; V : U) is
4957 begin
4958 Set_Uint15 (Id, V);
4959 end Set_Scale_Value;
4961 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4962 begin
4963 pragma Assert (not Is_Record_Type (Id));
4964 Set_Uint22 (Id, V);
4965 end Set_Scope_Depth_Value;
4967 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4968 begin
4969 Set_Flag167 (Id, V);
4970 end Set_Sec_Stack_Needed_For_Return;
4972 procedure Set_Shadow_Entities (Id : E; V : S) is
4973 begin
4974 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
4975 Set_List14 (Id, V);
4976 end Set_Shadow_Entities;
4978 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
4979 begin
4980 pragma Assert (Ekind (Id) = E_Variable);
4981 Set_Node22 (Id, V);
4982 end Set_Shared_Var_Procs_Instance;
4984 procedure Set_Size_Check_Code (Id : E; V : N) is
4985 begin
4986 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4987 Set_Node19 (Id, V);
4988 end Set_Size_Check_Code;
4990 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4991 begin
4992 Set_Flag177 (Id, V);
4993 end Set_Size_Depends_On_Discriminant;
4995 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4996 begin
4997 Set_Flag92 (Id, V);
4998 end Set_Size_Known_At_Compile_Time;
5000 procedure Set_Small_Value (Id : E; V : R) is
5001 begin
5002 pragma Assert (Is_Fixed_Point_Type (Id));
5003 Set_Ureal21 (Id, V);
5004 end Set_Small_Value;
5006 procedure Set_Spec_Entity (Id : E; V : E) is
5007 begin
5008 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5009 Set_Node19 (Id, V);
5010 end Set_Spec_Entity;
5012 procedure Set_Spec_PPC_List (Id : E; V : N) is
5013 begin
5014 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
5015 Set_Node24 (Id, V);
5016 end Set_Spec_PPC_List;
5018 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5019 begin
5020 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5021 pragma Assert (Id = Base_Type (Id));
5022 Set_Node15 (Id, V);
5023 end Set_Storage_Size_Variable;
5025 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5026 begin
5027 pragma Assert (Ekind (Id) = E_Package);
5028 Set_Flag77 (Id, V);
5029 end Set_Static_Elaboration_Desired;
5031 procedure Set_Static_Initialization (Id : E; V : N) is
5032 begin
5033 pragma Assert
5034 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5035 Set_Node26 (Id, V);
5036 end Set_Static_Initialization;
5038 procedure Set_Stored_Constraint (Id : E; V : L) is
5039 begin
5040 pragma Assert (Nkind (Id) in N_Entity);
5041 Set_Elist23 (Id, V);
5042 end Set_Stored_Constraint;
5044 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5045 begin
5046 pragma Assert (Id = Base_Type (Id));
5047 Set_Flag145 (Id, V);
5048 end Set_Strict_Alignment;
5050 procedure Set_String_Literal_Length (Id : E; V : U) is
5051 begin
5052 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5053 Set_Uint16 (Id, V);
5054 end Set_String_Literal_Length;
5056 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5057 begin
5058 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5059 Set_Node15 (Id, V);
5060 end Set_String_Literal_Low_Bound;
5062 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5063 begin
5064 Set_Flag148 (Id, V);
5065 end Set_Suppress_Elaboration_Warnings;
5067 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5068 begin
5069 pragma Assert (Id = Base_Type (Id));
5070 Set_Flag105 (Id, V);
5071 end Set_Suppress_Init_Proc;
5073 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5074 begin
5075 Set_Flag165 (Id, V);
5076 end Set_Suppress_Style_Checks;
5078 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5079 begin
5080 Set_Flag217 (Id, V);
5081 end Set_Suppress_Value_Tracking_On_Call;
5083 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5084 begin
5085 pragma Assert (Ekind (Id) in Task_Kind);
5086 Set_Node25 (Id, V);
5087 end Set_Task_Body_Procedure;
5089 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5090 begin
5091 Set_Flag41 (Id, V);
5092 end Set_Treat_As_Volatile;
5094 procedure Set_Underlying_Full_View (Id : E; V : E) is
5095 begin
5096 pragma Assert (Ekind (Id) in Private_Kind);
5097 Set_Node19 (Id, V);
5098 end Set_Underlying_Full_View;
5100 procedure Set_Underlying_Record_View (Id : E; V : E) is
5101 begin
5102 pragma Assert (Ekind (Id) = E_Record_Type);
5103 Set_Node28 (Id, V);
5104 end Set_Underlying_Record_View;
5106 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5107 begin
5108 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5109 Set_Flag216 (Id, V);
5110 end Set_Universal_Aliasing;
5112 procedure Set_Unset_Reference (Id : E; V : N) is
5113 begin
5114 Set_Node16 (Id, V);
5115 end Set_Unset_Reference;
5117 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5118 begin
5119 Set_Flag95 (Id, V);
5120 end Set_Uses_Sec_Stack;
5122 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5123 begin
5124 Set_Flag222 (Id, V);
5125 end Set_Used_As_Generic_Actual;
5127 procedure Set_Vax_Float (Id : E; V : B := True) is
5128 begin
5129 pragma Assert (Id = Base_Type (Id));
5130 Set_Flag151 (Id, V);
5131 end Set_Vax_Float;
5133 procedure Set_Warnings_Off (Id : E; V : B := True) is
5134 begin
5135 Set_Flag96 (Id, V);
5136 end Set_Warnings_Off;
5138 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5139 begin
5140 Set_Flag236 (Id, V);
5141 end Set_Warnings_Off_Used;
5143 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5144 begin
5145 Set_Flag237 (Id, V);
5146 end Set_Warnings_Off_Used_Unmodified;
5148 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5149 begin
5150 Set_Flag238 (Id, V);
5151 end Set_Warnings_Off_Used_Unreferenced;
5153 procedure Set_Was_Hidden (Id : E; V : B := True) is
5154 begin
5155 Set_Flag196 (Id, V);
5156 end Set_Was_Hidden;
5158 procedure Set_Wrapped_Entity (Id : E; V : E) is
5159 begin
5160 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5161 and then Is_Primitive_Wrapper (Id));
5162 Set_Node27 (Id, V);
5163 end Set_Wrapped_Entity;
5165 -----------------------------------
5166 -- Field Initialization Routines --
5167 -----------------------------------
5169 procedure Init_Alignment (Id : E) is
5170 begin
5171 Set_Uint14 (Id, Uint_0);
5172 end Init_Alignment;
5174 procedure Init_Alignment (Id : E; V : Int) is
5175 begin
5176 Set_Uint14 (Id, UI_From_Int (V));
5177 end Init_Alignment;
5179 procedure Init_Component_Bit_Offset (Id : E) is
5180 begin
5181 Set_Uint11 (Id, No_Uint);
5182 end Init_Component_Bit_Offset;
5184 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5185 begin
5186 Set_Uint11 (Id, UI_From_Int (V));
5187 end Init_Component_Bit_Offset;
5189 procedure Init_Component_Size (Id : E) is
5190 begin
5191 Set_Uint22 (Id, Uint_0);
5192 end Init_Component_Size;
5194 procedure Init_Component_Size (Id : E; V : Int) is
5195 begin
5196 Set_Uint22 (Id, UI_From_Int (V));
5197 end Init_Component_Size;
5199 procedure Init_Digits_Value (Id : E) is
5200 begin
5201 Set_Uint17 (Id, Uint_0);
5202 end Init_Digits_Value;
5204 procedure Init_Digits_Value (Id : E; V : Int) is
5205 begin
5206 Set_Uint17 (Id, UI_From_Int (V));
5207 end Init_Digits_Value;
5209 procedure Init_Esize (Id : E) is
5210 begin
5211 Set_Uint12 (Id, Uint_0);
5212 end Init_Esize;
5214 procedure Init_Esize (Id : E; V : Int) is
5215 begin
5216 Set_Uint12 (Id, UI_From_Int (V));
5217 end Init_Esize;
5219 procedure Init_Normalized_First_Bit (Id : E) is
5220 begin
5221 Set_Uint8 (Id, No_Uint);
5222 end Init_Normalized_First_Bit;
5224 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5225 begin
5226 Set_Uint8 (Id, UI_From_Int (V));
5227 end Init_Normalized_First_Bit;
5229 procedure Init_Normalized_Position (Id : E) is
5230 begin
5231 Set_Uint14 (Id, No_Uint);
5232 end Init_Normalized_Position;
5234 procedure Init_Normalized_Position (Id : E; V : Int) is
5235 begin
5236 Set_Uint14 (Id, UI_From_Int (V));
5237 end Init_Normalized_Position;
5239 procedure Init_Normalized_Position_Max (Id : E) is
5240 begin
5241 Set_Uint10 (Id, No_Uint);
5242 end Init_Normalized_Position_Max;
5244 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5245 begin
5246 Set_Uint10 (Id, UI_From_Int (V));
5247 end Init_Normalized_Position_Max;
5249 procedure Init_RM_Size (Id : E) is
5250 begin
5251 Set_Uint13 (Id, Uint_0);
5252 end Init_RM_Size;
5254 procedure Init_RM_Size (Id : E; V : Int) is
5255 begin
5256 Set_Uint13 (Id, UI_From_Int (V));
5257 end Init_RM_Size;
5259 -----------------------------
5260 -- Init_Component_Location --
5261 -----------------------------
5263 procedure Init_Component_Location (Id : E) is
5264 begin
5265 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5266 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5267 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5268 Set_Uint12 (Id, Uint_0); -- Esize
5269 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5270 end Init_Component_Location;
5272 ---------------
5273 -- Init_Size --
5274 ---------------
5276 procedure Init_Size (Id : E; V : Int) is
5277 begin
5278 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5279 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5280 end Init_Size;
5282 ---------------------
5283 -- Init_Size_Align --
5284 ---------------------
5286 procedure Init_Size_Align (Id : E) is
5287 begin
5288 Set_Uint12 (Id, Uint_0); -- Esize
5289 Set_Uint13 (Id, Uint_0); -- RM_Size
5290 Set_Uint14 (Id, Uint_0); -- Alignment
5291 end Init_Size_Align;
5293 ----------------------------------------------
5294 -- Type Representation Attribute Predicates --
5295 ----------------------------------------------
5297 function Known_Alignment (E : Entity_Id) return B is
5298 begin
5299 return Uint14 (E) /= Uint_0
5300 and then Uint14 (E) /= No_Uint;
5301 end Known_Alignment;
5303 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5304 begin
5305 return Uint11 (E) /= No_Uint;
5306 end Known_Component_Bit_Offset;
5308 function Known_Component_Size (E : Entity_Id) return B is
5309 begin
5310 return Uint22 (Base_Type (E)) /= Uint_0
5311 and then Uint22 (Base_Type (E)) /= No_Uint;
5312 end Known_Component_Size;
5314 function Known_Esize (E : Entity_Id) return B is
5315 begin
5316 return Uint12 (E) /= Uint_0
5317 and then Uint12 (E) /= No_Uint;
5318 end Known_Esize;
5320 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5321 begin
5322 return Uint8 (E) /= No_Uint;
5323 end Known_Normalized_First_Bit;
5325 function Known_Normalized_Position (E : Entity_Id) return B is
5326 begin
5327 return Uint14 (E) /= No_Uint;
5328 end Known_Normalized_Position;
5330 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5331 begin
5332 return Uint10 (E) /= No_Uint;
5333 end Known_Normalized_Position_Max;
5335 function Known_RM_Size (E : Entity_Id) return B is
5336 begin
5337 return Uint13 (E) /= No_Uint
5338 and then (Uint13 (E) /= Uint_0
5339 or else Is_Discrete_Type (E)
5340 or else Is_Fixed_Point_Type (E));
5341 end Known_RM_Size;
5343 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5344 begin
5345 return Uint11 (E) /= No_Uint
5346 and then Uint11 (E) >= Uint_0;
5347 end Known_Static_Component_Bit_Offset;
5349 function Known_Static_Component_Size (E : Entity_Id) return B is
5350 begin
5351 return Uint22 (Base_Type (E)) > Uint_0;
5352 end Known_Static_Component_Size;
5354 function Known_Static_Esize (E : Entity_Id) return B is
5355 begin
5356 return Uint12 (E) > Uint_0
5357 and then not Is_Generic_Type (E);
5358 end Known_Static_Esize;
5360 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5361 begin
5362 return Uint8 (E) /= No_Uint
5363 and then Uint8 (E) >= Uint_0;
5364 end Known_Static_Normalized_First_Bit;
5366 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5367 begin
5368 return Uint14 (E) /= No_Uint
5369 and then Uint14 (E) >= Uint_0;
5370 end Known_Static_Normalized_Position;
5372 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5373 begin
5374 return Uint10 (E) /= No_Uint
5375 and then Uint10 (E) >= Uint_0;
5376 end Known_Static_Normalized_Position_Max;
5378 function Known_Static_RM_Size (E : Entity_Id) return B is
5379 begin
5380 return (Uint13 (E) > Uint_0
5381 or else Is_Discrete_Type (E)
5382 or else Is_Fixed_Point_Type (E))
5383 and then not Is_Generic_Type (E);
5384 end Known_Static_RM_Size;
5386 function Unknown_Alignment (E : Entity_Id) return B is
5387 begin
5388 return Uint14 (E) = Uint_0
5389 or else Uint14 (E) = No_Uint;
5390 end Unknown_Alignment;
5392 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5393 begin
5394 return Uint11 (E) = No_Uint;
5395 end Unknown_Component_Bit_Offset;
5397 function Unknown_Component_Size (E : Entity_Id) return B is
5398 begin
5399 return Uint22 (Base_Type (E)) = Uint_0
5400 or else
5401 Uint22 (Base_Type (E)) = No_Uint;
5402 end Unknown_Component_Size;
5404 function Unknown_Esize (E : Entity_Id) return B is
5405 begin
5406 return Uint12 (E) = No_Uint
5407 or else
5408 Uint12 (E) = Uint_0;
5409 end Unknown_Esize;
5411 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5412 begin
5413 return Uint8 (E) = No_Uint;
5414 end Unknown_Normalized_First_Bit;
5416 function Unknown_Normalized_Position (E : Entity_Id) return B is
5417 begin
5418 return Uint14 (E) = No_Uint;
5419 end Unknown_Normalized_Position;
5421 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5422 begin
5423 return Uint10 (E) = No_Uint;
5424 end Unknown_Normalized_Position_Max;
5426 function Unknown_RM_Size (E : Entity_Id) return B is
5427 begin
5428 return (Uint13 (E) = Uint_0
5429 and then not Is_Discrete_Type (E)
5430 and then not Is_Fixed_Point_Type (E))
5431 or else Uint13 (E) = No_Uint;
5432 end Unknown_RM_Size;
5434 --------------------
5435 -- Address_Clause --
5436 --------------------
5438 function Address_Clause (Id : E) return N is
5439 begin
5440 return Rep_Clause (Id, Name_Address);
5441 end Address_Clause;
5443 ----------------------
5444 -- Alignment_Clause --
5445 ----------------------
5447 function Alignment_Clause (Id : E) return N is
5448 begin
5449 return Rep_Clause (Id, Name_Alignment);
5450 end Alignment_Clause;
5452 -------------------
5453 -- Append_Entity --
5454 -------------------
5456 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5457 begin
5458 if Last_Entity (V) = Empty then
5459 Set_First_Entity (Id => V, V => Id);
5460 else
5461 Set_Next_Entity (Last_Entity (V), Id);
5462 end if;
5464 Set_Next_Entity (Id, Empty);
5465 Set_Scope (Id, V);
5466 Set_Last_Entity (Id => V, V => Id);
5467 end Append_Entity;
5469 ---------------
5470 -- Base_Type --
5471 ---------------
5473 function Base_Type (Id : E) return E is
5474 begin
5475 case Ekind (Id) is
5476 when E_Enumeration_Subtype |
5477 E_Incomplete_Type |
5478 E_Signed_Integer_Subtype |
5479 E_Modular_Integer_Subtype |
5480 E_Floating_Point_Subtype |
5481 E_Ordinary_Fixed_Point_Subtype |
5482 E_Decimal_Fixed_Point_Subtype |
5483 E_Array_Subtype |
5484 E_String_Subtype |
5485 E_Record_Subtype |
5486 E_Private_Subtype |
5487 E_Record_Subtype_With_Private |
5488 E_Limited_Private_Subtype |
5489 E_Access_Subtype |
5490 E_Protected_Subtype |
5491 E_Task_Subtype |
5492 E_String_Literal_Subtype |
5493 E_Class_Wide_Subtype =>
5494 return Etype (Id);
5496 when others =>
5497 return Id;
5498 end case;
5499 end Base_Type;
5501 -------------------------
5502 -- Component_Alignment --
5503 -------------------------
5505 -- Component Alignment is encoded using two flags, Flag128/129 as
5506 -- follows. Note that both flags False = Align_Default, so that the
5507 -- default initialization of flags to False initializes component
5508 -- alignment to the default value as required.
5510 -- Flag128 Flag129 Value
5511 -- ------- ------- -----
5512 -- False False Calign_Default
5513 -- False True Calign_Component_Size
5514 -- True False Calign_Component_Size_4
5515 -- True True Calign_Storage_Unit
5517 function Component_Alignment (Id : E) return C is
5518 BT : constant Node_Id := Base_Type (Id);
5520 begin
5521 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5523 if Flag128 (BT) then
5524 if Flag129 (BT) then
5525 return Calign_Storage_Unit;
5526 else
5527 return Calign_Component_Size_4;
5528 end if;
5530 else
5531 if Flag129 (BT) then
5532 return Calign_Component_Size;
5533 else
5534 return Calign_Default;
5535 end if;
5536 end if;
5537 end Component_Alignment;
5539 ----------------------
5540 -- Declaration_Node --
5541 ----------------------
5543 function Declaration_Node (Id : E) return N is
5544 P : Node_Id;
5546 begin
5547 if Ekind (Id) = E_Incomplete_Type
5548 and then Present (Full_View (Id))
5549 then
5550 P := Parent (Full_View (Id));
5551 else
5552 P := Parent (Id);
5553 end if;
5555 loop
5556 if Nkind (P) /= N_Selected_Component
5557 and then Nkind (P) /= N_Expanded_Name
5558 and then
5559 not (Nkind (P) = N_Defining_Program_Unit_Name
5560 and then Is_Child_Unit (Id))
5561 then
5562 return P;
5563 else
5564 P := Parent (P);
5565 end if;
5566 end loop;
5567 end Declaration_Node;
5569 ---------------------
5570 -- Designated_Type --
5571 ---------------------
5573 function Designated_Type (Id : E) return E is
5574 Desig_Type : E;
5576 begin
5577 Desig_Type := Directly_Designated_Type (Id);
5579 if Ekind (Desig_Type) = E_Incomplete_Type
5580 and then Present (Full_View (Desig_Type))
5581 then
5582 return Full_View (Desig_Type);
5584 elsif Is_Class_Wide_Type (Desig_Type)
5585 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5586 and then Present (Full_View (Etype (Desig_Type)))
5587 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5588 then
5589 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5591 else
5592 return Desig_Type;
5593 end if;
5594 end Designated_Type;
5596 ----------------------
5597 -- Entry_Index_Type --
5598 ----------------------
5600 function Entry_Index_Type (Id : E) return N is
5601 begin
5602 pragma Assert (Ekind (Id) = E_Entry_Family);
5603 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5604 end Entry_Index_Type;
5606 ---------------------
5607 -- First_Component --
5608 ---------------------
5610 function First_Component (Id : E) return E is
5611 Comp_Id : E;
5613 begin
5614 pragma Assert
5615 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5617 Comp_Id := First_Entity (Id);
5618 while Present (Comp_Id) loop
5619 exit when Ekind (Comp_Id) = E_Component;
5620 Comp_Id := Next_Entity (Comp_Id);
5621 end loop;
5623 return Comp_Id;
5624 end First_Component;
5626 -------------------------------------
5627 -- First_Component_Or_Discriminant --
5628 -------------------------------------
5630 function First_Component_Or_Discriminant (Id : E) return E is
5631 Comp_Id : E;
5633 begin
5634 pragma Assert
5635 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5637 Comp_Id := First_Entity (Id);
5638 while Present (Comp_Id) loop
5639 exit when Ekind (Comp_Id) = E_Component
5640 or else
5641 Ekind (Comp_Id) = E_Discriminant;
5642 Comp_Id := Next_Entity (Comp_Id);
5643 end loop;
5645 return Comp_Id;
5646 end First_Component_Or_Discriminant;
5648 ------------------
5649 -- First_Formal --
5650 ------------------
5652 function First_Formal (Id : E) return E is
5653 Formal : E;
5655 begin
5656 pragma Assert
5657 (Is_Overloadable (Id)
5658 or else Ekind_In (Id, E_Entry_Family,
5659 E_Subprogram_Body,
5660 E_Subprogram_Type));
5662 if Ekind (Id) = E_Enumeration_Literal then
5663 return Empty;
5665 else
5666 Formal := First_Entity (Id);
5668 if Present (Formal) and then Is_Formal (Formal) then
5669 return Formal;
5670 else
5671 return Empty;
5672 end if;
5673 end if;
5674 end First_Formal;
5676 ------------------------------
5677 -- First_Formal_With_Extras --
5678 ------------------------------
5680 function First_Formal_With_Extras (Id : E) return E is
5681 Formal : E;
5683 begin
5684 pragma Assert
5685 (Is_Overloadable (Id)
5686 or else Ekind_In (Id, E_Entry_Family,
5687 E_Subprogram_Body,
5688 E_Subprogram_Type));
5690 if Ekind (Id) = E_Enumeration_Literal then
5691 return Empty;
5693 else
5694 Formal := First_Entity (Id);
5696 if Present (Formal) and then Is_Formal (Formal) then
5697 return Formal;
5698 else
5699 return Extra_Formals (Id); -- Empty if no extra formals
5700 end if;
5701 end if;
5702 end First_Formal_With_Extras;
5704 -------------------------------------
5705 -- Get_Attribute_Definition_Clause --
5706 -------------------------------------
5708 function Get_Attribute_Definition_Clause
5709 (E : Entity_Id;
5710 Id : Attribute_Id) return Node_Id
5712 N : Node_Id;
5714 begin
5715 N := First_Rep_Item (E);
5716 while Present (N) loop
5717 if Nkind (N) = N_Attribute_Definition_Clause
5718 and then Get_Attribute_Id (Chars (N)) = Id
5719 then
5720 return N;
5721 else
5722 Next_Rep_Item (N);
5723 end if;
5724 end loop;
5726 return Empty;
5727 end Get_Attribute_Definition_Clause;
5729 -------------------
5730 -- Get_Full_View --
5731 -------------------
5733 function Get_Full_View (T : Entity_Id) return Entity_Id is
5734 begin
5735 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5736 return Full_View (T);
5738 elsif Is_Class_Wide_Type (T)
5739 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5740 and then Present (Full_View (Root_Type (T)))
5741 then
5742 return Class_Wide_Type (Full_View (Root_Type (T)));
5744 else
5745 return T;
5746 end if;
5747 end Get_Full_View;
5749 --------------------------------------
5750 -- Get_Record_Representation_Clause --
5751 --------------------------------------
5753 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5754 N : Node_Id;
5756 begin
5757 N := First_Rep_Item (E);
5758 while Present (N) loop
5759 if Nkind (N) = N_Record_Representation_Clause then
5760 return N;
5761 end if;
5763 Next_Rep_Item (N);
5764 end loop;
5766 return Empty;
5767 end Get_Record_Representation_Clause;
5769 --------------------
5770 -- Get_Rep_Pragma --
5771 --------------------
5773 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5774 N : Node_Id;
5776 begin
5777 N := First_Rep_Item (E);
5778 while Present (N) loop
5779 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5780 return N;
5781 end if;
5783 Next_Rep_Item (N);
5784 end loop;
5786 return Empty;
5787 end Get_Rep_Pragma;
5789 ------------------------
5790 -- Has_Attach_Handler --
5791 ------------------------
5793 function Has_Attach_Handler (Id : E) return B is
5794 Ritem : Node_Id;
5796 begin
5797 pragma Assert (Is_Protected_Type (Id));
5799 Ritem := First_Rep_Item (Id);
5800 while Present (Ritem) loop
5801 if Nkind (Ritem) = N_Pragma
5802 and then Pragma_Name (Ritem) = Name_Attach_Handler
5803 then
5804 return True;
5805 else
5806 Ritem := Next_Rep_Item (Ritem);
5807 end if;
5808 end loop;
5810 return False;
5811 end Has_Attach_Handler;
5813 -------------------------------------
5814 -- Has_Attribute_Definition_Clause --
5815 -------------------------------------
5817 function Has_Attribute_Definition_Clause
5818 (E : Entity_Id;
5819 Id : Attribute_Id) return Boolean
5821 begin
5822 return Present (Get_Attribute_Definition_Clause (E, Id));
5823 end Has_Attribute_Definition_Clause;
5825 -----------------
5826 -- Has_Entries --
5827 -----------------
5829 function Has_Entries (Id : E) return B is
5830 Ent : Entity_Id;
5832 begin
5833 pragma Assert (Is_Concurrent_Type (Id));
5835 Ent := First_Entity (Id);
5836 while Present (Ent) loop
5837 if Is_Entry (Ent) then
5838 return True;
5839 end if;
5841 Ent := Next_Entity (Ent);
5842 end loop;
5844 return False;
5845 end Has_Entries;
5847 ----------------------------
5848 -- Has_Foreign_Convention --
5849 ----------------------------
5851 function Has_Foreign_Convention (Id : E) return B is
5852 begin
5853 -- While regular Intrinsics such as the Standard operators fit in the
5854 -- "Ada" convention, those with an Interface_Name materialize GCC
5855 -- builtin imports for which Ada special treatments shouldn't apply.
5857 return Convention (Id) in Foreign_Convention
5858 or else (Convention (Id) = Convention_Intrinsic
5859 and then Present (Interface_Name (Id)));
5860 end Has_Foreign_Convention;
5862 ---------------------------
5863 -- Has_Interrupt_Handler --
5864 ---------------------------
5866 function Has_Interrupt_Handler (Id : E) return B is
5867 Ritem : Node_Id;
5869 begin
5870 pragma Assert (Is_Protected_Type (Id));
5872 Ritem := First_Rep_Item (Id);
5873 while Present (Ritem) loop
5874 if Nkind (Ritem) = N_Pragma
5875 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
5876 then
5877 return True;
5878 else
5879 Ritem := Next_Rep_Item (Ritem);
5880 end if;
5881 end loop;
5883 return False;
5884 end Has_Interrupt_Handler;
5886 --------------------------
5887 -- Has_Private_Ancestor --
5888 --------------------------
5890 function Has_Private_Ancestor (Id : E) return B is
5891 R : constant Entity_Id := Root_Type (Id);
5892 T1 : Entity_Id := Id;
5893 begin
5894 loop
5895 if Is_Private_Type (T1) then
5896 return True;
5897 elsif T1 = R then
5898 return False;
5899 else
5900 T1 := Etype (T1);
5901 end if;
5902 end loop;
5903 end Has_Private_Ancestor;
5905 --------------------
5906 -- Has_Rep_Pragma --
5907 --------------------
5909 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5910 begin
5911 return Present (Get_Rep_Pragma (E, Nam));
5912 end Has_Rep_Pragma;
5914 --------------------
5915 -- Has_Unmodified --
5916 --------------------
5918 function Has_Unmodified (E : Entity_Id) return Boolean is
5919 begin
5920 if Has_Pragma_Unmodified (E) then
5921 return True;
5922 elsif Warnings_Off (E) then
5923 Set_Warnings_Off_Used_Unmodified (E);
5924 return True;
5925 else
5926 return False;
5927 end if;
5928 end Has_Unmodified;
5930 ---------------------
5931 -- Has_Unreferenced --
5932 ---------------------
5934 function Has_Unreferenced (E : Entity_Id) return Boolean is
5935 begin
5936 if Has_Pragma_Unreferenced (E) then
5937 return True;
5938 elsif Warnings_Off (E) then
5939 Set_Warnings_Off_Used_Unreferenced (E);
5940 return True;
5941 else
5942 return False;
5943 end if;
5944 end Has_Unreferenced;
5946 ----------------------
5947 -- Has_Warnings_Off --
5948 ----------------------
5950 function Has_Warnings_Off (E : Entity_Id) return Boolean is
5951 begin
5952 if Warnings_Off (E) then
5953 Set_Warnings_Off_Used (E);
5954 return True;
5955 else
5956 return False;
5957 end if;
5958 end Has_Warnings_Off;
5960 ------------------------------
5961 -- Implementation_Base_Type --
5962 ------------------------------
5964 function Implementation_Base_Type (Id : E) return E is
5965 Bastyp : Entity_Id;
5966 Imptyp : Entity_Id;
5968 begin
5969 Bastyp := Base_Type (Id);
5971 if Is_Incomplete_Or_Private_Type (Bastyp) then
5972 Imptyp := Underlying_Type (Bastyp);
5974 -- If we have an implementation type, then just return it,
5975 -- otherwise we return the Base_Type anyway. This can only
5976 -- happen in error situations and should avoid some error bombs.
5978 if Present (Imptyp) then
5979 return Base_Type (Imptyp);
5980 else
5981 return Bastyp;
5982 end if;
5984 else
5985 return Bastyp;
5986 end if;
5987 end Implementation_Base_Type;
5989 ---------------------
5990 -- Is_Boolean_Type --
5991 ---------------------
5993 function Is_Boolean_Type (Id : E) return B is
5994 begin
5995 return Root_Type (Id) = Standard_Boolean;
5996 end Is_Boolean_Type;
5998 ------------------------
5999 -- Is_Constant_Object --
6000 ------------------------
6002 function Is_Constant_Object (Id : E) return B is
6003 K : constant Entity_Kind := Ekind (Id);
6004 begin
6005 return
6006 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6007 end Is_Constant_Object;
6009 --------------------
6010 -- Is_Discriminal --
6011 --------------------
6013 function Is_Discriminal (Id : E) return B is
6014 begin
6015 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6016 and then Present (Discriminal_Link (Id)));
6017 end Is_Discriminal;
6019 ----------------------
6020 -- Is_Dynamic_Scope --
6021 ----------------------
6023 function Is_Dynamic_Scope (Id : E) return B is
6024 begin
6025 return
6026 Ekind (Id) = E_Block
6027 or else
6028 Ekind (Id) = E_Function
6029 or else
6030 Ekind (Id) = E_Procedure
6031 or else
6032 Ekind (Id) = E_Subprogram_Body
6033 or else
6034 Ekind (Id) = E_Task_Type
6035 or else
6036 Ekind (Id) = E_Entry
6037 or else
6038 Ekind (Id) = E_Entry_Family
6039 or else
6040 Ekind (Id) = E_Return_Statement;
6041 end Is_Dynamic_Scope;
6043 --------------------
6044 -- Is_Entity_Name --
6045 --------------------
6047 function Is_Entity_Name (N : Node_Id) return Boolean is
6048 Kind : constant Node_Kind := Nkind (N);
6050 begin
6051 -- Identifiers, operator symbols, expanded names are entity names
6053 return Kind = N_Identifier
6054 or else Kind = N_Operator_Symbol
6055 or else Kind = N_Expanded_Name
6057 -- Attribute references are entity names if they refer to an entity.
6058 -- Note that we don't do this by testing for the presence of the
6059 -- Entity field in the N_Attribute_Reference node, since it may not
6060 -- have been set yet.
6062 or else (Kind = N_Attribute_Reference
6063 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6064 end Is_Entity_Name;
6066 -----------------------------------
6067 -- Is_Package_Or_Generic_Package --
6068 -----------------------------------
6070 function Is_Package_Or_Generic_Package (Id : E) return B is
6071 begin
6072 return
6073 Ekind (Id) = E_Package
6074 or else
6075 Ekind (Id) = E_Generic_Package;
6076 end Is_Package_Or_Generic_Package;
6078 ---------------
6079 -- Is_Prival --
6080 ---------------
6082 function Is_Prival (Id : E) return B is
6083 begin
6084 return (Ekind_In (Id, E_Constant, E_Variable)
6085 and then Present (Prival_Link (Id)));
6086 end Is_Prival;
6088 ----------------------------
6089 -- Is_Protected_Component --
6090 ----------------------------
6092 function Is_Protected_Component (Id : E) return B is
6093 begin
6094 return Ekind (Id) = E_Component
6095 and then Is_Protected_Type (Scope (Id));
6096 end Is_Protected_Component;
6098 ----------------------------
6099 -- Is_Protected_Interface --
6100 ----------------------------
6102 function Is_Protected_Interface (Id : E) return B is
6103 Typ : constant Entity_Id := Base_Type (Id);
6104 begin
6105 if not Is_Interface (Typ) then
6106 return False;
6107 elsif Is_Class_Wide_Type (Typ) then
6108 return Is_Protected_Interface (Etype (Typ));
6109 else
6110 return Protected_Present (Type_Definition (Parent (Typ)));
6111 end if;
6112 end Is_Protected_Interface;
6114 ------------------------------
6115 -- Is_Protected_Record_Type --
6116 ------------------------------
6118 function Is_Protected_Record_Type (Id : E) return B is
6119 begin
6120 return
6121 Is_Concurrent_Record_Type (Id)
6122 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6123 end Is_Protected_Record_Type;
6125 --------------------------------
6126 -- Is_Standard_Character_Type --
6127 --------------------------------
6129 function Is_Standard_Character_Type (Id : E) return B is
6130 begin
6131 if Is_Type (Id) then
6132 declare
6133 R : constant Entity_Id := Root_Type (Id);
6134 begin
6135 return
6136 R = Standard_Character
6137 or else
6138 R = Standard_Wide_Character
6139 or else
6140 R = Standard_Wide_Wide_Character;
6141 end;
6143 else
6144 return False;
6145 end if;
6146 end Is_Standard_Character_Type;
6148 --------------------
6149 -- Is_String_Type --
6150 --------------------
6152 function Is_String_Type (Id : E) return B is
6153 begin
6154 return Ekind (Id) in String_Kind
6155 or else (Is_Array_Type (Id)
6156 and then Number_Dimensions (Id) = 1
6157 and then Is_Character_Type (Component_Type (Id)));
6158 end Is_String_Type;
6160 -------------------------------
6161 -- Is_Synchronized_Interface --
6162 -------------------------------
6164 function Is_Synchronized_Interface (Id : E) return B is
6165 Typ : constant Entity_Id := Base_Type (Id);
6167 begin
6168 if not Is_Interface (Typ) then
6169 return False;
6171 elsif Is_Class_Wide_Type (Typ) then
6172 return Is_Synchronized_Interface (Etype (Typ));
6174 else
6175 return Protected_Present (Type_Definition (Parent (Typ)))
6176 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6177 or else Task_Present (Type_Definition (Parent (Typ)));
6178 end if;
6179 end Is_Synchronized_Interface;
6181 -----------------------
6182 -- Is_Task_Interface --
6183 -----------------------
6185 function Is_Task_Interface (Id : E) return B is
6186 Typ : constant Entity_Id := Base_Type (Id);
6187 begin
6188 if not Is_Interface (Typ) then
6189 return False;
6190 elsif Is_Class_Wide_Type (Typ) then
6191 return Is_Task_Interface (Etype (Typ));
6192 else
6193 return Task_Present (Type_Definition (Parent (Typ)));
6194 end if;
6195 end Is_Task_Interface;
6197 -------------------------
6198 -- Is_Task_Record_Type --
6199 -------------------------
6201 function Is_Task_Record_Type (Id : E) return B is
6202 begin
6203 return
6204 Is_Concurrent_Record_Type (Id)
6205 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6206 end Is_Task_Record_Type;
6208 ------------------------
6209 -- Is_Wrapper_Package --
6210 ------------------------
6212 function Is_Wrapper_Package (Id : E) return B is
6213 begin
6214 return (Ekind (Id) = E_Package
6215 and then Present (Related_Instance (Id)));
6216 end Is_Wrapper_Package;
6218 -----------------
6219 -- Last_Formal --
6220 -----------------
6222 function Last_Formal (Id : E) return E is
6223 Formal : E;
6225 begin
6226 pragma Assert
6227 (Is_Overloadable (Id)
6228 or else Ekind_In (Id, E_Entry_Family,
6229 E_Subprogram_Body,
6230 E_Subprogram_Type));
6232 if Ekind (Id) = E_Enumeration_Literal then
6233 return Empty;
6235 else
6236 Formal := First_Formal (Id);
6238 if Present (Formal) then
6239 while Present (Next_Formal (Formal)) loop
6240 Formal := Next_Formal (Formal);
6241 end loop;
6242 end if;
6244 return Formal;
6245 end if;
6246 end Last_Formal;
6248 --------------------
6249 -- Next_Component --
6250 --------------------
6252 function Next_Component (Id : E) return E is
6253 Comp_Id : E;
6255 begin
6256 Comp_Id := Next_Entity (Id);
6257 while Present (Comp_Id) loop
6258 exit when Ekind (Comp_Id) = E_Component;
6259 Comp_Id := Next_Entity (Comp_Id);
6260 end loop;
6262 return Comp_Id;
6263 end Next_Component;
6265 ------------------------------------
6266 -- Next_Component_Or_Discriminant --
6267 ------------------------------------
6269 function Next_Component_Or_Discriminant (Id : E) return E is
6270 Comp_Id : E;
6272 begin
6273 Comp_Id := Next_Entity (Id);
6274 while Present (Comp_Id) loop
6275 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6276 Comp_Id := Next_Entity (Comp_Id);
6277 end loop;
6279 return Comp_Id;
6280 end Next_Component_Or_Discriminant;
6282 -----------------------
6283 -- Next_Discriminant --
6284 -----------------------
6286 -- This function actually implements both Next_Discriminant and
6287 -- Next_Stored_Discriminant by making sure that the Discriminant
6288 -- returned is of the same variety as Id.
6290 function Next_Discriminant (Id : E) return E is
6292 -- Derived Tagged types with private extensions look like this...
6294 -- E_Discriminant d1
6295 -- E_Discriminant d2
6296 -- E_Component _tag
6297 -- E_Discriminant d1
6298 -- E_Discriminant d2
6299 -- ...
6301 -- so it is critical not to go past the leading discriminants
6303 D : E := Id;
6305 begin
6306 pragma Assert (Ekind (Id) = E_Discriminant);
6308 loop
6309 D := Next_Entity (D);
6310 if No (D)
6311 or else (Ekind (D) /= E_Discriminant
6312 and then not Is_Itype (D))
6313 then
6314 return Empty;
6315 end if;
6317 exit when Ekind (D) = E_Discriminant
6318 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6319 end loop;
6321 return D;
6322 end Next_Discriminant;
6324 -----------------
6325 -- Next_Formal --
6326 -----------------
6328 function Next_Formal (Id : E) return E is
6329 P : E;
6331 begin
6332 -- Follow the chain of declared entities as long as the kind of the
6333 -- entity corresponds to a formal parameter. Skip internal entities
6334 -- that may have been created for implicit subtypes, in the process
6335 -- of analyzing default expressions.
6337 P := Id;
6339 loop
6340 P := Next_Entity (P);
6342 if No (P) or else Is_Formal (P) then
6343 return P;
6344 elsif not Is_Internal (P) then
6345 return Empty;
6346 end if;
6347 end loop;
6348 end Next_Formal;
6350 -----------------------------
6351 -- Next_Formal_With_Extras --
6352 -----------------------------
6354 function Next_Formal_With_Extras (Id : E) return E is
6355 begin
6356 if Present (Extra_Formal (Id)) then
6357 return Extra_Formal (Id);
6358 else
6359 return Next_Formal (Id);
6360 end if;
6361 end Next_Formal_With_Extras;
6363 ----------------
6364 -- Next_Index --
6365 ----------------
6367 function Next_Index (Id : Node_Id) return Node_Id is
6368 begin
6369 return Next (Id);
6370 end Next_Index;
6372 ------------------
6373 -- Next_Literal --
6374 ------------------
6376 function Next_Literal (Id : E) return E is
6377 begin
6378 pragma Assert (Nkind (Id) in N_Entity);
6379 return Next (Id);
6380 end Next_Literal;
6382 ------------------------------
6383 -- Next_Stored_Discriminant --
6384 ------------------------------
6386 function Next_Stored_Discriminant (Id : E) return E is
6387 begin
6388 -- See comment in Next_Discriminant
6390 return Next_Discriminant (Id);
6391 end Next_Stored_Discriminant;
6393 -----------------------
6394 -- Number_Dimensions --
6395 -----------------------
6397 function Number_Dimensions (Id : E) return Pos is
6398 N : Int;
6399 T : Node_Id;
6401 begin
6402 if Ekind (Id) in String_Kind then
6403 return 1;
6405 else
6406 N := 0;
6407 T := First_Index (Id);
6408 while Present (T) loop
6409 N := N + 1;
6410 T := Next (T);
6411 end loop;
6413 return N;
6414 end if;
6415 end Number_Dimensions;
6417 --------------------
6418 -- Number_Entries --
6419 --------------------
6421 function Number_Entries (Id : E) return Nat is
6422 N : Int;
6423 Ent : Entity_Id;
6425 begin
6426 pragma Assert (Is_Concurrent_Type (Id));
6428 N := 0;
6429 Ent := First_Entity (Id);
6430 while Present (Ent) loop
6431 if Is_Entry (Ent) then
6432 N := N + 1;
6433 end if;
6435 Ent := Next_Entity (Ent);
6436 end loop;
6438 return N;
6439 end Number_Entries;
6441 --------------------
6442 -- Number_Formals --
6443 --------------------
6445 function Number_Formals (Id : E) return Pos is
6446 N : Int;
6447 Formal : Entity_Id;
6449 begin
6450 N := 0;
6451 Formal := First_Formal (Id);
6452 while Present (Formal) loop
6453 N := N + 1;
6454 Formal := Next_Formal (Formal);
6455 end loop;
6457 return N;
6458 end Number_Formals;
6460 --------------------
6461 -- Parameter_Mode --
6462 --------------------
6464 function Parameter_Mode (Id : E) return Formal_Kind is
6465 begin
6466 return Ekind (Id);
6467 end Parameter_Mode;
6469 ---------------------
6470 -- Record_Rep_Item --
6471 ---------------------
6473 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6474 begin
6475 Set_Next_Rep_Item (N, First_Rep_Item (E));
6476 Set_First_Rep_Item (E, N);
6477 end Record_Rep_Item;
6479 ---------------
6480 -- Root_Type --
6481 ---------------
6483 function Root_Type (Id : E) return E is
6484 T, Etyp : E;
6486 begin
6487 pragma Assert (Nkind (Id) in N_Entity);
6489 T := Base_Type (Id);
6491 if Ekind (T) = E_Class_Wide_Type then
6492 return Etype (T);
6494 elsif Ekind (T) = E_Class_Wide_Subtype then
6495 return Etype (Base_Type (T));
6497 -- ??? T comes from Base_Type, how can it be a subtype?
6498 -- Also Base_Type is supposed to be idempotent, so either way
6499 -- this is equivalent to "return Etype (T)" and should be merged
6500 -- with the E_Class_Wide_Type case.
6502 -- All other cases
6504 else
6505 loop
6506 Etyp := Etype (T);
6508 if T = Etyp then
6509 return T;
6511 -- Following test catches some error cases resulting from
6512 -- previous errors.
6514 elsif No (Etyp) then
6515 return T;
6517 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6518 return T;
6520 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6521 return T;
6522 end if;
6524 T := Etyp;
6526 -- Return if there is a circularity in the inheritance chain. This
6527 -- happens in some error situations and we do not want to get
6528 -- stuck in this loop.
6530 if T = Base_Type (Id) then
6531 return T;
6532 end if;
6533 end loop;
6534 end if;
6535 end Root_Type;
6537 -----------------
6538 -- Scope_Depth --
6539 -----------------
6541 function Scope_Depth (Id : E) return Uint is
6542 Scop : Entity_Id;
6544 begin
6545 Scop := Id;
6546 while Is_Record_Type (Scop) loop
6547 Scop := Scope (Scop);
6548 end loop;
6550 return Scope_Depth_Value (Scop);
6551 end Scope_Depth;
6553 ---------------------
6554 -- Scope_Depth_Set --
6555 ---------------------
6557 function Scope_Depth_Set (Id : E) return B is
6558 begin
6559 return not Is_Record_Type (Id)
6560 and then Field22 (Id) /= Union_Id (Empty);
6561 end Scope_Depth_Set;
6563 -----------------------------
6564 -- Set_Component_Alignment --
6565 -----------------------------
6567 -- Component Alignment is encoded using two flags, Flag128/129 as
6568 -- follows. Note that both flags False = Align_Default, so that the
6569 -- default initialization of flags to False initializes component
6570 -- alignment to the default value as required.
6572 -- Flag128 Flag129 Value
6573 -- ------- ------- -----
6574 -- False False Calign_Default
6575 -- False True Calign_Component_Size
6576 -- True False Calign_Component_Size_4
6577 -- True True Calign_Storage_Unit
6579 procedure Set_Component_Alignment (Id : E; V : C) is
6580 begin
6581 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6582 and then Id = Base_Type (Id));
6584 case V is
6585 when Calign_Default =>
6586 Set_Flag128 (Id, False);
6587 Set_Flag129 (Id, False);
6589 when Calign_Component_Size =>
6590 Set_Flag128 (Id, False);
6591 Set_Flag129 (Id, True);
6593 when Calign_Component_Size_4 =>
6594 Set_Flag128 (Id, True);
6595 Set_Flag129 (Id, False);
6597 when Calign_Storage_Unit =>
6598 Set_Flag128 (Id, True);
6599 Set_Flag129 (Id, True);
6600 end case;
6601 end Set_Component_Alignment;
6603 -----------------
6604 -- Size_Clause --
6605 -----------------
6607 function Size_Clause (Id : E) return N is
6608 begin
6609 return Rep_Clause (Id, Name_Size);
6610 end Size_Clause;
6612 ------------------------
6613 -- Stream_Size_Clause --
6614 ------------------------
6616 function Stream_Size_Clause (Id : E) return N is
6617 begin
6618 return Rep_Clause (Id, Name_Stream_Size);
6619 end Stream_Size_Clause;
6621 ------------------
6622 -- Subtype_Kind --
6623 ------------------
6625 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6626 Kind : Entity_Kind;
6628 begin
6629 case K is
6630 when Access_Kind =>
6631 Kind := E_Access_Subtype;
6633 when E_Array_Type |
6634 E_Array_Subtype =>
6635 Kind := E_Array_Subtype;
6637 when E_Class_Wide_Type |
6638 E_Class_Wide_Subtype =>
6639 Kind := E_Class_Wide_Subtype;
6641 when E_Decimal_Fixed_Point_Type |
6642 E_Decimal_Fixed_Point_Subtype =>
6643 Kind := E_Decimal_Fixed_Point_Subtype;
6645 when E_Ordinary_Fixed_Point_Type |
6646 E_Ordinary_Fixed_Point_Subtype =>
6647 Kind := E_Ordinary_Fixed_Point_Subtype;
6649 when E_Private_Type |
6650 E_Private_Subtype =>
6651 Kind := E_Private_Subtype;
6653 when E_Limited_Private_Type |
6654 E_Limited_Private_Subtype =>
6655 Kind := E_Limited_Private_Subtype;
6657 when E_Record_Type_With_Private |
6658 E_Record_Subtype_With_Private =>
6659 Kind := E_Record_Subtype_With_Private;
6661 when E_Record_Type |
6662 E_Record_Subtype =>
6663 Kind := E_Record_Subtype;
6665 when E_String_Type |
6666 E_String_Subtype =>
6667 Kind := E_String_Subtype;
6669 when Enumeration_Kind =>
6670 Kind := E_Enumeration_Subtype;
6672 when Float_Kind =>
6673 Kind := E_Floating_Point_Subtype;
6675 when Signed_Integer_Kind =>
6676 Kind := E_Signed_Integer_Subtype;
6678 when Modular_Integer_Kind =>
6679 Kind := E_Modular_Integer_Subtype;
6681 when Protected_Kind =>
6682 Kind := E_Protected_Subtype;
6684 when Task_Kind =>
6685 Kind := E_Task_Subtype;
6687 when others =>
6688 Kind := E_Void;
6689 raise Program_Error;
6690 end case;
6692 return Kind;
6693 end Subtype_Kind;
6695 ---------------------
6696 -- Type_High_Bound --
6697 ---------------------
6699 function Type_High_Bound (Id : E) return Node_Id is
6700 Rng : constant Node_Id := Scalar_Range (Id);
6701 begin
6702 if Nkind (Rng) = N_Subtype_Indication then
6703 return High_Bound (Range_Expression (Constraint (Rng)));
6704 else
6705 return High_Bound (Rng);
6706 end if;
6707 end Type_High_Bound;
6709 --------------------
6710 -- Type_Low_Bound --
6711 --------------------
6713 function Type_Low_Bound (Id : E) return Node_Id is
6714 Rng : constant Node_Id := Scalar_Range (Id);
6715 begin
6716 if Nkind (Rng) = N_Subtype_Indication then
6717 return Low_Bound (Range_Expression (Constraint (Rng)));
6718 else
6719 return Low_Bound (Rng);
6720 end if;
6721 end Type_Low_Bound;
6723 ---------------------
6724 -- Underlying_Type --
6725 ---------------------
6727 function Underlying_Type (Id : E) return E is
6728 begin
6729 -- For record_with_private the underlying type is always the direct
6730 -- full view. Never try to take the full view of the parent it
6731 -- doesn't make sense.
6733 if Ekind (Id) = E_Record_Type_With_Private then
6734 return Full_View (Id);
6736 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6738 -- If we have an incomplete or private type with a full view,
6739 -- then we return the Underlying_Type of this full view
6741 if Present (Full_View (Id)) then
6742 if Id = Full_View (Id) then
6744 -- Previous error in declaration
6746 return Empty;
6748 else
6749 return Underlying_Type (Full_View (Id));
6750 end if;
6752 -- If we have an incomplete entity that comes from the limited
6753 -- view then we return the Underlying_Type of its non-limited
6754 -- view.
6756 elsif From_With_Type (Id)
6757 and then Present (Non_Limited_View (Id))
6758 then
6759 return Underlying_Type (Non_Limited_View (Id));
6761 -- Otherwise check for the case where we have a derived type or
6762 -- subtype, and if so get the Underlying_Type of the parent type.
6764 elsif Etype (Id) /= Id then
6765 return Underlying_Type (Etype (Id));
6767 -- Otherwise we have an incomplete or private type that has
6768 -- no full view, which means that we have not encountered the
6769 -- completion, so return Empty to indicate the underlying type
6770 -- is not yet known.
6772 else
6773 return Empty;
6774 end if;
6776 -- For non-incomplete, non-private types, return the type itself
6777 -- Also for entities that are not types at all return the entity
6778 -- itself.
6780 else
6781 return Id;
6782 end if;
6783 end Underlying_Type;
6785 ------------------------
6786 -- Write_Entity_Flags --
6787 ------------------------
6789 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
6791 procedure W (Flag_Name : String; Flag : Boolean);
6792 -- Write out given flag if it is set
6794 -------
6795 -- W --
6796 -------
6798 procedure W (Flag_Name : String; Flag : Boolean) is
6799 begin
6800 if Flag then
6801 Write_Str (Prefix);
6802 Write_Str (Flag_Name);
6803 Write_Str (" = True");
6804 Write_Eol;
6805 end if;
6806 end W;
6808 -- Start of processing for Write_Entity_Flags
6810 begin
6811 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
6812 and then Id = Base_Type (Id)
6813 then
6814 Write_Str (Prefix);
6815 Write_Str ("Component_Alignment = ");
6817 case Component_Alignment (Id) is
6818 when Calign_Default =>
6819 Write_Str ("Calign_Default");
6821 when Calign_Component_Size =>
6822 Write_Str ("Calign_Component_Size");
6824 when Calign_Component_Size_4 =>
6825 Write_Str ("Calign_Component_Size_4");
6827 when Calign_Storage_Unit =>
6828 Write_Str ("Calign_Storage_Unit");
6829 end case;
6831 Write_Eol;
6832 end if;
6834 W ("Address_Taken", Flag104 (Id));
6835 W ("Body_Needed_For_SAL", Flag40 (Id));
6836 W ("C_Pass_By_Copy", Flag125 (Id));
6837 W ("Can_Never_Be_Null", Flag38 (Id));
6838 W ("Checks_May_Be_Suppressed", Flag31 (Id));
6839 W ("Debug_Info_Off", Flag166 (Id));
6840 W ("Default_Expressions_Processed", Flag108 (Id));
6841 W ("Delay_Cleanups", Flag114 (Id));
6842 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
6843 W ("Depends_On_Private", Flag14 (Id));
6844 W ("Discard_Names", Flag88 (Id));
6845 W ("Elaboration_Entity_Required", Flag174 (Id));
6846 W ("Elaborate_Body_Desirable", Flag210 (Id));
6847 W ("Entry_Accepted", Flag152 (Id));
6848 W ("Can_Use_Internal_Rep", Flag229 (Id));
6849 W ("Finalize_Storage_Only", Flag158 (Id));
6850 W ("From_With_Type", Flag159 (Id));
6851 W ("Has_Aliased_Components", Flag135 (Id));
6852 W ("Has_Alignment_Clause", Flag46 (Id));
6853 W ("Has_All_Calls_Remote", Flag79 (Id));
6854 W ("Has_Anon_Block_Suffix", Flag201 (Id));
6855 W ("Has_Atomic_Components", Flag86 (Id));
6856 W ("Has_Biased_Representation", Flag139 (Id));
6857 W ("Has_Completion", Flag26 (Id));
6858 W ("Has_Completion_In_Body", Flag71 (Id));
6859 W ("Has_Complex_Representation", Flag140 (Id));
6860 W ("Has_Component_Size_Clause", Flag68 (Id));
6861 W ("Has_Contiguous_Rep", Flag181 (Id));
6862 W ("Has_Controlled_Component", Flag43 (Id));
6863 W ("Has_Controlling_Result", Flag98 (Id));
6864 W ("Has_Convention_Pragma", Flag119 (Id));
6865 W ("Has_Delayed_Freeze", Flag18 (Id));
6866 W ("Has_Discriminants", Flag5 (Id));
6867 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
6868 W ("Has_Exit", Flag47 (Id));
6869 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
6870 W ("Has_Forward_Instantiation", Flag175 (Id));
6871 W ("Has_Fully_Qualified_Name", Flag173 (Id));
6872 W ("Has_Gigi_Rep_Item", Flag82 (Id));
6873 W ("Has_Homonym", Flag56 (Id));
6874 W ("Has_Initial_Value", Flag219 (Id));
6875 W ("Has_Machine_Radix_Clause", Flag83 (Id));
6876 W ("Has_Master_Entity", Flag21 (Id));
6877 W ("Has_Missing_Return", Flag142 (Id));
6878 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
6879 W ("Has_Non_Standard_Rep", Flag75 (Id));
6880 W ("Has_Object_Size_Clause", Flag172 (Id));
6881 W ("Has_Per_Object_Constraint", Flag154 (Id));
6882 W ("Has_Persistent_BSS", Flag188 (Id));
6883 W ("Has_Postconditions", Flag240 (Id));
6884 W ("Has_Pragma_Controlled", Flag27 (Id));
6885 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
6886 W ("Has_Pragma_Inline", Flag157 (Id));
6887 W ("Has_Pragma_Inline_Always", Flag230 (Id));
6888 W ("Has_Pragma_Pack", Flag121 (Id));
6889 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
6890 W ("Has_Pragma_Pure", Flag203 (Id));
6891 W ("Has_Pragma_Pure_Function", Flag179 (Id));
6892 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
6893 W ("Has_Pragma_Unmodified", Flag233 (Id));
6894 W ("Has_Pragma_Unreferenced", Flag180 (Id));
6895 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
6896 W ("Has_Primitive_Operations", Flag120 (Id));
6897 W ("Has_Private_Declaration", Flag155 (Id));
6898 W ("Has_Qualified_Name", Flag161 (Id));
6899 W ("Has_RACW", Flag214 (Id));
6900 W ("Has_Record_Rep_Clause", Flag65 (Id));
6901 W ("Has_Recursive_Call", Flag143 (Id));
6902 W ("Has_Size_Clause", Flag29 (Id));
6903 W ("Has_Small_Clause", Flag67 (Id));
6904 W ("Has_Specified_Layout", Flag100 (Id));
6905 W ("Has_Specified_Stream_Input", Flag190 (Id));
6906 W ("Has_Specified_Stream_Output", Flag191 (Id));
6907 W ("Has_Specified_Stream_Read", Flag192 (Id));
6908 W ("Has_Specified_Stream_Write", Flag193 (Id));
6909 W ("Has_Static_Discriminants", Flag211 (Id));
6910 W ("Has_Storage_Size_Clause", Flag23 (Id));
6911 W ("Has_Stream_Size_Clause", Flag184 (Id));
6912 W ("Has_Subprogram_Descriptor", Flag93 (Id));
6913 W ("Has_Task", Flag30 (Id));
6914 W ("Has_Thunks", Flag228 (Id));
6915 W ("Has_Unchecked_Union", Flag123 (Id));
6916 W ("Has_Unknown_Discriminants", Flag72 (Id));
6917 W ("Has_Up_Level_Access", Flag215 (Id));
6918 W ("Has_Volatile_Components", Flag87 (Id));
6919 W ("Has_Xref_Entry", Flag182 (Id));
6920 W ("Implemented_By_Entry", Flag232 (Id));
6921 W ("In_Package_Body", Flag48 (Id));
6922 W ("In_Private_Part", Flag45 (Id));
6923 W ("In_Use", Flag8 (Id));
6924 W ("Is_AST_Entry", Flag132 (Id));
6925 W ("Is_Abstract_Subprogram", Flag19 (Id));
6926 W ("Is_Abstract_Type", Flag146 (Id));
6927 W ("Is_Local_Anonymous_Access", Flag194 (Id));
6928 W ("Is_Access_Constant", Flag69 (Id));
6929 W ("Is_Ada_2005_Only", Flag185 (Id));
6930 W ("Is_Aliased", Flag15 (Id));
6931 W ("Is_Asynchronous", Flag81 (Id));
6932 W ("Is_Atomic", Flag85 (Id));
6933 W ("Is_Bit_Packed_Array", Flag122 (Id));
6934 W ("Is_CPP_Class", Flag74 (Id));
6935 W ("Is_Called", Flag102 (Id));
6936 W ("Is_Character_Type", Flag63 (Id));
6937 W ("Is_Child_Unit", Flag73 (Id));
6938 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
6939 W ("Is_Compilation_Unit", Flag149 (Id));
6940 W ("Is_Completely_Hidden", Flag103 (Id));
6941 W ("Is_Concurrent_Record_Type", Flag20 (Id));
6942 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
6943 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
6944 W ("Is_Constrained", Flag12 (Id));
6945 W ("Is_Constructor", Flag76 (Id));
6946 W ("Is_Controlled", Flag42 (Id));
6947 W ("Is_Controlling_Formal", Flag97 (Id));
6948 W ("Is_Descendent_Of_Address", Flag223 (Id));
6949 W ("Is_Discrim_SO_Function", Flag176 (Id));
6950 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
6951 W ("Is_Dispatching_Operation", Flag6 (Id));
6952 W ("Is_Eliminated", Flag124 (Id));
6953 W ("Is_Entry_Formal", Flag52 (Id));
6954 W ("Is_Exported", Flag99 (Id));
6955 W ("Is_First_Subtype", Flag70 (Id));
6956 W ("Is_For_Access_Subtype", Flag118 (Id));
6957 W ("Is_Formal_Subprogram", Flag111 (Id));
6958 W ("Is_Frozen", Flag4 (Id));
6959 W ("Is_Generic_Actual_Type", Flag94 (Id));
6960 W ("Is_Generic_Instance", Flag130 (Id));
6961 W ("Is_Generic_Type", Flag13 (Id));
6962 W ("Is_Hidden", Flag57 (Id));
6963 W ("Is_Hidden_Open_Scope", Flag171 (Id));
6964 W ("Is_Immediately_Visible", Flag7 (Id));
6965 W ("Is_Imported", Flag24 (Id));
6966 W ("Is_Inlined", Flag11 (Id));
6967 W ("Is_Instantiated", Flag126 (Id));
6968 W ("Is_Interface", Flag186 (Id));
6969 W ("Is_Internal", Flag17 (Id));
6970 W ("Is_Interrupt_Handler", Flag89 (Id));
6971 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
6972 W ("Is_Itype", Flag91 (Id));
6973 W ("Is_Known_Non_Null", Flag37 (Id));
6974 W ("Is_Known_Null", Flag204 (Id));
6975 W ("Is_Known_Valid", Flag170 (Id));
6976 W ("Is_Limited_Composite", Flag106 (Id));
6977 W ("Is_Limited_Interface", Flag197 (Id));
6978 W ("Is_Limited_Record", Flag25 (Id));
6979 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
6980 W ("Is_Non_Static_Subtype", Flag109 (Id));
6981 W ("Is_Null_Init_Proc", Flag178 (Id));
6982 W ("Is_Obsolescent", Flag153 (Id));
6983 W ("Is_Only_Out_Parameter", Flag226 (Id));
6984 W ("Is_Optional_Parameter", Flag134 (Id));
6985 W ("Is_Overriding_Operation", Flag39 (Id));
6986 W ("Is_Package_Body_Entity", Flag160 (Id));
6987 W ("Is_Packed", Flag51 (Id));
6988 W ("Is_Packed_Array_Type", Flag138 (Id));
6989 W ("Is_Potentially_Use_Visible", Flag9 (Id));
6990 W ("Is_Preelaborated", Flag59 (Id));
6991 W ("Is_Primitive", Flag218 (Id));
6992 W ("Is_Primitive_Wrapper", Flag195 (Id));
6993 W ("Is_Private_Composite", Flag107 (Id));
6994 W ("Is_Private_Descendant", Flag53 (Id));
6995 W ("Is_Private_Primitive", Flag245 (Id));
6996 W ("Is_Public", Flag10 (Id));
6997 W ("Is_Pure", Flag44 (Id));
6998 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
6999 W ("Is_RACW_Stub_Type", Flag244 (Id));
7000 W ("Is_Raised", Flag224 (Id));
7001 W ("Is_Remote_Call_Interface", Flag62 (Id));
7002 W ("Is_Remote_Types", Flag61 (Id));
7003 W ("Is_Renaming_Of_Object", Flag112 (Id));
7004 W ("Is_Return_Object", Flag209 (Id));
7005 W ("Is_Shared_Passive", Flag60 (Id));
7006 W ("Is_Statically_Allocated", Flag28 (Id));
7007 W ("Is_Tag", Flag78 (Id));
7008 W ("Is_Tagged_Type", Flag55 (Id));
7009 W ("Is_Thunk", Flag225 (Id));
7010 W ("Is_Trivial_Subprogram", Flag235 (Id));
7011 W ("Is_True_Constant", Flag163 (Id));
7012 W ("Is_Unchecked_Union", Flag117 (Id));
7013 W ("Is_Underlying_Record_View", Flag246 (Id));
7014 W ("Is_Unsigned_Type", Flag144 (Id));
7015 W ("Is_VMS_Exception", Flag133 (Id));
7016 W ("Is_Valued_Procedure", Flag127 (Id));
7017 W ("Is_Visible_Child_Unit", Flag116 (Id));
7018 W ("Is_Visible_Formal", Flag206 (Id));
7019 W ("Is_Volatile", Flag16 (Id));
7020 W ("Itype_Printed", Flag202 (Id));
7021 W ("Kill_Elaboration_Checks", Flag32 (Id));
7022 W ("Kill_Range_Checks", Flag33 (Id));
7023 W ("Kill_Tag_Checks", Flag34 (Id));
7024 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7025 W ("Low_Bound_Tested", Flag205 (Id));
7026 W ("Machine_Radix_10", Flag84 (Id));
7027 W ("Materialize_Entity", Flag168 (Id));
7028 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7029 W ("Must_Have_Preelab_Init", Flag208 (Id));
7030 W ("Needs_Debug_Info", Flag147 (Id));
7031 W ("Needs_No_Actuals", Flag22 (Id));
7032 W ("Never_Set_In_Source", Flag115 (Id));
7033 W ("No_Pool_Assigned", Flag131 (Id));
7034 W ("No_Return", Flag113 (Id));
7035 W ("No_Strict_Aliasing", Flag136 (Id));
7036 W ("Non_Binary_Modulus", Flag58 (Id));
7037 W ("Nonzero_Is_True", Flag162 (Id));
7038 W ("OK_To_Rename", Flag247 (Id));
7039 W ("OK_To_Reorder_Components", Flag239 (Id));
7040 W ("Optimize_Alignment_Space", Flag241 (Id));
7041 W ("Optimize_Alignment_Time", Flag242 (Id));
7042 W ("Overlays_Constant", Flag243 (Id));
7043 W ("Reachable", Flag49 (Id));
7044 W ("Referenced", Flag156 (Id));
7045 W ("Referenced_As_LHS", Flag36 (Id));
7046 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7047 W ("Renamed_In_Spec", Flag231 (Id));
7048 W ("Requires_Overriding", Flag213 (Id));
7049 W ("Return_Present", Flag54 (Id));
7050 W ("Returns_By_Ref", Flag90 (Id));
7051 W ("Reverse_Bit_Order", Flag164 (Id));
7052 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7053 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7054 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7055 W ("Static_Elaboration_Desired", Flag77 (Id));
7056 W ("Strict_Alignment", Flag145 (Id));
7057 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7058 W ("Suppress_Init_Proc", Flag105 (Id));
7059 W ("Suppress_Style_Checks", Flag165 (Id));
7060 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7061 W ("Treat_As_Volatile", Flag41 (Id));
7062 W ("Universal_Aliasing", Flag216 (Id));
7063 W ("Used_As_Generic_Actual", Flag222 (Id));
7064 W ("Uses_Sec_Stack", Flag95 (Id));
7065 W ("Vax_Float", Flag151 (Id));
7066 W ("Warnings_Off", Flag96 (Id));
7067 W ("Warnings_Off_Used", Flag236 (Id));
7068 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7069 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7070 W ("Was_Hidden", Flag196 (Id));
7071 end Write_Entity_Flags;
7073 -----------------------
7074 -- Write_Entity_Info --
7075 -----------------------
7077 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7079 procedure Write_Attribute (Which : String; Nam : E);
7080 -- Write attribute value with given string name
7082 procedure Write_Kind (Id : Entity_Id);
7083 -- Write Ekind field of entity
7085 ---------------------
7086 -- Write_Attribute --
7087 ---------------------
7089 procedure Write_Attribute (Which : String; Nam : E) is
7090 begin
7091 Write_Str (Prefix);
7092 Write_Str (Which);
7093 Write_Int (Int (Nam));
7094 Write_Str (" ");
7095 Write_Name (Chars (Nam));
7096 Write_Str (" ");
7097 end Write_Attribute;
7099 ----------------
7100 -- Write_Kind --
7101 ----------------
7103 procedure Write_Kind (Id : Entity_Id) is
7104 K : constant String := Entity_Kind'Image (Ekind (Id));
7106 begin
7107 Write_Str (Prefix);
7108 Write_Str (" Kind ");
7110 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7111 Write_Str ("TAGGED ");
7112 end if;
7114 Write_Str (K (3 .. K'Length));
7115 Write_Str (" ");
7117 if Is_Type (Id) and then Depends_On_Private (Id) then
7118 Write_Str ("Depends_On_Private ");
7119 end if;
7120 end Write_Kind;
7122 -- Start of processing for Write_Entity_Info
7124 begin
7125 Write_Eol;
7126 Write_Attribute ("Name ", Id);
7127 Write_Int (Int (Id));
7128 Write_Eol;
7129 Write_Kind (Id);
7130 Write_Eol;
7131 Write_Attribute (" Type ", Etype (Id));
7132 Write_Eol;
7133 Write_Attribute (" Scope ", Scope (Id));
7134 Write_Eol;
7136 case Ekind (Id) is
7138 when Discrete_Kind =>
7139 Write_Str ("Bounds: Id = ");
7141 if Present (Scalar_Range (Id)) then
7142 Write_Int (Int (Type_Low_Bound (Id)));
7143 Write_Str (" .. Id = ");
7144 Write_Int (Int (Type_High_Bound (Id)));
7145 else
7146 Write_Str ("Empty");
7147 end if;
7149 Write_Eol;
7151 when Array_Kind =>
7152 declare
7153 Index : E;
7155 begin
7156 Write_Attribute
7157 (" Component Type ", Component_Type (Id));
7158 Write_Eol;
7159 Write_Str (Prefix);
7160 Write_Str (" Indices ");
7162 Index := First_Index (Id);
7163 while Present (Index) loop
7164 Write_Attribute (" ", Etype (Index));
7165 Index := Next_Index (Index);
7166 end loop;
7168 Write_Eol;
7169 end;
7171 when Access_Kind =>
7172 Write_Attribute
7173 (" Directly Designated Type ",
7174 Directly_Designated_Type (Id));
7175 Write_Eol;
7177 when Overloadable_Kind =>
7178 if Present (Homonym (Id)) then
7179 Write_Str (" Homonym ");
7180 Write_Name (Chars (Homonym (Id)));
7181 Write_Str (" ");
7182 Write_Int (Int (Homonym (Id)));
7183 Write_Eol;
7184 end if;
7186 Write_Eol;
7188 when E_Component =>
7189 if Ekind (Scope (Id)) in Record_Kind then
7190 Write_Attribute (
7191 " Original_Record_Component ",
7192 Original_Record_Component (Id));
7193 Write_Int (Int (Original_Record_Component (Id)));
7194 Write_Eol;
7195 end if;
7197 when others => null;
7198 end case;
7199 end Write_Entity_Info;
7201 -----------------------
7202 -- Write_Field6_Name --
7203 -----------------------
7205 procedure Write_Field6_Name (Id : Entity_Id) is
7206 pragma Warnings (Off, Id);
7207 begin
7208 Write_Str ("First_Rep_Item");
7209 end Write_Field6_Name;
7211 -----------------------
7212 -- Write_Field7_Name --
7213 -----------------------
7215 procedure Write_Field7_Name (Id : Entity_Id) is
7216 pragma Warnings (Off, Id);
7217 begin
7218 Write_Str ("Freeze_Node");
7219 end Write_Field7_Name;
7221 -----------------------
7222 -- Write_Field8_Name --
7223 -----------------------
7225 procedure Write_Field8_Name (Id : Entity_Id) is
7226 begin
7227 case Ekind (Id) is
7228 when E_Component |
7229 E_Discriminant =>
7230 Write_Str ("Normalized_First_Bit");
7232 when Formal_Kind |
7233 E_Function |
7234 E_Subprogram_Body =>
7235 Write_Str ("Mechanism");
7237 when Type_Kind =>
7238 Write_Str ("Associated_Node_For_Itype");
7240 when E_Loop =>
7241 Write_Str ("First_Exit_Statement");
7243 when E_Package =>
7244 Write_Str ("Dependent_Instances");
7246 when E_Procedure =>
7247 Write_Str ("Postcondition_Proc");
7249 when E_Return_Statement =>
7250 Write_Str ("Return_Applies_To");
7252 when E_Variable =>
7253 Write_Str ("Hiding_Loop_Variable");
7255 when others =>
7256 Write_Str ("Field8??");
7257 end case;
7258 end Write_Field8_Name;
7260 -----------------------
7261 -- Write_Field9_Name --
7262 -----------------------
7264 procedure Write_Field9_Name (Id : Entity_Id) is
7265 begin
7266 case Ekind (Id) is
7267 when Type_Kind =>
7268 Write_Str ("Class_Wide_Type");
7270 when E_Function |
7271 E_Generic_Function |
7272 E_Generic_Package |
7273 E_Generic_Procedure |
7274 E_Package |
7275 E_Procedure =>
7276 Write_Str ("Renaming_Map");
7278 when Object_Kind =>
7279 Write_Str ("Current_Value");
7281 when others =>
7282 Write_Str ("Field9??");
7283 end case;
7284 end Write_Field9_Name;
7286 ------------------------
7287 -- Write_Field10_Name --
7288 ------------------------
7290 procedure Write_Field10_Name (Id : Entity_Id) is
7291 begin
7292 case Ekind (Id) is
7293 when Type_Kind =>
7294 Write_Str ("Referenced_Object");
7296 when E_In_Parameter |
7297 E_Constant =>
7298 Write_Str ("Discriminal_Link");
7300 when E_Function |
7301 E_Package |
7302 E_Package_Body |
7303 E_Procedure =>
7304 Write_Str ("Handler_Records");
7306 when E_Component |
7307 E_Discriminant =>
7308 Write_Str ("Normalized_Position_Max");
7310 when others =>
7311 Write_Str ("Field10??");
7312 end case;
7313 end Write_Field10_Name;
7315 ------------------------
7316 -- Write_Field11_Name --
7317 ------------------------
7319 procedure Write_Field11_Name (Id : Entity_Id) is
7320 begin
7321 case Ekind (Id) is
7322 when Formal_Kind =>
7323 Write_Str ("Entry_Component");
7325 when E_Component |
7326 E_Discriminant =>
7327 Write_Str ("Component_Bit_Offset");
7329 when E_Constant =>
7330 Write_Str ("Full_View");
7332 when E_Enumeration_Literal =>
7333 Write_Str ("Enumeration_Pos");
7335 when E_Block =>
7336 Write_Str ("Block_Node");
7338 when E_Function |
7339 E_Procedure |
7340 E_Entry |
7341 E_Entry_Family =>
7342 Write_Str ("Protected_Body_Subprogram");
7344 when E_Generic_Package =>
7345 Write_Str ("Generic_Homonym");
7347 when Type_Kind =>
7348 Write_Str ("Full_View");
7350 when others =>
7351 Write_Str ("Field11??");
7352 end case;
7353 end Write_Field11_Name;
7355 ------------------------
7356 -- Write_Field12_Name --
7357 ------------------------
7359 procedure Write_Field12_Name (Id : Entity_Id) is
7360 begin
7361 case Ekind (Id) is
7362 when Entry_Kind =>
7363 Write_Str ("Barrier_Function");
7365 when E_Enumeration_Literal =>
7366 Write_Str ("Enumeration_Rep");
7368 when Type_Kind |
7369 E_Component |
7370 E_Constant |
7371 E_Discriminant |
7372 E_Exception |
7373 E_In_Parameter |
7374 E_In_Out_Parameter |
7375 E_Out_Parameter |
7376 E_Loop_Parameter |
7377 E_Variable =>
7378 Write_Str ("Esize");
7380 when E_Function |
7381 E_Procedure =>
7382 Write_Str ("Next_Inlined_Subprogram");
7384 when E_Package =>
7385 Write_Str ("Associated_Formal_Package");
7387 when others =>
7388 Write_Str ("Field12??");
7389 end case;
7390 end Write_Field12_Name;
7392 ------------------------
7393 -- Write_Field13_Name --
7394 ------------------------
7396 procedure Write_Field13_Name (Id : Entity_Id) is
7397 begin
7398 case Ekind (Id) is
7399 when Type_Kind =>
7400 Write_Str ("RM_Size");
7402 when E_Component |
7403 E_Discriminant =>
7404 Write_Str ("Component_Clause");
7406 when E_Function =>
7407 if not Comes_From_Source (Id)
7408 and then
7409 Chars (Id) = Name_Op_Ne
7410 then
7411 Write_Str ("Corresponding_Equality");
7413 elsif Comes_From_Source (Id) then
7414 Write_Str ("Elaboration_Entity");
7416 else
7417 Write_Str ("Field13??");
7418 end if;
7420 when Formal_Kind |
7421 E_Variable =>
7422 Write_Str ("Extra_Accessibility");
7424 when E_Procedure |
7425 E_Package |
7426 Generic_Unit_Kind =>
7427 Write_Str ("Elaboration_Entity");
7429 when others =>
7430 Write_Str ("Field13??");
7431 end case;
7432 end Write_Field13_Name;
7434 -----------------------
7435 -- Write_Field14_Name --
7436 -----------------------
7438 procedure Write_Field14_Name (Id : Entity_Id) is
7439 begin
7440 case Ekind (Id) is
7441 when Type_Kind |
7442 Formal_Kind |
7443 E_Constant |
7444 E_Exception |
7445 E_Variable |
7446 E_Loop_Parameter =>
7447 Write_Str ("Alignment");
7449 when E_Component |
7450 E_Discriminant =>
7451 Write_Str ("Normalized_Position");
7453 when E_Function |
7454 E_Procedure =>
7455 Write_Str ("First_Optional_Parameter");
7457 when E_Package |
7458 E_Generic_Package =>
7459 Write_Str ("Shadow_Entities");
7461 when others =>
7462 Write_Str ("Field14??");
7463 end case;
7464 end Write_Field14_Name;
7466 ------------------------
7467 -- Write_Field15_Name --
7468 ------------------------
7470 procedure Write_Field15_Name (Id : Entity_Id) is
7471 begin
7472 case Ekind (Id) is
7473 when Access_Kind |
7474 Task_Kind =>
7475 Write_Str ("Storage_Size_Variable");
7477 when Class_Wide_Kind |
7478 E_Record_Type |
7479 E_Record_Subtype |
7480 Private_Kind =>
7481 Write_Str ("Primitive_Operations");
7483 when E_Component =>
7484 Write_Str ("DT_Entry_Count");
7486 when Decimal_Fixed_Point_Kind =>
7487 Write_Str ("Scale_Value");
7489 when E_Discriminant =>
7490 Write_Str ("Discriminant_Number");
7492 when Formal_Kind =>
7493 Write_Str ("Extra_Formal");
7495 when E_Function |
7496 E_Procedure =>
7497 Write_Str ("DT_Position");
7499 when Entry_Kind =>
7500 Write_Str ("Entry_Parameters_Type");
7502 when Enumeration_Kind =>
7503 Write_Str ("Lit_Indexes");
7505 when E_Package |
7506 E_Package_Body =>
7507 Write_Str ("Related_Instance");
7509 when E_Protected_Type =>
7510 Write_Str ("Entry_Bodies_Array");
7512 when E_String_Literal_Subtype =>
7513 Write_Str ("String_Literal_Low_Bound");
7515 when others =>
7516 Write_Str ("Field15??");
7517 end case;
7518 end Write_Field15_Name;
7520 ------------------------
7521 -- Write_Field16_Name --
7522 ------------------------
7524 procedure Write_Field16_Name (Id : Entity_Id) is
7525 begin
7526 case Ekind (Id) is
7527 when E_Component =>
7528 Write_Str ("Entry_Formal");
7530 when E_Function |
7531 E_Procedure =>
7532 Write_Str ("DTC_Entity");
7534 when E_Package |
7535 E_Generic_Package |
7536 Concurrent_Kind =>
7537 Write_Str ("First_Private_Entity");
7539 when E_Record_Type |
7540 E_Record_Type_With_Private =>
7541 Write_Str ("Access_Disp_Table");
7543 when E_String_Literal_Subtype =>
7544 Write_Str ("String_Literal_Length");
7546 when Enumeration_Kind =>
7547 Write_Str ("Lit_Strings");
7549 when E_Variable |
7550 E_Out_Parameter =>
7551 Write_Str ("Unset_Reference");
7553 when E_Record_Subtype |
7554 E_Class_Wide_Subtype =>
7555 Write_Str ("Cloned_Subtype");
7557 when others =>
7558 Write_Str ("Field16??");
7559 end case;
7560 end Write_Field16_Name;
7562 ------------------------
7563 -- Write_Field17_Name --
7564 ------------------------
7566 procedure Write_Field17_Name (Id : Entity_Id) is
7567 begin
7568 case Ekind (Id) is
7569 when Digits_Kind =>
7570 Write_Str ("Digits_Value");
7572 when E_Component =>
7573 Write_Str ("Prival");
7575 when E_Discriminant =>
7576 Write_Str ("Discriminal");
7578 when E_Block |
7579 Class_Wide_Kind |
7580 Concurrent_Kind |
7581 Private_Kind |
7582 E_Entry |
7583 E_Entry_Family |
7584 E_Function |
7585 E_Generic_Function |
7586 E_Generic_Package |
7587 E_Generic_Procedure |
7588 E_Loop |
7589 E_Operator |
7590 E_Package |
7591 E_Package_Body |
7592 E_Procedure |
7593 E_Record_Type |
7594 E_Record_Subtype |
7595 E_Return_Statement |
7596 E_Subprogram_Body |
7597 E_Subprogram_Type =>
7598 Write_Str ("First_Entity");
7600 when Array_Kind =>
7601 Write_Str ("First_Index");
7603 when Enumeration_Kind =>
7604 Write_Str ("First_Literal");
7606 when Access_Kind =>
7607 Write_Str ("Master_Id");
7609 when Modular_Integer_Kind =>
7610 Write_Str ("Modulus");
7612 when Formal_Kind |
7613 E_Constant |
7614 E_Generic_In_Out_Parameter |
7615 E_Variable =>
7616 Write_Str ("Actual_Subtype");
7618 when E_Incomplete_Type =>
7619 Write_Str ("Non_Limited_View");
7621 when E_Incomplete_Subtype =>
7622 if From_With_Type (Id) then
7623 Write_Str ("Non_Limited_View");
7624 end if;
7626 when others =>
7627 Write_Str ("Field17??");
7628 end case;
7629 end Write_Field17_Name;
7631 ------------------------
7632 -- Write_Field18_Name --
7633 ------------------------
7635 procedure Write_Field18_Name (Id : Entity_Id) is
7636 begin
7637 case Ekind (Id) is
7638 when E_Enumeration_Literal |
7639 E_Function |
7640 E_Operator |
7641 E_Procedure =>
7642 Write_Str ("Alias");
7644 when E_Record_Type =>
7645 Write_Str ("Corresponding_Concurrent_Type");
7647 when E_Entry_Index_Parameter =>
7648 Write_Str ("Entry_Index_Constant");
7650 when E_Class_Wide_Subtype |
7651 E_Access_Protected_Subprogram_Type |
7652 E_Anonymous_Access_Protected_Subprogram_Type |
7653 E_Access_Subprogram_Type |
7654 E_Exception_Type =>
7655 Write_Str ("Equivalent_Type");
7657 when Fixed_Point_Kind =>
7658 Write_Str ("Delta_Value");
7660 when Object_Kind =>
7661 Write_Str ("Renamed_Object");
7663 when E_Exception |
7664 E_Package |
7665 E_Generic_Function |
7666 E_Generic_Procedure |
7667 E_Generic_Package =>
7668 Write_Str ("Renamed_Entity");
7670 when Incomplete_Or_Private_Kind =>
7671 Write_Str ("Private_Dependents");
7673 when Concurrent_Kind =>
7674 Write_Str ("Corresponding_Record_Type");
7676 when E_Label |
7677 E_Loop |
7678 E_Block =>
7679 Write_Str ("Enclosing_Scope");
7681 when others =>
7682 Write_Str ("Field18??");
7683 end case;
7684 end Write_Field18_Name;
7686 -----------------------
7687 -- Write_Field19_Name --
7688 -----------------------
7690 procedure Write_Field19_Name (Id : Entity_Id) is
7691 begin
7692 case Ekind (Id) is
7693 when E_Array_Type |
7694 E_Array_Subtype =>
7695 Write_Str ("Related_Array_Object");
7697 when E_Block |
7698 Concurrent_Kind |
7699 E_Function |
7700 E_Procedure |
7701 E_Return_Statement |
7702 Entry_Kind =>
7703 Write_Str ("Finalization_Chain_Entity");
7705 when E_Constant | E_Variable =>
7706 Write_Str ("Size_Check_Code");
7708 when E_Discriminant =>
7709 Write_Str ("Corresponding_Discriminant");
7711 when E_Package |
7712 E_Generic_Package =>
7713 Write_Str ("Body_Entity");
7715 when E_Package_Body |
7716 Formal_Kind =>
7717 Write_Str ("Spec_Entity");
7719 when Private_Kind =>
7720 Write_Str ("Underlying_Full_View");
7722 when E_Record_Type =>
7723 Write_Str ("Parent_Subtype");
7725 when others =>
7726 Write_Str ("Field19??");
7727 end case;
7728 end Write_Field19_Name;
7730 -----------------------
7731 -- Write_Field20_Name --
7732 -----------------------
7734 procedure Write_Field20_Name (Id : Entity_Id) is
7735 begin
7736 case Ekind (Id) is
7737 when Array_Kind =>
7738 Write_Str ("Component_Type");
7740 when E_In_Parameter |
7741 E_Generic_In_Parameter =>
7742 Write_Str ("Default_Value");
7744 when Access_Kind =>
7745 Write_Str ("Directly_Designated_Type");
7747 when E_Component =>
7748 Write_Str ("Discriminant_Checking_Func");
7750 when E_Constant |
7751 E_Variable =>
7752 Write_Str ("Prival_Link");
7754 when E_Discriminant =>
7755 Write_Str ("Discriminant_Default_Value");
7757 when E_Block |
7758 Class_Wide_Kind |
7759 Concurrent_Kind |
7760 Private_Kind |
7761 E_Entry |
7762 E_Entry_Family |
7763 E_Function |
7764 E_Generic_Function |
7765 E_Generic_Package |
7766 E_Generic_Procedure |
7767 E_Loop |
7768 E_Operator |
7769 E_Package |
7770 E_Package_Body |
7771 E_Procedure |
7772 E_Record_Type |
7773 E_Record_Subtype |
7774 E_Return_Statement |
7775 E_Subprogram_Body |
7776 E_Subprogram_Type =>
7778 Write_Str ("Last_Entity");
7780 when Scalar_Kind =>
7781 Write_Str ("Scalar_Range");
7783 when E_Exception =>
7784 Write_Str ("Register_Exception_Call");
7786 when others =>
7787 Write_Str ("Field20??");
7788 end case;
7789 end Write_Field20_Name;
7791 -----------------------
7792 -- Write_Field21_Name --
7793 -----------------------
7795 procedure Write_Field21_Name (Id : Entity_Id) is
7796 begin
7797 case Ekind (Id) is
7798 when E_Constant |
7799 E_Exception |
7800 E_Function |
7801 E_Generic_Function |
7802 E_Procedure |
7803 E_Generic_Procedure |
7804 E_Variable =>
7805 Write_Str ("Interface_Name");
7807 when Concurrent_Kind |
7808 Incomplete_Or_Private_Kind |
7809 Class_Wide_Kind |
7810 E_Record_Type |
7811 E_Record_Subtype =>
7812 Write_Str ("Discriminant_Constraint");
7814 when Entry_Kind =>
7815 Write_Str ("Accept_Address");
7817 when Fixed_Point_Kind =>
7818 Write_Str ("Small_Value");
7820 when E_In_Parameter =>
7821 Write_Str ("Default_Expr_Function");
7823 when Array_Kind |
7824 Modular_Integer_Kind =>
7825 Write_Str ("Original_Array_Type");
7827 when others =>
7828 Write_Str ("Field21??");
7829 end case;
7830 end Write_Field21_Name;
7832 -----------------------
7833 -- Write_Field22_Name --
7834 -----------------------
7836 procedure Write_Field22_Name (Id : Entity_Id) is
7837 begin
7838 case Ekind (Id) is
7839 when Access_Kind =>
7840 Write_Str ("Associated_Storage_Pool");
7842 when Array_Kind =>
7843 Write_Str ("Component_Size");
7845 when E_Component |
7846 E_Discriminant =>
7847 Write_Str ("Original_Record_Component");
7849 when E_Enumeration_Literal =>
7850 Write_Str ("Enumeration_Rep_Expr");
7852 when E_Exception =>
7853 Write_Str ("Exception_Code");
7855 when Formal_Kind =>
7856 Write_Str ("Protected_Formal");
7858 when E_Record_Type =>
7859 Write_Str ("Corresponding_Remote_Type");
7861 when E_Block |
7862 E_Entry |
7863 E_Entry_Family |
7864 E_Function |
7865 E_Loop |
7866 E_Package |
7867 E_Package_Body |
7868 E_Generic_Package |
7869 E_Generic_Function |
7870 E_Generic_Procedure |
7871 E_Procedure |
7872 E_Protected_Type |
7873 E_Return_Statement |
7874 E_Subprogram_Body |
7875 E_Task_Type =>
7876 Write_Str ("Scope_Depth_Value");
7878 when E_Record_Type_With_Private |
7879 E_Record_Subtype_With_Private |
7880 E_Private_Type |
7881 E_Private_Subtype |
7882 E_Limited_Private_Type |
7883 E_Limited_Private_Subtype =>
7884 Write_Str ("Private_View");
7886 when E_Variable =>
7887 Write_Str ("Shared_Var_Procs_Instance");
7889 when others =>
7890 Write_Str ("Field22??");
7891 end case;
7892 end Write_Field22_Name;
7894 ------------------------
7895 -- Write_Field23_Name --
7896 ------------------------
7898 procedure Write_Field23_Name (Id : Entity_Id) is
7899 begin
7900 case Ekind (Id) is
7901 when Access_Kind =>
7902 Write_Str ("Associated_Final_Chain");
7904 when Array_Kind =>
7905 Write_Str ("Packed_Array_Type");
7907 when E_Block =>
7908 Write_Str ("Entry_Cancel_Parameter");
7910 when E_Discriminant =>
7911 Write_Str ("CR_Discriminant");
7913 when E_Enumeration_Type =>
7914 Write_Str ("Enum_Pos_To_Rep");
7916 when Formal_Kind |
7917 E_Variable =>
7918 Write_Str ("Extra_Constrained");
7920 when E_Generic_Function |
7921 E_Generic_Package |
7922 E_Generic_Procedure =>
7923 Write_Str ("Inner_Instances");
7925 when Concurrent_Kind |
7926 Incomplete_Or_Private_Kind |
7927 Class_Wide_Kind |
7928 E_Record_Type |
7929 E_Record_Subtype =>
7930 Write_Str ("Stored_Constraint");
7932 when E_Function |
7933 E_Procedure =>
7934 if Present (Scope (Id))
7935 and then Is_Protected_Type (Scope (Id))
7936 then
7937 Write_Str ("Protection_Object");
7938 else
7939 Write_Str ("Generic_Renamings");
7940 end if;
7942 when E_Package =>
7943 if Is_Generic_Instance (Id) then
7944 Write_Str ("Generic_Renamings");
7945 else
7946 Write_Str ("Limited_View");
7947 end if;
7949 when Entry_Kind =>
7950 Write_Str ("Protection_Object");
7952 when others =>
7953 Write_Str ("Field23??");
7954 end case;
7955 end Write_Field23_Name;
7957 ------------------------
7958 -- Write_Field24_Name --
7959 ------------------------
7961 procedure Write_Field24_Name (Id : Entity_Id) is
7962 begin
7963 case Ekind (Id) is
7964 when Subprogram_Kind =>
7965 Write_Str ("Spec_PPC_List");
7967 when E_Variable | E_Constant | Type_Kind =>
7968 Write_Str ("Related_Expression");
7970 when others =>
7971 Write_Str ("Field24???");
7972 end case;
7973 end Write_Field24_Name;
7975 ------------------------
7976 -- Write_Field25_Name --
7977 ------------------------
7979 procedure Write_Field25_Name (Id : Entity_Id) is
7980 begin
7981 case Ekind (Id) is
7982 when E_Component =>
7983 Write_Str ("DT_Offset_To_Top_Func");
7985 when E_Procedure |
7986 E_Function =>
7987 Write_Str ("Interface_Alias");
7989 when E_Record_Type |
7990 E_Record_Subtype |
7991 E_Record_Type_With_Private |
7992 E_Record_Subtype_With_Private =>
7993 Write_Str ("Interfaces");
7995 when Task_Kind =>
7996 Write_Str ("Task_Body_Procedure");
7998 when E_Variable =>
7999 Write_Str ("Debug_Renaming_Link");
8001 when others =>
8002 Write_Str ("Field25??");
8003 end case;
8004 end Write_Field25_Name;
8006 ------------------------
8007 -- Write_Field26_Name --
8008 ------------------------
8010 procedure Write_Field26_Name (Id : Entity_Id) is
8011 begin
8012 case Ekind (Id) is
8013 when E_Component |
8014 E_Constant =>
8015 Write_Str ("Related_Type");
8017 when E_Generic_Package |
8018 E_Package =>
8019 Write_Str ("Package_Instantiation");
8021 when E_Procedure |
8022 E_Function =>
8024 if Is_Dispatching_Operation (Id) then
8025 Write_Str ("Overridden_Operation");
8026 else
8027 Write_Str ("Static_Initialization");
8028 end if;
8030 when E_Record_Type |
8031 E_Record_Type_With_Private =>
8032 Write_Str ("Dispatch_Table_Wrappers");
8034 when E_In_Out_Parameter |
8035 E_Out_Parameter |
8036 E_Variable =>
8037 Write_Str ("Last_Assignment");
8039 when Task_Kind =>
8040 Write_Str ("Relative_Deadline_Variable");
8042 when others =>
8043 Write_Str ("Field26??");
8044 end case;
8045 end Write_Field26_Name;
8047 ------------------------
8048 -- Write_Field27_Name --
8049 ------------------------
8051 procedure Write_Field27_Name (Id : Entity_Id) is
8052 begin
8053 case Ekind (Id) is
8054 when E_Procedure =>
8055 Write_Str ("Wrapped_Entity");
8057 when E_Package | Type_Kind =>
8058 Write_Str ("Current_Use_Clause");
8060 when others =>
8061 Write_Str ("Field27??");
8062 end case;
8063 end Write_Field27_Name;
8065 ------------------------
8066 -- Write_Field28_Name --
8067 ------------------------
8069 procedure Write_Field28_Name (Id : Entity_Id) is
8070 begin
8071 case Ekind (Id) is
8072 when E_Procedure | E_Function | E_Entry =>
8073 Write_Str ("Extra_Formals");
8075 when E_Record_Type =>
8076 Write_Str ("Underlying_Record_View");
8078 when others =>
8079 Write_Str ("Field28??");
8080 end case;
8081 end Write_Field28_Name;
8083 -------------------------
8084 -- Iterator Procedures --
8085 -------------------------
8087 procedure Proc_Next_Component (N : in out Node_Id) is
8088 begin
8089 N := Next_Component (N);
8090 end Proc_Next_Component;
8092 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8093 begin
8094 N := Next_Entity (N);
8095 while Present (N) loop
8096 exit when Ekind_In (N, E_Component, E_Discriminant);
8097 N := Next_Entity (N);
8098 end loop;
8099 end Proc_Next_Component_Or_Discriminant;
8101 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8102 begin
8103 N := Next_Discriminant (N);
8104 end Proc_Next_Discriminant;
8106 procedure Proc_Next_Formal (N : in out Node_Id) is
8107 begin
8108 N := Next_Formal (N);
8109 end Proc_Next_Formal;
8111 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8112 begin
8113 N := Next_Formal_With_Extras (N);
8114 end Proc_Next_Formal_With_Extras;
8116 procedure Proc_Next_Index (N : in out Node_Id) is
8117 begin
8118 N := Next_Index (N);
8119 end Proc_Next_Index;
8121 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8122 begin
8123 N := Next_Inlined_Subprogram (N);
8124 end Proc_Next_Inlined_Subprogram;
8126 procedure Proc_Next_Literal (N : in out Node_Id) is
8127 begin
8128 N := Next_Literal (N);
8129 end Proc_Next_Literal;
8131 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8132 begin
8133 N := Next_Stored_Discriminant (N);
8134 end Proc_Next_Stored_Discriminant;
8136 end Einfo;