* prerequisites.xml: Refer to GCC (instead of gcc) and GNU/Linux.
[official-gcc.git] / gcc / ada / einfo.adb
blob4cbd4c5cb44497b6b9ea410b55c421ef6f7dabdb
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2011, 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 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
95 -- Full_View Node11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
100 -- Block_Node Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
104 -- Esize Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
111 -- RM_Size Uint13
113 -- Alignment Uint14
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- Return_Flag_Or_Transient_Decl Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
131 -- Access_Disp_Table Elist16
132 -- Cloned_Subtype Node16
133 -- DTC_Entity Node16
134 -- Entry_Formal Node16
135 -- First_Private_Entity Node16
136 -- Lit_Strings Node16
137 -- String_Literal_Length Uint16
138 -- Unset_Reference Node16
140 -- Actual_Subtype Node17
141 -- Digits_Value Uint17
142 -- Discriminal Node17
143 -- First_Entity Node17
144 -- First_Index Node17
145 -- First_Literal Node17
146 -- Master_Id Node17
147 -- Modulus Uint17
148 -- Non_Limited_View Node17
149 -- Prival Node17
151 -- Alias Node18
152 -- Corresponding_Concurrent_Type Node18
153 -- Corresponding_Protected_Entry Node18
154 -- Corresponding_Record_Type Node18
155 -- Delta_Value Ureal18
156 -- Enclosing_Scope Node18
157 -- Equivalent_Type Node18
158 -- Private_Dependents Elist18
159 -- Renamed_Entity Node18
160 -- Renamed_Object Node18
162 -- Body_Entity Node19
163 -- Corresponding_Discriminant Node19
164 -- Extra_Accessibility_Of_Result Node19
165 -- Parent_Subtype Node19
166 -- Related_Array_Object Node19
167 -- Size_Check_Code Node19
168 -- Spec_Entity Node19
169 -- Underlying_Full_View Node19
171 -- Component_Type Node20
172 -- Default_Value Node20
173 -- Directly_Designated_Type Node20
174 -- Discriminant_Checking_Func Node20
175 -- Discriminant_Default_Value Node20
176 -- Last_Entity Node20
177 -- Prival_Link Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Interface_Name Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Exception_Code Uint22
193 -- Original_Record_Component Node22
194 -- Private_View Node22
195 -- Protected_Formal Node22
196 -- Scope_Depth_Value Uint22
197 -- Shared_Var_Procs_Instance Node22
199 -- CR_Discriminant Node23
200 -- Entry_Cancel_Parameter Node23
201 -- Enum_Pos_To_Rep Node23
202 -- Extra_Constrained Node23
203 -- Finalization_Master Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Limited_View Node23
207 -- Packed_Array_Type Node23
208 -- Protection_Object Node23
209 -- Stored_Constraint Elist23
211 -- Finalizer Node24
212 -- Related_Expression Node24
213 -- Contract Node24
215 -- Interface_Alias Node25
216 -- Interfaces Elist25
217 -- Debug_Renaming_Link Node25
218 -- DT_Offset_To_Top_Func Node25
219 -- PPC_Wrapper Node25
220 -- Static_Predicate List25
221 -- Task_Body_Procedure Node25
223 -- Dispatch_Table_Wrappers Elist26
224 -- Last_Assignment Node26
225 -- Original_Access_Type Node26
226 -- Overridden_Operation Node26
227 -- Package_Instantiation Node26
228 -- Relative_Deadline_Variable Node26
229 -- Static_Initialization Node26
231 -- Current_Use_Clause Node27
232 -- Related_Type Node27
233 -- Wrapped_Entity Node27
235 -- Extra_Formals Node28
236 -- Underlying_Record_View Node28
238 -- Subprograms_For_Type Node29
240 ---------------------------------------------
241 -- Usage of Flags in Defining Entity Nodes --
242 ---------------------------------------------
244 -- All flags are unique, there is no overlaying, so each flag is physically
245 -- present in every entity. However, for many of the flags, it only makes
246 -- sense for them to be set true for certain subsets of entity kinds. See
247 -- the spec of Einfo for further details.
249 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
251 -- Is_Frozen Flag4
252 -- Has_Discriminants Flag5
253 -- Is_Dispatching_Operation Flag6
254 -- Is_Immediately_Visible Flag7
255 -- In_Use Flag8
256 -- Is_Potentially_Use_Visible Flag9
257 -- Is_Public Flag10
259 -- Is_Inlined Flag11
260 -- Is_Constrained Flag12
261 -- Is_Generic_Type Flag13
262 -- Depends_On_Private Flag14
263 -- Is_Aliased Flag15
264 -- Is_Volatile Flag16
265 -- Is_Internal Flag17
266 -- Has_Delayed_Freeze Flag18
267 -- Is_Abstract_Subprogram Flag19
268 -- Is_Concurrent_Record_Type Flag20
270 -- Has_Master_Entity Flag21
271 -- Needs_No_Actuals Flag22
272 -- Has_Storage_Size_Clause Flag23
273 -- Is_Imported Flag24
274 -- Is_Limited_Record Flag25
275 -- Has_Completion Flag26
276 -- Has_Pragma_Controlled Flag27
277 -- Is_Statically_Allocated Flag28
278 -- Has_Size_Clause Flag29
279 -- Has_Task Flag30
281 -- Checks_May_Be_Suppressed Flag31
282 -- Kill_Elaboration_Checks Flag32
283 -- Kill_Range_Checks Flag33
284 -- Kill_Tag_Checks Flag34
285 -- Is_Class_Wide_Equivalent_Type Flag35
286 -- Referenced_As_LHS Flag36
287 -- Is_Known_Non_Null Flag37
288 -- Can_Never_Be_Null Flag38
289 -- Has_Default_Aspect Flag39
290 -- Body_Needed_For_SAL Flag40
292 -- Treat_As_Volatile Flag41
293 -- Is_Controlled Flag42
294 -- Has_Controlled_Component Flag43
295 -- Is_Pure Flag44
296 -- In_Private_Part Flag45
297 -- Has_Alignment_Clause Flag46
298 -- Has_Exit Flag47
299 -- In_Package_Body Flag48
300 -- Reachable Flag49
301 -- Delay_Subprogram_Descriptors Flag50
303 -- Is_Packed Flag51
304 -- Is_Entry_Formal Flag52
305 -- Is_Private_Descendant Flag53
306 -- Return_Present Flag54
307 -- Is_Tagged_Type Flag55
308 -- Has_Homonym Flag56
309 -- Is_Hidden Flag57
310 -- Non_Binary_Modulus Flag58
311 -- Is_Preelaborated Flag59
312 -- Is_Shared_Passive Flag60
314 -- Is_Remote_Types Flag61
315 -- Is_Remote_Call_Interface Flag62
316 -- Is_Character_Type Flag63
317 -- Is_Intrinsic_Subprogram Flag64
318 -- Has_Record_Rep_Clause Flag65
319 -- Has_Enumeration_Rep_Clause Flag66
320 -- Has_Small_Clause Flag67
321 -- Has_Component_Size_Clause Flag68
322 -- Is_Access_Constant Flag69
323 -- Is_First_Subtype Flag70
325 -- Has_Completion_In_Body Flag71
326 -- Has_Unknown_Discriminants Flag72
327 -- Is_Child_Unit Flag73
328 -- Is_CPP_Class Flag74
329 -- Has_Non_Standard_Rep Flag75
330 -- Is_Constructor Flag76
331 -- Static_Elaboration_Desired Flag77
332 -- Is_Tag Flag78
333 -- Has_All_Calls_Remote Flag79
334 -- Is_Constr_Subt_For_U_Nominal Flag80
336 -- Is_Asynchronous Flag81
337 -- Has_Gigi_Rep_Item Flag82
338 -- Has_Machine_Radix_Clause Flag83
339 -- Machine_Radix_10 Flag84
340 -- Is_Atomic Flag85
341 -- Has_Atomic_Components Flag86
342 -- Has_Volatile_Components Flag87
343 -- Discard_Names Flag88
344 -- Is_Interrupt_Handler Flag89
345 -- Returns_By_Ref Flag90
347 -- Is_Itype Flag91
348 -- Size_Known_At_Compile_Time Flag92
349 -- Has_Subprogram_Descriptor Flag93
350 -- Is_Generic_Actual_Type Flag94
351 -- Uses_Sec_Stack Flag95
352 -- Warnings_Off Flag96
353 -- Is_Controlling_Formal Flag97
354 -- Has_Controlling_Result Flag98
355 -- Is_Exported Flag99
356 -- Has_Specified_Layout Flag100
358 -- Has_Nested_Block_With_Handler Flag101
359 -- Is_Called Flag102
360 -- Is_Completely_Hidden Flag103
361 -- Address_Taken Flag104
362 -- Suppress_Initialization Flag105
363 -- Is_Limited_Composite Flag106
364 -- Is_Private_Composite Flag107
365 -- Default_Expressions_Processed Flag108
366 -- Is_Non_Static_Subtype Flag109
367 -- Has_External_Tag_Rep_Clause Flag110
369 -- Is_Formal_Subprogram Flag111
370 -- Is_Renaming_Of_Object Flag112
371 -- No_Return Flag113
372 -- Delay_Cleanups Flag114
373 -- Never_Set_In_Source Flag115
374 -- Is_Visible_Child_Unit Flag116
375 -- Is_Unchecked_Union Flag117
376 -- Is_For_Access_Subtype Flag118
377 -- Has_Convention_Pragma Flag119
378 -- Has_Primitive_Operations Flag120
380 -- Has_Pragma_Pack Flag121
381 -- Is_Bit_Packed_Array Flag122
382 -- Has_Unchecked_Union Flag123
383 -- Is_Eliminated Flag124
384 -- C_Pass_By_Copy Flag125
385 -- Is_Instantiated Flag126
386 -- Is_Valued_Procedure Flag127
387 -- (used for Component_Alignment) Flag128
388 -- (used for Component_Alignment) Flag129
389 -- Is_Generic_Instance Flag130
391 -- No_Pool_Assigned Flag131
392 -- Is_AST_Entry Flag132
393 -- Is_VMS_Exception Flag133
394 -- Is_Optional_Parameter Flag134
395 -- Has_Aliased_Components Flag135
396 -- No_Strict_Aliasing Flag136
397 -- Is_Machine_Code_Subprogram Flag137
398 -- Is_Packed_Array_Type Flag138
399 -- Has_Biased_Representation Flag139
400 -- Has_Complex_Representation Flag140
402 -- Is_Constr_Subt_For_UN_Aliased Flag141
403 -- Has_Missing_Return Flag142
404 -- Has_Recursive_Call Flag143
405 -- Is_Unsigned_Type Flag144
406 -- Strict_Alignment Flag145
407 -- Is_Abstract_Type Flag146
408 -- Needs_Debug_Info Flag147
409 -- Suppress_Elaboration_Warnings Flag148
410 -- Is_Compilation_Unit Flag149
411 -- Has_Pragma_Elaborate_Body Flag150
413 -- Has_Private_Ancestor Flag151
414 -- Entry_Accepted Flag152
415 -- Is_Obsolescent Flag153
416 -- Has_Per_Object_Constraint Flag154
417 -- Has_Private_Declaration Flag155
418 -- Referenced Flag156
419 -- Has_Pragma_Inline Flag157
420 -- Finalize_Storage_Only Flag158
421 -- From_With_Type Flag159
422 -- Is_Package_Body_Entity Flag160
424 -- Has_Qualified_Name Flag161
425 -- Nonzero_Is_True Flag162
426 -- Is_True_Constant Flag163
427 -- Reverse_Bit_Order Flag164
428 -- Suppress_Style_Checks Flag165
429 -- Debug_Info_Off Flag166
430 -- Sec_Stack_Needed_For_Return Flag167
431 -- Materialize_Entity Flag168
432 -- Has_Pragma_Thread_Local_Storage Flag169
433 -- Is_Known_Valid Flag170
435 -- Is_Hidden_Open_Scope Flag171
436 -- Has_Object_Size_Clause Flag172
437 -- Has_Fully_Qualified_Name Flag173
438 -- Elaboration_Entity_Required Flag174
439 -- Has_Forward_Instantiation Flag175
440 -- Is_Discrim_SO_Function Flag176
441 -- Size_Depends_On_Discriminant Flag177
442 -- Is_Null_Init_Proc Flag178
443 -- Has_Pragma_Pure_Function Flag179
444 -- Has_Pragma_Unreferenced Flag180
446 -- Has_Contiguous_Rep Flag181
447 -- Has_Xref_Entry Flag182
448 -- Must_Be_On_Byte_Boundary Flag183
449 -- Has_Stream_Size_Clause Flag184
450 -- Is_Ada_2005_Only Flag185
451 -- Is_Interface Flag186
452 -- Has_Constrained_Partial_View Flag187
453 -- Has_Persistent_BSS Flag188
454 -- Is_Pure_Unit_Access_Type Flag189
455 -- Has_Specified_Stream_Input Flag190
457 -- Has_Specified_Stream_Output Flag191
458 -- Has_Specified_Stream_Read Flag192
459 -- Has_Specified_Stream_Write Flag193
460 -- Is_Local_Anonymous_Access Flag194
461 -- Is_Primitive_Wrapper Flag195
462 -- Was_Hidden Flag196
463 -- Is_Limited_Interface Flag197
464 -- Has_Pragma_Ordered Flag198
465 -- Is_Ada_2012_Only Flag199
467 -- Has_Delayed_Aspects Flag200
468 -- Has_Anon_Block_Suffix Flag201
469 -- Itype_Printed Flag202
470 -- Has_Pragma_Pure Flag203
471 -- Is_Known_Null Flag204
472 -- Low_Bound_Tested Flag205
473 -- Is_Visible_Formal Flag206
474 -- Known_To_Have_Preelab_Init Flag207
475 -- Must_Have_Preelab_Init Flag208
476 -- Is_Return_Object Flag209
477 -- Elaborate_Body_Desirable Flag210
479 -- Has_Static_Discriminants Flag211
480 -- Has_Pragma_Unreferenced_Objects Flag212
481 -- Requires_Overriding Flag213
482 -- Has_RACW Flag214
483 -- Has_Up_Level_Access Flag215
484 -- Universal_Aliasing Flag216
485 -- Suppress_Value_Tracking_On_Call Flag217
486 -- Is_Primitive Flag218
487 -- Has_Initial_Value Flag219
488 -- Has_Dispatch_Table Flag220
490 -- Has_Pragma_Preelab_Init Flag221
491 -- Used_As_Generic_Actual Flag222
492 -- Is_Descendent_Of_Address Flag223
493 -- Is_Raised Flag224
494 -- Is_Thunk Flag225
495 -- Is_Only_Out_Parameter Flag226
496 -- Referenced_As_Out_Parameter Flag227
497 -- Has_Thunks Flag228
498 -- Can_Use_Internal_Rep Flag229
499 -- Has_Pragma_Inline_Always Flag230
501 -- Renamed_In_Spec Flag231
502 -- Has_Invariants Flag232
503 -- Has_Pragma_Unmodified Flag233
504 -- Is_Dispatch_Table_Entity Flag234
505 -- Is_Trivial_Subprogram Flag235
506 -- Warnings_Off_Used Flag236
507 -- Warnings_Off_Used_Unmodified Flag237
508 -- Warnings_Off_Used_Unreferenced Flag238
509 -- OK_To_Reorder_Components Flag239
510 -- Has_Postconditions Flag240
512 -- Optimize_Alignment_Space Flag241
513 -- Optimize_Alignment_Time Flag242
514 -- Overlays_Constant Flag243
515 -- Is_RACW_Stub_Type Flag244
516 -- Is_Private_Primitive Flag245
517 -- Is_Underlying_Record_View Flag246
518 -- OK_To_Rename Flag247
519 -- Has_Inheritable_Invariants Flag248
520 -- Is_Safe_To_Reevaluate Flag249
521 -- Has_Predicates Flag250
523 -- Has_Implicit_Dereference Flag251
524 -- Is_Processed_Transient Flag252
525 -- Has_Anonymous_Master Flag253
526 -- Is_Implementation_Defined Flag254
528 -----------------------
529 -- Local subprograms --
530 -----------------------
532 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
533 -- Returns the attribute definition clause for Id whose name is Rep_Name.
534 -- Returns Empty if no matching attribute definition clause found for Id.
536 ---------------
537 -- Float_Rep --
538 ---------------
540 function Float_Rep (Id : E) return F is
541 pragma Assert (Is_Floating_Point_Type (Id));
542 begin
543 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
544 end Float_Rep;
546 ----------------
547 -- Rep_Clause --
548 ----------------
550 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
551 Ritem : Node_Id;
553 begin
554 Ritem := First_Rep_Item (Id);
555 while Present (Ritem) loop
556 if Nkind (Ritem) = N_Attribute_Definition_Clause
557 and then Chars (Ritem) = Rep_Name
558 then
559 return Ritem;
560 else
561 Next_Rep_Item (Ritem);
562 end if;
563 end loop;
565 return Empty;
566 end Rep_Clause;
568 --------------------------------
569 -- Attribute Access Functions --
570 --------------------------------
572 function Accept_Address (Id : E) return L is
573 begin
574 return Elist21 (Id);
575 end Accept_Address;
577 function Access_Disp_Table (Id : E) return L is
578 begin
579 pragma Assert (Ekind_In (Id, E_Record_Type,
580 E_Record_Subtype));
581 return Elist16 (Implementation_Base_Type (Id));
582 end Access_Disp_Table;
584 function Actual_Subtype (Id : E) return E is
585 begin
586 pragma Assert
587 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
588 or else Is_Formal (Id));
589 return Node17 (Id);
590 end Actual_Subtype;
592 function Address_Taken (Id : E) return B is
593 begin
594 return Flag104 (Id);
595 end Address_Taken;
597 function Alias (Id : E) return E is
598 begin
599 pragma Assert
600 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
601 return Node18 (Id);
602 end Alias;
604 function Alignment (Id : E) return U is
605 begin
606 pragma Assert (Is_Type (Id)
607 or else Is_Formal (Id)
608 or else Ekind_In (Id, E_Loop_Parameter,
609 E_Constant,
610 E_Exception,
611 E_Variable));
612 return Uint14 (Id);
613 end Alignment;
615 function Associated_Formal_Package (Id : E) return E is
616 begin
617 pragma Assert (Ekind (Id) = E_Package);
618 return Node12 (Id);
619 end Associated_Formal_Package;
621 function Associated_Node_For_Itype (Id : E) return N is
622 begin
623 return Node8 (Id);
624 end Associated_Node_For_Itype;
626 function Associated_Storage_Pool (Id : E) return E is
627 begin
628 pragma Assert (Is_Access_Type (Id));
629 return Node22 (Root_Type (Id));
630 end Associated_Storage_Pool;
632 function Barrier_Function (Id : E) return N is
633 begin
634 pragma Assert (Is_Entry (Id));
635 return Node12 (Id);
636 end Barrier_Function;
638 function Block_Node (Id : E) return N is
639 begin
640 pragma Assert (Ekind (Id) = E_Block);
641 return Node11 (Id);
642 end Block_Node;
644 function Body_Entity (Id : E) return E is
645 begin
646 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
647 return Node19 (Id);
648 end Body_Entity;
650 function Body_Needed_For_SAL (Id : E) return B is
651 begin
652 pragma Assert
653 (Ekind (Id) = E_Package
654 or else Is_Subprogram (Id)
655 or else Is_Generic_Unit (Id));
656 return Flag40 (Id);
657 end Body_Needed_For_SAL;
659 function C_Pass_By_Copy (Id : E) return B is
660 begin
661 pragma Assert (Is_Record_Type (Id));
662 return Flag125 (Implementation_Base_Type (Id));
663 end C_Pass_By_Copy;
665 function Can_Never_Be_Null (Id : E) return B is
666 begin
667 return Flag38 (Id);
668 end Can_Never_Be_Null;
670 function Checks_May_Be_Suppressed (Id : E) return B is
671 begin
672 return Flag31 (Id);
673 end Checks_May_Be_Suppressed;
675 function Class_Wide_Type (Id : E) return E is
676 begin
677 pragma Assert (Is_Type (Id));
678 return Node9 (Id);
679 end Class_Wide_Type;
681 function Cloned_Subtype (Id : E) return E is
682 begin
683 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
684 return Node16 (Id);
685 end Cloned_Subtype;
687 function Component_Bit_Offset (Id : E) return U is
688 begin
689 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
690 return Uint11 (Id);
691 end Component_Bit_Offset;
693 function Component_Clause (Id : E) return N is
694 begin
695 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
696 return Node13 (Id);
697 end Component_Clause;
699 function Component_Size (Id : E) return U is
700 begin
701 pragma Assert (Is_Array_Type (Id));
702 return Uint22 (Implementation_Base_Type (Id));
703 end Component_Size;
705 function Component_Type (Id : E) return E is
706 begin
707 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
708 return Node20 (Implementation_Base_Type (Id));
709 end Component_Type;
711 function Corresponding_Concurrent_Type (Id : E) return E is
712 begin
713 pragma Assert (Ekind (Id) = E_Record_Type);
714 return Node18 (Id);
715 end Corresponding_Concurrent_Type;
717 function Corresponding_Discriminant (Id : E) return E is
718 begin
719 pragma Assert (Ekind (Id) = E_Discriminant);
720 return Node19 (Id);
721 end Corresponding_Discriminant;
723 function Corresponding_Equality (Id : E) return E is
724 begin
725 pragma Assert
726 (Ekind (Id) = E_Function
727 and then not Comes_From_Source (Id)
728 and then Chars (Id) = Name_Op_Ne);
729 return Node13 (Id);
730 end Corresponding_Equality;
732 function Corresponding_Protected_Entry (Id : E) return E is
733 begin
734 pragma Assert (Ekind (Id) = E_Subprogram_Body);
735 return Node18 (Id);
736 end Corresponding_Protected_Entry;
738 function Corresponding_Record_Type (Id : E) return E is
739 begin
740 pragma Assert (Is_Concurrent_Type (Id));
741 return Node18 (Id);
742 end Corresponding_Record_Type;
744 function Corresponding_Remote_Type (Id : E) return E is
745 begin
746 return Node22 (Id);
747 end Corresponding_Remote_Type;
749 function Current_Use_Clause (Id : E) return E is
750 begin
751 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
752 return Node27 (Id);
753 end Current_Use_Clause;
755 function Current_Value (Id : E) return N is
756 begin
757 pragma Assert (Ekind (Id) in Object_Kind);
758 return Node9 (Id);
759 end Current_Value;
761 function CR_Discriminant (Id : E) return E is
762 begin
763 return Node23 (Id);
764 end CR_Discriminant;
766 function Debug_Info_Off (Id : E) return B is
767 begin
768 return Flag166 (Id);
769 end Debug_Info_Off;
771 function Debug_Renaming_Link (Id : E) return E is
772 begin
773 return Node25 (Id);
774 end Debug_Renaming_Link;
776 function Default_Expr_Function (Id : E) return E is
777 begin
778 pragma Assert (Is_Formal (Id));
779 return Node21 (Id);
780 end Default_Expr_Function;
782 function Default_Expressions_Processed (Id : E) return B is
783 begin
784 return Flag108 (Id);
785 end Default_Expressions_Processed;
787 function Default_Value (Id : E) return N is
788 begin
789 pragma Assert (Is_Formal (Id));
790 return Node20 (Id);
791 end Default_Value;
793 function Delay_Cleanups (Id : E) return B is
794 begin
795 return Flag114 (Id);
796 end Delay_Cleanups;
798 function Delay_Subprogram_Descriptors (Id : E) return B is
799 begin
800 return Flag50 (Id);
801 end Delay_Subprogram_Descriptors;
803 function Delta_Value (Id : E) return R is
804 begin
805 pragma Assert (Is_Fixed_Point_Type (Id));
806 return Ureal18 (Id);
807 end Delta_Value;
809 function Dependent_Instances (Id : E) return L is
810 begin
811 pragma Assert (Is_Generic_Instance (Id));
812 return Elist8 (Id);
813 end Dependent_Instances;
815 function Depends_On_Private (Id : E) return B is
816 begin
817 pragma Assert (Nkind (Id) in N_Entity);
818 return Flag14 (Id);
819 end Depends_On_Private;
821 function Digits_Value (Id : E) return U is
822 begin
823 pragma Assert
824 (Is_Floating_Point_Type (Id)
825 or else Is_Decimal_Fixed_Point_Type (Id));
826 return Uint17 (Id);
827 end Digits_Value;
829 function Direct_Primitive_Operations (Id : E) return L is
830 begin
831 pragma Assert (Is_Tagged_Type (Id));
832 return Elist10 (Id);
833 end Direct_Primitive_Operations;
835 function Directly_Designated_Type (Id : E) return E is
836 begin
837 pragma Assert (Is_Access_Type (Id));
838 return Node20 (Id);
839 end Directly_Designated_Type;
841 function Discard_Names (Id : E) return B is
842 begin
843 return Flag88 (Id);
844 end Discard_Names;
846 function Discriminal (Id : E) return E is
847 begin
848 pragma Assert (Ekind (Id) = E_Discriminant);
849 return Node17 (Id);
850 end Discriminal;
852 function Discriminal_Link (Id : E) return N is
853 begin
854 return Node10 (Id);
855 end Discriminal_Link;
857 function Discriminant_Checking_Func (Id : E) return E is
858 begin
859 pragma Assert (Ekind (Id) = E_Component);
860 return Node20 (Id);
861 end Discriminant_Checking_Func;
863 function Discriminant_Constraint (Id : E) return L is
864 begin
865 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
866 return Elist21 (Id);
867 end Discriminant_Constraint;
869 function Discriminant_Default_Value (Id : E) return N is
870 begin
871 pragma Assert (Ekind (Id) = E_Discriminant);
872 return Node20 (Id);
873 end Discriminant_Default_Value;
875 function Discriminant_Number (Id : E) return U is
876 begin
877 pragma Assert (Ekind (Id) = E_Discriminant);
878 return Uint15 (Id);
879 end Discriminant_Number;
881 function Dispatch_Table_Wrappers (Id : E) return L is
882 begin
883 pragma Assert (Ekind_In (Id, E_Record_Type,
884 E_Record_Subtype));
885 return Elist26 (Implementation_Base_Type (Id));
886 end Dispatch_Table_Wrappers;
888 function DT_Entry_Count (Id : E) return U is
889 begin
890 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
891 return Uint15 (Id);
892 end DT_Entry_Count;
894 function DT_Offset_To_Top_Func (Id : E) return E is
895 begin
896 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
897 return Node25 (Id);
898 end DT_Offset_To_Top_Func;
900 function DT_Position (Id : E) return U is
901 begin
902 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
903 and then Present (DTC_Entity (Id)));
904 return Uint15 (Id);
905 end DT_Position;
907 function DTC_Entity (Id : E) return E is
908 begin
909 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
910 return Node16 (Id);
911 end DTC_Entity;
913 function Elaborate_Body_Desirable (Id : E) return B is
914 begin
915 pragma Assert (Ekind (Id) = E_Package);
916 return Flag210 (Id);
917 end Elaborate_Body_Desirable;
919 function Elaboration_Entity (Id : E) return E is
920 begin
921 pragma Assert
922 (Is_Subprogram (Id)
923 or else
924 Ekind (Id) = E_Package
925 or else
926 Is_Generic_Unit (Id));
927 return Node13 (Id);
928 end Elaboration_Entity;
930 function Elaboration_Entity_Required (Id : E) return B is
931 begin
932 pragma Assert
933 (Is_Subprogram (Id)
934 or else
935 Ekind (Id) = E_Package
936 or else
937 Is_Generic_Unit (Id));
938 return Flag174 (Id);
939 end Elaboration_Entity_Required;
941 function Enclosing_Scope (Id : E) return E is
942 begin
943 return Node18 (Id);
944 end Enclosing_Scope;
946 function Entry_Accepted (Id : E) return B is
947 begin
948 pragma Assert (Is_Entry (Id));
949 return Flag152 (Id);
950 end Entry_Accepted;
952 function Entry_Bodies_Array (Id : E) return E is
953 begin
954 return Node15 (Id);
955 end Entry_Bodies_Array;
957 function Entry_Cancel_Parameter (Id : E) return E is
958 begin
959 return Node23 (Id);
960 end Entry_Cancel_Parameter;
962 function Entry_Component (Id : E) return E is
963 begin
964 return Node11 (Id);
965 end Entry_Component;
967 function Entry_Formal (Id : E) return E is
968 begin
969 return Node16 (Id);
970 end Entry_Formal;
972 function Entry_Index_Constant (Id : E) return N is
973 begin
974 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
975 return Node18 (Id);
976 end Entry_Index_Constant;
978 function Contract (Id : E) return N is
979 begin
980 pragma Assert
981 (Ekind_In (Id, E_Entry, E_Entry_Family)
982 or else Is_Subprogram (Id)
983 or else Is_Generic_Subprogram (Id));
984 return Node24 (Id);
985 end Contract;
987 function Entry_Parameters_Type (Id : E) return E is
988 begin
989 return Node15 (Id);
990 end Entry_Parameters_Type;
992 function Enum_Pos_To_Rep (Id : E) return E is
993 begin
994 pragma Assert (Ekind (Id) = E_Enumeration_Type);
995 return Node23 (Id);
996 end Enum_Pos_To_Rep;
998 function Enumeration_Pos (Id : E) return Uint is
999 begin
1000 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1001 return Uint11 (Id);
1002 end Enumeration_Pos;
1004 function Enumeration_Rep (Id : E) return U is
1005 begin
1006 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1007 return Uint12 (Id);
1008 end Enumeration_Rep;
1010 function Enumeration_Rep_Expr (Id : E) return N is
1011 begin
1012 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1013 return Node22 (Id);
1014 end Enumeration_Rep_Expr;
1016 function Equivalent_Type (Id : E) return E is
1017 begin
1018 pragma Assert
1019 (Ekind_In (Id, E_Class_Wide_Type,
1020 E_Class_Wide_Subtype,
1021 E_Access_Protected_Subprogram_Type,
1022 E_Anonymous_Access_Protected_Subprogram_Type,
1023 E_Access_Subprogram_Type,
1024 E_Exception_Type));
1025 return Node18 (Id);
1026 end Equivalent_Type;
1028 function Esize (Id : E) return Uint is
1029 begin
1030 return Uint12 (Id);
1031 end Esize;
1033 function Exception_Code (Id : E) return Uint is
1034 begin
1035 pragma Assert (Ekind (Id) = E_Exception);
1036 return Uint22 (Id);
1037 end Exception_Code;
1039 function Extra_Accessibility (Id : E) return E is
1040 begin
1041 pragma Assert
1042 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1043 return Node13 (Id);
1044 end Extra_Accessibility;
1046 function Extra_Accessibility_Of_Result (Id : E) return E is
1047 begin
1048 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1049 return Node19 (Id);
1050 end Extra_Accessibility_Of_Result;
1052 function Extra_Constrained (Id : E) return E is
1053 begin
1054 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1055 return Node23 (Id);
1056 end Extra_Constrained;
1058 function Extra_Formal (Id : E) return E is
1059 begin
1060 return Node15 (Id);
1061 end Extra_Formal;
1063 function Extra_Formals (Id : E) return E is
1064 begin
1065 pragma Assert
1066 (Is_Overloadable (Id)
1067 or else Ekind_In (Id, E_Entry_Family,
1068 E_Subprogram_Body,
1069 E_Subprogram_Type));
1070 return Node28 (Id);
1071 end Extra_Formals;
1073 function Can_Use_Internal_Rep (Id : E) return B is
1074 begin
1075 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1076 return Flag229 (Base_Type (Id));
1077 end Can_Use_Internal_Rep;
1079 function Finalization_Master (Id : E) return E is
1080 begin
1081 pragma Assert (Is_Access_Type (Id));
1082 return Node23 (Root_Type (Id));
1083 end Finalization_Master;
1085 function Finalize_Storage_Only (Id : E) return B is
1086 begin
1087 pragma Assert (Is_Type (Id));
1088 return Flag158 (Base_Type (Id));
1089 end Finalize_Storage_Only;
1091 function Finalizer (Id : E) return E is
1092 begin
1093 pragma Assert
1094 (Ekind (Id) = E_Package
1095 or else Ekind (Id) = E_Package_Body);
1096 return Node24 (Id);
1097 end Finalizer;
1099 function First_Entity (Id : E) return E is
1100 begin
1101 return Node17 (Id);
1102 end First_Entity;
1104 function First_Exit_Statement (Id : E) return N is
1105 begin
1106 pragma Assert (Ekind (Id) = E_Loop);
1107 return Node8 (Id);
1108 end First_Exit_Statement;
1110 function First_Index (Id : E) return N is
1111 begin
1112 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1113 return Node17 (Id);
1114 end First_Index;
1116 function First_Literal (Id : E) return E is
1117 begin
1118 pragma Assert (Is_Enumeration_Type (Id));
1119 return Node17 (Id);
1120 end First_Literal;
1122 function First_Optional_Parameter (Id : E) return E is
1123 begin
1124 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1125 return Node14 (Id);
1126 end First_Optional_Parameter;
1128 function First_Private_Entity (Id : E) return E is
1129 begin
1130 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1131 or else Ekind (Id) in Concurrent_Kind);
1132 return Node16 (Id);
1133 end First_Private_Entity;
1135 function First_Rep_Item (Id : E) return E is
1136 begin
1137 return Node6 (Id);
1138 end First_Rep_Item;
1140 function Freeze_Node (Id : E) return N is
1141 begin
1142 return Node7 (Id);
1143 end Freeze_Node;
1145 function From_With_Type (Id : E) return B is
1146 begin
1147 return Flag159 (Id);
1148 end From_With_Type;
1150 function Full_View (Id : E) return E is
1151 begin
1152 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1153 return Node11 (Id);
1154 end Full_View;
1156 function Generic_Homonym (Id : E) return E is
1157 begin
1158 pragma Assert (Ekind (Id) = E_Generic_Package);
1159 return Node11 (Id);
1160 end Generic_Homonym;
1162 function Generic_Renamings (Id : E) return L is
1163 begin
1164 return Elist23 (Id);
1165 end Generic_Renamings;
1167 function Handler_Records (Id : E) return S is
1168 begin
1169 return List10 (Id);
1170 end Handler_Records;
1172 function Has_Aliased_Components (Id : E) return B is
1173 begin
1174 return Flag135 (Implementation_Base_Type (Id));
1175 end Has_Aliased_Components;
1177 function Has_Alignment_Clause (Id : E) return B is
1178 begin
1179 return Flag46 (Id);
1180 end Has_Alignment_Clause;
1182 function Has_All_Calls_Remote (Id : E) return B is
1183 begin
1184 return Flag79 (Id);
1185 end Has_All_Calls_Remote;
1187 function Has_Anon_Block_Suffix (Id : E) return B is
1188 begin
1189 return Flag201 (Id);
1190 end Has_Anon_Block_Suffix;
1192 function Has_Anonymous_Master (Id : E) return B is
1193 begin
1194 pragma Assert
1195 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1196 return Flag253 (Id);
1197 end Has_Anonymous_Master;
1199 function Has_Atomic_Components (Id : E) return B is
1200 begin
1201 return Flag86 (Implementation_Base_Type (Id));
1202 end Has_Atomic_Components;
1204 function Has_Biased_Representation (Id : E) return B is
1205 begin
1206 return Flag139 (Id);
1207 end Has_Biased_Representation;
1209 function Has_Completion (Id : E) return B is
1210 begin
1211 return Flag26 (Id);
1212 end Has_Completion;
1214 function Has_Completion_In_Body (Id : E) return B is
1215 begin
1216 pragma Assert (Is_Type (Id));
1217 return Flag71 (Id);
1218 end Has_Completion_In_Body;
1220 function Has_Complex_Representation (Id : E) return B is
1221 begin
1222 pragma Assert (Is_Type (Id));
1223 return Flag140 (Implementation_Base_Type (Id));
1224 end Has_Complex_Representation;
1226 function Has_Component_Size_Clause (Id : E) return B is
1227 begin
1228 pragma Assert (Is_Array_Type (Id));
1229 return Flag68 (Implementation_Base_Type (Id));
1230 end Has_Component_Size_Clause;
1232 function Has_Constrained_Partial_View (Id : E) return B is
1233 begin
1234 pragma Assert (Is_Type (Id));
1235 return Flag187 (Id);
1236 end Has_Constrained_Partial_View;
1238 function Has_Controlled_Component (Id : E) return B is
1239 begin
1240 return Flag43 (Base_Type (Id));
1241 end Has_Controlled_Component;
1243 function Has_Contiguous_Rep (Id : E) return B is
1244 begin
1245 return Flag181 (Id);
1246 end Has_Contiguous_Rep;
1248 function Has_Controlling_Result (Id : E) return B is
1249 begin
1250 return Flag98 (Id);
1251 end Has_Controlling_Result;
1253 function Has_Convention_Pragma (Id : E) return B is
1254 begin
1255 return Flag119 (Id);
1256 end Has_Convention_Pragma;
1258 function Has_Default_Aspect (Id : E) return B is
1259 begin
1260 return Flag39 (Base_Type (Id));
1261 end Has_Default_Aspect;
1263 function Has_Delayed_Aspects (Id : E) return B is
1264 begin
1265 pragma Assert (Nkind (Id) in N_Entity);
1266 return Flag200 (Id);
1267 end Has_Delayed_Aspects;
1269 function Has_Delayed_Freeze (Id : E) return B is
1270 begin
1271 pragma Assert (Nkind (Id) in N_Entity);
1272 return Flag18 (Id);
1273 end Has_Delayed_Freeze;
1275 function Has_Discriminants (Id : E) return B is
1276 begin
1277 pragma Assert (Nkind (Id) in N_Entity);
1278 return Flag5 (Id);
1279 end Has_Discriminants;
1281 function Has_Dispatch_Table (Id : E) return B is
1282 begin
1283 pragma Assert (Is_Tagged_Type (Id));
1284 return Flag220 (Id);
1285 end Has_Dispatch_Table;
1287 function Has_Enumeration_Rep_Clause (Id : E) return B is
1288 begin
1289 pragma Assert (Is_Enumeration_Type (Id));
1290 return Flag66 (Id);
1291 end Has_Enumeration_Rep_Clause;
1293 function Has_Exit (Id : E) return B is
1294 begin
1295 return Flag47 (Id);
1296 end Has_Exit;
1298 function Has_External_Tag_Rep_Clause (Id : E) return B is
1299 begin
1300 pragma Assert (Is_Tagged_Type (Id));
1301 return Flag110 (Id);
1302 end Has_External_Tag_Rep_Clause;
1304 function Has_Forward_Instantiation (Id : E) return B is
1305 begin
1306 return Flag175 (Id);
1307 end Has_Forward_Instantiation;
1309 function Has_Fully_Qualified_Name (Id : E) return B is
1310 begin
1311 return Flag173 (Id);
1312 end Has_Fully_Qualified_Name;
1314 function Has_Gigi_Rep_Item (Id : E) return B is
1315 begin
1316 return Flag82 (Id);
1317 end Has_Gigi_Rep_Item;
1319 function Has_Homonym (Id : E) return B is
1320 begin
1321 return Flag56 (Id);
1322 end Has_Homonym;
1324 function Has_Implicit_Dereference (Id : E) return B is
1325 begin
1326 return Flag251 (Id);
1327 end Has_Implicit_Dereference;
1329 function Has_Inheritable_Invariants (Id : E) return B is
1330 begin
1331 pragma Assert (Is_Type (Id));
1332 return Flag248 (Id);
1333 end Has_Inheritable_Invariants;
1335 function Has_Initial_Value (Id : E) return B is
1336 begin
1337 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1338 return Flag219 (Id);
1339 end Has_Initial_Value;
1341 function Has_Invariants (Id : E) return B is
1342 begin
1343 pragma Assert (Is_Type (Id)
1344 or else Ekind (Id) = E_Procedure
1345 or else Ekind (Id) = E_Generic_Procedure);
1346 return Flag232 (Id);
1347 end Has_Invariants;
1349 function Has_Machine_Radix_Clause (Id : E) return B is
1350 begin
1351 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1352 return Flag83 (Id);
1353 end Has_Machine_Radix_Clause;
1355 function Has_Master_Entity (Id : E) return B is
1356 begin
1357 return Flag21 (Id);
1358 end Has_Master_Entity;
1360 function Has_Missing_Return (Id : E) return B is
1361 begin
1362 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1363 return Flag142 (Id);
1364 end Has_Missing_Return;
1366 function Has_Nested_Block_With_Handler (Id : E) return B is
1367 begin
1368 return Flag101 (Id);
1369 end Has_Nested_Block_With_Handler;
1371 function Has_Non_Standard_Rep (Id : E) return B is
1372 begin
1373 return Flag75 (Implementation_Base_Type (Id));
1374 end Has_Non_Standard_Rep;
1376 function Has_Object_Size_Clause (Id : E) return B is
1377 begin
1378 pragma Assert (Is_Type (Id));
1379 return Flag172 (Id);
1380 end Has_Object_Size_Clause;
1382 function Has_Per_Object_Constraint (Id : E) return B is
1383 begin
1384 return Flag154 (Id);
1385 end Has_Per_Object_Constraint;
1387 function Has_Persistent_BSS (Id : E) return B is
1388 begin
1389 return Flag188 (Id);
1390 end Has_Persistent_BSS;
1392 function Has_Postconditions (Id : E) return B is
1393 begin
1394 pragma Assert (Is_Subprogram (Id));
1395 return Flag240 (Id);
1396 end Has_Postconditions;
1398 function Has_Pragma_Controlled (Id : E) return B is
1399 begin
1400 pragma Assert (Is_Access_Type (Id));
1401 return Flag27 (Implementation_Base_Type (Id));
1402 end Has_Pragma_Controlled;
1404 function Has_Pragma_Elaborate_Body (Id : E) return B is
1405 begin
1406 return Flag150 (Id);
1407 end Has_Pragma_Elaborate_Body;
1409 function Has_Pragma_Inline (Id : E) return B is
1410 begin
1411 return Flag157 (Id);
1412 end Has_Pragma_Inline;
1414 function Has_Pragma_Inline_Always (Id : E) return B is
1415 begin
1416 return Flag230 (Id);
1417 end Has_Pragma_Inline_Always;
1419 function Has_Pragma_Ordered (Id : E) return B is
1420 begin
1421 pragma Assert (Is_Enumeration_Type (Id));
1422 return Flag198 (Implementation_Base_Type (Id));
1423 end Has_Pragma_Ordered;
1425 function Has_Pragma_Pack (Id : E) return B is
1426 begin
1427 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1428 return Flag121 (Implementation_Base_Type (Id));
1429 end Has_Pragma_Pack;
1431 function Has_Pragma_Preelab_Init (Id : E) return B is
1432 begin
1433 return Flag221 (Id);
1434 end Has_Pragma_Preelab_Init;
1436 function Has_Pragma_Pure (Id : E) return B is
1437 begin
1438 return Flag203 (Id);
1439 end Has_Pragma_Pure;
1441 function Has_Pragma_Pure_Function (Id : E) return B is
1442 begin
1443 return Flag179 (Id);
1444 end Has_Pragma_Pure_Function;
1446 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1447 begin
1448 return Flag169 (Id);
1449 end Has_Pragma_Thread_Local_Storage;
1451 function Has_Pragma_Unmodified (Id : E) return B is
1452 begin
1453 return Flag233 (Id);
1454 end Has_Pragma_Unmodified;
1456 function Has_Pragma_Unreferenced (Id : E) return B is
1457 begin
1458 return Flag180 (Id);
1459 end Has_Pragma_Unreferenced;
1461 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1462 begin
1463 pragma Assert (Is_Type (Id));
1464 return Flag212 (Id);
1465 end Has_Pragma_Unreferenced_Objects;
1467 function Has_Predicates (Id : E) return B is
1468 begin
1469 return Flag250 (Id);
1470 end Has_Predicates;
1472 function Has_Primitive_Operations (Id : E) return B is
1473 begin
1474 pragma Assert (Is_Type (Id));
1475 return Flag120 (Base_Type (Id));
1476 end Has_Primitive_Operations;
1478 function Has_Private_Ancestor (Id : E) return B is
1479 begin
1480 return Flag151 (Id);
1481 end Has_Private_Ancestor;
1483 function Has_Private_Declaration (Id : E) return B is
1484 begin
1485 return Flag155 (Id);
1486 end Has_Private_Declaration;
1488 function Has_Qualified_Name (Id : E) return B is
1489 begin
1490 return Flag161 (Id);
1491 end Has_Qualified_Name;
1493 function Has_RACW (Id : E) return B is
1494 begin
1495 pragma Assert (Ekind (Id) = E_Package);
1496 return Flag214 (Id);
1497 end Has_RACW;
1499 function Has_Record_Rep_Clause (Id : E) return B is
1500 begin
1501 pragma Assert (Is_Record_Type (Id));
1502 return Flag65 (Implementation_Base_Type (Id));
1503 end Has_Record_Rep_Clause;
1505 function Has_Recursive_Call (Id : E) return B is
1506 begin
1507 pragma Assert (Is_Subprogram (Id));
1508 return Flag143 (Id);
1509 end Has_Recursive_Call;
1511 function Has_Size_Clause (Id : E) return B is
1512 begin
1513 return Flag29 (Id);
1514 end Has_Size_Clause;
1516 function Has_Small_Clause (Id : E) return B is
1517 begin
1518 return Flag67 (Id);
1519 end Has_Small_Clause;
1521 function Has_Specified_Layout (Id : E) return B is
1522 begin
1523 pragma Assert (Is_Type (Id));
1524 return Flag100 (Implementation_Base_Type (Id));
1525 end Has_Specified_Layout;
1527 function Has_Specified_Stream_Input (Id : E) return B is
1528 begin
1529 pragma Assert (Is_Type (Id));
1530 return Flag190 (Id);
1531 end Has_Specified_Stream_Input;
1533 function Has_Specified_Stream_Output (Id : E) return B is
1534 begin
1535 pragma Assert (Is_Type (Id));
1536 return Flag191 (Id);
1537 end Has_Specified_Stream_Output;
1539 function Has_Specified_Stream_Read (Id : E) return B is
1540 begin
1541 pragma Assert (Is_Type (Id));
1542 return Flag192 (Id);
1543 end Has_Specified_Stream_Read;
1545 function Has_Specified_Stream_Write (Id : E) return B is
1546 begin
1547 pragma Assert (Is_Type (Id));
1548 return Flag193 (Id);
1549 end Has_Specified_Stream_Write;
1551 function Has_Static_Discriminants (Id : E) return B is
1552 begin
1553 pragma Assert (Is_Type (Id));
1554 return Flag211 (Id);
1555 end Has_Static_Discriminants;
1557 function Has_Storage_Size_Clause (Id : E) return B is
1558 begin
1559 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1560 return Flag23 (Implementation_Base_Type (Id));
1561 end Has_Storage_Size_Clause;
1563 function Has_Stream_Size_Clause (Id : E) return B is
1564 begin
1565 return Flag184 (Id);
1566 end Has_Stream_Size_Clause;
1568 function Has_Subprogram_Descriptor (Id : E) return B is
1569 begin
1570 return Flag93 (Id);
1571 end Has_Subprogram_Descriptor;
1573 function Has_Task (Id : E) return B is
1574 begin
1575 return Flag30 (Base_Type (Id));
1576 end Has_Task;
1578 function Has_Thunks (Id : E) return B is
1579 begin
1580 return Flag228 (Id);
1581 end Has_Thunks;
1583 function Has_Unchecked_Union (Id : E) return B is
1584 begin
1585 return Flag123 (Base_Type (Id));
1586 end Has_Unchecked_Union;
1588 function Has_Unknown_Discriminants (Id : E) return B is
1589 begin
1590 pragma Assert (Is_Type (Id));
1591 return Flag72 (Id);
1592 end Has_Unknown_Discriminants;
1594 function Has_Up_Level_Access (Id : E) return B is
1595 begin
1596 pragma Assert
1597 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1598 return Flag215 (Id);
1599 end Has_Up_Level_Access;
1601 function Has_Volatile_Components (Id : E) return B is
1602 begin
1603 return Flag87 (Implementation_Base_Type (Id));
1604 end Has_Volatile_Components;
1606 function Has_Xref_Entry (Id : E) return B is
1607 begin
1608 return Flag182 (Id);
1609 end Has_Xref_Entry;
1611 function Hiding_Loop_Variable (Id : E) return E is
1612 begin
1613 pragma Assert (Ekind (Id) = E_Variable);
1614 return Node8 (Id);
1615 end Hiding_Loop_Variable;
1617 function Homonym (Id : E) return E is
1618 begin
1619 return Node4 (Id);
1620 end Homonym;
1622 function Interface_Alias (Id : E) return E is
1623 begin
1624 pragma Assert (Is_Subprogram (Id));
1625 return Node25 (Id);
1626 end Interface_Alias;
1628 function Interfaces (Id : E) return L is
1629 begin
1630 pragma Assert (Is_Record_Type (Id));
1631 return Elist25 (Id);
1632 end Interfaces;
1634 function In_Package_Body (Id : E) return B is
1635 begin
1636 return Flag48 (Id);
1637 end In_Package_Body;
1639 function In_Private_Part (Id : E) return B is
1640 begin
1641 return Flag45 (Id);
1642 end In_Private_Part;
1644 function In_Use (Id : E) return B is
1645 begin
1646 pragma Assert (Nkind (Id) in N_Entity);
1647 return Flag8 (Id);
1648 end In_Use;
1650 function Inner_Instances (Id : E) return L is
1651 begin
1652 return Elist23 (Id);
1653 end Inner_Instances;
1655 function Interface_Name (Id : E) return N is
1656 begin
1657 return Node21 (Id);
1658 end Interface_Name;
1660 function Is_Abstract_Subprogram (Id : E) return B is
1661 begin
1662 pragma Assert (Is_Overloadable (Id));
1663 return Flag19 (Id);
1664 end Is_Abstract_Subprogram;
1666 function Is_Abstract_Type (Id : E) return B is
1667 begin
1668 pragma Assert (Is_Type (Id));
1669 return Flag146 (Id);
1670 end Is_Abstract_Type;
1672 function Is_Local_Anonymous_Access (Id : E) return B is
1673 begin
1674 pragma Assert (Is_Access_Type (Id));
1675 return Flag194 (Id);
1676 end Is_Local_Anonymous_Access;
1678 function Is_Access_Constant (Id : E) return B is
1679 begin
1680 pragma Assert (Is_Access_Type (Id));
1681 return Flag69 (Id);
1682 end Is_Access_Constant;
1684 function Is_Ada_2005_Only (Id : E) return B is
1685 begin
1686 return Flag185 (Id);
1687 end Is_Ada_2005_Only;
1689 function Is_Ada_2012_Only (Id : E) return B is
1690 begin
1691 return Flag199 (Id);
1692 end Is_Ada_2012_Only;
1694 function Is_Aliased (Id : E) return B is
1695 begin
1696 pragma Assert (Nkind (Id) in N_Entity);
1697 return Flag15 (Id);
1698 end Is_Aliased;
1700 function Is_AST_Entry (Id : E) return B is
1701 begin
1702 pragma Assert (Is_Entry (Id));
1703 return Flag132 (Id);
1704 end Is_AST_Entry;
1706 function Is_Asynchronous (Id : E) return B is
1707 begin
1708 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1709 return Flag81 (Id);
1710 end Is_Asynchronous;
1712 function Is_Atomic (Id : E) return B is
1713 begin
1714 return Flag85 (Id);
1715 end Is_Atomic;
1717 function Is_Bit_Packed_Array (Id : E) return B is
1718 begin
1719 return Flag122 (Implementation_Base_Type (Id));
1720 end Is_Bit_Packed_Array;
1722 function Is_Called (Id : E) return B is
1723 begin
1724 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1725 return Flag102 (Id);
1726 end Is_Called;
1728 function Is_Character_Type (Id : E) return B is
1729 begin
1730 return Flag63 (Id);
1731 end Is_Character_Type;
1733 function Is_Child_Unit (Id : E) return B is
1734 begin
1735 return Flag73 (Id);
1736 end Is_Child_Unit;
1738 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1739 begin
1740 return Flag35 (Id);
1741 end Is_Class_Wide_Equivalent_Type;
1743 function Is_Compilation_Unit (Id : E) return B is
1744 begin
1745 return Flag149 (Id);
1746 end Is_Compilation_Unit;
1748 function Is_Completely_Hidden (Id : E) return B is
1749 begin
1750 pragma Assert (Ekind (Id) = E_Discriminant);
1751 return Flag103 (Id);
1752 end Is_Completely_Hidden;
1754 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1755 begin
1756 return Flag80 (Id);
1757 end Is_Constr_Subt_For_U_Nominal;
1759 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1760 begin
1761 return Flag141 (Id);
1762 end Is_Constr_Subt_For_UN_Aliased;
1764 function Is_Constrained (Id : E) return B is
1765 begin
1766 pragma Assert (Nkind (Id) in N_Entity);
1767 return Flag12 (Id);
1768 end Is_Constrained;
1770 function Is_Constructor (Id : E) return B is
1771 begin
1772 return Flag76 (Id);
1773 end Is_Constructor;
1775 function Is_Controlled (Id : E) return B is
1776 begin
1777 return Flag42 (Base_Type (Id));
1778 end Is_Controlled;
1780 function Is_Controlling_Formal (Id : E) return B is
1781 begin
1782 pragma Assert (Is_Formal (Id));
1783 return Flag97 (Id);
1784 end Is_Controlling_Formal;
1786 function Is_CPP_Class (Id : E) return B is
1787 begin
1788 return Flag74 (Id);
1789 end Is_CPP_Class;
1791 function Is_Descendent_Of_Address (Id : E) return B is
1792 begin
1793 pragma Assert (Is_Type (Id));
1794 return Flag223 (Id);
1795 end Is_Descendent_Of_Address;
1797 function Is_Discrim_SO_Function (Id : E) return B is
1798 begin
1799 return Flag176 (Id);
1800 end Is_Discrim_SO_Function;
1802 function Is_Dispatch_Table_Entity (Id : E) return B is
1803 begin
1804 return Flag234 (Id);
1805 end Is_Dispatch_Table_Entity;
1807 function Is_Dispatching_Operation (Id : E) return B is
1808 begin
1809 pragma Assert (Nkind (Id) in N_Entity);
1810 return Flag6 (Id);
1811 end Is_Dispatching_Operation;
1813 function Is_Eliminated (Id : E) return B is
1814 begin
1815 return Flag124 (Id);
1816 end Is_Eliminated;
1818 function Is_Entry_Formal (Id : E) return B is
1819 begin
1820 return Flag52 (Id);
1821 end Is_Entry_Formal;
1823 function Is_Exported (Id : E) return B is
1824 begin
1825 return Flag99 (Id);
1826 end Is_Exported;
1828 function Is_First_Subtype (Id : E) return B is
1829 begin
1830 return Flag70 (Id);
1831 end Is_First_Subtype;
1833 function Is_For_Access_Subtype (Id : E) return B is
1834 begin
1835 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1836 return Flag118 (Id);
1837 end Is_For_Access_Subtype;
1839 function Is_Formal_Subprogram (Id : E) return B is
1840 begin
1841 return Flag111 (Id);
1842 end Is_Formal_Subprogram;
1844 function Is_Frozen (Id : E) return B is
1845 begin
1846 return Flag4 (Id);
1847 end Is_Frozen;
1849 function Is_Generic_Actual_Type (Id : E) return B is
1850 begin
1851 pragma Assert (Is_Type (Id));
1852 return Flag94 (Id);
1853 end Is_Generic_Actual_Type;
1855 function Is_Generic_Instance (Id : E) return B is
1856 begin
1857 return Flag130 (Id);
1858 end Is_Generic_Instance;
1860 function Is_Generic_Type (Id : E) return B is
1861 begin
1862 pragma Assert (Nkind (Id) in N_Entity);
1863 return Flag13 (Id);
1864 end Is_Generic_Type;
1866 function Is_Hidden (Id : E) return B is
1867 begin
1868 return Flag57 (Id);
1869 end Is_Hidden;
1871 function Is_Hidden_Open_Scope (Id : E) return B is
1872 begin
1873 return Flag171 (Id);
1874 end Is_Hidden_Open_Scope;
1876 function Is_Immediately_Visible (Id : E) return B is
1877 begin
1878 pragma Assert (Nkind (Id) in N_Entity);
1879 return Flag7 (Id);
1880 end Is_Immediately_Visible;
1882 function Is_Implementation_Defined (Id : E) return B is
1883 begin
1884 return Flag254 (Id);
1885 end Is_Implementation_Defined;
1887 function Is_Imported (Id : E) return B is
1888 begin
1889 return Flag24 (Id);
1890 end Is_Imported;
1892 function Is_Inlined (Id : E) return B is
1893 begin
1894 return Flag11 (Id);
1895 end Is_Inlined;
1897 function Is_Interface (Id : E) return B is
1898 begin
1899 return Flag186 (Id);
1900 end Is_Interface;
1902 function Is_Instantiated (Id : E) return B is
1903 begin
1904 return Flag126 (Id);
1905 end Is_Instantiated;
1907 function Is_Internal (Id : E) return B is
1908 begin
1909 pragma Assert (Nkind (Id) in N_Entity);
1910 return Flag17 (Id);
1911 end Is_Internal;
1913 function Is_Interrupt_Handler (Id : E) return B is
1914 begin
1915 pragma Assert (Nkind (Id) in N_Entity);
1916 return Flag89 (Id);
1917 end Is_Interrupt_Handler;
1919 function Is_Intrinsic_Subprogram (Id : E) return B is
1920 begin
1921 return Flag64 (Id);
1922 end Is_Intrinsic_Subprogram;
1924 function Is_Itype (Id : E) return B is
1925 begin
1926 return Flag91 (Id);
1927 end Is_Itype;
1929 function Is_Known_Non_Null (Id : E) return B is
1930 begin
1931 return Flag37 (Id);
1932 end Is_Known_Non_Null;
1934 function Is_Known_Null (Id : E) return B is
1935 begin
1936 return Flag204 (Id);
1937 end Is_Known_Null;
1939 function Is_Known_Valid (Id : E) return B is
1940 begin
1941 return Flag170 (Id);
1942 end Is_Known_Valid;
1944 function Is_Limited_Composite (Id : E) return B is
1945 begin
1946 return Flag106 (Id);
1947 end Is_Limited_Composite;
1949 function Is_Limited_Interface (Id : E) return B is
1950 begin
1951 return Flag197 (Id);
1952 end Is_Limited_Interface;
1954 function Is_Limited_Record (Id : E) return B is
1955 begin
1956 return Flag25 (Id);
1957 end Is_Limited_Record;
1959 function Is_Machine_Code_Subprogram (Id : E) return B is
1960 begin
1961 pragma Assert (Is_Subprogram (Id));
1962 return Flag137 (Id);
1963 end Is_Machine_Code_Subprogram;
1965 function Is_Non_Static_Subtype (Id : E) return B is
1966 begin
1967 pragma Assert (Is_Type (Id));
1968 return Flag109 (Id);
1969 end Is_Non_Static_Subtype;
1971 function Is_Null_Init_Proc (Id : E) return B is
1972 begin
1973 pragma Assert (Ekind (Id) = E_Procedure);
1974 return Flag178 (Id);
1975 end Is_Null_Init_Proc;
1977 function Is_Obsolescent (Id : E) return B is
1978 begin
1979 return Flag153 (Id);
1980 end Is_Obsolescent;
1982 function Is_Only_Out_Parameter (Id : E) return B is
1983 begin
1984 pragma Assert (Is_Formal (Id));
1985 return Flag226 (Id);
1986 end Is_Only_Out_Parameter;
1988 function Is_Optional_Parameter (Id : E) return B is
1989 begin
1990 pragma Assert (Is_Formal (Id));
1991 return Flag134 (Id);
1992 end Is_Optional_Parameter;
1994 function Is_Package_Body_Entity (Id : E) return B is
1995 begin
1996 return Flag160 (Id);
1997 end Is_Package_Body_Entity;
1999 function Is_Packed (Id : E) return B is
2000 begin
2001 return Flag51 (Implementation_Base_Type (Id));
2002 end Is_Packed;
2004 function Is_Packed_Array_Type (Id : E) return B is
2005 begin
2006 return Flag138 (Id);
2007 end Is_Packed_Array_Type;
2009 function Is_Potentially_Use_Visible (Id : E) return B is
2010 begin
2011 pragma Assert (Nkind (Id) in N_Entity);
2012 return Flag9 (Id);
2013 end Is_Potentially_Use_Visible;
2015 function Is_Preelaborated (Id : E) return B is
2016 begin
2017 return Flag59 (Id);
2018 end Is_Preelaborated;
2020 function Is_Primitive (Id : E) return B is
2021 begin
2022 pragma Assert
2023 (Is_Overloadable (Id)
2024 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2025 return Flag218 (Id);
2026 end Is_Primitive;
2028 function Is_Primitive_Wrapper (Id : E) return B is
2029 begin
2030 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2031 return Flag195 (Id);
2032 end Is_Primitive_Wrapper;
2034 function Is_Private_Composite (Id : E) return B is
2035 begin
2036 pragma Assert (Is_Type (Id));
2037 return Flag107 (Id);
2038 end Is_Private_Composite;
2040 function Is_Private_Descendant (Id : E) return B is
2041 begin
2042 return Flag53 (Id);
2043 end Is_Private_Descendant;
2045 function Is_Private_Primitive (Id : E) return B is
2046 begin
2047 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2048 return Flag245 (Id);
2049 end Is_Private_Primitive;
2051 function Is_Processed_Transient (Id : E) return B is
2052 begin
2053 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2054 return Flag252 (Id);
2055 end Is_Processed_Transient;
2057 function Is_Public (Id : E) return B is
2058 begin
2059 pragma Assert (Nkind (Id) in N_Entity);
2060 return Flag10 (Id);
2061 end Is_Public;
2063 function Is_Pure (Id : E) return B is
2064 begin
2065 return Flag44 (Id);
2066 end Is_Pure;
2068 function Is_Pure_Unit_Access_Type (Id : E) return B is
2069 begin
2070 pragma Assert (Is_Access_Type (Id));
2071 return Flag189 (Id);
2072 end Is_Pure_Unit_Access_Type;
2074 function Is_RACW_Stub_Type (Id : E) return B is
2075 begin
2076 pragma Assert (Is_Type (Id));
2077 return Flag244 (Id);
2078 end Is_RACW_Stub_Type;
2080 function Is_Raised (Id : E) return B is
2081 begin
2082 pragma Assert (Ekind (Id) = E_Exception);
2083 return Flag224 (Id);
2084 end Is_Raised;
2086 function Is_Remote_Call_Interface (Id : E) return B is
2087 begin
2088 return Flag62 (Id);
2089 end Is_Remote_Call_Interface;
2091 function Is_Remote_Types (Id : E) return B is
2092 begin
2093 return Flag61 (Id);
2094 end Is_Remote_Types;
2096 function Is_Renaming_Of_Object (Id : E) return B is
2097 begin
2098 return Flag112 (Id);
2099 end Is_Renaming_Of_Object;
2101 function Is_Return_Object (Id : E) return B is
2102 begin
2103 return Flag209 (Id);
2104 end Is_Return_Object;
2106 function Is_Safe_To_Reevaluate (Id : E) return B is
2107 begin
2108 return Flag249 (Id);
2109 end Is_Safe_To_Reevaluate;
2111 function Is_Shared_Passive (Id : E) return B is
2112 begin
2113 return Flag60 (Id);
2114 end Is_Shared_Passive;
2116 function Is_Statically_Allocated (Id : E) return B is
2117 begin
2118 return Flag28 (Id);
2119 end Is_Statically_Allocated;
2121 function Is_Tag (Id : E) return B is
2122 begin
2123 pragma Assert (Nkind (Id) in N_Entity);
2124 return Flag78 (Id);
2125 end Is_Tag;
2127 function Is_Tagged_Type (Id : E) return B is
2128 begin
2129 return Flag55 (Id);
2130 end Is_Tagged_Type;
2132 function Is_Thunk (Id : E) return B is
2133 begin
2134 pragma Assert (Is_Subprogram (Id));
2135 return Flag225 (Id);
2136 end Is_Thunk;
2138 function Is_Trivial_Subprogram (Id : E) return B is
2139 begin
2140 return Flag235 (Id);
2141 end Is_Trivial_Subprogram;
2143 function Is_True_Constant (Id : E) return B is
2144 begin
2145 return Flag163 (Id);
2146 end Is_True_Constant;
2148 function Is_Unchecked_Union (Id : E) return B is
2149 begin
2150 return Flag117 (Implementation_Base_Type (Id));
2151 end Is_Unchecked_Union;
2153 function Is_Underlying_Record_View (Id : E) return B is
2154 begin
2155 return Flag246 (Id);
2156 end Is_Underlying_Record_View;
2158 function Is_Unsigned_Type (Id : E) return B is
2159 begin
2160 pragma Assert (Is_Type (Id));
2161 return Flag144 (Id);
2162 end Is_Unsigned_Type;
2164 function Is_Valued_Procedure (Id : E) return B is
2165 begin
2166 pragma Assert (Ekind (Id) = E_Procedure);
2167 return Flag127 (Id);
2168 end Is_Valued_Procedure;
2170 function Is_Visible_Child_Unit (Id : E) return B is
2171 begin
2172 pragma Assert (Is_Child_Unit (Id));
2173 return Flag116 (Id);
2174 end Is_Visible_Child_Unit;
2176 function Is_Visible_Formal (Id : E) return B is
2177 begin
2178 return Flag206 (Id);
2179 end Is_Visible_Formal;
2181 function Is_VMS_Exception (Id : E) return B is
2182 begin
2183 return Flag133 (Id);
2184 end Is_VMS_Exception;
2186 function Is_Volatile (Id : E) return B is
2187 begin
2188 pragma Assert (Nkind (Id) in N_Entity);
2190 if Is_Type (Id) then
2191 return Flag16 (Base_Type (Id));
2192 else
2193 return Flag16 (Id);
2194 end if;
2195 end Is_Volatile;
2197 function Itype_Printed (Id : E) return B is
2198 begin
2199 pragma Assert (Is_Itype (Id));
2200 return Flag202 (Id);
2201 end Itype_Printed;
2203 function Kill_Elaboration_Checks (Id : E) return B is
2204 begin
2205 return Flag32 (Id);
2206 end Kill_Elaboration_Checks;
2208 function Kill_Range_Checks (Id : E) return B is
2209 begin
2210 return Flag33 (Id);
2211 end Kill_Range_Checks;
2213 function Kill_Tag_Checks (Id : E) return B is
2214 begin
2215 return Flag34 (Id);
2216 end Kill_Tag_Checks;
2218 function Known_To_Have_Preelab_Init (Id : E) return B is
2219 begin
2220 pragma Assert (Is_Type (Id));
2221 return Flag207 (Id);
2222 end Known_To_Have_Preelab_Init;
2224 function Last_Assignment (Id : E) return N is
2225 begin
2226 pragma Assert (Is_Assignable (Id));
2227 return Node26 (Id);
2228 end Last_Assignment;
2230 function Last_Entity (Id : E) return E is
2231 begin
2232 return Node20 (Id);
2233 end Last_Entity;
2235 function Limited_View (Id : E) return E is
2236 begin
2237 pragma Assert (Ekind (Id) = E_Package);
2238 return Node23 (Id);
2239 end Limited_View;
2241 function Lit_Indexes (Id : E) return E is
2242 begin
2243 pragma Assert (Is_Enumeration_Type (Id));
2244 return Node15 (Id);
2245 end Lit_Indexes;
2247 function Lit_Strings (Id : E) return E is
2248 begin
2249 pragma Assert (Is_Enumeration_Type (Id));
2250 return Node16 (Id);
2251 end Lit_Strings;
2253 function Low_Bound_Tested (Id : E) return B is
2254 begin
2255 return Flag205 (Id);
2256 end Low_Bound_Tested;
2258 function Machine_Radix_10 (Id : E) return B is
2259 begin
2260 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2261 return Flag84 (Id);
2262 end Machine_Radix_10;
2264 function Master_Id (Id : E) return E is
2265 begin
2266 pragma Assert (Is_Access_Type (Id));
2267 return Node17 (Id);
2268 end Master_Id;
2270 function Materialize_Entity (Id : E) return B is
2271 begin
2272 return Flag168 (Id);
2273 end Materialize_Entity;
2275 function Mechanism (Id : E) return M is
2276 begin
2277 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2278 return UI_To_Int (Uint8 (Id));
2279 end Mechanism;
2281 function Modulus (Id : E) return Uint is
2282 begin
2283 pragma Assert (Is_Modular_Integer_Type (Id));
2284 return Uint17 (Base_Type (Id));
2285 end Modulus;
2287 function Must_Be_On_Byte_Boundary (Id : E) return B is
2288 begin
2289 pragma Assert (Is_Type (Id));
2290 return Flag183 (Id);
2291 end Must_Be_On_Byte_Boundary;
2293 function Must_Have_Preelab_Init (Id : E) return B is
2294 begin
2295 pragma Assert (Is_Type (Id));
2296 return Flag208 (Id);
2297 end Must_Have_Preelab_Init;
2299 function Needs_Debug_Info (Id : E) return B is
2300 begin
2301 return Flag147 (Id);
2302 end Needs_Debug_Info;
2304 function Needs_No_Actuals (Id : E) return B is
2305 begin
2306 pragma Assert
2307 (Is_Overloadable (Id)
2308 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2309 return Flag22 (Id);
2310 end Needs_No_Actuals;
2312 function Never_Set_In_Source (Id : E) return B is
2313 begin
2314 return Flag115 (Id);
2315 end Never_Set_In_Source;
2317 function Next_Inlined_Subprogram (Id : E) return E is
2318 begin
2319 return Node12 (Id);
2320 end Next_Inlined_Subprogram;
2322 function No_Pool_Assigned (Id : E) return B is
2323 begin
2324 pragma Assert (Is_Access_Type (Id));
2325 return Flag131 (Root_Type (Id));
2326 end No_Pool_Assigned;
2328 function No_Return (Id : E) return B is
2329 begin
2330 return Flag113 (Id);
2331 end No_Return;
2333 function No_Strict_Aliasing (Id : E) return B is
2334 begin
2335 pragma Assert (Is_Access_Type (Id));
2336 return Flag136 (Base_Type (Id));
2337 end No_Strict_Aliasing;
2339 function Non_Binary_Modulus (Id : E) return B is
2340 begin
2341 pragma Assert (Is_Type (Id));
2342 return Flag58 (Base_Type (Id));
2343 end Non_Binary_Modulus;
2345 function Non_Limited_View (Id : E) return E is
2346 begin
2347 pragma Assert (Ekind (Id) in Incomplete_Kind);
2348 return Node17 (Id);
2349 end Non_Limited_View;
2351 function Nonzero_Is_True (Id : E) return B is
2352 begin
2353 pragma Assert (Root_Type (Id) = Standard_Boolean);
2354 return Flag162 (Base_Type (Id));
2355 end Nonzero_Is_True;
2357 function Normalized_First_Bit (Id : E) return U is
2358 begin
2359 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2360 return Uint8 (Id);
2361 end Normalized_First_Bit;
2363 function Normalized_Position (Id : E) return U is
2364 begin
2365 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2366 return Uint14 (Id);
2367 end Normalized_Position;
2369 function Normalized_Position_Max (Id : E) return U is
2370 begin
2371 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2372 return Uint10 (Id);
2373 end Normalized_Position_Max;
2375 function OK_To_Rename (Id : E) return B is
2376 begin
2377 pragma Assert (Ekind (Id) = E_Variable);
2378 return Flag247 (Id);
2379 end OK_To_Rename;
2381 function OK_To_Reorder_Components (Id : E) return B is
2382 begin
2383 pragma Assert (Is_Record_Type (Id));
2384 return Flag239 (Base_Type (Id));
2385 end OK_To_Reorder_Components;
2387 function Optimize_Alignment_Space (Id : E) return B is
2388 begin
2389 pragma Assert
2390 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2391 return Flag241 (Id);
2392 end Optimize_Alignment_Space;
2394 function Optimize_Alignment_Time (Id : E) return B is
2395 begin
2396 pragma Assert
2397 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2398 return Flag242 (Id);
2399 end Optimize_Alignment_Time;
2401 function Original_Access_Type (Id : E) return E is
2402 begin
2403 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2404 return Node26 (Id);
2405 end Original_Access_Type;
2407 function Original_Array_Type (Id : E) return E is
2408 begin
2409 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2410 return Node21 (Id);
2411 end Original_Array_Type;
2413 function Original_Record_Component (Id : E) return E is
2414 begin
2415 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2416 return Node22 (Id);
2417 end Original_Record_Component;
2419 function Overlays_Constant (Id : E) return B is
2420 begin
2421 return Flag243 (Id);
2422 end Overlays_Constant;
2424 function Overridden_Operation (Id : E) return E is
2425 begin
2426 return Node26 (Id);
2427 end Overridden_Operation;
2429 function Package_Instantiation (Id : E) return N is
2430 begin
2431 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2432 return Node26 (Id);
2433 end Package_Instantiation;
2435 function Packed_Array_Type (Id : E) return E is
2436 begin
2437 pragma Assert (Is_Array_Type (Id));
2438 return Node23 (Id);
2439 end Packed_Array_Type;
2441 function Parent_Subtype (Id : E) return E is
2442 begin
2443 pragma Assert (Is_Record_Type (Id));
2444 return Node19 (Base_Type (Id));
2445 end Parent_Subtype;
2447 function Postcondition_Proc (Id : E) return E is
2448 begin
2449 pragma Assert (Ekind (Id) = E_Procedure);
2450 return Node8 (Id);
2451 end Postcondition_Proc;
2453 function PPC_Wrapper (Id : E) return E is
2454 begin
2455 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2456 return Node25 (Id);
2457 end PPC_Wrapper;
2459 function Prival (Id : E) return E is
2460 begin
2461 pragma Assert (Is_Protected_Component (Id));
2462 return Node17 (Id);
2463 end Prival;
2465 function Prival_Link (Id : E) return E is
2466 begin
2467 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2468 return Node20 (Id);
2469 end Prival_Link;
2471 function Private_Dependents (Id : E) return L is
2472 begin
2473 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2474 return Elist18 (Id);
2475 end Private_Dependents;
2477 function Private_View (Id : E) return N is
2478 begin
2479 pragma Assert (Is_Private_Type (Id));
2480 return Node22 (Id);
2481 end Private_View;
2483 function Protected_Body_Subprogram (Id : E) return E is
2484 begin
2485 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2486 return Node11 (Id);
2487 end Protected_Body_Subprogram;
2489 function Protected_Formal (Id : E) return E is
2490 begin
2491 pragma Assert (Is_Formal (Id));
2492 return Node22 (Id);
2493 end Protected_Formal;
2495 function Protection_Object (Id : E) return E is
2496 begin
2497 pragma Assert
2498 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2499 return Node23 (Id);
2500 end Protection_Object;
2502 function Reachable (Id : E) return B is
2503 begin
2504 return Flag49 (Id);
2505 end Reachable;
2507 function Referenced (Id : E) return B is
2508 begin
2509 return Flag156 (Id);
2510 end Referenced;
2512 function Referenced_As_LHS (Id : E) return B is
2513 begin
2514 return Flag36 (Id);
2515 end Referenced_As_LHS;
2517 function Referenced_As_Out_Parameter (Id : E) return B is
2518 begin
2519 return Flag227 (Id);
2520 end Referenced_As_Out_Parameter;
2522 function Register_Exception_Call (Id : E) return N is
2523 begin
2524 pragma Assert (Ekind (Id) = E_Exception);
2525 return Node20 (Id);
2526 end Register_Exception_Call;
2528 function Related_Array_Object (Id : E) return E is
2529 begin
2530 pragma Assert (Is_Array_Type (Id));
2531 return Node19 (Id);
2532 end Related_Array_Object;
2534 function Related_Expression (Id : E) return N is
2535 begin
2536 pragma Assert (Ekind (Id) in Type_Kind
2537 or else Ekind_In (Id, E_Constant, E_Variable));
2538 return Node24 (Id);
2539 end Related_Expression;
2541 function Related_Instance (Id : E) return E is
2542 begin
2543 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2544 return Node15 (Id);
2545 end Related_Instance;
2547 function Related_Type (Id : E) return E is
2548 begin
2549 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2550 return Node27 (Id);
2551 end Related_Type;
2553 function Relative_Deadline_Variable (Id : E) return E is
2554 begin
2555 pragma Assert (Is_Task_Type (Id));
2556 return Node26 (Implementation_Base_Type (Id));
2557 end Relative_Deadline_Variable;
2559 function Renamed_Entity (Id : E) return N is
2560 begin
2561 return Node18 (Id);
2562 end Renamed_Entity;
2564 function Renamed_In_Spec (Id : E) return B is
2565 begin
2566 pragma Assert (Ekind (Id) = E_Package);
2567 return Flag231 (Id);
2568 end Renamed_In_Spec;
2570 function Renamed_Object (Id : E) return N is
2571 begin
2572 return Node18 (Id);
2573 end Renamed_Object;
2575 function Renaming_Map (Id : E) return U is
2576 begin
2577 return Uint9 (Id);
2578 end Renaming_Map;
2580 function Requires_Overriding (Id : E) return B is
2581 begin
2582 pragma Assert (Is_Overloadable (Id));
2583 return Flag213 (Id);
2584 end Requires_Overriding;
2586 function Return_Flag_Or_Transient_Decl (Id : E) return N is
2587 begin
2588 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2589 return Node15 (Id);
2590 end Return_Flag_Or_Transient_Decl;
2592 function Return_Present (Id : E) return B is
2593 begin
2594 return Flag54 (Id);
2595 end Return_Present;
2597 function Return_Applies_To (Id : E) return N is
2598 begin
2599 return Node8 (Id);
2600 end Return_Applies_To;
2602 function Returns_By_Ref (Id : E) return B is
2603 begin
2604 return Flag90 (Id);
2605 end Returns_By_Ref;
2607 function Reverse_Bit_Order (Id : E) return B is
2608 begin
2609 pragma Assert (Is_Record_Type (Id));
2610 return Flag164 (Base_Type (Id));
2611 end Reverse_Bit_Order;
2613 function RM_Size (Id : E) return U is
2614 begin
2615 pragma Assert (Is_Type (Id));
2616 return Uint13 (Id);
2617 end RM_Size;
2619 function Scalar_Range (Id : E) return N is
2620 begin
2621 return Node20 (Id);
2622 end Scalar_Range;
2624 function Scale_Value (Id : E) return U is
2625 begin
2626 return Uint15 (Id);
2627 end Scale_Value;
2629 function Scope_Depth_Value (Id : E) return U is
2630 begin
2631 return Uint22 (Id);
2632 end Scope_Depth_Value;
2634 function Sec_Stack_Needed_For_Return (Id : E) return B is
2635 begin
2636 return Flag167 (Id);
2637 end Sec_Stack_Needed_For_Return;
2639 function Shadow_Entities (Id : E) return S is
2640 begin
2641 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2642 return List14 (Id);
2643 end Shadow_Entities;
2645 function Shared_Var_Procs_Instance (Id : E) return E is
2646 begin
2647 pragma Assert (Ekind (Id) = E_Variable);
2648 return Node22 (Id);
2649 end Shared_Var_Procs_Instance;
2651 function Size_Check_Code (Id : E) return N is
2652 begin
2653 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2654 return Node19 (Id);
2655 end Size_Check_Code;
2657 function Size_Depends_On_Discriminant (Id : E) return B is
2658 begin
2659 return Flag177 (Id);
2660 end Size_Depends_On_Discriminant;
2662 function Size_Known_At_Compile_Time (Id : E) return B is
2663 begin
2664 return Flag92 (Id);
2665 end Size_Known_At_Compile_Time;
2667 function Small_Value (Id : E) return R is
2668 begin
2669 pragma Assert (Is_Fixed_Point_Type (Id));
2670 return Ureal21 (Id);
2671 end Small_Value;
2673 function Spec_Entity (Id : E) return E is
2674 begin
2675 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2676 return Node19 (Id);
2677 end Spec_Entity;
2679 function Static_Predicate (Id : E) return S is
2680 begin
2681 pragma Assert (Is_Discrete_Type (Id));
2682 return List25 (Id);
2683 end Static_Predicate;
2685 function Storage_Size_Variable (Id : E) return E is
2686 begin
2687 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2688 return Node15 (Implementation_Base_Type (Id));
2689 end Storage_Size_Variable;
2691 function Static_Elaboration_Desired (Id : E) return B is
2692 begin
2693 pragma Assert (Ekind (Id) = E_Package);
2694 return Flag77 (Id);
2695 end Static_Elaboration_Desired;
2697 function Static_Initialization (Id : E) return N is
2698 begin
2699 pragma Assert
2700 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2701 return Node26 (Id);
2702 end Static_Initialization;
2704 function Stored_Constraint (Id : E) return L is
2705 begin
2706 pragma Assert
2707 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2708 return Elist23 (Id);
2709 end Stored_Constraint;
2711 function Strict_Alignment (Id : E) return B is
2712 begin
2713 return Flag145 (Implementation_Base_Type (Id));
2714 end Strict_Alignment;
2716 function String_Literal_Length (Id : E) return U is
2717 begin
2718 return Uint16 (Id);
2719 end String_Literal_Length;
2721 function String_Literal_Low_Bound (Id : E) return N is
2722 begin
2723 return Node15 (Id);
2724 end String_Literal_Low_Bound;
2726 function Subprograms_For_Type (Id : E) return E is
2727 begin
2728 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2729 return Node29 (Id);
2730 end Subprograms_For_Type;
2732 function Suppress_Elaboration_Warnings (Id : E) return B is
2733 begin
2734 return Flag148 (Id);
2735 end Suppress_Elaboration_Warnings;
2737 function Suppress_Initialization (Id : E) return B is
2738 begin
2739 pragma Assert (Is_Type (Id));
2740 return Flag105 (Id);
2741 end Suppress_Initialization;
2743 function Suppress_Style_Checks (Id : E) return B is
2744 begin
2745 return Flag165 (Id);
2746 end Suppress_Style_Checks;
2748 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2749 begin
2750 return Flag217 (Id);
2751 end Suppress_Value_Tracking_On_Call;
2753 function Task_Body_Procedure (Id : E) return N is
2754 begin
2755 pragma Assert (Ekind (Id) in Task_Kind);
2756 return Node25 (Id);
2757 end Task_Body_Procedure;
2759 function Treat_As_Volatile (Id : E) return B is
2760 begin
2761 return Flag41 (Id);
2762 end Treat_As_Volatile;
2764 function Underlying_Full_View (Id : E) return E is
2765 begin
2766 pragma Assert (Ekind (Id) in Private_Kind);
2767 return Node19 (Id);
2768 end Underlying_Full_View;
2770 function Underlying_Record_View (Id : E) return E is
2771 begin
2772 return Node28 (Id);
2773 end Underlying_Record_View;
2775 function Universal_Aliasing (Id : E) return B is
2776 begin
2777 pragma Assert (Is_Type (Id));
2778 return Flag216 (Base_Type (Id));
2779 end Universal_Aliasing;
2781 function Unset_Reference (Id : E) return N is
2782 begin
2783 return Node16 (Id);
2784 end Unset_Reference;
2786 function Used_As_Generic_Actual (Id : E) return B is
2787 begin
2788 return Flag222 (Id);
2789 end Used_As_Generic_Actual;
2791 function Uses_Sec_Stack (Id : E) return B is
2792 begin
2793 return Flag95 (Id);
2794 end Uses_Sec_Stack;
2796 function Warnings_Off (Id : E) return B is
2797 begin
2798 return Flag96 (Id);
2799 end Warnings_Off;
2801 function Warnings_Off_Used (Id : E) return B is
2802 begin
2803 return Flag236 (Id);
2804 end Warnings_Off_Used;
2806 function Warnings_Off_Used_Unmodified (Id : E) return B is
2807 begin
2808 return Flag237 (Id);
2809 end Warnings_Off_Used_Unmodified;
2811 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2812 begin
2813 return Flag238 (Id);
2814 end Warnings_Off_Used_Unreferenced;
2816 function Wrapped_Entity (Id : E) return E is
2817 begin
2818 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2819 and then Is_Primitive_Wrapper (Id));
2820 return Node27 (Id);
2821 end Wrapped_Entity;
2823 function Was_Hidden (Id : E) return B is
2824 begin
2825 return Flag196 (Id);
2826 end Was_Hidden;
2828 ------------------------------
2829 -- Classification Functions --
2830 ------------------------------
2832 function Is_Access_Type (Id : E) return B is
2833 begin
2834 return Ekind (Id) in Access_Kind;
2835 end Is_Access_Type;
2837 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2838 begin
2839 return Ekind (Id) in Access_Protected_Kind;
2840 end Is_Access_Protected_Subprogram_Type;
2842 function Is_Access_Subprogram_Type (Id : E) return B is
2843 begin
2844 return Ekind (Id) in Access_Subprogram_Kind;
2845 end Is_Access_Subprogram_Type;
2847 function Is_Aggregate_Type (Id : E) return B is
2848 begin
2849 return Ekind (Id) in Aggregate_Kind;
2850 end Is_Aggregate_Type;
2852 function Is_Array_Type (Id : E) return B is
2853 begin
2854 return Ekind (Id) in Array_Kind;
2855 end Is_Array_Type;
2857 function Is_Assignable (Id : E) return B is
2858 begin
2859 return Ekind (Id) in Assignable_Kind;
2860 end Is_Assignable;
2862 function Is_Class_Wide_Type (Id : E) return B is
2863 begin
2864 return Ekind (Id) in Class_Wide_Kind;
2865 end Is_Class_Wide_Type;
2867 function Is_Composite_Type (Id : E) return B is
2868 begin
2869 return Ekind (Id) in Composite_Kind;
2870 end Is_Composite_Type;
2872 function Is_Concurrent_Body (Id : E) return B is
2873 begin
2874 return Ekind (Id) in
2875 Concurrent_Body_Kind;
2876 end Is_Concurrent_Body;
2878 function Is_Concurrent_Record_Type (Id : E) return B is
2879 begin
2880 return Flag20 (Id);
2881 end Is_Concurrent_Record_Type;
2883 function Is_Concurrent_Type (Id : E) return B is
2884 begin
2885 return Ekind (Id) in Concurrent_Kind;
2886 end Is_Concurrent_Type;
2888 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2889 begin
2890 return Ekind (Id) in
2891 Decimal_Fixed_Point_Kind;
2892 end Is_Decimal_Fixed_Point_Type;
2894 function Is_Digits_Type (Id : E) return B is
2895 begin
2896 return Ekind (Id) in Digits_Kind;
2897 end Is_Digits_Type;
2899 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2900 begin
2901 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2902 end Is_Discrete_Or_Fixed_Point_Type;
2904 function Is_Discrete_Type (Id : E) return B is
2905 begin
2906 return Ekind (Id) in Discrete_Kind;
2907 end Is_Discrete_Type;
2909 function Is_Elementary_Type (Id : E) return B is
2910 begin
2911 return Ekind (Id) in Elementary_Kind;
2912 end Is_Elementary_Type;
2914 function Is_Entry (Id : E) return B is
2915 begin
2916 return Ekind (Id) in Entry_Kind;
2917 end Is_Entry;
2919 function Is_Enumeration_Type (Id : E) return B is
2920 begin
2921 return Ekind (Id) in
2922 Enumeration_Kind;
2923 end Is_Enumeration_Type;
2925 function Is_Fixed_Point_Type (Id : E) return B is
2926 begin
2927 return Ekind (Id) in
2928 Fixed_Point_Kind;
2929 end Is_Fixed_Point_Type;
2931 function Is_Floating_Point_Type (Id : E) return B is
2932 begin
2933 return Ekind (Id) in Float_Kind;
2934 end Is_Floating_Point_Type;
2936 function Is_Formal (Id : E) return B is
2937 begin
2938 return Ekind (Id) in Formal_Kind;
2939 end Is_Formal;
2941 function Is_Formal_Object (Id : E) return B is
2942 begin
2943 return Ekind (Id) in Formal_Object_Kind;
2944 end Is_Formal_Object;
2946 function Is_Generic_Subprogram (Id : E) return B is
2947 begin
2948 return Ekind (Id) in Generic_Subprogram_Kind;
2949 end Is_Generic_Subprogram;
2951 function Is_Generic_Unit (Id : E) return B is
2952 begin
2953 return Ekind (Id) in Generic_Unit_Kind;
2954 end Is_Generic_Unit;
2956 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2957 begin
2958 return Ekind (Id) in
2959 Incomplete_Or_Private_Kind;
2960 end Is_Incomplete_Or_Private_Type;
2962 function Is_Incomplete_Type (Id : E) return B is
2963 begin
2964 return Ekind (Id) in
2965 Incomplete_Kind;
2966 end Is_Incomplete_Type;
2968 function Is_Integer_Type (Id : E) return B is
2969 begin
2970 return Ekind (Id) in Integer_Kind;
2971 end Is_Integer_Type;
2973 function Is_Modular_Integer_Type (Id : E) return B is
2974 begin
2975 return Ekind (Id) in
2976 Modular_Integer_Kind;
2977 end Is_Modular_Integer_Type;
2979 function Is_Named_Number (Id : E) return B is
2980 begin
2981 return Ekind (Id) in Named_Kind;
2982 end Is_Named_Number;
2984 function Is_Numeric_Type (Id : E) return B is
2985 begin
2986 return Ekind (Id) in Numeric_Kind;
2987 end Is_Numeric_Type;
2989 function Is_Object (Id : E) return B is
2990 begin
2991 return Ekind (Id) in Object_Kind;
2992 end Is_Object;
2994 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2995 begin
2996 return Ekind (Id) in
2997 Ordinary_Fixed_Point_Kind;
2998 end Is_Ordinary_Fixed_Point_Type;
3000 function Is_Overloadable (Id : E) return B is
3001 begin
3002 return Ekind (Id) in Overloadable_Kind;
3003 end Is_Overloadable;
3005 function Is_Private_Type (Id : E) return B is
3006 begin
3007 return Ekind (Id) in Private_Kind;
3008 end Is_Private_Type;
3010 function Is_Protected_Type (Id : E) return B is
3011 begin
3012 return Ekind (Id) in Protected_Kind;
3013 end Is_Protected_Type;
3015 function Is_Real_Type (Id : E) return B is
3016 begin
3017 return Ekind (Id) in Real_Kind;
3018 end Is_Real_Type;
3020 function Is_Record_Type (Id : E) return B is
3021 begin
3022 return Ekind (Id) in Record_Kind;
3023 end Is_Record_Type;
3025 function Is_Scalar_Type (Id : E) return B is
3026 begin
3027 return Ekind (Id) in Scalar_Kind;
3028 end Is_Scalar_Type;
3030 function Is_Signed_Integer_Type (Id : E) return B is
3031 begin
3032 return Ekind (Id) in Signed_Integer_Kind;
3033 end Is_Signed_Integer_Type;
3035 function Is_Subprogram (Id : E) return B is
3036 begin
3037 return Ekind (Id) in Subprogram_Kind;
3038 end Is_Subprogram;
3040 function Is_Task_Type (Id : E) return B is
3041 begin
3042 return Ekind (Id) in Task_Kind;
3043 end Is_Task_Type;
3045 function Is_Type (Id : E) return B is
3046 begin
3047 return Ekind (Id) in Type_Kind;
3048 end Is_Type;
3050 ------------------------------
3051 -- Attribute Set Procedures --
3052 ------------------------------
3054 -- Note: in many of these set procedures an "obvious" assertion is missing.
3055 -- The reason for this is that in many cases, a field is set before the
3056 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3057 -- it is possible to add assertions that specifically include the E_Void
3058 -- possibility, but in some cases, we just omit the assertions.
3060 procedure Set_Accept_Address (Id : E; V : L) is
3061 begin
3062 Set_Elist21 (Id, V);
3063 end Set_Accept_Address;
3065 procedure Set_Access_Disp_Table (Id : E; V : L) is
3066 begin
3067 pragma Assert (Ekind (Id) = E_Record_Type
3068 and then Id = Implementation_Base_Type (Id));
3069 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3070 Set_Elist16 (Id, V);
3071 end Set_Access_Disp_Table;
3073 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3074 begin
3075 Set_Node12 (Id, V);
3076 end Set_Associated_Formal_Package;
3078 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3079 begin
3080 Set_Node8 (Id, V);
3081 end Set_Associated_Node_For_Itype;
3083 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3084 begin
3085 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3086 Set_Node22 (Id, V);
3087 end Set_Associated_Storage_Pool;
3089 procedure Set_Actual_Subtype (Id : E; V : E) is
3090 begin
3091 pragma Assert
3092 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3093 or else Is_Formal (Id));
3094 Set_Node17 (Id, V);
3095 end Set_Actual_Subtype;
3097 procedure Set_Address_Taken (Id : E; V : B := True) is
3098 begin
3099 Set_Flag104 (Id, V);
3100 end Set_Address_Taken;
3102 procedure Set_Alias (Id : E; V : E) is
3103 begin
3104 pragma Assert
3105 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3106 Set_Node18 (Id, V);
3107 end Set_Alias;
3109 procedure Set_Alignment (Id : E; V : U) is
3110 begin
3111 pragma Assert (Is_Type (Id)
3112 or else Is_Formal (Id)
3113 or else Ekind_In (Id, E_Loop_Parameter,
3114 E_Constant,
3115 E_Exception,
3116 E_Variable));
3117 Set_Uint14 (Id, V);
3118 end Set_Alignment;
3120 procedure Set_Barrier_Function (Id : E; V : N) is
3121 begin
3122 pragma Assert (Is_Entry (Id));
3123 Set_Node12 (Id, V);
3124 end Set_Barrier_Function;
3126 procedure Set_Block_Node (Id : E; V : N) is
3127 begin
3128 pragma Assert (Ekind (Id) = E_Block);
3129 Set_Node11 (Id, V);
3130 end Set_Block_Node;
3132 procedure Set_Body_Entity (Id : E; V : E) is
3133 begin
3134 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3135 Set_Node19 (Id, V);
3136 end Set_Body_Entity;
3138 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3139 begin
3140 pragma Assert
3141 (Ekind (Id) = E_Package
3142 or else Is_Subprogram (Id)
3143 or else Is_Generic_Unit (Id));
3144 Set_Flag40 (Id, V);
3145 end Set_Body_Needed_For_SAL;
3147 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3148 begin
3149 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3150 Set_Flag125 (Id, V);
3151 end Set_C_Pass_By_Copy;
3153 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3154 begin
3155 Set_Flag38 (Id, V);
3156 end Set_Can_Never_Be_Null;
3158 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3159 begin
3160 Set_Flag31 (Id, V);
3161 end Set_Checks_May_Be_Suppressed;
3163 procedure Set_Class_Wide_Type (Id : E; V : E) is
3164 begin
3165 pragma Assert (Is_Type (Id));
3166 Set_Node9 (Id, V);
3167 end Set_Class_Wide_Type;
3169 procedure Set_Cloned_Subtype (Id : E; V : E) is
3170 begin
3171 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3172 Set_Node16 (Id, V);
3173 end Set_Cloned_Subtype;
3175 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3176 begin
3177 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3178 Set_Uint11 (Id, V);
3179 end Set_Component_Bit_Offset;
3181 procedure Set_Component_Clause (Id : E; V : N) is
3182 begin
3183 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3184 Set_Node13 (Id, V);
3185 end Set_Component_Clause;
3187 procedure Set_Component_Size (Id : E; V : U) is
3188 begin
3189 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3190 Set_Uint22 (Id, V);
3191 end Set_Component_Size;
3193 procedure Set_Component_Type (Id : E; V : E) is
3194 begin
3195 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3196 Set_Node20 (Id, V);
3197 end Set_Component_Type;
3199 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3200 begin
3201 pragma Assert
3202 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3203 Set_Node18 (Id, V);
3204 end Set_Corresponding_Concurrent_Type;
3206 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3207 begin
3208 pragma Assert (Ekind (Id) = E_Discriminant);
3209 Set_Node19 (Id, V);
3210 end Set_Corresponding_Discriminant;
3212 procedure Set_Corresponding_Equality (Id : E; V : E) is
3213 begin
3214 pragma Assert
3215 (Ekind (Id) = E_Function
3216 and then not Comes_From_Source (Id)
3217 and then Chars (Id) = Name_Op_Ne);
3218 Set_Node13 (Id, V);
3219 end Set_Corresponding_Equality;
3221 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3222 begin
3223 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3224 Set_Node18 (Id, V);
3225 end Set_Corresponding_Protected_Entry;
3227 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3228 begin
3229 pragma Assert (Is_Concurrent_Type (Id));
3230 Set_Node18 (Id, V);
3231 end Set_Corresponding_Record_Type;
3233 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3234 begin
3235 Set_Node22 (Id, V);
3236 end Set_Corresponding_Remote_Type;
3238 procedure Set_Current_Use_Clause (Id : E; V : E) is
3239 begin
3240 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3241 Set_Node27 (Id, V);
3242 end Set_Current_Use_Clause;
3244 procedure Set_Current_Value (Id : E; V : N) is
3245 begin
3246 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3247 Set_Node9 (Id, V);
3248 end Set_Current_Value;
3250 procedure Set_CR_Discriminant (Id : E; V : E) is
3251 begin
3252 Set_Node23 (Id, V);
3253 end Set_CR_Discriminant;
3255 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3256 begin
3257 Set_Flag166 (Id, V);
3258 end Set_Debug_Info_Off;
3260 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3261 begin
3262 Set_Node25 (Id, V);
3263 end Set_Debug_Renaming_Link;
3265 procedure Set_Default_Expr_Function (Id : E; V : E) is
3266 begin
3267 pragma Assert (Is_Formal (Id));
3268 Set_Node21 (Id, V);
3269 end Set_Default_Expr_Function;
3271 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3272 begin
3273 Set_Flag108 (Id, V);
3274 end Set_Default_Expressions_Processed;
3276 procedure Set_Default_Value (Id : E; V : N) is
3277 begin
3278 pragma Assert (Is_Formal (Id));
3279 Set_Node20 (Id, V);
3280 end Set_Default_Value;
3282 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3283 begin
3284 pragma Assert
3285 (Is_Subprogram (Id)
3286 or else Is_Task_Type (Id)
3287 or else Ekind (Id) = E_Block);
3288 Set_Flag114 (Id, V);
3289 end Set_Delay_Cleanups;
3291 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3292 begin
3293 pragma Assert
3294 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3296 Set_Flag50 (Id, V);
3297 end Set_Delay_Subprogram_Descriptors;
3299 procedure Set_Delta_Value (Id : E; V : R) is
3300 begin
3301 pragma Assert (Is_Fixed_Point_Type (Id));
3302 Set_Ureal18 (Id, V);
3303 end Set_Delta_Value;
3305 procedure Set_Dependent_Instances (Id : E; V : L) is
3306 begin
3307 pragma Assert (Is_Generic_Instance (Id));
3308 Set_Elist8 (Id, V);
3309 end Set_Dependent_Instances;
3311 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3312 begin
3313 pragma Assert (Nkind (Id) in N_Entity);
3314 Set_Flag14 (Id, V);
3315 end Set_Depends_On_Private;
3317 procedure Set_Digits_Value (Id : E; V : U) is
3318 begin
3319 pragma Assert
3320 (Is_Floating_Point_Type (Id)
3321 or else Is_Decimal_Fixed_Point_Type (Id));
3322 Set_Uint17 (Id, V);
3323 end Set_Digits_Value;
3325 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3326 begin
3327 Set_Node20 (Id, V);
3328 end Set_Directly_Designated_Type;
3330 procedure Set_Discard_Names (Id : E; V : B := True) is
3331 begin
3332 Set_Flag88 (Id, V);
3333 end Set_Discard_Names;
3335 procedure Set_Discriminal (Id : E; V : E) is
3336 begin
3337 pragma Assert (Ekind (Id) = E_Discriminant);
3338 Set_Node17 (Id, V);
3339 end Set_Discriminal;
3341 procedure Set_Discriminal_Link (Id : E; V : E) is
3342 begin
3343 Set_Node10 (Id, V);
3344 end Set_Discriminal_Link;
3346 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3347 begin
3348 pragma Assert (Ekind (Id) = E_Component);
3349 Set_Node20 (Id, V);
3350 end Set_Discriminant_Checking_Func;
3352 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3353 begin
3354 pragma Assert (Nkind (Id) in N_Entity);
3355 Set_Elist21 (Id, V);
3356 end Set_Discriminant_Constraint;
3358 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3359 begin
3360 Set_Node20 (Id, V);
3361 end Set_Discriminant_Default_Value;
3363 procedure Set_Discriminant_Number (Id : E; V : U) is
3364 begin
3365 Set_Uint15 (Id, V);
3366 end Set_Discriminant_Number;
3368 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3369 begin
3370 pragma Assert (Ekind (Id) = E_Record_Type
3371 and then Id = Implementation_Base_Type (Id));
3372 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3373 Set_Elist26 (Id, V);
3374 end Set_Dispatch_Table_Wrappers;
3376 procedure Set_DT_Entry_Count (Id : E; V : U) is
3377 begin
3378 pragma Assert (Ekind (Id) = E_Component);
3379 Set_Uint15 (Id, V);
3380 end Set_DT_Entry_Count;
3382 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3383 begin
3384 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3385 Set_Node25 (Id, V);
3386 end Set_DT_Offset_To_Top_Func;
3388 procedure Set_DT_Position (Id : E; V : U) is
3389 begin
3390 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3391 Set_Uint15 (Id, V);
3392 end Set_DT_Position;
3394 procedure Set_DTC_Entity (Id : E; V : E) is
3395 begin
3396 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3397 Set_Node16 (Id, V);
3398 end Set_DTC_Entity;
3400 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3401 begin
3402 pragma Assert (Ekind (Id) = E_Package);
3403 Set_Flag210 (Id, V);
3404 end Set_Elaborate_Body_Desirable;
3406 procedure Set_Elaboration_Entity (Id : E; V : E) is
3407 begin
3408 pragma Assert
3409 (Is_Subprogram (Id)
3410 or else
3411 Ekind (Id) = E_Package
3412 or else
3413 Is_Generic_Unit (Id));
3414 Set_Node13 (Id, V);
3415 end Set_Elaboration_Entity;
3417 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3418 begin
3419 pragma Assert
3420 (Is_Subprogram (Id)
3421 or else
3422 Ekind (Id) = E_Package
3423 or else
3424 Is_Generic_Unit (Id));
3425 Set_Flag174 (Id, V);
3426 end Set_Elaboration_Entity_Required;
3428 procedure Set_Enclosing_Scope (Id : E; V : E) is
3429 begin
3430 Set_Node18 (Id, V);
3431 end Set_Enclosing_Scope;
3433 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3434 begin
3435 pragma Assert (Is_Entry (Id));
3436 Set_Flag152 (Id, V);
3437 end Set_Entry_Accepted;
3439 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3440 begin
3441 Set_Node15 (Id, V);
3442 end Set_Entry_Bodies_Array;
3444 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3445 begin
3446 Set_Node23 (Id, V);
3447 end Set_Entry_Cancel_Parameter;
3449 procedure Set_Entry_Component (Id : E; V : E) is
3450 begin
3451 Set_Node11 (Id, V);
3452 end Set_Entry_Component;
3454 procedure Set_Entry_Formal (Id : E; V : E) is
3455 begin
3456 Set_Node16 (Id, V);
3457 end Set_Entry_Formal;
3459 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3460 begin
3461 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3462 Set_Node18 (Id, V);
3463 end Set_Entry_Index_Constant;
3465 procedure Set_Contract (Id : E; V : N) is
3466 begin
3467 pragma Assert
3468 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3469 or else Is_Subprogram (Id)
3470 or else Is_Generic_Subprogram (Id));
3471 Set_Node24 (Id, V);
3472 end Set_Contract;
3474 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3475 begin
3476 Set_Node15 (Id, V);
3477 end Set_Entry_Parameters_Type;
3479 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3480 begin
3481 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3482 Set_Node23 (Id, V);
3483 end Set_Enum_Pos_To_Rep;
3485 procedure Set_Enumeration_Pos (Id : E; V : U) is
3486 begin
3487 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3488 Set_Uint11 (Id, V);
3489 end Set_Enumeration_Pos;
3491 procedure Set_Enumeration_Rep (Id : E; V : U) is
3492 begin
3493 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3494 Set_Uint12 (Id, V);
3495 end Set_Enumeration_Rep;
3497 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3498 begin
3499 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3500 Set_Node22 (Id, V);
3501 end Set_Enumeration_Rep_Expr;
3503 procedure Set_Equivalent_Type (Id : E; V : E) is
3504 begin
3505 pragma Assert
3506 (Ekind_In (Id, E_Class_Wide_Type,
3507 E_Class_Wide_Subtype,
3508 E_Access_Protected_Subprogram_Type,
3509 E_Anonymous_Access_Protected_Subprogram_Type,
3510 E_Access_Subprogram_Type,
3511 E_Exception_Type));
3512 Set_Node18 (Id, V);
3513 end Set_Equivalent_Type;
3515 procedure Set_Esize (Id : E; V : U) is
3516 begin
3517 Set_Uint12 (Id, V);
3518 end Set_Esize;
3520 procedure Set_Exception_Code (Id : E; V : U) is
3521 begin
3522 pragma Assert (Ekind (Id) = E_Exception);
3523 Set_Uint22 (Id, V);
3524 end Set_Exception_Code;
3526 procedure Set_Extra_Accessibility (Id : E; V : E) is
3527 begin
3528 pragma Assert
3529 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3530 Set_Node13 (Id, V);
3531 end Set_Extra_Accessibility;
3533 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3534 begin
3535 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3536 Set_Node19 (Id, V);
3537 end Set_Extra_Accessibility_Of_Result;
3539 procedure Set_Extra_Constrained (Id : E; V : E) is
3540 begin
3541 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3542 Set_Node23 (Id, V);
3543 end Set_Extra_Constrained;
3545 procedure Set_Extra_Formal (Id : E; V : E) is
3546 begin
3547 Set_Node15 (Id, V);
3548 end Set_Extra_Formal;
3550 procedure Set_Extra_Formals (Id : E; V : E) is
3551 begin
3552 pragma Assert
3553 (Is_Overloadable (Id)
3554 or else Ekind_In (Id, E_Entry_Family,
3555 E_Subprogram_Body,
3556 E_Subprogram_Type));
3557 Set_Node28 (Id, V);
3558 end Set_Extra_Formals;
3560 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3561 begin
3562 pragma Assert
3563 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3564 Set_Flag229 (Id, V);
3565 end Set_Can_Use_Internal_Rep;
3567 procedure Set_Finalization_Master (Id : E; V : E) is
3568 begin
3569 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3570 Set_Node23 (Id, V);
3571 end Set_Finalization_Master;
3573 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3574 begin
3575 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3576 Set_Flag158 (Id, V);
3577 end Set_Finalize_Storage_Only;
3579 procedure Set_Finalizer (Id : E; V : E) is
3580 begin
3581 pragma Assert
3582 (Ekind (Id) = E_Package
3583 or else Ekind (Id) = E_Package_Body);
3584 Set_Node24 (Id, V);
3585 end Set_Finalizer;
3587 procedure Set_First_Entity (Id : E; V : E) is
3588 begin
3589 Set_Node17 (Id, V);
3590 end Set_First_Entity;
3592 procedure Set_First_Exit_Statement (Id : E; V : N) is
3593 begin
3594 pragma Assert (Ekind (Id) = E_Loop);
3595 Set_Node8 (Id, V);
3596 end Set_First_Exit_Statement;
3598 procedure Set_First_Index (Id : E; V : N) is
3599 begin
3600 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3601 Set_Node17 (Id, V);
3602 end Set_First_Index;
3604 procedure Set_First_Literal (Id : E; V : E) is
3605 begin
3606 pragma Assert (Is_Enumeration_Type (Id));
3607 Set_Node17 (Id, V);
3608 end Set_First_Literal;
3610 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3611 begin
3612 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3613 Set_Node14 (Id, V);
3614 end Set_First_Optional_Parameter;
3616 procedure Set_First_Private_Entity (Id : E; V : E) is
3617 begin
3618 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3619 or else Ekind (Id) in Concurrent_Kind);
3620 Set_Node16 (Id, V);
3621 end Set_First_Private_Entity;
3623 procedure Set_First_Rep_Item (Id : E; V : N) is
3624 begin
3625 Set_Node6 (Id, V);
3626 end Set_First_Rep_Item;
3628 procedure Set_Float_Rep (Id : E; V : F) is
3629 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3630 begin
3631 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3632 end Set_Float_Rep;
3634 procedure Set_Freeze_Node (Id : E; V : N) is
3635 begin
3636 Set_Node7 (Id, V);
3637 end Set_Freeze_Node;
3639 procedure Set_From_With_Type (Id : E; V : B := True) is
3640 begin
3641 pragma Assert
3642 (Is_Type (Id)
3643 or else Ekind (Id) = E_Package);
3644 Set_Flag159 (Id, V);
3645 end Set_From_With_Type;
3647 procedure Set_Full_View (Id : E; V : E) is
3648 begin
3649 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3650 Set_Node11 (Id, V);
3651 end Set_Full_View;
3653 procedure Set_Generic_Homonym (Id : E; V : E) is
3654 begin
3655 Set_Node11 (Id, V);
3656 end Set_Generic_Homonym;
3658 procedure Set_Generic_Renamings (Id : E; V : L) is
3659 begin
3660 Set_Elist23 (Id, V);
3661 end Set_Generic_Renamings;
3663 procedure Set_Handler_Records (Id : E; V : S) is
3664 begin
3665 Set_List10 (Id, V);
3666 end Set_Handler_Records;
3668 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3669 begin
3670 pragma Assert (Id = Base_Type (Id));
3671 Set_Flag135 (Id, V);
3672 end Set_Has_Aliased_Components;
3674 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3675 begin
3676 Set_Flag46 (Id, V);
3677 end Set_Has_Alignment_Clause;
3679 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3680 begin
3681 Set_Flag79 (Id, V);
3682 end Set_Has_All_Calls_Remote;
3684 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3685 begin
3686 Set_Flag201 (Id, V);
3687 end Set_Has_Anon_Block_Suffix;
3689 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3690 begin
3691 pragma Assert
3692 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3693 Set_Flag253 (Id, V);
3694 end Set_Has_Anonymous_Master;
3696 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3697 begin
3698 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3699 Set_Flag86 (Id, V);
3700 end Set_Has_Atomic_Components;
3702 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3703 begin
3704 pragma Assert
3705 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3706 Set_Flag139 (Id, V);
3707 end Set_Has_Biased_Representation;
3709 procedure Set_Has_Completion (Id : E; V : B := True) is
3710 begin
3711 Set_Flag26 (Id, V);
3712 end Set_Has_Completion;
3714 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3715 begin
3716 pragma Assert (Is_Type (Id));
3717 Set_Flag71 (Id, V);
3718 end Set_Has_Completion_In_Body;
3720 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3721 begin
3722 pragma Assert (Ekind (Id) = E_Record_Type);
3723 Set_Flag140 (Id, V);
3724 end Set_Has_Complex_Representation;
3726 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3727 begin
3728 pragma Assert (Ekind (Id) = E_Array_Type);
3729 Set_Flag68 (Id, V);
3730 end Set_Has_Component_Size_Clause;
3732 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3733 begin
3734 pragma Assert (Is_Type (Id));
3735 Set_Flag187 (Id, V);
3736 end Set_Has_Constrained_Partial_View;
3738 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3739 begin
3740 Set_Flag181 (Id, V);
3741 end Set_Has_Contiguous_Rep;
3743 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3744 begin
3745 pragma Assert (Id = Base_Type (Id));
3746 Set_Flag43 (Id, V);
3747 end Set_Has_Controlled_Component;
3749 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3750 begin
3751 Set_Flag98 (Id, V);
3752 end Set_Has_Controlling_Result;
3754 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3755 begin
3756 Set_Flag119 (Id, V);
3757 end Set_Has_Convention_Pragma;
3759 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3760 begin
3761 pragma Assert
3762 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3763 and then Is_Base_Type (Id));
3764 Set_Flag39 (Id, V);
3765 end Set_Has_Default_Aspect;
3767 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3768 begin
3769 pragma Assert (Nkind (Id) in N_Entity);
3770 Set_Flag200 (Id, V);
3771 end Set_Has_Delayed_Aspects;
3773 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3774 begin
3775 pragma Assert (Nkind (Id) in N_Entity);
3776 Set_Flag18 (Id, V);
3777 end Set_Has_Delayed_Freeze;
3779 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3780 begin
3781 pragma Assert (Nkind (Id) in N_Entity);
3782 Set_Flag5 (Id, V);
3783 end Set_Has_Discriminants;
3785 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3786 begin
3787 pragma Assert (Ekind (Id) = E_Record_Type
3788 and then Is_Tagged_Type (Id));
3789 Set_Flag220 (Id, V);
3790 end Set_Has_Dispatch_Table;
3792 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3793 begin
3794 pragma Assert (Is_Enumeration_Type (Id));
3795 Set_Flag66 (Id, V);
3796 end Set_Has_Enumeration_Rep_Clause;
3798 procedure Set_Has_Exit (Id : E; V : B := True) is
3799 begin
3800 Set_Flag47 (Id, V);
3801 end Set_Has_Exit;
3803 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3804 begin
3805 pragma Assert (Is_Tagged_Type (Id));
3806 Set_Flag110 (Id, V);
3807 end Set_Has_External_Tag_Rep_Clause;
3809 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3810 begin
3811 Set_Flag175 (Id, V);
3812 end Set_Has_Forward_Instantiation;
3814 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3815 begin
3816 Set_Flag173 (Id, V);
3817 end Set_Has_Fully_Qualified_Name;
3819 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3820 begin
3821 Set_Flag82 (Id, V);
3822 end Set_Has_Gigi_Rep_Item;
3824 procedure Set_Has_Homonym (Id : E; V : B := True) is
3825 begin
3826 Set_Flag56 (Id, V);
3827 end Set_Has_Homonym;
3829 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
3830 begin
3831 Set_Flag251 (Id, V);
3832 end Set_Has_Implicit_Dereference;
3834 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3835 begin
3836 pragma Assert (Is_Type (Id));
3837 Set_Flag248 (Id, V);
3838 end Set_Has_Inheritable_Invariants;
3840 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3841 begin
3842 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3843 Set_Flag219 (Id, V);
3844 end Set_Has_Initial_Value;
3846 procedure Set_Has_Invariants (Id : E; V : B := True) is
3847 begin
3848 pragma Assert (Is_Type (Id)
3849 or else Ekind (Id) = E_Procedure
3850 or else Ekind (Id) = E_Void);
3851 Set_Flag232 (Id, V);
3852 end Set_Has_Invariants;
3854 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3855 begin
3856 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3857 Set_Flag83 (Id, V);
3858 end Set_Has_Machine_Radix_Clause;
3860 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3861 begin
3862 Set_Flag21 (Id, V);
3863 end Set_Has_Master_Entity;
3865 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3866 begin
3867 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3868 Set_Flag142 (Id, V);
3869 end Set_Has_Missing_Return;
3871 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3872 begin
3873 Set_Flag101 (Id, V);
3874 end Set_Has_Nested_Block_With_Handler;
3876 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3877 begin
3878 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3879 Set_Flag215 (Id, V);
3880 end Set_Has_Up_Level_Access;
3882 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3883 begin
3884 pragma Assert (Id = Base_Type (Id));
3885 Set_Flag75 (Id, V);
3886 end Set_Has_Non_Standard_Rep;
3888 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3889 begin
3890 pragma Assert (Is_Type (Id));
3891 Set_Flag172 (Id, V);
3892 end Set_Has_Object_Size_Clause;
3894 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3895 begin
3896 Set_Flag154 (Id, V);
3897 end Set_Has_Per_Object_Constraint;
3899 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3900 begin
3901 Set_Flag188 (Id, V);
3902 end Set_Has_Persistent_BSS;
3904 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3905 begin
3906 pragma Assert (Is_Subprogram (Id));
3907 Set_Flag240 (Id, V);
3908 end Set_Has_Postconditions;
3910 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3911 begin
3912 pragma Assert (Is_Access_Type (Id));
3913 Set_Flag27 (Base_Type (Id), V);
3914 end Set_Has_Pragma_Controlled;
3916 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3917 begin
3918 Set_Flag150 (Id, V);
3919 end Set_Has_Pragma_Elaborate_Body;
3921 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3922 begin
3923 Set_Flag157 (Id, V);
3924 end Set_Has_Pragma_Inline;
3926 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3927 begin
3928 Set_Flag230 (Id, V);
3929 end Set_Has_Pragma_Inline_Always;
3931 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3932 begin
3933 pragma Assert (Is_Enumeration_Type (Id));
3934 pragma Assert (Id = Base_Type (Id));
3935 Set_Flag198 (Id, V);
3936 end Set_Has_Pragma_Ordered;
3938 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3939 begin
3940 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3941 pragma Assert (Id = Base_Type (Id));
3942 Set_Flag121 (Id, V);
3943 end Set_Has_Pragma_Pack;
3945 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3946 begin
3947 Set_Flag221 (Id, V);
3948 end Set_Has_Pragma_Preelab_Init;
3950 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3951 begin
3952 Set_Flag203 (Id, V);
3953 end Set_Has_Pragma_Pure;
3955 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3956 begin
3957 Set_Flag179 (Id, V);
3958 end Set_Has_Pragma_Pure_Function;
3960 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3961 begin
3962 Set_Flag169 (Id, V);
3963 end Set_Has_Pragma_Thread_Local_Storage;
3965 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3966 begin
3967 Set_Flag233 (Id, V);
3968 end Set_Has_Pragma_Unmodified;
3970 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3971 begin
3972 Set_Flag180 (Id, V);
3973 end Set_Has_Pragma_Unreferenced;
3975 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3976 begin
3977 pragma Assert (Is_Type (Id));
3978 Set_Flag212 (Id, V);
3979 end Set_Has_Pragma_Unreferenced_Objects;
3981 procedure Set_Has_Predicates (Id : E; V : B := True) is
3982 begin
3983 Set_Flag250 (Id, V);
3984 end Set_Has_Predicates;
3986 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3987 begin
3988 pragma Assert (Id = Base_Type (Id));
3989 Set_Flag120 (Id, V);
3990 end Set_Has_Primitive_Operations;
3992 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
3993 begin
3994 pragma Assert (Is_Type (Id));
3995 Set_Flag151 (Id, V);
3996 end Set_Has_Private_Ancestor;
3998 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3999 begin
4000 Set_Flag155 (Id, V);
4001 end Set_Has_Private_Declaration;
4003 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4004 begin
4005 Set_Flag161 (Id, V);
4006 end Set_Has_Qualified_Name;
4008 procedure Set_Has_RACW (Id : E; V : B := True) is
4009 begin
4010 pragma Assert (Ekind (Id) = E_Package);
4011 Set_Flag214 (Id, V);
4012 end Set_Has_RACW;
4014 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4015 begin
4016 pragma Assert (Id = Base_Type (Id));
4017 Set_Flag65 (Id, V);
4018 end Set_Has_Record_Rep_Clause;
4020 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4021 begin
4022 pragma Assert (Is_Subprogram (Id));
4023 Set_Flag143 (Id, V);
4024 end Set_Has_Recursive_Call;
4026 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4027 begin
4028 Set_Flag29 (Id, V);
4029 end Set_Has_Size_Clause;
4031 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4032 begin
4033 Set_Flag67 (Id, V);
4034 end Set_Has_Small_Clause;
4036 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4037 begin
4038 pragma Assert (Id = Base_Type (Id));
4039 Set_Flag100 (Id, V);
4040 end Set_Has_Specified_Layout;
4042 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4043 begin
4044 pragma Assert (Is_Type (Id));
4045 Set_Flag190 (Id, V);
4046 end Set_Has_Specified_Stream_Input;
4048 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4049 begin
4050 pragma Assert (Is_Type (Id));
4051 Set_Flag191 (Id, V);
4052 end Set_Has_Specified_Stream_Output;
4054 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4055 begin
4056 pragma Assert (Is_Type (Id));
4057 Set_Flag192 (Id, V);
4058 end Set_Has_Specified_Stream_Read;
4060 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4061 begin
4062 pragma Assert (Is_Type (Id));
4063 Set_Flag193 (Id, V);
4064 end Set_Has_Specified_Stream_Write;
4066 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4067 begin
4068 Set_Flag211 (Id, V);
4069 end Set_Has_Static_Discriminants;
4071 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4072 begin
4073 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4074 pragma Assert (Id = Base_Type (Id));
4075 Set_Flag23 (Id, V);
4076 end Set_Has_Storage_Size_Clause;
4078 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4079 begin
4080 pragma Assert (Is_Elementary_Type (Id));
4081 Set_Flag184 (Id, V);
4082 end Set_Has_Stream_Size_Clause;
4084 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4085 begin
4086 Set_Flag93 (Id, V);
4087 end Set_Has_Subprogram_Descriptor;
4089 procedure Set_Has_Task (Id : E; V : B := True) is
4090 begin
4091 pragma Assert (Id = Base_Type (Id));
4092 Set_Flag30 (Id, V);
4093 end Set_Has_Task;
4095 procedure Set_Has_Thunks (Id : E; V : B := True) is
4096 begin
4097 pragma Assert (Is_Tag (Id));
4098 Set_Flag228 (Id, V);
4099 end Set_Has_Thunks;
4101 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4102 begin
4103 pragma Assert (Id = Base_Type (Id));
4104 Set_Flag123 (Id, V);
4105 end Set_Has_Unchecked_Union;
4107 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4108 begin
4109 pragma Assert (Is_Type (Id));
4110 Set_Flag72 (Id, V);
4111 end Set_Has_Unknown_Discriminants;
4113 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4114 begin
4115 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4116 Set_Flag87 (Id, V);
4117 end Set_Has_Volatile_Components;
4119 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4120 begin
4121 Set_Flag182 (Id, V);
4122 end Set_Has_Xref_Entry;
4124 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4125 begin
4126 pragma Assert (Ekind (Id) = E_Variable);
4127 Set_Node8 (Id, V);
4128 end Set_Hiding_Loop_Variable;
4130 procedure Set_Homonym (Id : E; V : E) is
4131 begin
4132 pragma Assert (Id /= V);
4133 Set_Node4 (Id, V);
4134 end Set_Homonym;
4136 procedure Set_Interface_Alias (Id : E; V : E) is
4137 begin
4138 pragma Assert
4139 (Is_Internal (Id)
4140 and then Is_Hidden (Id)
4141 and then (Ekind_In (Id, E_Procedure, E_Function)));
4142 Set_Node25 (Id, V);
4143 end Set_Interface_Alias;
4145 procedure Set_Interfaces (Id : E; V : L) is
4146 begin
4147 pragma Assert (Is_Record_Type (Id));
4148 Set_Elist25 (Id, V);
4149 end Set_Interfaces;
4151 procedure Set_In_Package_Body (Id : E; V : B := True) is
4152 begin
4153 Set_Flag48 (Id, V);
4154 end Set_In_Package_Body;
4156 procedure Set_In_Private_Part (Id : E; V : B := True) is
4157 begin
4158 Set_Flag45 (Id, V);
4159 end Set_In_Private_Part;
4161 procedure Set_In_Use (Id : E; V : B := True) is
4162 begin
4163 pragma Assert (Nkind (Id) in N_Entity);
4164 Set_Flag8 (Id, V);
4165 end Set_In_Use;
4167 procedure Set_Inner_Instances (Id : E; V : L) is
4168 begin
4169 Set_Elist23 (Id, V);
4170 end Set_Inner_Instances;
4172 procedure Set_Interface_Name (Id : E; V : N) is
4173 begin
4174 Set_Node21 (Id, V);
4175 end Set_Interface_Name;
4177 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4178 begin
4179 pragma Assert (Is_Overloadable (Id));
4180 Set_Flag19 (Id, V);
4181 end Set_Is_Abstract_Subprogram;
4183 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4184 begin
4185 pragma Assert (Is_Type (Id));
4186 Set_Flag146 (Id, V);
4187 end Set_Is_Abstract_Type;
4189 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4190 begin
4191 pragma Assert (Is_Access_Type (Id));
4192 Set_Flag194 (Id, V);
4193 end Set_Is_Local_Anonymous_Access;
4195 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4196 begin
4197 pragma Assert (Is_Access_Type (Id));
4198 Set_Flag69 (Id, V);
4199 end Set_Is_Access_Constant;
4201 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4202 begin
4203 Set_Flag185 (Id, V);
4204 end Set_Is_Ada_2005_Only;
4206 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4207 begin
4208 Set_Flag199 (Id, V);
4209 end Set_Is_Ada_2012_Only;
4211 procedure Set_Is_Aliased (Id : E; V : B := True) is
4212 begin
4213 pragma Assert (Nkind (Id) in N_Entity);
4214 Set_Flag15 (Id, V);
4215 end Set_Is_Aliased;
4217 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4218 begin
4219 pragma Assert (Is_Entry (Id));
4220 Set_Flag132 (Id, V);
4221 end Set_Is_AST_Entry;
4223 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4224 begin
4225 pragma Assert
4226 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4227 Set_Flag81 (Id, V);
4228 end Set_Is_Asynchronous;
4230 procedure Set_Is_Atomic (Id : E; V : B := True) is
4231 begin
4232 Set_Flag85 (Id, V);
4233 end Set_Is_Atomic;
4235 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4236 begin
4237 pragma Assert ((not V)
4238 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4239 Set_Flag122 (Id, V);
4240 end Set_Is_Bit_Packed_Array;
4242 procedure Set_Is_Called (Id : E; V : B := True) is
4243 begin
4244 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4245 Set_Flag102 (Id, V);
4246 end Set_Is_Called;
4248 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4249 begin
4250 Set_Flag63 (Id, V);
4251 end Set_Is_Character_Type;
4253 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4254 begin
4255 Set_Flag73 (Id, V);
4256 end Set_Is_Child_Unit;
4258 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4259 begin
4260 Set_Flag35 (Id, V);
4261 end Set_Is_Class_Wide_Equivalent_Type;
4263 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4264 begin
4265 Set_Flag149 (Id, V);
4266 end Set_Is_Compilation_Unit;
4268 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4269 begin
4270 pragma Assert (Ekind (Id) = E_Discriminant);
4271 Set_Flag103 (Id, V);
4272 end Set_Is_Completely_Hidden;
4274 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4275 begin
4276 Set_Flag20 (Id, V);
4277 end Set_Is_Concurrent_Record_Type;
4279 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4280 begin
4281 Set_Flag80 (Id, V);
4282 end Set_Is_Constr_Subt_For_U_Nominal;
4284 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4285 begin
4286 Set_Flag141 (Id, V);
4287 end Set_Is_Constr_Subt_For_UN_Aliased;
4289 procedure Set_Is_Constrained (Id : E; V : B := True) is
4290 begin
4291 pragma Assert (Nkind (Id) in N_Entity);
4292 Set_Flag12 (Id, V);
4293 end Set_Is_Constrained;
4295 procedure Set_Is_Constructor (Id : E; V : B := True) is
4296 begin
4297 Set_Flag76 (Id, V);
4298 end Set_Is_Constructor;
4300 procedure Set_Is_Controlled (Id : E; V : B := True) is
4301 begin
4302 pragma Assert (Id = Base_Type (Id));
4303 Set_Flag42 (Id, V);
4304 end Set_Is_Controlled;
4306 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4307 begin
4308 pragma Assert (Is_Formal (Id));
4309 Set_Flag97 (Id, V);
4310 end Set_Is_Controlling_Formal;
4312 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4313 begin
4314 Set_Flag74 (Id, V);
4315 end Set_Is_CPP_Class;
4317 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4318 begin
4319 pragma Assert (Is_Type (Id));
4320 Set_Flag223 (Id, V);
4321 end Set_Is_Descendent_Of_Address;
4323 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4324 begin
4325 Set_Flag176 (Id, V);
4326 end Set_Is_Discrim_SO_Function;
4328 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4329 begin
4330 Set_Flag234 (Id, V);
4331 end Set_Is_Dispatch_Table_Entity;
4333 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4334 begin
4335 pragma Assert
4336 (V = False
4337 or else
4338 Is_Overloadable (Id)
4339 or else
4340 Ekind (Id) = E_Subprogram_Type);
4342 Set_Flag6 (Id, V);
4343 end Set_Is_Dispatching_Operation;
4345 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4346 begin
4347 Set_Flag124 (Id, V);
4348 end Set_Is_Eliminated;
4350 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4351 begin
4352 Set_Flag52 (Id, V);
4353 end Set_Is_Entry_Formal;
4355 procedure Set_Is_Exported (Id : E; V : B := True) is
4356 begin
4357 Set_Flag99 (Id, V);
4358 end Set_Is_Exported;
4360 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4361 begin
4362 Set_Flag70 (Id, V);
4363 end Set_Is_First_Subtype;
4365 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4366 begin
4367 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4368 Set_Flag118 (Id, V);
4369 end Set_Is_For_Access_Subtype;
4371 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4372 begin
4373 Set_Flag111 (Id, V);
4374 end Set_Is_Formal_Subprogram;
4376 procedure Set_Is_Frozen (Id : E; V : B := True) is
4377 begin
4378 pragma Assert (Nkind (Id) in N_Entity);
4379 Set_Flag4 (Id, V);
4380 end Set_Is_Frozen;
4382 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4383 begin
4384 pragma Assert (Is_Type (Id));
4385 Set_Flag94 (Id, V);
4386 end Set_Is_Generic_Actual_Type;
4388 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4389 begin
4390 Set_Flag130 (Id, V);
4391 end Set_Is_Generic_Instance;
4393 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4394 begin
4395 pragma Assert (Nkind (Id) in N_Entity);
4396 Set_Flag13 (Id, V);
4397 end Set_Is_Generic_Type;
4399 procedure Set_Is_Hidden (Id : E; V : B := True) is
4400 begin
4401 Set_Flag57 (Id, V);
4402 end Set_Is_Hidden;
4404 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4405 begin
4406 Set_Flag171 (Id, V);
4407 end Set_Is_Hidden_Open_Scope;
4409 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4410 begin
4411 pragma Assert (Nkind (Id) in N_Entity);
4412 Set_Flag7 (Id, V);
4413 end Set_Is_Immediately_Visible;
4415 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4416 begin
4417 Set_Flag254 (Id, V);
4418 end Set_Is_Implementation_Defined;
4420 procedure Set_Is_Imported (Id : E; V : B := True) is
4421 begin
4422 Set_Flag24 (Id, V);
4423 end Set_Is_Imported;
4425 procedure Set_Is_Inlined (Id : E; V : B := True) is
4426 begin
4427 Set_Flag11 (Id, V);
4428 end Set_Is_Inlined;
4430 procedure Set_Is_Interface (Id : E; V : B := True) is
4431 begin
4432 pragma Assert (Is_Record_Type (Id));
4433 Set_Flag186 (Id, V);
4434 end Set_Is_Interface;
4436 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4437 begin
4438 Set_Flag126 (Id, V);
4439 end Set_Is_Instantiated;
4441 procedure Set_Is_Internal (Id : E; V : B := True) is
4442 begin
4443 pragma Assert (Nkind (Id) in N_Entity);
4444 Set_Flag17 (Id, V);
4445 end Set_Is_Internal;
4447 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4448 begin
4449 pragma Assert (Nkind (Id) in N_Entity);
4450 Set_Flag89 (Id, V);
4451 end Set_Is_Interrupt_Handler;
4453 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4454 begin
4455 Set_Flag64 (Id, V);
4456 end Set_Is_Intrinsic_Subprogram;
4458 procedure Set_Is_Itype (Id : E; V : B := True) is
4459 begin
4460 Set_Flag91 (Id, V);
4461 end Set_Is_Itype;
4463 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4464 begin
4465 Set_Flag37 (Id, V);
4466 end Set_Is_Known_Non_Null;
4468 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4469 begin
4470 Set_Flag204 (Id, V);
4471 end Set_Is_Known_Null;
4473 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4474 begin
4475 Set_Flag170 (Id, V);
4476 end Set_Is_Known_Valid;
4478 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4479 begin
4480 pragma Assert (Is_Type (Id));
4481 Set_Flag106 (Id, V);
4482 end Set_Is_Limited_Composite;
4484 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4485 begin
4486 pragma Assert (Is_Interface (Id));
4487 Set_Flag197 (Id, V);
4488 end Set_Is_Limited_Interface;
4490 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4491 begin
4492 Set_Flag25 (Id, V);
4493 end Set_Is_Limited_Record;
4495 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4496 begin
4497 pragma Assert (Is_Subprogram (Id));
4498 Set_Flag137 (Id, V);
4499 end Set_Is_Machine_Code_Subprogram;
4501 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4502 begin
4503 pragma Assert (Is_Type (Id));
4504 Set_Flag109 (Id, V);
4505 end Set_Is_Non_Static_Subtype;
4507 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4508 begin
4509 pragma Assert (Ekind (Id) = E_Procedure);
4510 Set_Flag178 (Id, V);
4511 end Set_Is_Null_Init_Proc;
4513 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4514 begin
4515 Set_Flag153 (Id, V);
4516 end Set_Is_Obsolescent;
4518 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4519 begin
4520 pragma Assert (Ekind (Id) = E_Out_Parameter);
4521 Set_Flag226 (Id, V);
4522 end Set_Is_Only_Out_Parameter;
4524 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4525 begin
4526 pragma Assert (Is_Formal (Id));
4527 Set_Flag134 (Id, V);
4528 end Set_Is_Optional_Parameter;
4530 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4531 begin
4532 Set_Flag160 (Id, V);
4533 end Set_Is_Package_Body_Entity;
4535 procedure Set_Is_Packed (Id : E; V : B := True) is
4536 begin
4537 pragma Assert (Id = Base_Type (Id));
4538 Set_Flag51 (Id, V);
4539 end Set_Is_Packed;
4541 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4542 begin
4543 Set_Flag138 (Id, V);
4544 end Set_Is_Packed_Array_Type;
4546 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4547 begin
4548 pragma Assert (Nkind (Id) in N_Entity);
4549 Set_Flag9 (Id, V);
4550 end Set_Is_Potentially_Use_Visible;
4552 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4553 begin
4554 Set_Flag59 (Id, V);
4555 end Set_Is_Preelaborated;
4557 procedure Set_Is_Primitive (Id : E; V : B := True) is
4558 begin
4559 pragma Assert
4560 (Is_Overloadable (Id)
4561 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4562 Set_Flag218 (Id, V);
4563 end Set_Is_Primitive;
4565 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4566 begin
4567 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4568 Set_Flag195 (Id, V);
4569 end Set_Is_Primitive_Wrapper;
4571 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4572 begin
4573 pragma Assert (Is_Type (Id));
4574 Set_Flag107 (Id, V);
4575 end Set_Is_Private_Composite;
4577 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4578 begin
4579 Set_Flag53 (Id, V);
4580 end Set_Is_Private_Descendant;
4582 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4583 begin
4584 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4585 Set_Flag245 (Id, V);
4586 end Set_Is_Private_Primitive;
4588 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4589 begin
4590 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4591 Set_Flag252 (Id, V);
4592 end Set_Is_Processed_Transient;
4594 procedure Set_Is_Public (Id : E; V : B := True) is
4595 begin
4596 pragma Assert (Nkind (Id) in N_Entity);
4597 Set_Flag10 (Id, V);
4598 end Set_Is_Public;
4600 procedure Set_Is_Pure (Id : E; V : B := True) is
4601 begin
4602 Set_Flag44 (Id, V);
4603 end Set_Is_Pure;
4605 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4606 begin
4607 pragma Assert (Is_Access_Type (Id));
4608 Set_Flag189 (Id, V);
4609 end Set_Is_Pure_Unit_Access_Type;
4611 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4612 begin
4613 pragma Assert (Is_Type (Id));
4614 Set_Flag244 (Id, V);
4615 end Set_Is_RACW_Stub_Type;
4617 procedure Set_Is_Raised (Id : E; V : B := True) is
4618 begin
4619 pragma Assert (Ekind (Id) = E_Exception);
4620 Set_Flag224 (Id, V);
4621 end Set_Is_Raised;
4623 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4624 begin
4625 Set_Flag62 (Id, V);
4626 end Set_Is_Remote_Call_Interface;
4628 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4629 begin
4630 Set_Flag61 (Id, V);
4631 end Set_Is_Remote_Types;
4633 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4634 begin
4635 Set_Flag112 (Id, V);
4636 end Set_Is_Renaming_Of_Object;
4638 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4639 begin
4640 Set_Flag209 (Id, V);
4641 end Set_Is_Return_Object;
4643 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4644 begin
4645 pragma Assert (Ekind (Id) = E_Variable);
4646 Set_Flag249 (Id, V);
4647 end Set_Is_Safe_To_Reevaluate;
4649 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4650 begin
4651 Set_Flag60 (Id, V);
4652 end Set_Is_Shared_Passive;
4654 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4655 begin
4656 pragma Assert
4657 (Is_Type (Id)
4658 or else Ekind_In (Id, E_Exception,
4659 E_Variable,
4660 E_Constant,
4661 E_Void));
4662 Set_Flag28 (Id, V);
4663 end Set_Is_Statically_Allocated;
4665 procedure Set_Is_Tag (Id : E; V : B := True) is
4666 begin
4667 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4668 Set_Flag78 (Id, V);
4669 end Set_Is_Tag;
4671 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4672 begin
4673 Set_Flag55 (Id, V);
4674 end Set_Is_Tagged_Type;
4676 procedure Set_Is_Thunk (Id : E; V : B := True) is
4677 begin
4678 Set_Flag225 (Id, V);
4679 end Set_Is_Thunk;
4681 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4682 begin
4683 Set_Flag235 (Id, V);
4684 end Set_Is_Trivial_Subprogram;
4686 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4687 begin
4688 Set_Flag163 (Id, V);
4689 end Set_Is_True_Constant;
4691 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4692 begin
4693 pragma Assert (Id = Base_Type (Id));
4694 Set_Flag117 (Id, V);
4695 end Set_Is_Unchecked_Union;
4697 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4698 begin
4699 pragma Assert (Ekind (Id) = E_Record_Type);
4700 Set_Flag246 (Id, V);
4701 end Set_Is_Underlying_Record_View;
4703 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4704 begin
4705 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4706 Set_Flag144 (Id, V);
4707 end Set_Is_Unsigned_Type;
4709 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4710 begin
4711 pragma Assert (Ekind (Id) = E_Procedure);
4712 Set_Flag127 (Id, V);
4713 end Set_Is_Valued_Procedure;
4715 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4716 begin
4717 pragma Assert (Is_Child_Unit (Id));
4718 Set_Flag116 (Id, V);
4719 end Set_Is_Visible_Child_Unit;
4721 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4722 begin
4723 Set_Flag206 (Id, V);
4724 end Set_Is_Visible_Formal;
4726 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4727 begin
4728 pragma Assert (Ekind (Id) = E_Exception);
4729 Set_Flag133 (Id, V);
4730 end Set_Is_VMS_Exception;
4732 procedure Set_Is_Volatile (Id : E; V : B := True) is
4733 begin
4734 pragma Assert (Nkind (Id) in N_Entity);
4735 Set_Flag16 (Id, V);
4736 end Set_Is_Volatile;
4738 procedure Set_Itype_Printed (Id : E; V : B := True) is
4739 begin
4740 pragma Assert (Is_Itype (Id));
4741 Set_Flag202 (Id, V);
4742 end Set_Itype_Printed;
4744 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4745 begin
4746 Set_Flag32 (Id, V);
4747 end Set_Kill_Elaboration_Checks;
4749 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4750 begin
4751 Set_Flag33 (Id, V);
4752 end Set_Kill_Range_Checks;
4754 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4755 begin
4756 Set_Flag34 (Id, V);
4757 end Set_Kill_Tag_Checks;
4759 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4760 begin
4761 pragma Assert (Is_Type (Id));
4762 Set_Flag207 (Id, V);
4763 end Set_Known_To_Have_Preelab_Init;
4765 procedure Set_Last_Assignment (Id : E; V : N) is
4766 begin
4767 pragma Assert (Is_Assignable (Id));
4768 Set_Node26 (Id, V);
4769 end Set_Last_Assignment;
4771 procedure Set_Last_Entity (Id : E; V : E) is
4772 begin
4773 Set_Node20 (Id, V);
4774 end Set_Last_Entity;
4776 procedure Set_Limited_View (Id : E; V : E) is
4777 begin
4778 pragma Assert (Ekind (Id) = E_Package);
4779 Set_Node23 (Id, V);
4780 end Set_Limited_View;
4782 procedure Set_Lit_Indexes (Id : E; V : E) is
4783 begin
4784 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4785 Set_Node15 (Id, V);
4786 end Set_Lit_Indexes;
4788 procedure Set_Lit_Strings (Id : E; V : E) is
4789 begin
4790 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4791 Set_Node16 (Id, V);
4792 end Set_Lit_Strings;
4794 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4795 begin
4796 pragma Assert (Is_Formal (Id));
4797 Set_Flag205 (Id, V);
4798 end Set_Low_Bound_Tested;
4800 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4801 begin
4802 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4803 Set_Flag84 (Id, V);
4804 end Set_Machine_Radix_10;
4806 procedure Set_Master_Id (Id : E; V : E) is
4807 begin
4808 pragma Assert (Is_Access_Type (Id));
4809 Set_Node17 (Id, V);
4810 end Set_Master_Id;
4812 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4813 begin
4814 Set_Flag168 (Id, V);
4815 end Set_Materialize_Entity;
4817 procedure Set_Mechanism (Id : E; V : M) is
4818 begin
4819 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4820 Set_Uint8 (Id, UI_From_Int (V));
4821 end Set_Mechanism;
4823 procedure Set_Modulus (Id : E; V : U) is
4824 begin
4825 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4826 Set_Uint17 (Id, V);
4827 end Set_Modulus;
4829 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4830 begin
4831 pragma Assert (Is_Type (Id));
4832 Set_Flag183 (Id, V);
4833 end Set_Must_Be_On_Byte_Boundary;
4835 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4836 begin
4837 pragma Assert (Is_Type (Id));
4838 Set_Flag208 (Id, V);
4839 end Set_Must_Have_Preelab_Init;
4841 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4842 begin
4843 Set_Flag147 (Id, V);
4844 end Set_Needs_Debug_Info;
4846 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4847 begin
4848 pragma Assert
4849 (Is_Overloadable (Id)
4850 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4851 Set_Flag22 (Id, V);
4852 end Set_Needs_No_Actuals;
4854 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4855 begin
4856 Set_Flag115 (Id, V);
4857 end Set_Never_Set_In_Source;
4859 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4860 begin
4861 Set_Node12 (Id, V);
4862 end Set_Next_Inlined_Subprogram;
4864 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4865 begin
4866 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4867 Set_Flag131 (Id, V);
4868 end Set_No_Pool_Assigned;
4870 procedure Set_No_Return (Id : E; V : B := True) is
4871 begin
4872 pragma Assert
4873 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4874 Set_Flag113 (Id, V);
4875 end Set_No_Return;
4877 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4878 begin
4879 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4880 Set_Flag136 (Id, V);
4881 end Set_No_Strict_Aliasing;
4883 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4884 begin
4885 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4886 Set_Flag58 (Id, V);
4887 end Set_Non_Binary_Modulus;
4889 procedure Set_Non_Limited_View (Id : E; V : E) is
4890 begin
4891 pragma Assert (Ekind (Id) in Incomplete_Kind);
4892 Set_Node17 (Id, V);
4893 end Set_Non_Limited_View;
4895 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4896 begin
4897 pragma Assert
4898 (Root_Type (Id) = Standard_Boolean
4899 and then Ekind (Id) = E_Enumeration_Type);
4900 Set_Flag162 (Id, V);
4901 end Set_Nonzero_Is_True;
4903 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4904 begin
4905 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4906 Set_Uint8 (Id, V);
4907 end Set_Normalized_First_Bit;
4909 procedure Set_Normalized_Position (Id : E; V : U) is
4910 begin
4911 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4912 Set_Uint14 (Id, V);
4913 end Set_Normalized_Position;
4915 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4916 begin
4917 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4918 Set_Uint10 (Id, V);
4919 end Set_Normalized_Position_Max;
4921 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4922 begin
4923 pragma Assert (Ekind (Id) = E_Variable);
4924 Set_Flag247 (Id, V);
4925 end Set_OK_To_Rename;
4927 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4928 begin
4929 pragma Assert
4930 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4931 Set_Flag239 (Id, V);
4932 end Set_OK_To_Reorder_Components;
4934 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4935 begin
4936 pragma Assert
4937 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4938 Set_Flag241 (Id, V);
4939 end Set_Optimize_Alignment_Space;
4941 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4942 begin
4943 pragma Assert
4944 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4945 Set_Flag242 (Id, V);
4946 end Set_Optimize_Alignment_Time;
4948 procedure Set_Original_Access_Type (Id : E; V : E) is
4949 begin
4950 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4951 Set_Node26 (Id, V);
4952 end Set_Original_Access_Type;
4954 procedure Set_Original_Array_Type (Id : E; V : E) is
4955 begin
4956 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4957 Set_Node21 (Id, V);
4958 end Set_Original_Array_Type;
4960 procedure Set_Original_Record_Component (Id : E; V : E) is
4961 begin
4962 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4963 Set_Node22 (Id, V);
4964 end Set_Original_Record_Component;
4966 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4967 begin
4968 Set_Flag243 (Id, V);
4969 end Set_Overlays_Constant;
4971 procedure Set_Overridden_Operation (Id : E; V : E) is
4972 begin
4973 Set_Node26 (Id, V);
4974 end Set_Overridden_Operation;
4976 procedure Set_Package_Instantiation (Id : E; V : N) is
4977 begin
4978 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4979 Set_Node26 (Id, V);
4980 end Set_Package_Instantiation;
4982 procedure Set_Packed_Array_Type (Id : E; V : E) is
4983 begin
4984 pragma Assert (Is_Array_Type (Id));
4985 Set_Node23 (Id, V);
4986 end Set_Packed_Array_Type;
4988 procedure Set_Parent_Subtype (Id : E; V : E) is
4989 begin
4990 pragma Assert (Ekind (Id) = E_Record_Type);
4991 Set_Node19 (Id, V);
4992 end Set_Parent_Subtype;
4994 procedure Set_Postcondition_Proc (Id : E; V : E) is
4995 begin
4996 pragma Assert (Ekind (Id) = E_Procedure);
4997 Set_Node8 (Id, V);
4998 end Set_Postcondition_Proc;
5000 procedure Set_PPC_Wrapper (Id : E; V : E) is
5001 begin
5002 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5003 Set_Node25 (Id, V);
5004 end Set_PPC_Wrapper;
5006 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5007 begin
5008 pragma Assert (Is_Tagged_Type (Id));
5009 Set_Elist10 (Id, V);
5010 end Set_Direct_Primitive_Operations;
5012 procedure Set_Prival (Id : E; V : E) is
5013 begin
5014 pragma Assert (Is_Protected_Component (Id));
5015 Set_Node17 (Id, V);
5016 end Set_Prival;
5018 procedure Set_Prival_Link (Id : E; V : E) is
5019 begin
5020 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5021 Set_Node20 (Id, V);
5022 end Set_Prival_Link;
5024 procedure Set_Private_Dependents (Id : E; V : L) is
5025 begin
5026 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5027 Set_Elist18 (Id, V);
5028 end Set_Private_Dependents;
5030 procedure Set_Private_View (Id : E; V : N) is
5031 begin
5032 pragma Assert (Is_Private_Type (Id));
5033 Set_Node22 (Id, V);
5034 end Set_Private_View;
5036 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5037 begin
5038 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5039 Set_Node11 (Id, V);
5040 end Set_Protected_Body_Subprogram;
5042 procedure Set_Protected_Formal (Id : E; V : E) is
5043 begin
5044 pragma Assert (Is_Formal (Id));
5045 Set_Node22 (Id, V);
5046 end Set_Protected_Formal;
5048 procedure Set_Protection_Object (Id : E; V : E) is
5049 begin
5050 pragma Assert (Ekind_In (Id, E_Entry,
5051 E_Entry_Family,
5052 E_Function,
5053 E_Procedure));
5054 Set_Node23 (Id, V);
5055 end Set_Protection_Object;
5057 procedure Set_Reachable (Id : E; V : B := True) is
5058 begin
5059 Set_Flag49 (Id, V);
5060 end Set_Reachable;
5062 procedure Set_Referenced (Id : E; V : B := True) is
5063 begin
5064 Set_Flag156 (Id, V);
5065 end Set_Referenced;
5067 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5068 begin
5069 Set_Flag36 (Id, V);
5070 end Set_Referenced_As_LHS;
5072 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5073 begin
5074 Set_Flag227 (Id, V);
5075 end Set_Referenced_As_Out_Parameter;
5077 procedure Set_Register_Exception_Call (Id : E; V : N) is
5078 begin
5079 pragma Assert (Ekind (Id) = E_Exception);
5080 Set_Node20 (Id, V);
5081 end Set_Register_Exception_Call;
5083 procedure Set_Related_Array_Object (Id : E; V : E) is
5084 begin
5085 pragma Assert (Is_Array_Type (Id));
5086 Set_Node19 (Id, V);
5087 end Set_Related_Array_Object;
5089 procedure Set_Related_Expression (Id : E; V : N) is
5090 begin
5091 pragma Assert (Ekind (Id) in Type_Kind
5092 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5093 Set_Node24 (Id, V);
5094 end Set_Related_Expression;
5096 procedure Set_Related_Instance (Id : E; V : E) is
5097 begin
5098 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5099 Set_Node15 (Id, V);
5100 end Set_Related_Instance;
5102 procedure Set_Related_Type (Id : E; V : E) is
5103 begin
5104 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5105 Set_Node27 (Id, V);
5106 end Set_Related_Type;
5108 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5109 begin
5110 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5111 Set_Node26 (Id, V);
5112 end Set_Relative_Deadline_Variable;
5114 procedure Set_Renamed_Entity (Id : E; V : N) is
5115 begin
5116 Set_Node18 (Id, V);
5117 end Set_Renamed_Entity;
5119 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5120 begin
5121 pragma Assert (Ekind (Id) = E_Package);
5122 Set_Flag231 (Id, V);
5123 end Set_Renamed_In_Spec;
5125 procedure Set_Renamed_Object (Id : E; V : N) is
5126 begin
5127 Set_Node18 (Id, V);
5128 end Set_Renamed_Object;
5130 procedure Set_Renaming_Map (Id : E; V : U) is
5131 begin
5132 Set_Uint9 (Id, V);
5133 end Set_Renaming_Map;
5135 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5136 begin
5137 pragma Assert (Is_Overloadable (Id));
5138 Set_Flag213 (Id, V);
5139 end Set_Requires_Overriding;
5141 procedure Set_Return_Flag_Or_Transient_Decl (Id : E; V : E) is
5142 begin
5143 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5144 Set_Node15 (Id, V);
5145 end Set_Return_Flag_Or_Transient_Decl;
5147 procedure Set_Return_Present (Id : E; V : B := True) is
5148 begin
5149 Set_Flag54 (Id, V);
5150 end Set_Return_Present;
5152 procedure Set_Return_Applies_To (Id : E; V : N) is
5153 begin
5154 Set_Node8 (Id, V);
5155 end Set_Return_Applies_To;
5157 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5158 begin
5159 Set_Flag90 (Id, V);
5160 end Set_Returns_By_Ref;
5162 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5163 begin
5164 pragma Assert
5165 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5166 Set_Flag164 (Id, V);
5167 end Set_Reverse_Bit_Order;
5169 procedure Set_RM_Size (Id : E; V : U) is
5170 begin
5171 pragma Assert (Is_Type (Id));
5172 Set_Uint13 (Id, V);
5173 end Set_RM_Size;
5175 procedure Set_Scalar_Range (Id : E; V : N) is
5176 begin
5177 Set_Node20 (Id, V);
5178 end Set_Scalar_Range;
5180 procedure Set_Scale_Value (Id : E; V : U) is
5181 begin
5182 Set_Uint15 (Id, V);
5183 end Set_Scale_Value;
5185 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5186 begin
5187 pragma Assert (not Is_Record_Type (Id));
5188 Set_Uint22 (Id, V);
5189 end Set_Scope_Depth_Value;
5191 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5192 begin
5193 Set_Flag167 (Id, V);
5194 end Set_Sec_Stack_Needed_For_Return;
5196 procedure Set_Shadow_Entities (Id : E; V : S) is
5197 begin
5198 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5199 Set_List14 (Id, V);
5200 end Set_Shadow_Entities;
5202 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5203 begin
5204 pragma Assert (Ekind (Id) = E_Variable);
5205 Set_Node22 (Id, V);
5206 end Set_Shared_Var_Procs_Instance;
5208 procedure Set_Size_Check_Code (Id : E; V : N) is
5209 begin
5210 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5211 Set_Node19 (Id, V);
5212 end Set_Size_Check_Code;
5214 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5215 begin
5216 Set_Flag177 (Id, V);
5217 end Set_Size_Depends_On_Discriminant;
5219 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5220 begin
5221 Set_Flag92 (Id, V);
5222 end Set_Size_Known_At_Compile_Time;
5224 procedure Set_Small_Value (Id : E; V : R) is
5225 begin
5226 pragma Assert (Is_Fixed_Point_Type (Id));
5227 Set_Ureal21 (Id, V);
5228 end Set_Small_Value;
5230 procedure Set_Spec_Entity (Id : E; V : E) is
5231 begin
5232 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5233 Set_Node19 (Id, V);
5234 end Set_Spec_Entity;
5236 procedure Set_Static_Predicate (Id : E; V : S) is
5237 begin
5238 pragma Assert
5239 (Ekind_In (Id, E_Enumeration_Subtype,
5240 E_Modular_Integer_Subtype,
5241 E_Signed_Integer_Subtype)
5242 and then Has_Predicates (Id));
5243 Set_List25 (Id, V);
5244 end Set_Static_Predicate;
5246 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5247 begin
5248 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5249 pragma Assert (Id = Base_Type (Id));
5250 Set_Node15 (Id, V);
5251 end Set_Storage_Size_Variable;
5253 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5254 begin
5255 pragma Assert (Ekind (Id) = E_Package);
5256 Set_Flag77 (Id, V);
5257 end Set_Static_Elaboration_Desired;
5259 procedure Set_Static_Initialization (Id : E; V : N) is
5260 begin
5261 pragma Assert
5262 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5263 Set_Node26 (Id, V);
5264 end Set_Static_Initialization;
5266 procedure Set_Stored_Constraint (Id : E; V : L) is
5267 begin
5268 pragma Assert (Nkind (Id) in N_Entity);
5269 Set_Elist23 (Id, V);
5270 end Set_Stored_Constraint;
5272 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5273 begin
5274 pragma Assert (Id = Base_Type (Id));
5275 Set_Flag145 (Id, V);
5276 end Set_Strict_Alignment;
5278 procedure Set_String_Literal_Length (Id : E; V : U) is
5279 begin
5280 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5281 Set_Uint16 (Id, V);
5282 end Set_String_Literal_Length;
5284 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5285 begin
5286 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5287 Set_Node15 (Id, V);
5288 end Set_String_Literal_Low_Bound;
5290 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5291 begin
5292 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5293 Set_Node29 (Id, V);
5294 end Set_Subprograms_For_Type;
5296 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5297 begin
5298 Set_Flag148 (Id, V);
5299 end Set_Suppress_Elaboration_Warnings;
5301 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5302 begin
5303 pragma Assert (Is_Type (Id));
5304 Set_Flag105 (Id, V);
5305 end Set_Suppress_Initialization;
5307 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5308 begin
5309 Set_Flag165 (Id, V);
5310 end Set_Suppress_Style_Checks;
5312 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5313 begin
5314 Set_Flag217 (Id, V);
5315 end Set_Suppress_Value_Tracking_On_Call;
5317 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5318 begin
5319 pragma Assert (Ekind (Id) in Task_Kind);
5320 Set_Node25 (Id, V);
5321 end Set_Task_Body_Procedure;
5323 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5324 begin
5325 Set_Flag41 (Id, V);
5326 end Set_Treat_As_Volatile;
5328 procedure Set_Underlying_Full_View (Id : E; V : E) is
5329 begin
5330 pragma Assert (Ekind (Id) in Private_Kind);
5331 Set_Node19 (Id, V);
5332 end Set_Underlying_Full_View;
5334 procedure Set_Underlying_Record_View (Id : E; V : E) is
5335 begin
5336 pragma Assert (Ekind (Id) = E_Record_Type);
5337 Set_Node28 (Id, V);
5338 end Set_Underlying_Record_View;
5340 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5341 begin
5342 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5343 Set_Flag216 (Id, V);
5344 end Set_Universal_Aliasing;
5346 procedure Set_Unset_Reference (Id : E; V : N) is
5347 begin
5348 Set_Node16 (Id, V);
5349 end Set_Unset_Reference;
5351 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5352 begin
5353 Set_Flag95 (Id, V);
5354 end Set_Uses_Sec_Stack;
5356 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5357 begin
5358 Set_Flag222 (Id, V);
5359 end Set_Used_As_Generic_Actual;
5361 procedure Set_Warnings_Off (Id : E; V : B := True) is
5362 begin
5363 Set_Flag96 (Id, V);
5364 end Set_Warnings_Off;
5366 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5367 begin
5368 Set_Flag236 (Id, V);
5369 end Set_Warnings_Off_Used;
5371 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5372 begin
5373 Set_Flag237 (Id, V);
5374 end Set_Warnings_Off_Used_Unmodified;
5376 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5377 begin
5378 Set_Flag238 (Id, V);
5379 end Set_Warnings_Off_Used_Unreferenced;
5381 procedure Set_Was_Hidden (Id : E; V : B := True) is
5382 begin
5383 Set_Flag196 (Id, V);
5384 end Set_Was_Hidden;
5386 procedure Set_Wrapped_Entity (Id : E; V : E) is
5387 begin
5388 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5389 and then Is_Primitive_Wrapper (Id));
5390 Set_Node27 (Id, V);
5391 end Set_Wrapped_Entity;
5393 -----------------------------------
5394 -- Field Initialization Routines --
5395 -----------------------------------
5397 procedure Init_Alignment (Id : E) is
5398 begin
5399 Set_Uint14 (Id, Uint_0);
5400 end Init_Alignment;
5402 procedure Init_Alignment (Id : E; V : Int) is
5403 begin
5404 Set_Uint14 (Id, UI_From_Int (V));
5405 end Init_Alignment;
5407 procedure Init_Component_Bit_Offset (Id : E) is
5408 begin
5409 Set_Uint11 (Id, No_Uint);
5410 end Init_Component_Bit_Offset;
5412 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5413 begin
5414 Set_Uint11 (Id, UI_From_Int (V));
5415 end Init_Component_Bit_Offset;
5417 procedure Init_Component_Size (Id : E) is
5418 begin
5419 Set_Uint22 (Id, Uint_0);
5420 end Init_Component_Size;
5422 procedure Init_Component_Size (Id : E; V : Int) is
5423 begin
5424 Set_Uint22 (Id, UI_From_Int (V));
5425 end Init_Component_Size;
5427 procedure Init_Digits_Value (Id : E) is
5428 begin
5429 Set_Uint17 (Id, Uint_0);
5430 end Init_Digits_Value;
5432 procedure Init_Digits_Value (Id : E; V : Int) is
5433 begin
5434 Set_Uint17 (Id, UI_From_Int (V));
5435 end Init_Digits_Value;
5437 procedure Init_Esize (Id : E) is
5438 begin
5439 Set_Uint12 (Id, Uint_0);
5440 end Init_Esize;
5442 procedure Init_Esize (Id : E; V : Int) is
5443 begin
5444 Set_Uint12 (Id, UI_From_Int (V));
5445 end Init_Esize;
5447 procedure Init_Normalized_First_Bit (Id : E) is
5448 begin
5449 Set_Uint8 (Id, No_Uint);
5450 end Init_Normalized_First_Bit;
5452 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5453 begin
5454 Set_Uint8 (Id, UI_From_Int (V));
5455 end Init_Normalized_First_Bit;
5457 procedure Init_Normalized_Position (Id : E) is
5458 begin
5459 Set_Uint14 (Id, No_Uint);
5460 end Init_Normalized_Position;
5462 procedure Init_Normalized_Position (Id : E; V : Int) is
5463 begin
5464 Set_Uint14 (Id, UI_From_Int (V));
5465 end Init_Normalized_Position;
5467 procedure Init_Normalized_Position_Max (Id : E) is
5468 begin
5469 Set_Uint10 (Id, No_Uint);
5470 end Init_Normalized_Position_Max;
5472 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5473 begin
5474 Set_Uint10 (Id, UI_From_Int (V));
5475 end Init_Normalized_Position_Max;
5477 procedure Init_RM_Size (Id : E) is
5478 begin
5479 Set_Uint13 (Id, Uint_0);
5480 end Init_RM_Size;
5482 procedure Init_RM_Size (Id : E; V : Int) is
5483 begin
5484 Set_Uint13 (Id, UI_From_Int (V));
5485 end Init_RM_Size;
5487 -----------------------------
5488 -- Init_Component_Location --
5489 -----------------------------
5491 procedure Init_Component_Location (Id : E) is
5492 begin
5493 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5494 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5495 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5496 Set_Uint12 (Id, Uint_0); -- Esize
5497 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5498 end Init_Component_Location;
5500 ----------------------------
5501 -- Init_Object_Size_Align --
5502 ----------------------------
5504 procedure Init_Object_Size_Align (Id : E) is
5505 begin
5506 Set_Uint12 (Id, Uint_0); -- Esize
5507 Set_Uint14 (Id, Uint_0); -- Alignment
5508 end Init_Object_Size_Align;
5510 ---------------
5511 -- Init_Size --
5512 ---------------
5514 procedure Init_Size (Id : E; V : Int) is
5515 begin
5516 pragma Assert (not Is_Object (Id));
5517 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5518 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5519 end Init_Size;
5521 ---------------------
5522 -- Init_Size_Align --
5523 ---------------------
5525 procedure Init_Size_Align (Id : E) is
5526 begin
5527 pragma Assert (not Is_Object (Id));
5528 Set_Uint12 (Id, Uint_0); -- Esize
5529 Set_Uint13 (Id, Uint_0); -- RM_Size
5530 Set_Uint14 (Id, Uint_0); -- Alignment
5531 end Init_Size_Align;
5533 ----------------------------------------------
5534 -- Type Representation Attribute Predicates --
5535 ----------------------------------------------
5537 function Known_Alignment (E : Entity_Id) return B is
5538 begin
5539 return Uint14 (E) /= Uint_0
5540 and then Uint14 (E) /= No_Uint;
5541 end Known_Alignment;
5543 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5544 begin
5545 return Uint11 (E) /= No_Uint;
5546 end Known_Component_Bit_Offset;
5548 function Known_Component_Size (E : Entity_Id) return B is
5549 begin
5550 return Uint22 (Base_Type (E)) /= Uint_0
5551 and then Uint22 (Base_Type (E)) /= No_Uint;
5552 end Known_Component_Size;
5554 function Known_Esize (E : Entity_Id) return B is
5555 begin
5556 return Uint12 (E) /= Uint_0
5557 and then Uint12 (E) /= No_Uint;
5558 end Known_Esize;
5560 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5561 begin
5562 return Uint8 (E) /= No_Uint;
5563 end Known_Normalized_First_Bit;
5565 function Known_Normalized_Position (E : Entity_Id) return B is
5566 begin
5567 return Uint14 (E) /= No_Uint;
5568 end Known_Normalized_Position;
5570 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5571 begin
5572 return Uint10 (E) /= No_Uint;
5573 end Known_Normalized_Position_Max;
5575 function Known_RM_Size (E : Entity_Id) return B is
5576 begin
5577 return Uint13 (E) /= No_Uint
5578 and then (Uint13 (E) /= Uint_0
5579 or else Is_Discrete_Type (E)
5580 or else Is_Fixed_Point_Type (E));
5581 end Known_RM_Size;
5583 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5584 begin
5585 return Uint11 (E) /= No_Uint
5586 and then Uint11 (E) >= Uint_0;
5587 end Known_Static_Component_Bit_Offset;
5589 function Known_Static_Component_Size (E : Entity_Id) return B is
5590 begin
5591 return Uint22 (Base_Type (E)) > Uint_0;
5592 end Known_Static_Component_Size;
5594 function Known_Static_Esize (E : Entity_Id) return B is
5595 begin
5596 return Uint12 (E) > Uint_0
5597 and then not Is_Generic_Type (E);
5598 end Known_Static_Esize;
5600 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5601 begin
5602 return Uint8 (E) /= No_Uint
5603 and then Uint8 (E) >= Uint_0;
5604 end Known_Static_Normalized_First_Bit;
5606 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5607 begin
5608 return Uint14 (E) /= No_Uint
5609 and then Uint14 (E) >= Uint_0;
5610 end Known_Static_Normalized_Position;
5612 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5613 begin
5614 return Uint10 (E) /= No_Uint
5615 and then Uint10 (E) >= Uint_0;
5616 end Known_Static_Normalized_Position_Max;
5618 function Known_Static_RM_Size (E : Entity_Id) return B is
5619 begin
5620 return (Uint13 (E) > Uint_0
5621 or else Is_Discrete_Type (E)
5622 or else Is_Fixed_Point_Type (E))
5623 and then not Is_Generic_Type (E);
5624 end Known_Static_RM_Size;
5626 function Unknown_Alignment (E : Entity_Id) return B is
5627 begin
5628 return Uint14 (E) = Uint_0
5629 or else Uint14 (E) = No_Uint;
5630 end Unknown_Alignment;
5632 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5633 begin
5634 return Uint11 (E) = No_Uint;
5635 end Unknown_Component_Bit_Offset;
5637 function Unknown_Component_Size (E : Entity_Id) return B is
5638 begin
5639 return Uint22 (Base_Type (E)) = Uint_0
5640 or else
5641 Uint22 (Base_Type (E)) = No_Uint;
5642 end Unknown_Component_Size;
5644 function Unknown_Esize (E : Entity_Id) return B is
5645 begin
5646 return Uint12 (E) = No_Uint
5647 or else
5648 Uint12 (E) = Uint_0;
5649 end Unknown_Esize;
5651 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5652 begin
5653 return Uint8 (E) = No_Uint;
5654 end Unknown_Normalized_First_Bit;
5656 function Unknown_Normalized_Position (E : Entity_Id) return B is
5657 begin
5658 return Uint14 (E) = No_Uint;
5659 end Unknown_Normalized_Position;
5661 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5662 begin
5663 return Uint10 (E) = No_Uint;
5664 end Unknown_Normalized_Position_Max;
5666 function Unknown_RM_Size (E : Entity_Id) return B is
5667 begin
5668 return (Uint13 (E) = Uint_0
5669 and then not Is_Discrete_Type (E)
5670 and then not Is_Fixed_Point_Type (E))
5671 or else Uint13 (E) = No_Uint;
5672 end Unknown_RM_Size;
5674 --------------------
5675 -- Address_Clause --
5676 --------------------
5678 function Address_Clause (Id : E) return N is
5679 begin
5680 return Rep_Clause (Id, Name_Address);
5681 end Address_Clause;
5683 ---------------
5684 -- Aft_Value --
5685 ---------------
5687 function Aft_Value (Id : E) return U is
5688 Result : Nat := 1;
5689 Delta_Val : Ureal := Delta_Value (Id);
5690 begin
5691 while Delta_Val < Ureal_Tenth loop
5692 Delta_Val := Delta_Val * Ureal_10;
5693 Result := Result + 1;
5694 end loop;
5696 return UI_From_Int (Result);
5697 end Aft_Value;
5699 ----------------------
5700 -- Alignment_Clause --
5701 ----------------------
5703 function Alignment_Clause (Id : E) return N is
5704 begin
5705 return Rep_Clause (Id, Name_Alignment);
5706 end Alignment_Clause;
5708 -------------------
5709 -- Append_Entity --
5710 -------------------
5712 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5713 begin
5714 if Last_Entity (V) = Empty then
5715 Set_First_Entity (Id => V, V => Id);
5716 else
5717 Set_Next_Entity (Last_Entity (V), Id);
5718 end if;
5720 Set_Next_Entity (Id, Empty);
5721 Set_Scope (Id, V);
5722 Set_Last_Entity (Id => V, V => Id);
5723 end Append_Entity;
5725 ---------------
5726 -- Base_Type --
5727 ---------------
5729 function Base_Type (Id : E) return E is
5730 begin
5731 if Is_Base_Type (Id) then
5732 return Id;
5733 else
5734 pragma Assert (Is_Type (Id));
5735 return Etype (Id);
5736 end if;
5737 end Base_Type;
5739 -------------------------
5740 -- Component_Alignment --
5741 -------------------------
5743 -- Component Alignment is encoded using two flags, Flag128/129 as
5744 -- follows. Note that both flags False = Align_Default, so that the
5745 -- default initialization of flags to False initializes component
5746 -- alignment to the default value as required.
5748 -- Flag128 Flag129 Value
5749 -- ------- ------- -----
5750 -- False False Calign_Default
5751 -- False True Calign_Component_Size
5752 -- True False Calign_Component_Size_4
5753 -- True True Calign_Storage_Unit
5755 function Component_Alignment (Id : E) return C is
5756 BT : constant Node_Id := Base_Type (Id);
5758 begin
5759 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5761 if Flag128 (BT) then
5762 if Flag129 (BT) then
5763 return Calign_Storage_Unit;
5764 else
5765 return Calign_Component_Size_4;
5766 end if;
5768 else
5769 if Flag129 (BT) then
5770 return Calign_Component_Size;
5771 else
5772 return Calign_Default;
5773 end if;
5774 end if;
5775 end Component_Alignment;
5777 ----------------------
5778 -- Declaration_Node --
5779 ----------------------
5781 function Declaration_Node (Id : E) return N is
5782 P : Node_Id;
5784 begin
5785 if Ekind (Id) = E_Incomplete_Type
5786 and then Present (Full_View (Id))
5787 then
5788 P := Parent (Full_View (Id));
5789 else
5790 P := Parent (Id);
5791 end if;
5793 loop
5794 if Nkind (P) /= N_Selected_Component
5795 and then Nkind (P) /= N_Expanded_Name
5796 and then
5797 not (Nkind (P) = N_Defining_Program_Unit_Name
5798 and then Is_Child_Unit (Id))
5799 then
5800 return P;
5801 else
5802 P := Parent (P);
5803 end if;
5804 end loop;
5805 end Declaration_Node;
5807 ---------------------
5808 -- Designated_Type --
5809 ---------------------
5811 function Designated_Type (Id : E) return E is
5812 Desig_Type : E;
5814 begin
5815 Desig_Type := Directly_Designated_Type (Id);
5817 if Ekind (Desig_Type) = E_Incomplete_Type
5818 and then Present (Full_View (Desig_Type))
5819 then
5820 return Full_View (Desig_Type);
5822 elsif Is_Class_Wide_Type (Desig_Type)
5823 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5824 and then Present (Full_View (Etype (Desig_Type)))
5825 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5826 then
5827 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5829 else
5830 return Desig_Type;
5831 end if;
5832 end Designated_Type;
5834 ----------------------
5835 -- Entry_Index_Type --
5836 ----------------------
5838 function Entry_Index_Type (Id : E) return N is
5839 begin
5840 pragma Assert (Ekind (Id) = E_Entry_Family);
5841 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5842 end Entry_Index_Type;
5844 ---------------------
5845 -- First_Component --
5846 ---------------------
5848 function First_Component (Id : E) return E is
5849 Comp_Id : E;
5851 begin
5852 pragma Assert
5853 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5855 Comp_Id := First_Entity (Id);
5856 while Present (Comp_Id) loop
5857 exit when Ekind (Comp_Id) = E_Component;
5858 Comp_Id := Next_Entity (Comp_Id);
5859 end loop;
5861 return Comp_Id;
5862 end First_Component;
5864 -------------------------------------
5865 -- First_Component_Or_Discriminant --
5866 -------------------------------------
5868 function First_Component_Or_Discriminant (Id : E) return E is
5869 Comp_Id : E;
5871 begin
5872 pragma Assert
5873 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5875 Comp_Id := First_Entity (Id);
5876 while Present (Comp_Id) loop
5877 exit when Ekind (Comp_Id) = E_Component
5878 or else
5879 Ekind (Comp_Id) = E_Discriminant;
5880 Comp_Id := Next_Entity (Comp_Id);
5881 end loop;
5883 return Comp_Id;
5884 end First_Component_Or_Discriminant;
5886 ------------------
5887 -- First_Formal --
5888 ------------------
5890 function First_Formal (Id : E) return E is
5891 Formal : E;
5893 begin
5894 pragma Assert
5895 (Is_Overloadable (Id)
5896 or else Ekind_In (Id, E_Entry_Family,
5897 E_Subprogram_Body,
5898 E_Subprogram_Type));
5900 if Ekind (Id) = E_Enumeration_Literal then
5901 return Empty;
5903 else
5904 Formal := First_Entity (Id);
5906 if Present (Formal) and then Is_Formal (Formal) then
5907 return Formal;
5908 else
5909 return Empty;
5910 end if;
5911 end if;
5912 end First_Formal;
5914 ------------------------------
5915 -- First_Formal_With_Extras --
5916 ------------------------------
5918 function First_Formal_With_Extras (Id : E) return E is
5919 Formal : E;
5921 begin
5922 pragma Assert
5923 (Is_Overloadable (Id)
5924 or else Ekind_In (Id, E_Entry_Family,
5925 E_Subprogram_Body,
5926 E_Subprogram_Type));
5928 if Ekind (Id) = E_Enumeration_Literal then
5929 return Empty;
5931 else
5932 Formal := First_Entity (Id);
5934 if Present (Formal) and then Is_Formal (Formal) then
5935 return Formal;
5936 else
5937 return Extra_Formals (Id); -- Empty if no extra formals
5938 end if;
5939 end if;
5940 end First_Formal_With_Extras;
5942 -------------------------------------
5943 -- Get_Attribute_Definition_Clause --
5944 -------------------------------------
5946 function Get_Attribute_Definition_Clause
5947 (E : Entity_Id;
5948 Id : Attribute_Id) return Node_Id
5950 N : Node_Id;
5952 begin
5953 N := First_Rep_Item (E);
5954 while Present (N) loop
5955 if Nkind (N) = N_Attribute_Definition_Clause
5956 and then Get_Attribute_Id (Chars (N)) = Id
5957 then
5958 return N;
5959 else
5960 Next_Rep_Item (N);
5961 end if;
5962 end loop;
5964 return Empty;
5965 end Get_Attribute_Definition_Clause;
5967 -------------------
5968 -- Get_Full_View --
5969 -------------------
5971 function Get_Full_View (T : Entity_Id) return Entity_Id is
5972 begin
5973 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5974 return Full_View (T);
5976 elsif Is_Class_Wide_Type (T)
5977 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5978 and then Present (Full_View (Root_Type (T)))
5979 then
5980 return Class_Wide_Type (Full_View (Root_Type (T)));
5982 else
5983 return T;
5984 end if;
5985 end Get_Full_View;
5987 --------------------------------------
5988 -- Get_Record_Representation_Clause --
5989 --------------------------------------
5991 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5992 N : Node_Id;
5994 begin
5995 N := First_Rep_Item (E);
5996 while Present (N) loop
5997 if Nkind (N) = N_Record_Representation_Clause then
5998 return N;
5999 end if;
6001 Next_Rep_Item (N);
6002 end loop;
6004 return Empty;
6005 end Get_Record_Representation_Clause;
6007 -----------------------------
6008 -- Get_Rep_Item_For_Entity --
6009 -----------------------------
6011 function Get_Rep_Item_For_Entity
6012 (E : Entity_Id;
6013 Nam : Name_Id) return Node_Id
6015 N : Node_Id;
6016 Arg : Node_Id;
6018 begin
6019 N := First_Rep_Item (E);
6020 while Present (N) loop
6021 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6022 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
6024 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
6025 return N;
6026 end if;
6028 elsif Nkind (N) = N_Attribute_Definition_Clause
6029 and then Chars (N) = Nam
6030 and then Entity (N) = E
6031 then
6032 return N;
6034 elsif Nkind (N) = N_Aspect_Specification
6035 and then Chars (Identifier (N)) = Nam
6036 and then Entity (N) = E
6037 then
6038 return N;
6039 end if;
6041 Next_Rep_Item (N);
6042 end loop;
6044 return Empty;
6045 end Get_Rep_Item_For_Entity;
6047 --------------------
6048 -- Get_Rep_Pragma --
6049 --------------------
6051 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6052 N : Node_Id;
6054 begin
6055 N := First_Rep_Item (E);
6056 while Present (N) loop
6057 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6058 return N;
6059 end if;
6061 Next_Rep_Item (N);
6062 end loop;
6064 return Empty;
6065 end Get_Rep_Pragma;
6067 ------------------------
6068 -- Has_Attach_Handler --
6069 ------------------------
6071 function Has_Attach_Handler (Id : E) return B is
6072 Ritem : Node_Id;
6074 begin
6075 pragma Assert (Is_Protected_Type (Id));
6077 Ritem := First_Rep_Item (Id);
6078 while Present (Ritem) loop
6079 if Nkind (Ritem) = N_Pragma
6080 and then Pragma_Name (Ritem) = Name_Attach_Handler
6081 then
6082 return True;
6083 else
6084 Next_Rep_Item (Ritem);
6085 end if;
6086 end loop;
6088 return False;
6089 end Has_Attach_Handler;
6091 -------------------------------------
6092 -- Has_Attribute_Definition_Clause --
6093 -------------------------------------
6095 function Has_Attribute_Definition_Clause
6096 (E : Entity_Id;
6097 Id : Attribute_Id) return Boolean
6099 begin
6100 return Present (Get_Attribute_Definition_Clause (E, Id));
6101 end Has_Attribute_Definition_Clause;
6103 -----------------
6104 -- Has_Entries --
6105 -----------------
6107 function Has_Entries (Id : E) return B is
6108 Ent : Entity_Id;
6110 begin
6111 pragma Assert (Is_Concurrent_Type (Id));
6113 Ent := First_Entity (Id);
6114 while Present (Ent) loop
6115 if Is_Entry (Ent) then
6116 return True;
6117 end if;
6119 Ent := Next_Entity (Ent);
6120 end loop;
6122 return False;
6123 end Has_Entries;
6125 ----------------------------
6126 -- Has_Foreign_Convention --
6127 ----------------------------
6129 function Has_Foreign_Convention (Id : E) return B is
6130 begin
6131 -- While regular Intrinsics such as the Standard operators fit in the
6132 -- "Ada" convention, those with an Interface_Name materialize GCC
6133 -- builtin imports for which Ada special treatments shouldn't apply.
6135 return Convention (Id) in Foreign_Convention
6136 or else (Convention (Id) = Convention_Intrinsic
6137 and then Present (Interface_Name (Id)));
6138 end Has_Foreign_Convention;
6140 ---------------------------
6141 -- Has_Interrupt_Handler --
6142 ---------------------------
6144 function Has_Interrupt_Handler (Id : E) return B is
6145 Ritem : Node_Id;
6147 begin
6148 pragma Assert (Is_Protected_Type (Id));
6150 Ritem := First_Rep_Item (Id);
6151 while Present (Ritem) loop
6152 if Nkind (Ritem) = N_Pragma
6153 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6154 then
6155 return True;
6156 else
6157 Next_Rep_Item (Ritem);
6158 end if;
6159 end loop;
6161 return False;
6162 end Has_Interrupt_Handler;
6164 --------------------
6165 -- Has_Rep_Pragma --
6166 --------------------
6168 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6169 begin
6170 return Present (Get_Rep_Pragma (E, Nam));
6171 end Has_Rep_Pragma;
6173 --------------------
6174 -- Has_Unmodified --
6175 --------------------
6177 function Has_Unmodified (E : Entity_Id) return Boolean is
6178 begin
6179 if Has_Pragma_Unmodified (E) then
6180 return True;
6181 elsif Warnings_Off (E) then
6182 Set_Warnings_Off_Used_Unmodified (E);
6183 return True;
6184 else
6185 return False;
6186 end if;
6187 end Has_Unmodified;
6189 ---------------------
6190 -- Has_Unreferenced --
6191 ---------------------
6193 function Has_Unreferenced (E : Entity_Id) return Boolean is
6194 begin
6195 if Has_Pragma_Unreferenced (E) then
6196 return True;
6197 elsif Warnings_Off (E) then
6198 Set_Warnings_Off_Used_Unreferenced (E);
6199 return True;
6200 else
6201 return False;
6202 end if;
6203 end Has_Unreferenced;
6205 ----------------------
6206 -- Has_Warnings_Off --
6207 ----------------------
6209 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6210 begin
6211 if Warnings_Off (E) then
6212 Set_Warnings_Off_Used (E);
6213 return True;
6214 else
6215 return False;
6216 end if;
6217 end Has_Warnings_Off;
6219 ------------------------------
6220 -- Implementation_Base_Type --
6221 ------------------------------
6223 function Implementation_Base_Type (Id : E) return E is
6224 Bastyp : Entity_Id;
6225 Imptyp : Entity_Id;
6227 begin
6228 Bastyp := Base_Type (Id);
6230 if Is_Incomplete_Or_Private_Type (Bastyp) then
6231 Imptyp := Underlying_Type (Bastyp);
6233 -- If we have an implementation type, then just return it,
6234 -- otherwise we return the Base_Type anyway. This can only
6235 -- happen in error situations and should avoid some error bombs.
6237 if Present (Imptyp) then
6238 return Base_Type (Imptyp);
6239 else
6240 return Bastyp;
6241 end if;
6243 else
6244 return Bastyp;
6245 end if;
6246 end Implementation_Base_Type;
6248 -------------------------
6249 -- Invariant_Procedure --
6250 -------------------------
6252 function Invariant_Procedure (Id : E) return E is
6253 S : Entity_Id;
6255 begin
6256 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6258 if No (Subprograms_For_Type (Id)) then
6259 return Empty;
6261 else
6262 S := Subprograms_For_Type (Id);
6263 while Present (S) loop
6264 if Has_Invariants (S) then
6265 return S;
6266 else
6267 S := Subprograms_For_Type (S);
6268 end if;
6269 end loop;
6271 return Empty;
6272 end if;
6273 end Invariant_Procedure;
6275 ------------------
6276 -- Is_Base_Type --
6277 ------------------
6279 -- Global flag table allowing rapid computation of this function
6281 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6282 (E_Enumeration_Subtype |
6283 E_Incomplete_Type |
6284 E_Signed_Integer_Subtype |
6285 E_Modular_Integer_Subtype |
6286 E_Floating_Point_Subtype |
6287 E_Ordinary_Fixed_Point_Subtype |
6288 E_Decimal_Fixed_Point_Subtype |
6289 E_Array_Subtype |
6290 E_String_Subtype |
6291 E_Record_Subtype |
6292 E_Private_Subtype |
6293 E_Record_Subtype_With_Private |
6294 E_Limited_Private_Subtype |
6295 E_Access_Subtype |
6296 E_Protected_Subtype |
6297 E_Task_Subtype |
6298 E_String_Literal_Subtype |
6299 E_Class_Wide_Subtype => False,
6300 others => True);
6302 function Is_Base_Type (Id : E) return Boolean is
6303 begin
6304 return Entity_Is_Base_Type (Ekind (Id));
6305 end Is_Base_Type;
6307 ---------------------
6308 -- Is_Boolean_Type --
6309 ---------------------
6311 function Is_Boolean_Type (Id : E) return B is
6312 begin
6313 return Root_Type (Id) = Standard_Boolean;
6314 end Is_Boolean_Type;
6316 ------------------------
6317 -- Is_Constant_Object --
6318 ------------------------
6320 function Is_Constant_Object (Id : E) return B is
6321 K : constant Entity_Kind := Ekind (Id);
6322 begin
6323 return
6324 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6325 end Is_Constant_Object;
6327 --------------------
6328 -- Is_Discriminal --
6329 --------------------
6331 function Is_Discriminal (Id : E) return B is
6332 begin
6333 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6334 and then Present (Discriminal_Link (Id)));
6335 end Is_Discriminal;
6337 ----------------------
6338 -- Is_Dynamic_Scope --
6339 ----------------------
6341 function Is_Dynamic_Scope (Id : E) return B is
6342 begin
6343 return
6344 Ekind (Id) = E_Block
6345 or else
6346 Ekind (Id) = E_Function
6347 or else
6348 Ekind (Id) = E_Procedure
6349 or else
6350 Ekind (Id) = E_Subprogram_Body
6351 or else
6352 Ekind (Id) = E_Task_Type
6353 or else
6354 (Ekind (Id) = E_Limited_Private_Type
6355 and then Present (Full_View (Id))
6356 and then Ekind (Full_View (Id)) = E_Task_Type)
6357 or else
6358 Ekind (Id) = E_Entry
6359 or else
6360 Ekind (Id) = E_Entry_Family
6361 or else
6362 Ekind (Id) = E_Return_Statement;
6363 end Is_Dynamic_Scope;
6365 --------------------
6366 -- Is_Entity_Name --
6367 --------------------
6369 function Is_Entity_Name (N : Node_Id) return Boolean is
6370 Kind : constant Node_Kind := Nkind (N);
6372 begin
6373 -- Identifiers, operator symbols, expanded names are entity names
6375 return Kind = N_Identifier
6376 or else Kind = N_Operator_Symbol
6377 or else Kind = N_Expanded_Name
6379 -- Attribute references are entity names if they refer to an entity.
6380 -- Note that we don't do this by testing for the presence of the
6381 -- Entity field in the N_Attribute_Reference node, since it may not
6382 -- have been set yet.
6384 or else (Kind = N_Attribute_Reference
6385 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6386 end Is_Entity_Name;
6388 ------------------
6389 -- Is_Finalizer --
6390 ------------------
6392 function Is_Finalizer (Id : E) return B is
6393 begin
6394 return Ekind (Id) = E_Procedure
6395 and then Chars (Id) = Name_uFinalizer;
6396 end Is_Finalizer;
6398 -----------------------------------
6399 -- Is_Package_Or_Generic_Package --
6400 -----------------------------------
6402 function Is_Package_Or_Generic_Package (Id : E) return B is
6403 begin
6404 return
6405 Ekind (Id) = E_Package
6406 or else
6407 Ekind (Id) = E_Generic_Package;
6408 end Is_Package_Or_Generic_Package;
6410 ------------------------
6411 -- Predicate_Function --
6412 ------------------------
6414 function Predicate_Function (Id : E) return E is
6415 S : Entity_Id;
6417 begin
6418 pragma Assert (Is_Type (Id));
6420 if No (Subprograms_For_Type (Id)) then
6421 return Empty;
6423 else
6424 S := Subprograms_For_Type (Id);
6425 while Present (S) loop
6426 if Has_Predicates (S) then
6427 return S;
6428 else
6429 S := Subprograms_For_Type (S);
6430 end if;
6431 end loop;
6433 return Empty;
6434 end if;
6435 end Predicate_Function;
6437 ---------------
6438 -- Is_Prival --
6439 ---------------
6441 function Is_Prival (Id : E) return B is
6442 begin
6443 return (Ekind_In (Id, E_Constant, E_Variable)
6444 and then Present (Prival_Link (Id)));
6445 end Is_Prival;
6447 ----------------------------
6448 -- Is_Protected_Component --
6449 ----------------------------
6451 function Is_Protected_Component (Id : E) return B is
6452 begin
6453 return Ekind (Id) = E_Component
6454 and then Is_Protected_Type (Scope (Id));
6455 end Is_Protected_Component;
6457 ----------------------------
6458 -- Is_Protected_Interface --
6459 ----------------------------
6461 function Is_Protected_Interface (Id : E) return B is
6462 Typ : constant Entity_Id := Base_Type (Id);
6463 begin
6464 if not Is_Interface (Typ) then
6465 return False;
6466 elsif Is_Class_Wide_Type (Typ) then
6467 return Is_Protected_Interface (Etype (Typ));
6468 else
6469 return Protected_Present (Type_Definition (Parent (Typ)));
6470 end if;
6471 end Is_Protected_Interface;
6473 ------------------------------
6474 -- Is_Protected_Record_Type --
6475 ------------------------------
6477 function Is_Protected_Record_Type (Id : E) return B is
6478 begin
6479 return
6480 Is_Concurrent_Record_Type (Id)
6481 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6482 end Is_Protected_Record_Type;
6484 --------------------------------
6485 -- Is_Standard_Character_Type --
6486 --------------------------------
6488 function Is_Standard_Character_Type (Id : E) return B is
6489 begin
6490 if Is_Type (Id) then
6491 declare
6492 R : constant Entity_Id := Root_Type (Id);
6493 begin
6494 return
6495 R = Standard_Character
6496 or else
6497 R = Standard_Wide_Character
6498 or else
6499 R = Standard_Wide_Wide_Character;
6500 end;
6502 else
6503 return False;
6504 end if;
6505 end Is_Standard_Character_Type;
6507 --------------------
6508 -- Is_String_Type --
6509 --------------------
6511 function Is_String_Type (Id : E) return B is
6512 begin
6513 return Ekind (Id) in String_Kind
6514 or else (Is_Array_Type (Id)
6515 and then Id /= Any_Composite
6516 and then Number_Dimensions (Id) = 1
6517 and then Is_Character_Type (Component_Type (Id)));
6518 end Is_String_Type;
6520 -------------------------------
6521 -- Is_Synchronized_Interface --
6522 -------------------------------
6524 function Is_Synchronized_Interface (Id : E) return B is
6525 Typ : constant Entity_Id := Base_Type (Id);
6527 begin
6528 if not Is_Interface (Typ) then
6529 return False;
6531 elsif Is_Class_Wide_Type (Typ) then
6532 return Is_Synchronized_Interface (Etype (Typ));
6534 else
6535 return Protected_Present (Type_Definition (Parent (Typ)))
6536 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6537 or else Task_Present (Type_Definition (Parent (Typ)));
6538 end if;
6539 end Is_Synchronized_Interface;
6541 -----------------------
6542 -- Is_Task_Interface --
6543 -----------------------
6545 function Is_Task_Interface (Id : E) return B is
6546 Typ : constant Entity_Id := Base_Type (Id);
6547 begin
6548 if not Is_Interface (Typ) then
6549 return False;
6550 elsif Is_Class_Wide_Type (Typ) then
6551 return Is_Task_Interface (Etype (Typ));
6552 else
6553 return Task_Present (Type_Definition (Parent (Typ)));
6554 end if;
6555 end Is_Task_Interface;
6557 -------------------------
6558 -- Is_Task_Record_Type --
6559 -------------------------
6561 function Is_Task_Record_Type (Id : E) return B is
6562 begin
6563 return
6564 Is_Concurrent_Record_Type (Id)
6565 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6566 end Is_Task_Record_Type;
6568 ------------------------
6569 -- Is_Wrapper_Package --
6570 ------------------------
6572 function Is_Wrapper_Package (Id : E) return B is
6573 begin
6574 return (Ekind (Id) = E_Package
6575 and then Present (Related_Instance (Id)));
6576 end Is_Wrapper_Package;
6578 -----------------
6579 -- Last_Formal --
6580 -----------------
6582 function Last_Formal (Id : E) return E is
6583 Formal : E;
6585 begin
6586 pragma Assert
6587 (Is_Overloadable (Id)
6588 or else Ekind_In (Id, E_Entry_Family,
6589 E_Subprogram_Body,
6590 E_Subprogram_Type));
6592 if Ekind (Id) = E_Enumeration_Literal then
6593 return Empty;
6595 else
6596 Formal := First_Formal (Id);
6598 if Present (Formal) then
6599 while Present (Next_Formal (Formal)) loop
6600 Formal := Next_Formal (Formal);
6601 end loop;
6602 end if;
6604 return Formal;
6605 end if;
6606 end Last_Formal;
6608 function Model_Emin_Value (Id : E) return Uint is
6609 begin
6610 return Machine_Emin_Value (Id);
6611 end Model_Emin_Value;
6613 -------------------------
6614 -- Model_Epsilon_Value --
6615 -------------------------
6617 function Model_Epsilon_Value (Id : E) return Ureal is
6618 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6619 begin
6620 return Radix ** (1 - Model_Mantissa_Value (Id));
6621 end Model_Epsilon_Value;
6623 --------------------------
6624 -- Model_Mantissa_Value --
6625 --------------------------
6627 function Model_Mantissa_Value (Id : E) return Uint is
6628 begin
6629 return Machine_Mantissa_Value (Id);
6630 end Model_Mantissa_Value;
6632 -----------------------
6633 -- Model_Small_Value --
6634 -----------------------
6636 function Model_Small_Value (Id : E) return Ureal is
6637 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6638 begin
6639 return Radix ** (Model_Emin_Value (Id) - 1);
6640 end Model_Small_Value;
6642 ------------------------
6643 -- Machine_Emax_Value --
6644 ------------------------
6646 function Machine_Emax_Value (Id : E) return Uint is
6647 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6649 begin
6650 case Float_Rep (Id) is
6651 when IEEE_Binary =>
6652 case Digs is
6653 when 1 .. 6 => return Uint_128;
6654 when 7 .. 15 => return 2**10;
6655 when 16 .. 33 => return 2**14;
6656 when others => return No_Uint;
6657 end case;
6659 when VAX_Native =>
6660 case Digs is
6661 when 1 .. 9 => return 2**7 - 1;
6662 when 10 .. 15 => return 2**10 - 1;
6663 when others => return No_Uint;
6664 end case;
6666 when AAMP =>
6667 return Uint_2 ** Uint_7 - Uint_1;
6668 end case;
6669 end Machine_Emax_Value;
6671 ------------------------
6672 -- Machine_Emin_Value --
6673 ------------------------
6675 function Machine_Emin_Value (Id : E) return Uint is
6676 begin
6677 case Float_Rep (Id) is
6678 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6679 when VAX_Native => return -Machine_Emax_Value (Id);
6680 when AAMP => return -Machine_Emax_Value (Id);
6681 end case;
6682 end Machine_Emin_Value;
6684 ----------------------------
6685 -- Machine_Mantissa_Value --
6686 ----------------------------
6688 function Machine_Mantissa_Value (Id : E) return Uint is
6689 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6691 begin
6692 case Float_Rep (Id) is
6693 when IEEE_Binary =>
6694 case Digs is
6695 when 1 .. 6 => return Uint_24;
6696 when 7 .. 15 => return UI_From_Int (53);
6697 when 16 .. 18 => return Uint_64;
6698 when 19 .. 33 => return UI_From_Int (113);
6699 when others => return No_Uint;
6700 end case;
6702 when VAX_Native =>
6703 case Digs is
6704 when 1 .. 6 => return Uint_24;
6705 when 7 .. 9 => return UI_From_Int (56);
6706 when 10 .. 15 => return UI_From_Int (53);
6707 when others => return No_Uint;
6708 end case;
6710 when AAMP =>
6711 case Digs is
6712 when 1 .. 6 => return Uint_24;
6713 when 7 .. 9 => return UI_From_Int (40);
6714 when others => return No_Uint;
6715 end case;
6716 end case;
6717 end Machine_Mantissa_Value;
6719 -------------------------
6720 -- Machine_Radix_Value --
6721 -------------------------
6723 function Machine_Radix_Value (Id : E) return U is
6724 begin
6725 case Float_Rep (Id) is
6726 when IEEE_Binary | VAX_Native | AAMP =>
6727 return Uint_2;
6728 end case;
6729 end Machine_Radix_Value;
6731 --------------------
6732 -- Next_Component --
6733 --------------------
6735 function Next_Component (Id : E) return E is
6736 Comp_Id : E;
6738 begin
6739 Comp_Id := Next_Entity (Id);
6740 while Present (Comp_Id) loop
6741 exit when Ekind (Comp_Id) = E_Component;
6742 Comp_Id := Next_Entity (Comp_Id);
6743 end loop;
6745 return Comp_Id;
6746 end Next_Component;
6748 ------------------------------------
6749 -- Next_Component_Or_Discriminant --
6750 ------------------------------------
6752 function Next_Component_Or_Discriminant (Id : E) return E is
6753 Comp_Id : E;
6755 begin
6756 Comp_Id := Next_Entity (Id);
6757 while Present (Comp_Id) loop
6758 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6759 Comp_Id := Next_Entity (Comp_Id);
6760 end loop;
6762 return Comp_Id;
6763 end Next_Component_Or_Discriminant;
6765 -----------------------
6766 -- Next_Discriminant --
6767 -----------------------
6769 -- This function actually implements both Next_Discriminant and
6770 -- Next_Stored_Discriminant by making sure that the Discriminant
6771 -- returned is of the same variety as Id.
6773 function Next_Discriminant (Id : E) return E is
6775 -- Derived Tagged types with private extensions look like this...
6777 -- E_Discriminant d1
6778 -- E_Discriminant d2
6779 -- E_Component _tag
6780 -- E_Discriminant d1
6781 -- E_Discriminant d2
6782 -- ...
6784 -- so it is critical not to go past the leading discriminants
6786 D : E := Id;
6788 begin
6789 pragma Assert (Ekind (Id) = E_Discriminant);
6791 loop
6792 D := Next_Entity (D);
6793 if No (D)
6794 or else (Ekind (D) /= E_Discriminant
6795 and then not Is_Itype (D))
6796 then
6797 return Empty;
6798 end if;
6800 exit when Ekind (D) = E_Discriminant
6801 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6802 end loop;
6804 return D;
6805 end Next_Discriminant;
6807 -----------------
6808 -- Next_Formal --
6809 -----------------
6811 function Next_Formal (Id : E) return E is
6812 P : E;
6814 begin
6815 -- Follow the chain of declared entities as long as the kind of the
6816 -- entity corresponds to a formal parameter. Skip internal entities
6817 -- that may have been created for implicit subtypes, in the process
6818 -- of analyzing default expressions.
6820 P := Id;
6821 loop
6822 P := Next_Entity (P);
6824 if No (P) or else Is_Formal (P) then
6825 return P;
6826 elsif not Is_Internal (P) then
6827 return Empty;
6828 end if;
6829 end loop;
6830 end Next_Formal;
6832 -----------------------------
6833 -- Next_Formal_With_Extras --
6834 -----------------------------
6836 function Next_Formal_With_Extras (Id : E) return E is
6837 begin
6838 if Present (Extra_Formal (Id)) then
6839 return Extra_Formal (Id);
6840 else
6841 return Next_Formal (Id);
6842 end if;
6843 end Next_Formal_With_Extras;
6845 ----------------
6846 -- Next_Index --
6847 ----------------
6849 function Next_Index (Id : Node_Id) return Node_Id is
6850 begin
6851 return Next (Id);
6852 end Next_Index;
6854 ------------------
6855 -- Next_Literal --
6856 ------------------
6858 function Next_Literal (Id : E) return E is
6859 begin
6860 pragma Assert (Nkind (Id) in N_Entity);
6861 return Next (Id);
6862 end Next_Literal;
6864 ------------------------------
6865 -- Next_Stored_Discriminant --
6866 ------------------------------
6868 function Next_Stored_Discriminant (Id : E) return E is
6869 begin
6870 -- See comment in Next_Discriminant
6872 return Next_Discriminant (Id);
6873 end Next_Stored_Discriminant;
6875 -----------------------
6876 -- Number_Dimensions --
6877 -----------------------
6879 function Number_Dimensions (Id : E) return Pos is
6880 N : Int;
6881 T : Node_Id;
6883 begin
6884 if Ekind (Id) in String_Kind then
6885 return 1;
6887 else
6888 N := 0;
6889 T := First_Index (Id);
6890 while Present (T) loop
6891 N := N + 1;
6892 T := Next (T);
6893 end loop;
6895 return N;
6896 end if;
6897 end Number_Dimensions;
6899 --------------------
6900 -- Number_Entries --
6901 --------------------
6903 function Number_Entries (Id : E) return Nat is
6904 N : Int;
6905 Ent : Entity_Id;
6907 begin
6908 pragma Assert (Is_Concurrent_Type (Id));
6910 N := 0;
6911 Ent := First_Entity (Id);
6912 while Present (Ent) loop
6913 if Is_Entry (Ent) then
6914 N := N + 1;
6915 end if;
6917 Ent := Next_Entity (Ent);
6918 end loop;
6920 return N;
6921 end Number_Entries;
6923 --------------------
6924 -- Number_Formals --
6925 --------------------
6927 function Number_Formals (Id : E) return Pos is
6928 N : Int;
6929 Formal : Entity_Id;
6931 begin
6932 N := 0;
6933 Formal := First_Formal (Id);
6934 while Present (Formal) loop
6935 N := N + 1;
6936 Formal := Next_Formal (Formal);
6937 end loop;
6939 return N;
6940 end Number_Formals;
6942 --------------------
6943 -- Parameter_Mode --
6944 --------------------
6946 function Parameter_Mode (Id : E) return Formal_Kind is
6947 begin
6948 return Ekind (Id);
6949 end Parameter_Mode;
6951 --------------------------
6952 -- Primitive_Operations --
6953 --------------------------
6955 function Primitive_Operations (Id : E) return L is
6956 begin
6957 if Is_Concurrent_Type (Id) then
6958 if Present (Corresponding_Record_Type (Id)) then
6959 return Direct_Primitive_Operations
6960 (Corresponding_Record_Type (Id));
6962 -- If expansion is disabled the corresponding record type is absent,
6963 -- but if the type has ancestors it may have primitive operations.
6965 elsif Is_Tagged_Type (Id) then
6966 return Direct_Primitive_Operations (Id);
6968 else
6969 return No_Elist;
6970 end if;
6971 else
6972 return Direct_Primitive_Operations (Id);
6973 end if;
6974 end Primitive_Operations;
6976 ---------------------
6977 -- Record_Rep_Item --
6978 ---------------------
6980 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6981 begin
6982 Set_Next_Rep_Item (N, First_Rep_Item (E));
6983 Set_First_Rep_Item (E, N);
6984 end Record_Rep_Item;
6986 ---------------
6987 -- Root_Type --
6988 ---------------
6990 function Root_Type (Id : E) return E is
6991 T, Etyp : E;
6993 begin
6994 pragma Assert (Nkind (Id) in N_Entity);
6996 T := Base_Type (Id);
6998 if Ekind (T) = E_Class_Wide_Type then
6999 return Etype (T);
7001 -- Other cases
7003 else
7004 loop
7005 Etyp := Etype (T);
7007 if T = Etyp then
7008 return T;
7010 -- Following test catches some error cases resulting from
7011 -- previous errors.
7013 elsif No (Etyp) then
7014 return T;
7016 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7017 return T;
7019 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7020 return T;
7021 end if;
7023 T := Etyp;
7025 -- Return if there is a circularity in the inheritance chain. This
7026 -- happens in some error situations and we do not want to get
7027 -- stuck in this loop.
7029 if T = Base_Type (Id) then
7030 return T;
7031 end if;
7032 end loop;
7033 end if;
7034 end Root_Type;
7036 ---------------------
7037 -- Safe_Emax_Value --
7038 ---------------------
7040 function Safe_Emax_Value (Id : E) return Uint is
7041 begin
7042 return Machine_Emax_Value (Id);
7043 end Safe_Emax_Value;
7045 ----------------------
7046 -- Safe_First_Value --
7047 ----------------------
7049 function Safe_First_Value (Id : E) return Ureal is
7050 begin
7051 return -Safe_Last_Value (Id);
7052 end Safe_First_Value;
7054 ---------------------
7055 -- Safe_Last_Value --
7056 ---------------------
7058 function Safe_Last_Value (Id : E) return Ureal is
7059 Radix : constant Uint := Machine_Radix_Value (Id);
7060 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7061 Emax : constant Uint := Safe_Emax_Value (Id);
7062 Significand : constant Uint := Radix ** Mantissa - 1;
7063 Exponent : constant Uint := Emax - Mantissa;
7065 begin
7066 if Radix = 2 then
7067 return
7068 UR_From_Components
7069 (Num => Significand * 2 ** (Exponent mod 4),
7070 Den => -Exponent / 4,
7071 Rbase => 16);
7073 else
7074 return
7075 UR_From_Components
7076 (Num => Significand,
7077 Den => -Exponent,
7078 Rbase => 16);
7079 end if;
7080 end Safe_Last_Value;
7082 -----------------
7083 -- Scope_Depth --
7084 -----------------
7086 function Scope_Depth (Id : E) return Uint is
7087 Scop : Entity_Id;
7089 begin
7090 Scop := Id;
7091 while Is_Record_Type (Scop) loop
7092 Scop := Scope (Scop);
7093 end loop;
7095 return Scope_Depth_Value (Scop);
7096 end Scope_Depth;
7098 ---------------------
7099 -- Scope_Depth_Set --
7100 ---------------------
7102 function Scope_Depth_Set (Id : E) return B is
7103 begin
7104 return not Is_Record_Type (Id)
7105 and then Field22 (Id) /= Union_Id (Empty);
7106 end Scope_Depth_Set;
7108 -----------------------------
7109 -- Set_Component_Alignment --
7110 -----------------------------
7112 -- Component Alignment is encoded using two flags, Flag128/129 as
7113 -- follows. Note that both flags False = Align_Default, so that the
7114 -- default initialization of flags to False initializes component
7115 -- alignment to the default value as required.
7117 -- Flag128 Flag129 Value
7118 -- ------- ------- -----
7119 -- False False Calign_Default
7120 -- False True Calign_Component_Size
7121 -- True False Calign_Component_Size_4
7122 -- True True Calign_Storage_Unit
7124 procedure Set_Component_Alignment (Id : E; V : C) is
7125 begin
7126 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7127 and then Is_Base_Type (Id));
7129 case V is
7130 when Calign_Default =>
7131 Set_Flag128 (Id, False);
7132 Set_Flag129 (Id, False);
7134 when Calign_Component_Size =>
7135 Set_Flag128 (Id, False);
7136 Set_Flag129 (Id, True);
7138 when Calign_Component_Size_4 =>
7139 Set_Flag128 (Id, True);
7140 Set_Flag129 (Id, False);
7142 when Calign_Storage_Unit =>
7143 Set_Flag128 (Id, True);
7144 Set_Flag129 (Id, True);
7145 end case;
7146 end Set_Component_Alignment;
7148 -----------------------------
7149 -- Set_Invariant_Procedure --
7150 -----------------------------
7152 procedure Set_Invariant_Procedure (Id : E; V : E) is
7153 S : Entity_Id;
7155 begin
7156 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7158 S := Subprograms_For_Type (Id);
7159 Set_Subprograms_For_Type (Id, V);
7161 while Present (S) loop
7162 if Has_Invariants (S) then
7163 raise Program_Error;
7164 else
7165 S := Subprograms_For_Type (S);
7166 end if;
7167 end loop;
7169 Set_Subprograms_For_Type (Id, V);
7170 end Set_Invariant_Procedure;
7172 ----------------------------
7173 -- Set_Predicate_Function --
7174 ----------------------------
7176 procedure Set_Predicate_Function (Id : E; V : E) is
7177 S : Entity_Id;
7179 begin
7180 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7182 S := Subprograms_For_Type (Id);
7183 Set_Subprograms_For_Type (Id, V);
7185 while Present (S) loop
7186 if Has_Predicates (S) then
7187 raise Program_Error;
7188 else
7189 S := Subprograms_For_Type (S);
7190 end if;
7191 end loop;
7193 Set_Subprograms_For_Type (Id, V);
7194 end Set_Predicate_Function;
7196 -----------------
7197 -- Size_Clause --
7198 -----------------
7200 function Size_Clause (Id : E) return N is
7201 begin
7202 return Rep_Clause (Id, Name_Size);
7203 end Size_Clause;
7205 ------------------------
7206 -- Stream_Size_Clause --
7207 ------------------------
7209 function Stream_Size_Clause (Id : E) return N is
7210 begin
7211 return Rep_Clause (Id, Name_Stream_Size);
7212 end Stream_Size_Clause;
7214 ------------------
7215 -- Subtype_Kind --
7216 ------------------
7218 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7219 Kind : Entity_Kind;
7221 begin
7222 case K is
7223 when Access_Kind =>
7224 Kind := E_Access_Subtype;
7226 when E_Array_Type |
7227 E_Array_Subtype =>
7228 Kind := E_Array_Subtype;
7230 when E_Class_Wide_Type |
7231 E_Class_Wide_Subtype =>
7232 Kind := E_Class_Wide_Subtype;
7234 when E_Decimal_Fixed_Point_Type |
7235 E_Decimal_Fixed_Point_Subtype =>
7236 Kind := E_Decimal_Fixed_Point_Subtype;
7238 when E_Ordinary_Fixed_Point_Type |
7239 E_Ordinary_Fixed_Point_Subtype =>
7240 Kind := E_Ordinary_Fixed_Point_Subtype;
7242 when E_Private_Type |
7243 E_Private_Subtype =>
7244 Kind := E_Private_Subtype;
7246 when E_Limited_Private_Type |
7247 E_Limited_Private_Subtype =>
7248 Kind := E_Limited_Private_Subtype;
7250 when E_Record_Type_With_Private |
7251 E_Record_Subtype_With_Private =>
7252 Kind := E_Record_Subtype_With_Private;
7254 when E_Record_Type |
7255 E_Record_Subtype =>
7256 Kind := E_Record_Subtype;
7258 when E_String_Type |
7259 E_String_Subtype =>
7260 Kind := E_String_Subtype;
7262 when Enumeration_Kind =>
7263 Kind := E_Enumeration_Subtype;
7265 when Float_Kind =>
7266 Kind := E_Floating_Point_Subtype;
7268 when Signed_Integer_Kind =>
7269 Kind := E_Signed_Integer_Subtype;
7271 when Modular_Integer_Kind =>
7272 Kind := E_Modular_Integer_Subtype;
7274 when Protected_Kind =>
7275 Kind := E_Protected_Subtype;
7277 when Task_Kind =>
7278 Kind := E_Task_Subtype;
7280 when others =>
7281 Kind := E_Void;
7282 raise Program_Error;
7283 end case;
7285 return Kind;
7286 end Subtype_Kind;
7288 ---------------------
7289 -- Type_High_Bound --
7290 ---------------------
7292 function Type_High_Bound (Id : E) return Node_Id is
7293 Rng : constant Node_Id := Scalar_Range (Id);
7294 begin
7295 if Nkind (Rng) = N_Subtype_Indication then
7296 return High_Bound (Range_Expression (Constraint (Rng)));
7297 else
7298 return High_Bound (Rng);
7299 end if;
7300 end Type_High_Bound;
7302 --------------------
7303 -- Type_Low_Bound --
7304 --------------------
7306 function Type_Low_Bound (Id : E) return Node_Id is
7307 Rng : constant Node_Id := Scalar_Range (Id);
7308 begin
7309 if Nkind (Rng) = N_Subtype_Indication then
7310 return Low_Bound (Range_Expression (Constraint (Rng)));
7311 else
7312 return Low_Bound (Rng);
7313 end if;
7314 end Type_Low_Bound;
7316 ---------------------
7317 -- Underlying_Type --
7318 ---------------------
7320 function Underlying_Type (Id : E) return E is
7321 begin
7322 -- For record_with_private the underlying type is always the direct
7323 -- full view. Never try to take the full view of the parent it
7324 -- doesn't make sense.
7326 if Ekind (Id) = E_Record_Type_With_Private then
7327 return Full_View (Id);
7329 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7331 -- If we have an incomplete or private type with a full view,
7332 -- then we return the Underlying_Type of this full view
7334 if Present (Full_View (Id)) then
7335 if Id = Full_View (Id) then
7337 -- Previous error in declaration
7339 return Empty;
7341 else
7342 return Underlying_Type (Full_View (Id));
7343 end if;
7345 -- If we have an incomplete entity that comes from the limited
7346 -- view then we return the Underlying_Type of its non-limited
7347 -- view.
7349 elsif From_With_Type (Id)
7350 and then Present (Non_Limited_View (Id))
7351 then
7352 return Underlying_Type (Non_Limited_View (Id));
7354 -- Otherwise check for the case where we have a derived type or
7355 -- subtype, and if so get the Underlying_Type of the parent type.
7357 elsif Etype (Id) /= Id then
7358 return Underlying_Type (Etype (Id));
7360 -- Otherwise we have an incomplete or private type that has
7361 -- no full view, which means that we have not encountered the
7362 -- completion, so return Empty to indicate the underlying type
7363 -- is not yet known.
7365 else
7366 return Empty;
7367 end if;
7369 -- For non-incomplete, non-private types, return the type itself
7370 -- Also for entities that are not types at all return the entity
7371 -- itself.
7373 else
7374 return Id;
7375 end if;
7376 end Underlying_Type;
7378 ---------------
7379 -- Vax_Float --
7380 ---------------
7382 function Vax_Float (Id : E) return B is
7383 begin
7384 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7385 end Vax_Float;
7387 ------------------------
7388 -- Write_Entity_Flags --
7389 ------------------------
7391 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7393 procedure W (Flag_Name : String; Flag : Boolean);
7394 -- Write out given flag if it is set
7396 -------
7397 -- W --
7398 -------
7400 procedure W (Flag_Name : String; Flag : Boolean) is
7401 begin
7402 if Flag then
7403 Write_Str (Prefix);
7404 Write_Str (Flag_Name);
7405 Write_Str (" = True");
7406 Write_Eol;
7407 end if;
7408 end W;
7410 -- Start of processing for Write_Entity_Flags
7412 begin
7413 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7414 and then Is_Base_Type (Id)
7415 then
7416 Write_Str (Prefix);
7417 Write_Str ("Component_Alignment = ");
7419 case Component_Alignment (Id) is
7420 when Calign_Default =>
7421 Write_Str ("Calign_Default");
7423 when Calign_Component_Size =>
7424 Write_Str ("Calign_Component_Size");
7426 when Calign_Component_Size_4 =>
7427 Write_Str ("Calign_Component_Size_4");
7429 when Calign_Storage_Unit =>
7430 Write_Str ("Calign_Storage_Unit");
7431 end case;
7433 Write_Eol;
7434 end if;
7436 W ("Address_Taken", Flag104 (Id));
7437 W ("Body_Needed_For_SAL", Flag40 (Id));
7438 W ("C_Pass_By_Copy", Flag125 (Id));
7439 W ("Can_Never_Be_Null", Flag38 (Id));
7440 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7441 W ("Debug_Info_Off", Flag166 (Id));
7442 W ("Default_Expressions_Processed", Flag108 (Id));
7443 W ("Delay_Cleanups", Flag114 (Id));
7444 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7445 W ("Depends_On_Private", Flag14 (Id));
7446 W ("Discard_Names", Flag88 (Id));
7447 W ("Elaboration_Entity_Required", Flag174 (Id));
7448 W ("Elaborate_Body_Desirable", Flag210 (Id));
7449 W ("Entry_Accepted", Flag152 (Id));
7450 W ("Can_Use_Internal_Rep", Flag229 (Id));
7451 W ("Finalize_Storage_Only", Flag158 (Id));
7452 W ("From_With_Type", Flag159 (Id));
7453 W ("Has_Aliased_Components", Flag135 (Id));
7454 W ("Has_Alignment_Clause", Flag46 (Id));
7455 W ("Has_All_Calls_Remote", Flag79 (Id));
7456 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7457 W ("Has_Anonymous_Master", Flag253 (Id));
7458 W ("Has_Atomic_Components", Flag86 (Id));
7459 W ("Has_Biased_Representation", Flag139 (Id));
7460 W ("Has_Completion", Flag26 (Id));
7461 W ("Has_Completion_In_Body", Flag71 (Id));
7462 W ("Has_Complex_Representation", Flag140 (Id));
7463 W ("Has_Component_Size_Clause", Flag68 (Id));
7464 W ("Has_Contiguous_Rep", Flag181 (Id));
7465 W ("Has_Controlled_Component", Flag43 (Id));
7466 W ("Has_Controlling_Result", Flag98 (Id));
7467 W ("Has_Convention_Pragma", Flag119 (Id));
7468 W ("Has_Default_Aspect", Flag39 (Id));
7469 W ("Has_Delayed_Aspects", Flag200 (Id));
7470 W ("Has_Delayed_Freeze", Flag18 (Id));
7471 W ("Has_Discriminants", Flag5 (Id));
7472 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7473 W ("Has_Exit", Flag47 (Id));
7474 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7475 W ("Has_Forward_Instantiation", Flag175 (Id));
7476 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7477 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7478 W ("Has_Homonym", Flag56 (Id));
7479 W ("Has_Implicit_Dereference", Flag251 (Id));
7480 W ("Has_Inheritable_Invariants", Flag248 (Id));
7481 W ("Has_Initial_Value", Flag219 (Id));
7482 W ("Has_Invariants", Flag232 (Id));
7483 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7484 W ("Has_Master_Entity", Flag21 (Id));
7485 W ("Has_Missing_Return", Flag142 (Id));
7486 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7487 W ("Has_Non_Standard_Rep", Flag75 (Id));
7488 W ("Has_Object_Size_Clause", Flag172 (Id));
7489 W ("Has_Per_Object_Constraint", Flag154 (Id));
7490 W ("Has_Persistent_BSS", Flag188 (Id));
7491 W ("Has_Postconditions", Flag240 (Id));
7492 W ("Has_Pragma_Controlled", Flag27 (Id));
7493 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7494 W ("Has_Pragma_Inline", Flag157 (Id));
7495 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7496 W ("Has_Pragma_Ordered", Flag198 (Id));
7497 W ("Has_Pragma_Pack", Flag121 (Id));
7498 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7499 W ("Has_Pragma_Pure", Flag203 (Id));
7500 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7501 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7502 W ("Has_Pragma_Unmodified", Flag233 (Id));
7503 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7504 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7505 W ("Has_Predicates", Flag250 (Id));
7506 W ("Has_Primitive_Operations", Flag120 (Id));
7507 W ("Has_Private_Ancestor", Flag151 (Id));
7508 W ("Has_Private_Declaration", Flag155 (Id));
7509 W ("Has_Qualified_Name", Flag161 (Id));
7510 W ("Has_RACW", Flag214 (Id));
7511 W ("Has_Record_Rep_Clause", Flag65 (Id));
7512 W ("Has_Recursive_Call", Flag143 (Id));
7513 W ("Has_Size_Clause", Flag29 (Id));
7514 W ("Has_Small_Clause", Flag67 (Id));
7515 W ("Has_Specified_Layout", Flag100 (Id));
7516 W ("Has_Specified_Stream_Input", Flag190 (Id));
7517 W ("Has_Specified_Stream_Output", Flag191 (Id));
7518 W ("Has_Specified_Stream_Read", Flag192 (Id));
7519 W ("Has_Specified_Stream_Write", Flag193 (Id));
7520 W ("Has_Static_Discriminants", Flag211 (Id));
7521 W ("Has_Storage_Size_Clause", Flag23 (Id));
7522 W ("Has_Stream_Size_Clause", Flag184 (Id));
7523 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7524 W ("Has_Task", Flag30 (Id));
7525 W ("Has_Thunks", Flag228 (Id));
7526 W ("Has_Unchecked_Union", Flag123 (Id));
7527 W ("Has_Unknown_Discriminants", Flag72 (Id));
7528 W ("Has_Up_Level_Access", Flag215 (Id));
7529 W ("Has_Volatile_Components", Flag87 (Id));
7530 W ("Has_Xref_Entry", Flag182 (Id));
7531 W ("In_Package_Body", Flag48 (Id));
7532 W ("In_Private_Part", Flag45 (Id));
7533 W ("In_Use", Flag8 (Id));
7534 W ("Is_AST_Entry", Flag132 (Id));
7535 W ("Is_Abstract_Subprogram", Flag19 (Id));
7536 W ("Is_Abstract_Type", Flag146 (Id));
7537 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7538 W ("Is_Access_Constant", Flag69 (Id));
7539 W ("Is_Ada_2005_Only", Flag185 (Id));
7540 W ("Is_Ada_2012_Only", Flag199 (Id));
7541 W ("Is_Aliased", Flag15 (Id));
7542 W ("Is_Asynchronous", Flag81 (Id));
7543 W ("Is_Atomic", Flag85 (Id));
7544 W ("Is_Bit_Packed_Array", Flag122 (Id));
7545 W ("Is_CPP_Class", Flag74 (Id));
7546 W ("Is_Called", Flag102 (Id));
7547 W ("Is_Character_Type", Flag63 (Id));
7548 W ("Is_Child_Unit", Flag73 (Id));
7549 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7550 W ("Is_Compilation_Unit", Flag149 (Id));
7551 W ("Is_Completely_Hidden", Flag103 (Id));
7552 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7553 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7554 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7555 W ("Is_Constrained", Flag12 (Id));
7556 W ("Is_Constructor", Flag76 (Id));
7557 W ("Is_Controlled", Flag42 (Id));
7558 W ("Is_Controlling_Formal", Flag97 (Id));
7559 W ("Is_Descendent_Of_Address", Flag223 (Id));
7560 W ("Is_Discrim_SO_Function", Flag176 (Id));
7561 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7562 W ("Is_Dispatching_Operation", Flag6 (Id));
7563 W ("Is_Eliminated", Flag124 (Id));
7564 W ("Is_Entry_Formal", Flag52 (Id));
7565 W ("Is_Exported", Flag99 (Id));
7566 W ("Is_First_Subtype", Flag70 (Id));
7567 W ("Is_For_Access_Subtype", Flag118 (Id));
7568 W ("Is_Formal_Subprogram", Flag111 (Id));
7569 W ("Is_Frozen", Flag4 (Id));
7570 W ("Is_Generic_Actual_Type", Flag94 (Id));
7571 W ("Is_Generic_Instance", Flag130 (Id));
7572 W ("Is_Generic_Type", Flag13 (Id));
7573 W ("Is_Hidden", Flag57 (Id));
7574 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7575 W ("Is_Immediately_Visible", Flag7 (Id));
7576 W ("Is_Implementation_Defined", Flag254 (Id));
7577 W ("Is_Imported", Flag24 (Id));
7578 W ("Is_Inlined", Flag11 (Id));
7579 W ("Is_Instantiated", Flag126 (Id));
7580 W ("Is_Interface", Flag186 (Id));
7581 W ("Is_Internal", Flag17 (Id));
7582 W ("Is_Interrupt_Handler", Flag89 (Id));
7583 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7584 W ("Is_Itype", Flag91 (Id));
7585 W ("Is_Known_Non_Null", Flag37 (Id));
7586 W ("Is_Known_Null", Flag204 (Id));
7587 W ("Is_Known_Valid", Flag170 (Id));
7588 W ("Is_Limited_Composite", Flag106 (Id));
7589 W ("Is_Limited_Interface", Flag197 (Id));
7590 W ("Is_Limited_Record", Flag25 (Id));
7591 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7592 W ("Is_Non_Static_Subtype", Flag109 (Id));
7593 W ("Is_Null_Init_Proc", Flag178 (Id));
7594 W ("Is_Obsolescent", Flag153 (Id));
7595 W ("Is_Only_Out_Parameter", Flag226 (Id));
7596 W ("Is_Optional_Parameter", Flag134 (Id));
7597 W ("Is_Package_Body_Entity", Flag160 (Id));
7598 W ("Is_Packed", Flag51 (Id));
7599 W ("Is_Packed_Array_Type", Flag138 (Id));
7600 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7601 W ("Is_Preelaborated", Flag59 (Id));
7602 W ("Is_Primitive", Flag218 (Id));
7603 W ("Is_Primitive_Wrapper", Flag195 (Id));
7604 W ("Is_Private_Composite", Flag107 (Id));
7605 W ("Is_Private_Descendant", Flag53 (Id));
7606 W ("Is_Private_Primitive", Flag245 (Id));
7607 W ("Is_Processed_Transient", Flag252 (Id));
7608 W ("Is_Public", Flag10 (Id));
7609 W ("Is_Pure", Flag44 (Id));
7610 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7611 W ("Is_RACW_Stub_Type", Flag244 (Id));
7612 W ("Is_Raised", Flag224 (Id));
7613 W ("Is_Remote_Call_Interface", Flag62 (Id));
7614 W ("Is_Remote_Types", Flag61 (Id));
7615 W ("Is_Renaming_Of_Object", Flag112 (Id));
7616 W ("Is_Return_Object", Flag209 (Id));
7617 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7618 W ("Is_Shared_Passive", Flag60 (Id));
7619 W ("Is_Statically_Allocated", Flag28 (Id));
7620 W ("Is_Tag", Flag78 (Id));
7621 W ("Is_Tagged_Type", Flag55 (Id));
7622 W ("Is_Thunk", Flag225 (Id));
7623 W ("Is_Trivial_Subprogram", Flag235 (Id));
7624 W ("Is_True_Constant", Flag163 (Id));
7625 W ("Is_Unchecked_Union", Flag117 (Id));
7626 W ("Is_Underlying_Record_View", Flag246 (Id));
7627 W ("Is_Unsigned_Type", Flag144 (Id));
7628 W ("Is_VMS_Exception", Flag133 (Id));
7629 W ("Is_Valued_Procedure", Flag127 (Id));
7630 W ("Is_Visible_Child_Unit", Flag116 (Id));
7631 W ("Is_Visible_Formal", Flag206 (Id));
7632 W ("Is_Volatile", Flag16 (Id));
7633 W ("Itype_Printed", Flag202 (Id));
7634 W ("Kill_Elaboration_Checks", Flag32 (Id));
7635 W ("Kill_Range_Checks", Flag33 (Id));
7636 W ("Kill_Tag_Checks", Flag34 (Id));
7637 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7638 W ("Low_Bound_Tested", Flag205 (Id));
7639 W ("Machine_Radix_10", Flag84 (Id));
7640 W ("Materialize_Entity", Flag168 (Id));
7641 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7642 W ("Must_Have_Preelab_Init", Flag208 (Id));
7643 W ("Needs_Debug_Info", Flag147 (Id));
7644 W ("Needs_No_Actuals", Flag22 (Id));
7645 W ("Never_Set_In_Source", Flag115 (Id));
7646 W ("No_Pool_Assigned", Flag131 (Id));
7647 W ("No_Return", Flag113 (Id));
7648 W ("No_Strict_Aliasing", Flag136 (Id));
7649 W ("Non_Binary_Modulus", Flag58 (Id));
7650 W ("Nonzero_Is_True", Flag162 (Id));
7651 W ("OK_To_Rename", Flag247 (Id));
7652 W ("OK_To_Reorder_Components", Flag239 (Id));
7653 W ("Optimize_Alignment_Space", Flag241 (Id));
7654 W ("Optimize_Alignment_Time", Flag242 (Id));
7655 W ("Overlays_Constant", Flag243 (Id));
7656 W ("Reachable", Flag49 (Id));
7657 W ("Referenced", Flag156 (Id));
7658 W ("Referenced_As_LHS", Flag36 (Id));
7659 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7660 W ("Renamed_In_Spec", Flag231 (Id));
7661 W ("Requires_Overriding", Flag213 (Id));
7662 W ("Return_Present", Flag54 (Id));
7663 W ("Returns_By_Ref", Flag90 (Id));
7664 W ("Reverse_Bit_Order", Flag164 (Id));
7665 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7666 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7667 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7668 W ("Static_Elaboration_Desired", Flag77 (Id));
7669 W ("Strict_Alignment", Flag145 (Id));
7670 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7671 W ("Suppress_Initialization", Flag105 (Id));
7672 W ("Suppress_Style_Checks", Flag165 (Id));
7673 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7674 W ("Treat_As_Volatile", Flag41 (Id));
7675 W ("Universal_Aliasing", Flag216 (Id));
7676 W ("Used_As_Generic_Actual", Flag222 (Id));
7677 W ("Uses_Sec_Stack", Flag95 (Id));
7678 W ("Warnings_Off", Flag96 (Id));
7679 W ("Warnings_Off_Used", Flag236 (Id));
7680 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7681 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7682 W ("Was_Hidden", Flag196 (Id));
7683 end Write_Entity_Flags;
7685 -----------------------
7686 -- Write_Entity_Info --
7687 -----------------------
7689 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7691 procedure Write_Attribute (Which : String; Nam : E);
7692 -- Write attribute value with given string name
7694 procedure Write_Kind (Id : Entity_Id);
7695 -- Write Ekind field of entity
7697 ---------------------
7698 -- Write_Attribute --
7699 ---------------------
7701 procedure Write_Attribute (Which : String; Nam : E) is
7702 begin
7703 Write_Str (Prefix);
7704 Write_Str (Which);
7705 Write_Int (Int (Nam));
7706 Write_Str (" ");
7707 Write_Name (Chars (Nam));
7708 Write_Str (" ");
7709 end Write_Attribute;
7711 ----------------
7712 -- Write_Kind --
7713 ----------------
7715 procedure Write_Kind (Id : Entity_Id) is
7716 K : constant String := Entity_Kind'Image (Ekind (Id));
7718 begin
7719 Write_Str (Prefix);
7720 Write_Str (" Kind ");
7722 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7723 Write_Str ("TAGGED ");
7724 end if;
7726 Write_Str (K (3 .. K'Length));
7727 Write_Str (" ");
7729 if Is_Type (Id) and then Depends_On_Private (Id) then
7730 Write_Str ("Depends_On_Private ");
7731 end if;
7732 end Write_Kind;
7734 -- Start of processing for Write_Entity_Info
7736 begin
7737 Write_Eol;
7738 Write_Attribute ("Name ", Id);
7739 Write_Int (Int (Id));
7740 Write_Eol;
7741 Write_Kind (Id);
7742 Write_Eol;
7743 Write_Attribute (" Type ", Etype (Id));
7744 Write_Eol;
7745 Write_Attribute (" Scope ", Scope (Id));
7746 Write_Eol;
7748 case Ekind (Id) is
7750 when Discrete_Kind =>
7751 Write_Str ("Bounds: Id = ");
7753 if Present (Scalar_Range (Id)) then
7754 Write_Int (Int (Type_Low_Bound (Id)));
7755 Write_Str (" .. Id = ");
7756 Write_Int (Int (Type_High_Bound (Id)));
7757 else
7758 Write_Str ("Empty");
7759 end if;
7761 Write_Eol;
7763 when Array_Kind =>
7764 declare
7765 Index : E;
7767 begin
7768 Write_Attribute
7769 (" Component Type ", Component_Type (Id));
7770 Write_Eol;
7771 Write_Str (Prefix);
7772 Write_Str (" Indexes ");
7774 Index := First_Index (Id);
7775 while Present (Index) loop
7776 Write_Attribute (" ", Etype (Index));
7777 Index := Next_Index (Index);
7778 end loop;
7780 Write_Eol;
7781 end;
7783 when Access_Kind =>
7784 Write_Attribute
7785 (" Directly Designated Type ",
7786 Directly_Designated_Type (Id));
7787 Write_Eol;
7789 when Overloadable_Kind =>
7790 if Present (Homonym (Id)) then
7791 Write_Str (" Homonym ");
7792 Write_Name (Chars (Homonym (Id)));
7793 Write_Str (" ");
7794 Write_Int (Int (Homonym (Id)));
7795 Write_Eol;
7796 end if;
7798 Write_Eol;
7800 when E_Component =>
7801 if Ekind (Scope (Id)) in Record_Kind then
7802 Write_Attribute (
7803 " Original_Record_Component ",
7804 Original_Record_Component (Id));
7805 Write_Int (Int (Original_Record_Component (Id)));
7806 Write_Eol;
7807 end if;
7809 when others => null;
7810 end case;
7811 end Write_Entity_Info;
7813 -----------------------
7814 -- Write_Field6_Name --
7815 -----------------------
7817 procedure Write_Field6_Name (Id : Entity_Id) is
7818 pragma Warnings (Off, Id);
7819 begin
7820 Write_Str ("First_Rep_Item");
7821 end Write_Field6_Name;
7823 -----------------------
7824 -- Write_Field7_Name --
7825 -----------------------
7827 procedure Write_Field7_Name (Id : Entity_Id) is
7828 pragma Warnings (Off, Id);
7829 begin
7830 Write_Str ("Freeze_Node");
7831 end Write_Field7_Name;
7833 -----------------------
7834 -- Write_Field8_Name --
7835 -----------------------
7837 procedure Write_Field8_Name (Id : Entity_Id) is
7838 begin
7839 case Ekind (Id) is
7840 when Type_Kind =>
7841 Write_Str ("Associated_Node_For_Itype");
7843 when E_Package =>
7844 Write_Str ("Dependent_Instances");
7846 when E_Loop =>
7847 Write_Str ("First_Exit_Statement");
7849 when E_Variable =>
7850 Write_Str ("Hiding_Loop_Variable");
7852 when Formal_Kind |
7853 E_Function |
7854 E_Subprogram_Body =>
7855 Write_Str ("Mechanism");
7857 when E_Component |
7858 E_Discriminant =>
7859 Write_Str ("Normalized_First_Bit");
7861 when E_Procedure =>
7862 Write_Str ("Postcondition_Proc");
7864 when E_Return_Statement =>
7865 Write_Str ("Return_Applies_To");
7867 when others =>
7868 Write_Str ("Field8??");
7869 end case;
7870 end Write_Field8_Name;
7872 -----------------------
7873 -- Write_Field9_Name --
7874 -----------------------
7876 procedure Write_Field9_Name (Id : Entity_Id) is
7877 begin
7878 case Ekind (Id) is
7879 when Type_Kind =>
7880 Write_Str ("Class_Wide_Type");
7882 when Object_Kind =>
7883 Write_Str ("Current_Value");
7885 when E_Function |
7886 E_Generic_Function |
7887 E_Generic_Package |
7888 E_Generic_Procedure |
7889 E_Package |
7890 E_Procedure =>
7891 Write_Str ("Renaming_Map");
7893 when others =>
7894 Write_Str ("Field9??");
7895 end case;
7896 end Write_Field9_Name;
7898 ------------------------
7899 -- Write_Field10_Name --
7900 ------------------------
7902 procedure Write_Field10_Name (Id : Entity_Id) is
7903 begin
7904 case Ekind (Id) is
7905 when Class_Wide_Kind |
7906 Incomplete_Kind |
7907 E_Record_Type |
7908 E_Record_Subtype |
7909 Private_Kind |
7910 Concurrent_Kind =>
7911 Write_Str ("Direct_Primitive_Operations");
7913 when Float_Kind =>
7914 Write_Str ("Float_Rep");
7916 when E_In_Parameter |
7917 E_Constant =>
7918 Write_Str ("Discriminal_Link");
7920 when E_Function |
7921 E_Package |
7922 E_Package_Body |
7923 E_Procedure =>
7924 Write_Str ("Handler_Records");
7926 when E_Component |
7927 E_Discriminant =>
7928 Write_Str ("Normalized_Position_Max");
7930 when others =>
7931 Write_Str ("Field10??");
7932 end case;
7933 end Write_Field10_Name;
7935 ------------------------
7936 -- Write_Field11_Name --
7937 ------------------------
7939 procedure Write_Field11_Name (Id : Entity_Id) is
7940 begin
7941 case Ekind (Id) is
7942 when E_Block =>
7943 Write_Str ("Block_Node");
7945 when E_Component |
7946 E_Discriminant =>
7947 Write_Str ("Component_Bit_Offset");
7949 when Formal_Kind =>
7950 Write_Str ("Entry_Component");
7952 when E_Enumeration_Literal =>
7953 Write_Str ("Enumeration_Pos");
7955 when Type_Kind |
7956 E_Constant =>
7957 Write_Str ("Full_View");
7959 when E_Generic_Package =>
7960 Write_Str ("Generic_Homonym");
7962 when E_Function |
7963 E_Procedure |
7964 E_Entry |
7965 E_Entry_Family =>
7966 Write_Str ("Protected_Body_Subprogram");
7968 when others =>
7969 Write_Str ("Field11??");
7970 end case;
7971 end Write_Field11_Name;
7973 ------------------------
7974 -- Write_Field12_Name --
7975 ------------------------
7977 procedure Write_Field12_Name (Id : Entity_Id) is
7978 begin
7979 case Ekind (Id) is
7980 when E_Package =>
7981 Write_Str ("Associated_Formal_Package");
7983 when Entry_Kind =>
7984 Write_Str ("Barrier_Function");
7986 when E_Enumeration_Literal =>
7987 Write_Str ("Enumeration_Rep");
7989 when Type_Kind |
7990 E_Component |
7991 E_Constant |
7992 E_Discriminant |
7993 E_Exception |
7994 E_In_Parameter |
7995 E_In_Out_Parameter |
7996 E_Out_Parameter |
7997 E_Loop_Parameter |
7998 E_Variable =>
7999 Write_Str ("Esize");
8001 when E_Function |
8002 E_Procedure =>
8003 Write_Str ("Next_Inlined_Subprogram");
8005 when others =>
8006 Write_Str ("Field12??");
8007 end case;
8008 end Write_Field12_Name;
8010 ------------------------
8011 -- Write_Field13_Name --
8012 ------------------------
8014 procedure Write_Field13_Name (Id : Entity_Id) is
8015 begin
8016 case Ekind (Id) is
8017 when E_Component |
8018 E_Discriminant =>
8019 Write_Str ("Component_Clause");
8021 when E_Function =>
8022 if not Comes_From_Source (Id)
8023 and then
8024 Chars (Id) = Name_Op_Ne
8025 then
8026 Write_Str ("Corresponding_Equality");
8028 elsif Comes_From_Source (Id) then
8029 Write_Str ("Elaboration_Entity");
8031 else
8032 Write_Str ("Field13??");
8033 end if;
8035 when E_Procedure |
8036 E_Package |
8037 Generic_Unit_Kind =>
8038 Write_Str ("Elaboration_Entity");
8040 when Formal_Kind |
8041 E_Variable =>
8042 Write_Str ("Extra_Accessibility");
8044 when Type_Kind =>
8045 Write_Str ("RM_Size");
8047 when others =>
8048 Write_Str ("Field13??");
8049 end case;
8050 end Write_Field13_Name;
8052 -----------------------
8053 -- Write_Field14_Name --
8054 -----------------------
8056 procedure Write_Field14_Name (Id : Entity_Id) is
8057 begin
8058 case Ekind (Id) is
8059 when Type_Kind |
8060 Formal_Kind |
8061 E_Constant |
8062 E_Exception |
8063 E_Variable |
8064 E_Loop_Parameter =>
8065 Write_Str ("Alignment");
8067 when E_Function |
8068 E_Procedure =>
8069 Write_Str ("First_Optional_Parameter");
8071 when E_Component |
8072 E_Discriminant =>
8073 Write_Str ("Normalized_Position");
8075 when E_Package |
8076 E_Generic_Package =>
8077 Write_Str ("Shadow_Entities");
8079 when others =>
8080 Write_Str ("Field14??");
8081 end case;
8082 end Write_Field14_Name;
8084 ------------------------
8085 -- Write_Field15_Name --
8086 ------------------------
8088 procedure Write_Field15_Name (Id : Entity_Id) is
8089 begin
8090 case Ekind (Id) is
8091 when E_Discriminant =>
8092 Write_Str ("Discriminant_Number");
8094 when E_Component =>
8095 Write_Str ("DT_Entry_Count");
8097 when E_Function |
8098 E_Procedure =>
8099 Write_Str ("DT_Position");
8101 when E_Protected_Type =>
8102 Write_Str ("Entry_Bodies_Array");
8104 when Entry_Kind =>
8105 Write_Str ("Entry_Parameters_Type");
8107 when Formal_Kind =>
8108 Write_Str ("Extra_Formal");
8110 when Enumeration_Kind =>
8111 Write_Str ("Lit_Indexes");
8113 when E_Package |
8114 E_Package_Body =>
8115 Write_Str ("Related_Instance");
8117 when E_Constant |
8118 E_Variable =>
8119 Write_Str ("Return_Flag_Or_Transient_Decl");
8121 when Decimal_Fixed_Point_Kind =>
8122 Write_Str ("Scale_Value");
8124 when Access_Kind |
8125 Task_Kind =>
8126 Write_Str ("Storage_Size_Variable");
8128 when E_String_Literal_Subtype =>
8129 Write_Str ("String_Literal_Low_Bound");
8131 when others =>
8132 Write_Str ("Field15??");
8133 end case;
8134 end Write_Field15_Name;
8136 ------------------------
8137 -- Write_Field16_Name --
8138 ------------------------
8140 procedure Write_Field16_Name (Id : Entity_Id) is
8141 begin
8142 case Ekind (Id) is
8143 when E_Record_Type |
8144 E_Record_Type_With_Private =>
8145 Write_Str ("Access_Disp_Table");
8147 when E_Record_Subtype |
8148 E_Class_Wide_Subtype =>
8149 Write_Str ("Cloned_Subtype");
8151 when E_Function |
8152 E_Procedure =>
8153 Write_Str ("DTC_Entity");
8155 when E_Component =>
8156 Write_Str ("Entry_Formal");
8158 when E_Package |
8159 E_Generic_Package |
8160 Concurrent_Kind =>
8161 Write_Str ("First_Private_Entity");
8163 when Enumeration_Kind =>
8164 Write_Str ("Lit_Strings");
8166 when E_String_Literal_Subtype =>
8167 Write_Str ("String_Literal_Length");
8169 when E_Variable |
8170 E_Out_Parameter =>
8171 Write_Str ("Unset_Reference");
8173 when others =>
8174 Write_Str ("Field16??");
8175 end case;
8176 end Write_Field16_Name;
8178 ------------------------
8179 -- Write_Field17_Name --
8180 ------------------------
8182 procedure Write_Field17_Name (Id : Entity_Id) is
8183 begin
8184 case Ekind (Id) is
8185 when Formal_Kind |
8186 E_Constant |
8187 E_Generic_In_Out_Parameter |
8188 E_Variable =>
8189 Write_Str ("Actual_Subtype");
8191 when Digits_Kind =>
8192 Write_Str ("Digits_Value");
8194 when E_Discriminant =>
8195 Write_Str ("Discriminal");
8197 when E_Block |
8198 Class_Wide_Kind |
8199 Concurrent_Kind |
8200 Private_Kind |
8201 E_Entry |
8202 E_Entry_Family |
8203 E_Function |
8204 E_Generic_Function |
8205 E_Generic_Package |
8206 E_Generic_Procedure |
8207 E_Loop |
8208 E_Operator |
8209 E_Package |
8210 E_Package_Body |
8211 E_Procedure |
8212 E_Record_Type |
8213 E_Record_Subtype |
8214 E_Return_Statement |
8215 E_Subprogram_Body |
8216 E_Subprogram_Type =>
8217 Write_Str ("First_Entity");
8219 when Array_Kind =>
8220 Write_Str ("First_Index");
8222 when Enumeration_Kind =>
8223 Write_Str ("First_Literal");
8225 when Access_Kind =>
8226 Write_Str ("Master_Id");
8228 when Modular_Integer_Kind =>
8229 Write_Str ("Modulus");
8231 when E_Incomplete_Type =>
8232 Write_Str ("Non_Limited_View");
8234 when E_Incomplete_Subtype =>
8235 if From_With_Type (Id) then
8236 Write_Str ("Non_Limited_View");
8237 end if;
8239 when E_Component =>
8240 Write_Str ("Prival");
8242 when others =>
8243 Write_Str ("Field17??");
8244 end case;
8245 end Write_Field17_Name;
8247 ------------------------
8248 -- Write_Field18_Name --
8249 ------------------------
8251 procedure Write_Field18_Name (Id : Entity_Id) is
8252 begin
8253 case Ekind (Id) is
8254 when E_Enumeration_Literal |
8255 E_Function |
8256 E_Operator |
8257 E_Procedure =>
8258 Write_Str ("Alias");
8260 when E_Record_Type =>
8261 Write_Str ("Corresponding_Concurrent_Type");
8263 when E_Subprogram_Body =>
8264 Write_Str ("Corresponding_Protected_Entry");
8266 when Concurrent_Kind =>
8267 Write_Str ("Corresponding_Record_Type");
8269 when E_Label |
8270 E_Loop |
8271 E_Block =>
8272 Write_Str ("Enclosing_Scope");
8274 when E_Entry_Index_Parameter =>
8275 Write_Str ("Entry_Index_Constant");
8277 when E_Class_Wide_Subtype |
8278 E_Access_Protected_Subprogram_Type |
8279 E_Anonymous_Access_Protected_Subprogram_Type |
8280 E_Access_Subprogram_Type |
8281 E_Exception_Type =>
8282 Write_Str ("Equivalent_Type");
8284 when Fixed_Point_Kind =>
8285 Write_Str ("Delta_Value");
8287 when Incomplete_Or_Private_Kind |
8288 E_Record_Subtype =>
8289 Write_Str ("Private_Dependents");
8291 when Object_Kind =>
8292 Write_Str ("Renamed_Object");
8294 when E_Exception |
8295 E_Package |
8296 E_Generic_Function |
8297 E_Generic_Procedure |
8298 E_Generic_Package =>
8299 Write_Str ("Renamed_Entity");
8301 when others =>
8302 Write_Str ("Field18??");
8303 end case;
8304 end Write_Field18_Name;
8306 -----------------------
8307 -- Write_Field19_Name --
8308 -----------------------
8310 procedure Write_Field19_Name (Id : Entity_Id) is
8311 begin
8312 case Ekind (Id) is
8313 when E_Package |
8314 E_Generic_Package =>
8315 Write_Str ("Body_Entity");
8317 when E_Discriminant =>
8318 Write_Str ("Corresponding_Discriminant");
8320 when E_Record_Type =>
8321 Write_Str ("Parent_Subtype");
8323 when E_Array_Type |
8324 E_Array_Subtype =>
8325 Write_Str ("Related_Array_Object");
8327 when E_Constant |
8328 E_Variable =>
8329 Write_Str ("Size_Check_Code");
8331 when E_Package_Body |
8332 Formal_Kind =>
8333 Write_Str ("Spec_Entity");
8335 when Private_Kind =>
8336 Write_Str ("Underlying_Full_View");
8338 when E_Function | E_Operator | E_Subprogram_Type =>
8339 Write_Str ("Extra_Accessibility_Of_Result");
8341 when others =>
8342 Write_Str ("Field19??");
8343 end case;
8344 end Write_Field19_Name;
8346 -----------------------
8347 -- Write_Field20_Name --
8348 -----------------------
8350 procedure Write_Field20_Name (Id : Entity_Id) is
8351 begin
8352 case Ekind (Id) is
8353 when Array_Kind =>
8354 Write_Str ("Component_Type");
8356 when E_In_Parameter |
8357 E_Generic_In_Parameter =>
8358 Write_Str ("Default_Value");
8360 when Access_Kind =>
8361 Write_Str ("Directly_Designated_Type");
8363 when E_Component =>
8364 Write_Str ("Discriminant_Checking_Func");
8366 when E_Discriminant =>
8367 Write_Str ("Discriminant_Default_Value");
8369 when E_Block |
8370 Class_Wide_Kind |
8371 Concurrent_Kind |
8372 Private_Kind |
8373 E_Entry |
8374 E_Entry_Family |
8375 E_Function |
8376 E_Generic_Function |
8377 E_Generic_Package |
8378 E_Generic_Procedure |
8379 E_Loop |
8380 E_Operator |
8381 E_Package |
8382 E_Package_Body |
8383 E_Procedure |
8384 E_Record_Type |
8385 E_Record_Subtype |
8386 E_Return_Statement |
8387 E_Subprogram_Body |
8388 E_Subprogram_Type =>
8389 Write_Str ("Last_Entity");
8391 when E_Constant |
8392 E_Variable =>
8393 Write_Str ("Prival_Link");
8395 when Scalar_Kind =>
8396 Write_Str ("Scalar_Range");
8398 when E_Exception =>
8399 Write_Str ("Register_Exception_Call");
8401 when others =>
8402 Write_Str ("Field20??");
8403 end case;
8404 end Write_Field20_Name;
8406 -----------------------
8407 -- Write_Field21_Name --
8408 -----------------------
8410 procedure Write_Field21_Name (Id : Entity_Id) is
8411 begin
8412 case Ekind (Id) is
8413 when Entry_Kind =>
8414 Write_Str ("Accept_Address");
8416 when E_In_Parameter =>
8417 Write_Str ("Default_Expr_Function");
8419 when Concurrent_Kind |
8420 Incomplete_Or_Private_Kind |
8421 Class_Wide_Kind |
8422 E_Record_Type |
8423 E_Record_Subtype =>
8424 Write_Str ("Discriminant_Constraint");
8426 when E_Constant |
8427 E_Exception |
8428 E_Function |
8429 E_Generic_Function |
8430 E_Procedure |
8431 E_Generic_Procedure |
8432 E_Variable =>
8433 Write_Str ("Interface_Name");
8435 when Array_Kind |
8436 Modular_Integer_Kind =>
8437 Write_Str ("Original_Array_Type");
8439 when Fixed_Point_Kind =>
8440 Write_Str ("Small_Value");
8442 when others =>
8443 Write_Str ("Field21??");
8444 end case;
8445 end Write_Field21_Name;
8447 -----------------------
8448 -- Write_Field22_Name --
8449 -----------------------
8451 procedure Write_Field22_Name (Id : Entity_Id) is
8452 begin
8453 case Ekind (Id) is
8454 when Access_Kind =>
8455 Write_Str ("Associated_Storage_Pool");
8457 when Array_Kind =>
8458 Write_Str ("Component_Size");
8460 when E_Record_Type =>
8461 Write_Str ("Corresponding_Remote_Type");
8463 when E_Component |
8464 E_Discriminant =>
8465 Write_Str ("Original_Record_Component");
8467 when E_Enumeration_Literal =>
8468 Write_Str ("Enumeration_Rep_Expr");
8470 when E_Exception =>
8471 Write_Str ("Exception_Code");
8473 when E_Record_Type_With_Private |
8474 E_Record_Subtype_With_Private |
8475 E_Private_Type |
8476 E_Private_Subtype |
8477 E_Limited_Private_Type |
8478 E_Limited_Private_Subtype =>
8479 Write_Str ("Private_View");
8481 when Formal_Kind =>
8482 Write_Str ("Protected_Formal");
8484 when E_Block |
8485 E_Entry |
8486 E_Entry_Family |
8487 E_Function |
8488 E_Loop |
8489 E_Package |
8490 E_Package_Body |
8491 E_Generic_Package |
8492 E_Generic_Function |
8493 E_Generic_Procedure |
8494 E_Procedure |
8495 E_Protected_Type |
8496 E_Return_Statement |
8497 E_Subprogram_Body |
8498 E_Task_Type =>
8499 Write_Str ("Scope_Depth_Value");
8501 when E_Variable =>
8502 Write_Str ("Shared_Var_Procs_Instance");
8504 when others =>
8505 Write_Str ("Field22??");
8506 end case;
8507 end Write_Field22_Name;
8509 ------------------------
8510 -- Write_Field23_Name --
8511 ------------------------
8513 procedure Write_Field23_Name (Id : Entity_Id) is
8514 begin
8515 case Ekind (Id) is
8516 when E_Discriminant =>
8517 Write_Str ("CR_Discriminant");
8519 when E_Block =>
8520 Write_Str ("Entry_Cancel_Parameter");
8522 when E_Enumeration_Type =>
8523 Write_Str ("Enum_Pos_To_Rep");
8525 when Formal_Kind |
8526 E_Variable =>
8527 Write_Str ("Extra_Constrained");
8529 when Access_Kind =>
8530 Write_Str ("Finalization_Master");
8532 when E_Generic_Function |
8533 E_Generic_Package |
8534 E_Generic_Procedure =>
8535 Write_Str ("Inner_Instances");
8537 when Array_Kind =>
8538 Write_Str ("Packed_Array_Type");
8540 when Entry_Kind =>
8541 Write_Str ("Protection_Object");
8543 when Concurrent_Kind |
8544 Incomplete_Or_Private_Kind |
8545 Class_Wide_Kind |
8546 E_Record_Type |
8547 E_Record_Subtype =>
8548 Write_Str ("Stored_Constraint");
8550 when E_Function |
8551 E_Procedure =>
8552 if Present (Scope (Id))
8553 and then Is_Protected_Type (Scope (Id))
8554 then
8555 Write_Str ("Protection_Object");
8556 else
8557 Write_Str ("Generic_Renamings");
8558 end if;
8560 when E_Package =>
8561 if Is_Generic_Instance (Id) then
8562 Write_Str ("Generic_Renamings");
8563 else
8564 Write_Str ("Limited_View");
8565 end if;
8567 when others =>
8568 Write_Str ("Field23??");
8569 end case;
8570 end Write_Field23_Name;
8572 ------------------------
8573 -- Write_Field24_Name --
8574 ------------------------
8576 procedure Write_Field24_Name (Id : Entity_Id) is
8577 begin
8578 case Ekind (Id) is
8579 when E_Package |
8580 E_Package_Body =>
8581 Write_Str ("Finalizer");
8583 when E_Constant |
8584 E_Variable |
8585 Type_Kind =>
8586 Write_Str ("Related_Expression");
8588 when E_Entry |
8589 E_Entry_Family |
8590 Subprogram_Kind |
8591 Generic_Subprogram_Kind =>
8592 Write_Str ("Contract");
8594 when others =>
8595 Write_Str ("Field24???");
8596 end case;
8597 end Write_Field24_Name;
8599 ------------------------
8600 -- Write_Field25_Name --
8601 ------------------------
8603 procedure Write_Field25_Name (Id : Entity_Id) is
8604 begin
8605 case Ekind (Id) is
8606 when E_Variable =>
8607 Write_Str ("Debug_Renaming_Link");
8609 when E_Component =>
8610 Write_Str ("DT_Offset_To_Top_Func");
8612 when E_Procedure |
8613 E_Function =>
8614 Write_Str ("Interface_Alias");
8616 when E_Record_Type |
8617 E_Record_Subtype |
8618 E_Record_Type_With_Private |
8619 E_Record_Subtype_With_Private =>
8620 Write_Str ("Interfaces");
8622 when Task_Kind =>
8623 Write_Str ("Task_Body_Procedure");
8625 when E_Entry |
8626 E_Entry_Family =>
8627 Write_Str ("PPC_Wrapper");
8629 when E_Enumeration_Subtype |
8630 E_Modular_Integer_Subtype |
8631 E_Signed_Integer_Subtype =>
8632 Write_Str ("Static_Predicate");
8634 when others =>
8635 Write_Str ("Field25??");
8636 end case;
8637 end Write_Field25_Name;
8639 ------------------------
8640 -- Write_Field26_Name --
8641 ------------------------
8643 procedure Write_Field26_Name (Id : Entity_Id) is
8644 begin
8645 case Ekind (Id) is
8646 when E_Record_Type |
8647 E_Record_Type_With_Private =>
8648 Write_Str ("Dispatch_Table_Wrappers");
8650 when E_In_Out_Parameter |
8651 E_Out_Parameter |
8652 E_Variable =>
8653 Write_Str ("Last_Assignment");
8655 when E_Access_Subprogram_Type =>
8656 Write_Str ("Original_Access_Type");
8658 when E_Generic_Package |
8659 E_Package =>
8660 Write_Str ("Package_Instantiation");
8662 when E_Component |
8663 E_Constant =>
8664 Write_Str ("Related_Type");
8666 when Task_Kind =>
8667 Write_Str ("Relative_Deadline_Variable");
8669 when E_Procedure |
8670 E_Function =>
8671 if Ekind (Id) = E_Procedure
8672 and then not Is_Dispatching_Operation (Id)
8673 then
8674 Write_Str ("Static_Initialization");
8675 else
8676 Write_Str ("Overridden_Operation");
8677 end if;
8679 when others =>
8680 Write_Str ("Field26??");
8681 end case;
8682 end Write_Field26_Name;
8684 ------------------------
8685 -- Write_Field27_Name --
8686 ------------------------
8688 procedure Write_Field27_Name (Id : Entity_Id) is
8689 begin
8690 case Ekind (Id) is
8691 when E_Package |
8692 Type_Kind =>
8693 Write_Str ("Current_Use_Clause");
8695 when E_Component |
8696 E_Constant |
8697 E_Variable =>
8698 Write_Str ("Related_Type");
8700 when E_Procedure =>
8701 Write_Str ("Wrapped_Entity");
8703 when others =>
8704 Write_Str ("Field27??");
8705 end case;
8706 end Write_Field27_Name;
8708 ------------------------
8709 -- Write_Field28_Name --
8710 ------------------------
8712 procedure Write_Field28_Name (Id : Entity_Id) is
8713 begin
8714 case Ekind (Id) is
8715 when E_Entry |
8716 E_Entry_Family |
8717 E_Function |
8718 E_Procedure |
8719 E_Subprogram_Body |
8720 E_Subprogram_Type =>
8721 Write_Str ("Extra_Formals");
8723 when E_Record_Type =>
8724 Write_Str ("Underlying_Record_View");
8726 when others =>
8727 Write_Str ("Field28??");
8728 end case;
8729 end Write_Field28_Name;
8731 procedure Write_Field29_Name (Id : Entity_Id) is
8732 begin
8733 case Ekind (Id) is
8734 when Type_Kind =>
8735 Write_Str ("Subprograms_For_Type");
8737 when others =>
8738 Write_Str ("Field29??");
8739 end case;
8740 end Write_Field29_Name;
8742 -------------------------
8743 -- Iterator Procedures --
8744 -------------------------
8746 procedure Proc_Next_Component (N : in out Node_Id) is
8747 begin
8748 N := Next_Component (N);
8749 end Proc_Next_Component;
8751 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8752 begin
8753 N := Next_Entity (N);
8754 while Present (N) loop
8755 exit when Ekind_In (N, E_Component, E_Discriminant);
8756 N := Next_Entity (N);
8757 end loop;
8758 end Proc_Next_Component_Or_Discriminant;
8760 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8761 begin
8762 N := Next_Discriminant (N);
8763 end Proc_Next_Discriminant;
8765 procedure Proc_Next_Formal (N : in out Node_Id) is
8766 begin
8767 N := Next_Formal (N);
8768 end Proc_Next_Formal;
8770 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8771 begin
8772 N := Next_Formal_With_Extras (N);
8773 end Proc_Next_Formal_With_Extras;
8775 procedure Proc_Next_Index (N : in out Node_Id) is
8776 begin
8777 N := Next_Index (N);
8778 end Proc_Next_Index;
8780 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8781 begin
8782 N := Next_Inlined_Subprogram (N);
8783 end Proc_Next_Inlined_Subprogram;
8785 procedure Proc_Next_Literal (N : in out Node_Id) is
8786 begin
8787 N := Next_Literal (N);
8788 end Proc_Next_Literal;
8790 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8791 begin
8792 N := Next_Stored_Discriminant (N);
8793 end Proc_Next_Stored_Discriminant;
8795 end Einfo;