1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks
(All_Checks
);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree
; use Atree
;
36 with Nlists
; use Nlists
;
37 with Output
; use Output
;
38 with Sinfo
; use Sinfo
;
39 with Stand
; use Stand
;
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.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
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
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Elaboration_Entity Node13
109 -- Extra_Accessibility Node13
113 -- First_Optional_Parameter Node14
114 -- Normalized_Position Uint14
115 -- Shadow_Entities List14
117 -- Discriminant_Number Uint15
118 -- DT_Position Uint15
119 -- DT_Entry_Count Uint15
120 -- Entry_Bodies_Array Node15
121 -- Entry_Parameters_Type Node15
122 -- Extra_Formal Node15
123 -- Lit_Indexes Node15
124 -- Primitive_Operations Elist15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
130 -- Access_Disp_Table Elist16
131 -- Cloned_Subtype Node16
133 -- Entry_Formal Node16
134 -- First_Private_Entity Node16
135 -- Lit_Strings Node16
136 -- String_Literal_Length Uint16
137 -- Unset_Reference Node16
139 -- Actual_Subtype Node17
140 -- Digits_Value Uint17
141 -- Discriminal Node17
142 -- First_Entity Node17
143 -- First_Index Node17
144 -- First_Literal Node17
147 -- Non_Limited_View Node17
151 -- Corresponding_Concurrent_Type Node18
152 -- Corresponding_Record_Type Node18
153 -- Delta_Value Ureal18
154 -- Enclosing_Scope Node18
155 -- Equivalent_Type Node18
156 -- Private_Dependents Elist18
157 -- Renamed_Entity Node18
158 -- Renamed_Object Node18
160 -- Body_Entity Node19
161 -- Corresponding_Discriminant Node19
162 -- Finalization_Chain_Entity Node19
163 -- Parent_Subtype Node19
164 -- Related_Array_Object Node19
165 -- Size_Check_Code Node19
166 -- Spec_Entity Node19
167 -- Underlying_Full_View Node19
169 -- Component_Type Node20
170 -- Default_Value Node20
171 -- Directly_Designated_Type Node20
172 -- Discriminant_Checking_Func Node20
173 -- Discriminant_Default_Value Node20
174 -- Last_Entity Node20
175 -- Prival_Link Node20
176 -- Register_Exception_Call Node20
177 -- Scalar_Range Node20
179 -- Accept_Address Elist21
180 -- Default_Expr_Function Node21
181 -- Discriminant_Constraint Elist21
182 -- Interface_Name Node21
183 -- Original_Array_Type Node21
184 -- Small_Value Ureal21
186 -- Associated_Storage_Pool Node22
187 -- Component_Size Uint22
188 -- Corresponding_Remote_Type Node22
189 -- Enumeration_Rep_Expr Node22
190 -- Exception_Code Uint22
191 -- Original_Record_Component Node22
192 -- Private_View Node22
193 -- Protected_Formal Node22
194 -- Scope_Depth_Value Uint22
195 -- Shared_Var_Procs_Instance Node22
197 -- Associated_Final_Chain Node23
198 -- CR_Discriminant Node23
199 -- Entry_Cancel_Parameter Node23
200 -- Enum_Pos_To_Rep Node23
201 -- Extra_Constrained Node23
202 -- Generic_Renamings Elist23
203 -- Inner_Instances Elist23
204 -- Limited_View Node23
205 -- Packed_Array_Type Node23
206 -- Protection_Object Node23
207 -- Stored_Constraint Elist23
209 -- Related_Expression Node24
210 -- Spec_PPC_List Node24
212 -- Interface_Alias Node25
213 -- Interfaces Elist25
214 -- Debug_Renaming_Link Node25
215 -- DT_Offset_To_Top_Func Node25
216 -- Task_Body_Procedure Node25
218 -- Dispatch_Table_Wrappers Elist26
219 -- Last_Assignment Node26
220 -- Overridden_Operation Node26
221 -- Package_Instantiation Node26
222 -- Related_Type Node26
223 -- Relative_Deadline_Variable Node26
224 -- Static_Initialization Node26
226 -- Current_Use_Clause Node27
227 -- Wrapped_Entity Node27
229 -- Extra_Formals Node28
230 -- Underlying_Record_View Node28
232 ---------------------------------------------
233 -- Usage of Flags in Defining Entity Nodes --
234 ---------------------------------------------
236 -- All flags are unique, there is no overlaying, so each flag is physically
237 -- present in every entity. However, for many of the flags, it only makes
238 -- sense for them to be set true for certain subsets of entity kinds. See
239 -- the spec of Einfo for further details.
241 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
242 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
243 -- which are common to all nodes, including entity nodes.
246 -- Has_Discriminants Flag5
247 -- Is_Dispatching_Operation Flag6
248 -- Is_Immediately_Visible Flag7
250 -- Is_Potentially_Use_Visible Flag9
254 -- Is_Constrained Flag12
255 -- Is_Generic_Type Flag13
256 -- Depends_On_Private Flag14
258 -- Is_Volatile Flag16
259 -- Is_Internal Flag17
260 -- Has_Delayed_Freeze Flag18
261 -- Is_Abstract_Subprogram Flag19
262 -- Is_Concurrent_Record_Type Flag20
264 -- Has_Master_Entity Flag21
265 -- Needs_No_Actuals Flag22
266 -- Has_Storage_Size_Clause Flag23
267 -- Is_Imported Flag24
268 -- Is_Limited_Record Flag25
269 -- Has_Completion Flag26
270 -- Has_Pragma_Controlled Flag27
271 -- Is_Statically_Allocated Flag28
272 -- Has_Size_Clause Flag29
275 -- Checks_May_Be_Suppressed Flag31
276 -- Kill_Elaboration_Checks Flag32
277 -- Kill_Range_Checks Flag33
278 -- Kill_Tag_Checks Flag34
279 -- Is_Class_Wide_Equivalent_Type Flag35
280 -- Referenced_As_LHS Flag36
281 -- Is_Known_Non_Null Flag37
282 -- Can_Never_Be_Null Flag38
283 -- Is_Overriding_Operation Flag39
284 -- Body_Needed_For_SAL Flag40
286 -- Treat_As_Volatile Flag41
287 -- Is_Controlled Flag42
288 -- Has_Controlled_Component Flag43
290 -- In_Private_Part Flag45
291 -- Has_Alignment_Clause Flag46
293 -- In_Package_Body Flag48
295 -- Delay_Subprogram_Descriptors Flag50
298 -- Is_Entry_Formal Flag52
299 -- Is_Private_Descendant Flag53
300 -- Return_Present Flag54
301 -- Is_Tagged_Type Flag55
302 -- Has_Homonym Flag56
304 -- Non_Binary_Modulus Flag58
305 -- Is_Preelaborated Flag59
306 -- Is_Shared_Passive Flag60
308 -- Is_Remote_Types Flag61
309 -- Is_Remote_Call_Interface Flag62
310 -- Is_Character_Type Flag63
311 -- Is_Intrinsic_Subprogram Flag64
312 -- Has_Record_Rep_Clause Flag65
313 -- Has_Enumeration_Rep_Clause Flag66
314 -- Has_Small_Clause Flag67
315 -- Has_Component_Size_Clause Flag68
316 -- Is_Access_Constant Flag69
317 -- Is_First_Subtype Flag70
319 -- Has_Completion_In_Body Flag71
320 -- Has_Unknown_Discriminants Flag72
321 -- Is_Child_Unit Flag73
322 -- Is_CPP_Class Flag74
323 -- Has_Non_Standard_Rep Flag75
324 -- Is_Constructor Flag76
325 -- Static_Elaboration_Desired Flag77
327 -- Has_All_Calls_Remote Flag79
328 -- Is_Constr_Subt_For_U_Nominal Flag80
330 -- Is_Asynchronous Flag81
331 -- Has_Gigi_Rep_Item Flag82
332 -- Has_Machine_Radix_Clause Flag83
333 -- Machine_Radix_10 Flag84
335 -- Has_Atomic_Components Flag86
336 -- Has_Volatile_Components Flag87
337 -- Discard_Names Flag88
338 -- Is_Interrupt_Handler Flag89
339 -- Returns_By_Ref Flag90
342 -- Size_Known_At_Compile_Time Flag92
343 -- Has_Subprogram_Descriptor Flag93
344 -- Is_Generic_Actual_Type Flag94
345 -- Uses_Sec_Stack Flag95
346 -- Warnings_Off Flag96
347 -- Is_Controlling_Formal Flag97
348 -- Has_Controlling_Result Flag98
349 -- Is_Exported Flag99
350 -- Has_Specified_Layout Flag100
352 -- Has_Nested_Block_With_Handler Flag101
354 -- Is_Completely_Hidden Flag103
355 -- Address_Taken Flag104
356 -- Suppress_Init_Proc Flag105
357 -- Is_Limited_Composite Flag106
358 -- Is_Private_Composite Flag107
359 -- Default_Expressions_Processed Flag108
360 -- Is_Non_Static_Subtype Flag109
361 -- Has_External_Tag_Rep_Clause Flag110
363 -- Is_Formal_Subprogram Flag111
364 -- Is_Renaming_Of_Object Flag112
366 -- Delay_Cleanups Flag114
367 -- Never_Set_In_Source Flag115
368 -- Is_Visible_Child_Unit Flag116
369 -- Is_Unchecked_Union Flag117
370 -- Is_For_Access_Subtype Flag118
371 -- Has_Convention_Pragma Flag119
372 -- Has_Primitive_Operations Flag120
374 -- Has_Pragma_Pack Flag121
375 -- Is_Bit_Packed_Array Flag122
376 -- Has_Unchecked_Union Flag123
377 -- Is_Eliminated Flag124
378 -- C_Pass_By_Copy Flag125
379 -- Is_Instantiated Flag126
380 -- Is_Valued_Procedure Flag127
381 -- (used for Component_Alignment) Flag128
382 -- (used for Component_Alignment) Flag129
383 -- Is_Generic_Instance Flag130
385 -- No_Pool_Assigned Flag131
386 -- Is_AST_Entry Flag132
387 -- Is_VMS_Exception Flag133
388 -- Is_Optional_Parameter Flag134
389 -- Has_Aliased_Components Flag135
390 -- No_Strict_Aliasing Flag136
391 -- Is_Machine_Code_Subprogram Flag137
392 -- Is_Packed_Array_Type Flag138
393 -- Has_Biased_Representation Flag139
394 -- Has_Complex_Representation Flag140
396 -- Is_Constr_Subt_For_UN_Aliased Flag141
397 -- Has_Missing_Return Flag142
398 -- Has_Recursive_Call Flag143
399 -- Is_Unsigned_Type Flag144
400 -- Strict_Alignment Flag145
401 -- Is_Abstract_Type Flag146
402 -- Needs_Debug_Info Flag147
403 -- Suppress_Elaboration_Warnings Flag148
404 -- Is_Compilation_Unit Flag149
405 -- Has_Pragma_Elaborate_Body Flag150
408 -- Entry_Accepted Flag152
409 -- Is_Obsolescent Flag153
410 -- Has_Per_Object_Constraint Flag154
411 -- Has_Private_Declaration Flag155
412 -- Referenced Flag156
413 -- Has_Pragma_Inline Flag157
414 -- Finalize_Storage_Only Flag158
415 -- From_With_Type Flag159
416 -- Is_Package_Body_Entity Flag160
418 -- Has_Qualified_Name Flag161
419 -- Nonzero_Is_True Flag162
420 -- Is_True_Constant Flag163
421 -- Reverse_Bit_Order Flag164
422 -- Suppress_Style_Checks Flag165
423 -- Debug_Info_Off Flag166
424 -- Sec_Stack_Needed_For_Return Flag167
425 -- Materialize_Entity Flag168
426 -- Has_Pragma_Thread_Local_Storage Flag169
427 -- Is_Known_Valid Flag170
429 -- Is_Hidden_Open_Scope Flag171
430 -- Has_Object_Size_Clause Flag172
431 -- Has_Fully_Qualified_Name Flag173
432 -- Elaboration_Entity_Required Flag174
433 -- Has_Forward_Instantiation Flag175
434 -- Is_Discrim_SO_Function Flag176
435 -- Size_Depends_On_Discriminant Flag177
436 -- Is_Null_Init_Proc Flag178
437 -- Has_Pragma_Pure_Function Flag179
438 -- Has_Pragma_Unreferenced Flag180
440 -- Has_Contiguous_Rep Flag181
441 -- Has_Xref_Entry Flag182
442 -- Must_Be_On_Byte_Boundary Flag183
443 -- Has_Stream_Size_Clause Flag184
444 -- Is_Ada_2005_Only Flag185
445 -- Is_Interface Flag186
446 -- Has_Constrained_Partial_View Flag187
447 -- Has_Persistent_BSS Flag188
448 -- Is_Pure_Unit_Access_Type Flag189
449 -- Has_Specified_Stream_Input Flag190
451 -- Has_Specified_Stream_Output Flag191
452 -- Has_Specified_Stream_Read Flag192
453 -- Has_Specified_Stream_Write Flag193
454 -- Is_Local_Anonymous_Access Flag194
455 -- Is_Primitive_Wrapper Flag195
456 -- Was_Hidden Flag196
457 -- Is_Limited_Interface Flag197
459 -- Has_Anon_Block_Suffix Flag201
460 -- Itype_Printed Flag202
461 -- Has_Pragma_Pure Flag203
462 -- Is_Known_Null Flag204
463 -- Low_Bound_Tested Flag205
464 -- Is_Visible_Formal Flag206
465 -- Known_To_Have_Preelab_Init Flag207
466 -- Must_Have_Preelab_Init Flag208
467 -- Is_Return_Object Flag209
468 -- Elaborate_Body_Desirable Flag210
470 -- Has_Static_Discriminants Flag211
471 -- Has_Pragma_Unreferenced_Objects Flag212
472 -- Requires_Overriding Flag213
474 -- Has_Up_Level_Access Flag215
475 -- Universal_Aliasing Flag216
476 -- Suppress_Value_Tracking_On_Call Flag217
477 -- Is_Primitive Flag218
478 -- Has_Initial_Value Flag219
479 -- Has_Dispatch_Table Flag220
481 -- Has_Pragma_Preelab_Init Flag221
482 -- Used_As_Generic_Actual Flag222
483 -- Is_Descendent_Of_Address Flag223
486 -- Is_Only_Out_Parameter Flag226
487 -- Referenced_As_Out_Parameter Flag227
488 -- Has_Thunks Flag228
489 -- Can_Use_Internal_Rep Flag229
490 -- Has_Pragma_Inline_Always Flag230
492 -- Renamed_In_Spec Flag231
493 -- Implemented_By_Entry Flag232
494 -- Has_Pragma_Unmodified Flag233
495 -- Is_Dispatch_Table_Entity Flag234
496 -- Is_Trivial_Subprogram Flag235
497 -- Warnings_Off_Used Flag236
498 -- Warnings_Off_Used_Unmodified Flag237
499 -- Warnings_Off_Used_Unreferenced Flag238
500 -- OK_To_Reorder_Components Flag239
501 -- Has_Postconditions Flag240
503 -- Optimize_Alignment_Space Flag241
504 -- Optimize_Alignment_Time Flag242
505 -- Overlays_Constant Flag243
506 -- Is_RACW_Stub_Type Flag244
507 -- Is_Private_Primitive Flag245
508 -- Is_Underlying_Record_View Flag246
509 -- OK_To_Rename Flag247
515 -----------------------
516 -- Local subprograms --
517 -----------------------
519 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
;
520 -- Returns the attribute definition clause for Id whose name is Rep_Name.
521 -- Returns Empty if no matching attribute definition clause found for Id.
527 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
is
531 Ritem
:= First_Rep_Item
(Id
);
532 while Present
(Ritem
) loop
533 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
534 and then Chars
(Ritem
) = Rep_Name
538 Ritem
:= Next_Rep_Item
(Ritem
);
545 --------------------------------
546 -- Attribute Access Functions --
547 --------------------------------
549 function Accept_Address
(Id
: E
) return L
is
554 function Access_Disp_Table
(Id
: E
) return L
is
556 pragma Assert
(Is_Tagged_Type
(Id
));
557 return Elist16
(Implementation_Base_Type
(Id
));
558 end Access_Disp_Table
;
560 function Actual_Subtype
(Id
: E
) return E
is
563 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
564 or else Is_Formal
(Id
));
568 function Address_Taken
(Id
: E
) return B
is
573 function Aft_Value
(Id
: E
) return U
is
575 Delta_Val
: Ureal
:= Delta_Value
(Id
);
577 while Delta_Val
< Ureal_Tenth
loop
578 Delta_Val
:= Delta_Val
* Ureal_10
;
579 Result
:= Result
+ 1;
582 return UI_From_Int
(Result
);
585 function Alias
(Id
: E
) return E
is
588 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
592 function Alignment
(Id
: E
) return U
is
594 pragma Assert
(Is_Type
(Id
)
595 or else Is_Formal
(Id
)
596 or else Ekind_In
(Id
, E_Loop_Parameter
,
603 function Associated_Final_Chain
(Id
: E
) return E
is
605 pragma Assert
(Is_Access_Type
(Id
));
607 end Associated_Final_Chain
;
609 function Associated_Formal_Package
(Id
: E
) return E
is
611 pragma Assert
(Ekind
(Id
) = E_Package
);
613 end Associated_Formal_Package
;
615 function Associated_Node_For_Itype
(Id
: E
) return N
is
618 end Associated_Node_For_Itype
;
620 function Associated_Storage_Pool
(Id
: E
) return E
is
622 pragma Assert
(Is_Access_Type
(Id
));
623 return Node22
(Root_Type
(Id
));
624 end Associated_Storage_Pool
;
626 function Barrier_Function
(Id
: E
) return N
is
628 pragma Assert
(Is_Entry
(Id
));
630 end Barrier_Function
;
632 function Block_Node
(Id
: E
) return N
is
634 pragma Assert
(Ekind
(Id
) = E_Block
);
638 function Body_Entity
(Id
: E
) return E
is
640 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
644 function Body_Needed_For_SAL
(Id
: E
) return B
is
647 (Ekind
(Id
) = E_Package
648 or else Is_Subprogram
(Id
)
649 or else Is_Generic_Unit
(Id
));
651 end Body_Needed_For_SAL
;
653 function C_Pass_By_Copy
(Id
: E
) return B
is
655 pragma Assert
(Is_Record_Type
(Id
));
656 return Flag125
(Implementation_Base_Type
(Id
));
659 function Can_Never_Be_Null
(Id
: E
) return B
is
662 end Can_Never_Be_Null
;
664 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
667 end Checks_May_Be_Suppressed
;
669 function Class_Wide_Type
(Id
: E
) return E
is
671 pragma Assert
(Is_Type
(Id
));
675 function Cloned_Subtype
(Id
: E
) return E
is
677 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
681 function Component_Bit_Offset
(Id
: E
) return U
is
683 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
685 end Component_Bit_Offset
;
687 function Component_Clause
(Id
: E
) return N
is
689 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
691 end Component_Clause
;
693 function Component_Size
(Id
: E
) return U
is
695 pragma Assert
(Is_Array_Type
(Id
));
696 return Uint22
(Implementation_Base_Type
(Id
));
699 function Component_Type
(Id
: E
) return E
is
701 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
702 return Node20
(Implementation_Base_Type
(Id
));
705 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
707 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
709 end Corresponding_Concurrent_Type
;
711 function Corresponding_Discriminant
(Id
: E
) return E
is
713 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
715 end Corresponding_Discriminant
;
717 function Corresponding_Equality
(Id
: E
) return E
is
720 (Ekind
(Id
) = E_Function
721 and then not Comes_From_Source
(Id
)
722 and then Chars
(Id
) = Name_Op_Ne
);
724 end Corresponding_Equality
;
726 function Corresponding_Record_Type
(Id
: E
) return E
is
728 pragma Assert
(Is_Concurrent_Type
(Id
));
730 end Corresponding_Record_Type
;
732 function Corresponding_Remote_Type
(Id
: E
) return E
is
735 end Corresponding_Remote_Type
;
737 function Current_Use_Clause
(Id
: E
) return E
is
739 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
741 end Current_Use_Clause
;
743 function Current_Value
(Id
: E
) return N
is
745 pragma Assert
(Ekind
(Id
) in Object_Kind
);
749 function CR_Discriminant
(Id
: E
) return E
is
754 function Debug_Info_Off
(Id
: E
) return B
is
759 function Debug_Renaming_Link
(Id
: E
) return E
is
762 end Debug_Renaming_Link
;
764 function Default_Expr_Function
(Id
: E
) return E
is
766 pragma Assert
(Is_Formal
(Id
));
768 end Default_Expr_Function
;
770 function Default_Expressions_Processed
(Id
: E
) return B
is
773 end Default_Expressions_Processed
;
775 function Default_Value
(Id
: E
) return N
is
777 pragma Assert
(Is_Formal
(Id
));
781 function Delay_Cleanups
(Id
: E
) return B
is
786 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
789 end Delay_Subprogram_Descriptors
;
791 function Delta_Value
(Id
: E
) return R
is
793 pragma Assert
(Is_Fixed_Point_Type
(Id
));
797 function Dependent_Instances
(Id
: E
) return L
is
799 pragma Assert
(Is_Generic_Instance
(Id
));
801 end Dependent_Instances
;
803 function Depends_On_Private
(Id
: E
) return B
is
805 pragma Assert
(Nkind
(Id
) in N_Entity
);
807 end Depends_On_Private
;
809 function Digits_Value
(Id
: E
) return U
is
812 (Is_Floating_Point_Type
(Id
)
813 or else Is_Decimal_Fixed_Point_Type
(Id
));
817 function Directly_Designated_Type
(Id
: E
) return E
is
819 pragma Assert
(Is_Access_Type
(Id
));
821 end Directly_Designated_Type
;
823 function Discard_Names
(Id
: E
) return B
is
828 function Discriminal
(Id
: E
) return E
is
830 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
834 function Discriminal_Link
(Id
: E
) return N
is
837 end Discriminal_Link
;
839 function Discriminant_Checking_Func
(Id
: E
) return E
is
841 pragma Assert
(Ekind
(Id
) = E_Component
);
843 end Discriminant_Checking_Func
;
845 function Discriminant_Constraint
(Id
: E
) return L
is
847 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
849 end Discriminant_Constraint
;
851 function Discriminant_Default_Value
(Id
: E
) return N
is
853 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
855 end Discriminant_Default_Value
;
857 function Discriminant_Number
(Id
: E
) return U
is
859 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
861 end Discriminant_Number
;
863 function Dispatch_Table_Wrappers
(Id
: E
) return L
is
865 pragma Assert
(Is_Tagged_Type
(Id
));
866 return Elist26
(Implementation_Base_Type
(Id
));
867 end Dispatch_Table_Wrappers
;
869 function DT_Entry_Count
(Id
: E
) return U
is
871 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
875 function DT_Offset_To_Top_Func
(Id
: E
) return E
is
877 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
879 end DT_Offset_To_Top_Func
;
881 function DT_Position
(Id
: E
) return U
is
883 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
884 and then Present
(DTC_Entity
(Id
)));
888 function DTC_Entity
(Id
: E
) return E
is
890 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
894 function Elaborate_Body_Desirable
(Id
: E
) return B
is
896 pragma Assert
(Ekind
(Id
) = E_Package
);
898 end Elaborate_Body_Desirable
;
900 function Elaboration_Entity
(Id
: E
) return E
is
905 Ekind
(Id
) = E_Package
907 Is_Generic_Unit
(Id
));
909 end Elaboration_Entity
;
911 function Elaboration_Entity_Required
(Id
: E
) return B
is
916 Ekind
(Id
) = E_Package
918 Is_Generic_Unit
(Id
));
920 end Elaboration_Entity_Required
;
922 function Enclosing_Scope
(Id
: E
) return E
is
927 function Entry_Accepted
(Id
: E
) return B
is
929 pragma Assert
(Is_Entry
(Id
));
933 function Entry_Bodies_Array
(Id
: E
) return E
is
936 end Entry_Bodies_Array
;
938 function Entry_Cancel_Parameter
(Id
: E
) return E
is
941 end Entry_Cancel_Parameter
;
943 function Entry_Component
(Id
: E
) return E
is
948 function Entry_Formal
(Id
: E
) return E
is
953 function Entry_Index_Constant
(Id
: E
) return N
is
955 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
957 end Entry_Index_Constant
;
959 function Entry_Parameters_Type
(Id
: E
) return E
is
962 end Entry_Parameters_Type
;
964 function Enum_Pos_To_Rep
(Id
: E
) return E
is
966 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
970 function Enumeration_Pos
(Id
: E
) return Uint
is
972 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
976 function Enumeration_Rep
(Id
: E
) return U
is
978 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
982 function Enumeration_Rep_Expr
(Id
: E
) return N
is
984 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
986 end Enumeration_Rep_Expr
;
988 function Equivalent_Type
(Id
: E
) return E
is
991 (Ekind_In
(Id
, E_Class_Wide_Type
,
992 E_Class_Wide_Subtype
,
993 E_Access_Protected_Subprogram_Type
,
994 E_Anonymous_Access_Protected_Subprogram_Type
,
995 E_Access_Subprogram_Type
,
1000 function Esize
(Id
: E
) return Uint
is
1005 function Exception_Code
(Id
: E
) return Uint
is
1007 pragma Assert
(Ekind
(Id
) = E_Exception
);
1011 function Extra_Accessibility
(Id
: E
) return E
is
1013 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
1015 end Extra_Accessibility
;
1017 function Extra_Constrained
(Id
: E
) return E
is
1019 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
1021 end Extra_Constrained
;
1023 function Extra_Formal
(Id
: E
) return E
is
1028 function Extra_Formals
(Id
: E
) return E
is
1031 (Is_Overloadable
(Id
)
1032 or else Ekind_In
(Id
, E_Entry_Family
,
1034 E_Subprogram_Type
));
1038 function Can_Use_Internal_Rep
(Id
: E
) return B
is
1040 pragma Assert
(Is_Access_Subprogram_Type
(Base_Type
(Id
)));
1041 return Flag229
(Base_Type
(Id
));
1042 end Can_Use_Internal_Rep
;
1044 function Finalization_Chain_Entity
(Id
: E
) return E
is
1047 end Finalization_Chain_Entity
;
1049 function Finalize_Storage_Only
(Id
: E
) return B
is
1051 pragma Assert
(Is_Type
(Id
));
1052 return Flag158
(Base_Type
(Id
));
1053 end Finalize_Storage_Only
;
1055 function First_Entity
(Id
: E
) return E
is
1060 function First_Exit_Statement
(Id
: E
) return N
is
1062 pragma Assert
(Ekind
(Id
) = E_Loop
);
1064 end First_Exit_Statement
;
1066 function First_Index
(Id
: E
) return N
is
1068 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
1072 function First_Literal
(Id
: E
) return E
is
1074 pragma Assert
(Is_Enumeration_Type
(Id
));
1078 function First_Optional_Parameter
(Id
: E
) return E
is
1080 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1082 end First_Optional_Parameter
;
1084 function First_Private_Entity
(Id
: E
) return E
is
1086 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
1087 or else Ekind
(Id
) in Concurrent_Kind
);
1089 end First_Private_Entity
;
1091 function First_Rep_Item
(Id
: E
) return E
is
1096 function Freeze_Node
(Id
: E
) return N
is
1101 function From_With_Type
(Id
: E
) return B
is
1103 return Flag159
(Id
);
1106 function Full_View
(Id
: E
) return E
is
1108 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1112 function Generic_Homonym
(Id
: E
) return E
is
1114 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1116 end Generic_Homonym
;
1118 function Generic_Renamings
(Id
: E
) return L
is
1120 return Elist23
(Id
);
1121 end Generic_Renamings
;
1123 function Handler_Records
(Id
: E
) return S
is
1126 end Handler_Records
;
1128 function Has_Aliased_Components
(Id
: E
) return B
is
1130 return Flag135
(Implementation_Base_Type
(Id
));
1131 end Has_Aliased_Components
;
1133 function Has_Alignment_Clause
(Id
: E
) return B
is
1136 end Has_Alignment_Clause
;
1138 function Has_All_Calls_Remote
(Id
: E
) return B
is
1141 end Has_All_Calls_Remote
;
1143 function Has_Anon_Block_Suffix
(Id
: E
) return B
is
1145 return Flag201
(Id
);
1146 end Has_Anon_Block_Suffix
;
1148 function Has_Atomic_Components
(Id
: E
) return B
is
1150 return Flag86
(Implementation_Base_Type
(Id
));
1151 end Has_Atomic_Components
;
1153 function Has_Biased_Representation
(Id
: E
) return B
is
1155 return Flag139
(Id
);
1156 end Has_Biased_Representation
;
1158 function Has_Completion
(Id
: E
) return B
is
1163 function Has_Completion_In_Body
(Id
: E
) return B
is
1165 pragma Assert
(Is_Type
(Id
));
1167 end Has_Completion_In_Body
;
1169 function Has_Complex_Representation
(Id
: E
) return B
is
1171 pragma Assert
(Is_Type
(Id
));
1172 return Flag140
(Implementation_Base_Type
(Id
));
1173 end Has_Complex_Representation
;
1175 function Has_Component_Size_Clause
(Id
: E
) return B
is
1177 pragma Assert
(Is_Array_Type
(Id
));
1178 return Flag68
(Implementation_Base_Type
(Id
));
1179 end Has_Component_Size_Clause
;
1181 function Has_Constrained_Partial_View
(Id
: E
) return B
is
1183 pragma Assert
(Is_Type
(Id
));
1184 return Flag187
(Id
);
1185 end Has_Constrained_Partial_View
;
1187 function Has_Controlled_Component
(Id
: E
) return B
is
1189 return Flag43
(Base_Type
(Id
));
1190 end Has_Controlled_Component
;
1192 function Has_Contiguous_Rep
(Id
: E
) return B
is
1194 return Flag181
(Id
);
1195 end Has_Contiguous_Rep
;
1197 function Has_Controlling_Result
(Id
: E
) return B
is
1200 end Has_Controlling_Result
;
1202 function Has_Convention_Pragma
(Id
: E
) return B
is
1204 return Flag119
(Id
);
1205 end Has_Convention_Pragma
;
1207 function Has_Delayed_Freeze
(Id
: E
) return B
is
1209 pragma Assert
(Nkind
(Id
) in N_Entity
);
1211 end Has_Delayed_Freeze
;
1213 function Has_Discriminants
(Id
: E
) return B
is
1215 pragma Assert
(Nkind
(Id
) in N_Entity
);
1217 end Has_Discriminants
;
1219 function Has_Dispatch_Table
(Id
: E
) return B
is
1221 pragma Assert
(Is_Tagged_Type
(Id
));
1222 return Flag220
(Id
);
1223 end Has_Dispatch_Table
;
1225 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1227 pragma Assert
(Is_Enumeration_Type
(Id
));
1229 end Has_Enumeration_Rep_Clause
;
1231 function Has_Exit
(Id
: E
) return B
is
1236 function Has_External_Tag_Rep_Clause
(Id
: E
) return B
is
1238 pragma Assert
(Is_Tagged_Type
(Id
));
1239 return Flag110
(Id
);
1240 end Has_External_Tag_Rep_Clause
;
1242 function Has_Forward_Instantiation
(Id
: E
) return B
is
1244 return Flag175
(Id
);
1245 end Has_Forward_Instantiation
;
1247 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1249 return Flag173
(Id
);
1250 end Has_Fully_Qualified_Name
;
1252 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1255 end Has_Gigi_Rep_Item
;
1257 function Has_Homonym
(Id
: E
) return B
is
1262 function Has_Initial_Value
(Id
: E
) return B
is
1265 (Ekind
(Id
) = E_Variable
or else Is_Formal
(Id
));
1266 return Flag219
(Id
);
1267 end Has_Initial_Value
;
1269 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1271 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1273 end Has_Machine_Radix_Clause
;
1275 function Has_Master_Entity
(Id
: E
) return B
is
1278 end Has_Master_Entity
;
1280 function Has_Missing_Return
(Id
: E
) return B
is
1282 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
1283 return Flag142
(Id
);
1284 end Has_Missing_Return
;
1286 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1288 return Flag101
(Id
);
1289 end Has_Nested_Block_With_Handler
;
1291 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1293 return Flag75
(Implementation_Base_Type
(Id
));
1294 end Has_Non_Standard_Rep
;
1296 function Has_Object_Size_Clause
(Id
: E
) return B
is
1298 pragma Assert
(Is_Type
(Id
));
1299 return Flag172
(Id
);
1300 end Has_Object_Size_Clause
;
1302 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1304 return Flag154
(Id
);
1305 end Has_Per_Object_Constraint
;
1307 function Has_Persistent_BSS
(Id
: E
) return B
is
1309 return Flag188
(Id
);
1310 end Has_Persistent_BSS
;
1312 function Has_Postconditions
(Id
: E
) return B
is
1314 pragma Assert
(Is_Subprogram
(Id
));
1315 return Flag240
(Id
);
1316 end Has_Postconditions
;
1318 function Has_Pragma_Controlled
(Id
: E
) return B
is
1320 pragma Assert
(Is_Access_Type
(Id
));
1321 return Flag27
(Implementation_Base_Type
(Id
));
1322 end Has_Pragma_Controlled
;
1324 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1326 return Flag150
(Id
);
1327 end Has_Pragma_Elaborate_Body
;
1329 function Has_Pragma_Inline
(Id
: E
) return B
is
1331 return Flag157
(Id
);
1332 end Has_Pragma_Inline
;
1334 function Has_Pragma_Inline_Always
(Id
: E
) return B
is
1336 return Flag230
(Id
);
1337 end Has_Pragma_Inline_Always
;
1339 function Has_Pragma_Pack
(Id
: E
) return B
is
1341 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1342 return Flag121
(Implementation_Base_Type
(Id
));
1343 end Has_Pragma_Pack
;
1345 function Has_Pragma_Preelab_Init
(Id
: E
) return B
is
1347 return Flag221
(Id
);
1348 end Has_Pragma_Preelab_Init
;
1350 function Has_Pragma_Pure
(Id
: E
) return B
is
1352 return Flag203
(Id
);
1353 end Has_Pragma_Pure
;
1355 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1357 return Flag179
(Id
);
1358 end Has_Pragma_Pure_Function
;
1360 function Has_Pragma_Thread_Local_Storage
(Id
: E
) return B
is
1362 return Flag169
(Id
);
1363 end Has_Pragma_Thread_Local_Storage
;
1365 function Has_Pragma_Unmodified
(Id
: E
) return B
is
1367 return Flag233
(Id
);
1368 end Has_Pragma_Unmodified
;
1370 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1372 return Flag180
(Id
);
1373 end Has_Pragma_Unreferenced
;
1375 function Has_Pragma_Unreferenced_Objects
(Id
: E
) return B
is
1377 pragma Assert
(Is_Type
(Id
));
1378 return Flag212
(Id
);
1379 end Has_Pragma_Unreferenced_Objects
;
1381 function Has_Primitive_Operations
(Id
: E
) return B
is
1383 pragma Assert
(Is_Type
(Id
));
1384 return Flag120
(Base_Type
(Id
));
1385 end Has_Primitive_Operations
;
1387 function Has_Private_Declaration
(Id
: E
) return B
is
1389 return Flag155
(Id
);
1390 end Has_Private_Declaration
;
1392 function Has_Qualified_Name
(Id
: E
) return B
is
1394 return Flag161
(Id
);
1395 end Has_Qualified_Name
;
1397 function Has_RACW
(Id
: E
) return B
is
1399 pragma Assert
(Ekind
(Id
) = E_Package
);
1400 return Flag214
(Id
);
1403 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1405 pragma Assert
(Is_Record_Type
(Id
));
1406 return Flag65
(Implementation_Base_Type
(Id
));
1407 end Has_Record_Rep_Clause
;
1409 function Has_Recursive_Call
(Id
: E
) return B
is
1411 pragma Assert
(Is_Subprogram
(Id
));
1412 return Flag143
(Id
);
1413 end Has_Recursive_Call
;
1415 function Has_Size_Clause
(Id
: E
) return B
is
1418 end Has_Size_Clause
;
1420 function Has_Small_Clause
(Id
: E
) return B
is
1423 end Has_Small_Clause
;
1425 function Has_Specified_Layout
(Id
: E
) return B
is
1427 pragma Assert
(Is_Type
(Id
));
1428 return Flag100
(Implementation_Base_Type
(Id
));
1429 end Has_Specified_Layout
;
1431 function Has_Specified_Stream_Input
(Id
: E
) return B
is
1433 pragma Assert
(Is_Type
(Id
));
1434 return Flag190
(Id
);
1435 end Has_Specified_Stream_Input
;
1437 function Has_Specified_Stream_Output
(Id
: E
) return B
is
1439 pragma Assert
(Is_Type
(Id
));
1440 return Flag191
(Id
);
1441 end Has_Specified_Stream_Output
;
1443 function Has_Specified_Stream_Read
(Id
: E
) return B
is
1445 pragma Assert
(Is_Type
(Id
));
1446 return Flag192
(Id
);
1447 end Has_Specified_Stream_Read
;
1449 function Has_Specified_Stream_Write
(Id
: E
) return B
is
1451 pragma Assert
(Is_Type
(Id
));
1452 return Flag193
(Id
);
1453 end Has_Specified_Stream_Write
;
1455 function Has_Static_Discriminants
(Id
: E
) return B
is
1457 pragma Assert
(Is_Type
(Id
));
1458 return Flag211
(Id
);
1459 end Has_Static_Discriminants
;
1461 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1463 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1464 return Flag23
(Implementation_Base_Type
(Id
));
1465 end Has_Storage_Size_Clause
;
1467 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1469 return Flag184
(Id
);
1470 end Has_Stream_Size_Clause
;
1472 function Has_Subprogram_Descriptor
(Id
: E
) return B
is
1475 end Has_Subprogram_Descriptor
;
1477 function Has_Task
(Id
: E
) return B
is
1479 return Flag30
(Base_Type
(Id
));
1482 function Has_Thunks
(Id
: E
) return B
is
1484 pragma Assert
(Ekind
(Id
) = E_Constant
);
1485 return Flag228
(Id
);
1488 function Has_Unchecked_Union
(Id
: E
) return B
is
1490 return Flag123
(Base_Type
(Id
));
1491 end Has_Unchecked_Union
;
1493 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1495 pragma Assert
(Is_Type
(Id
));
1497 end Has_Unknown_Discriminants
;
1499 function Has_Up_Level_Access
(Id
: E
) return B
is
1502 (Ekind_In
(Id
, E_Variable
, E_Constant
, E_Loop_Parameter
));
1503 return Flag215
(Id
);
1504 end Has_Up_Level_Access
;
1506 function Has_Volatile_Components
(Id
: E
) return B
is
1508 return Flag87
(Implementation_Base_Type
(Id
));
1509 end Has_Volatile_Components
;
1511 function Has_Xref_Entry
(Id
: E
) return B
is
1513 return Flag182
(Implementation_Base_Type
(Id
));
1516 function Hiding_Loop_Variable
(Id
: E
) return E
is
1518 pragma Assert
(Ekind
(Id
) = E_Variable
);
1520 end Hiding_Loop_Variable
;
1522 function Homonym
(Id
: E
) return E
is
1527 function Implemented_By_Entry
(Id
: E
) return B
is
1529 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1530 return Flag232
(Id
);
1531 end Implemented_By_Entry
;
1533 function Interfaces
(Id
: E
) return L
is
1535 pragma Assert
(Is_Record_Type
(Id
));
1536 return Elist25
(Id
);
1539 function Interface_Alias
(Id
: E
) return E
is
1541 pragma Assert
(Is_Subprogram
(Id
));
1543 end Interface_Alias
;
1545 function In_Package_Body
(Id
: E
) return B
is
1548 end In_Package_Body
;
1550 function In_Private_Part
(Id
: E
) return B
is
1553 end In_Private_Part
;
1555 function In_Use
(Id
: E
) return B
is
1557 pragma Assert
(Nkind
(Id
) in N_Entity
);
1561 function Inner_Instances
(Id
: E
) return L
is
1563 return Elist23
(Id
);
1564 end Inner_Instances
;
1566 function Interface_Name
(Id
: E
) return N
is
1571 function Is_Abstract_Subprogram
(Id
: E
) return B
is
1573 pragma Assert
(Is_Overloadable
(Id
));
1575 end Is_Abstract_Subprogram
;
1577 function Is_Abstract_Type
(Id
: E
) return B
is
1579 pragma Assert
(Is_Type
(Id
));
1580 return Flag146
(Id
);
1581 end Is_Abstract_Type
;
1583 function Is_Local_Anonymous_Access
(Id
: E
) return B
is
1585 pragma Assert
(Is_Access_Type
(Id
));
1586 return Flag194
(Id
);
1587 end Is_Local_Anonymous_Access
;
1589 function Is_Access_Constant
(Id
: E
) return B
is
1591 pragma Assert
(Is_Access_Type
(Id
));
1593 end Is_Access_Constant
;
1595 function Is_Ada_2005_Only
(Id
: E
) return B
is
1597 return Flag185
(Id
);
1598 end Is_Ada_2005_Only
;
1600 function Is_Aliased
(Id
: E
) return B
is
1602 pragma Assert
(Nkind
(Id
) in N_Entity
);
1606 function Is_AST_Entry
(Id
: E
) return B
is
1608 pragma Assert
(Is_Entry
(Id
));
1609 return Flag132
(Id
);
1612 function Is_Asynchronous
(Id
: E
) return B
is
1614 pragma Assert
(Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
1616 end Is_Asynchronous
;
1618 function Is_Atomic
(Id
: E
) return B
is
1623 function Is_Bit_Packed_Array
(Id
: E
) return B
is
1625 return Flag122
(Implementation_Base_Type
(Id
));
1626 end Is_Bit_Packed_Array
;
1628 function Is_Called
(Id
: E
) return B
is
1630 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
1631 return Flag102
(Id
);
1634 function Is_Character_Type
(Id
: E
) return B
is
1637 end Is_Character_Type
;
1639 function Is_Child_Unit
(Id
: E
) return B
is
1644 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
1647 end Is_Class_Wide_Equivalent_Type
;
1649 function Is_Compilation_Unit
(Id
: E
) return B
is
1651 return Flag149
(Id
);
1652 end Is_Compilation_Unit
;
1654 function Is_Completely_Hidden
(Id
: E
) return B
is
1656 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1657 return Flag103
(Id
);
1658 end Is_Completely_Hidden
;
1660 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
1663 end Is_Constr_Subt_For_U_Nominal
;
1665 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
1667 return Flag141
(Id
);
1668 end Is_Constr_Subt_For_UN_Aliased
;
1670 function Is_Constrained
(Id
: E
) return B
is
1672 pragma Assert
(Nkind
(Id
) in N_Entity
);
1676 function Is_Constructor
(Id
: E
) return B
is
1681 function Is_Controlled
(Id
: E
) return B
is
1683 return Flag42
(Base_Type
(Id
));
1686 function Is_Controlling_Formal
(Id
: E
) return B
is
1688 pragma Assert
(Is_Formal
(Id
));
1690 end Is_Controlling_Formal
;
1692 function Is_CPP_Class
(Id
: E
) return B
is
1697 function Is_Descendent_Of_Address
(Id
: E
) return B
is
1699 pragma Assert
(Is_Type
(Id
));
1700 return Flag223
(Id
);
1701 end Is_Descendent_Of_Address
;
1703 function Is_Discrim_SO_Function
(Id
: E
) return B
is
1705 return Flag176
(Id
);
1706 end Is_Discrim_SO_Function
;
1708 function Is_Dispatch_Table_Entity
(Id
: E
) return B
is
1710 return Flag234
(Id
);
1711 end Is_Dispatch_Table_Entity
;
1713 function Is_Dispatching_Operation
(Id
: E
) return B
is
1715 pragma Assert
(Nkind
(Id
) in N_Entity
);
1717 end Is_Dispatching_Operation
;
1719 function Is_Eliminated
(Id
: E
) return B
is
1721 return Flag124
(Id
);
1724 function Is_Entry_Formal
(Id
: E
) return B
is
1727 end Is_Entry_Formal
;
1729 function Is_Exported
(Id
: E
) return B
is
1734 function Is_First_Subtype
(Id
: E
) return B
is
1737 end Is_First_Subtype
;
1739 function Is_For_Access_Subtype
(Id
: E
) return B
is
1741 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
1742 return Flag118
(Id
);
1743 end Is_For_Access_Subtype
;
1745 function Is_Formal_Subprogram
(Id
: E
) return B
is
1747 return Flag111
(Id
);
1748 end Is_Formal_Subprogram
;
1750 function Is_Frozen
(Id
: E
) return B
is
1755 function Is_Generic_Actual_Type
(Id
: E
) return B
is
1757 pragma Assert
(Is_Type
(Id
));
1759 end Is_Generic_Actual_Type
;
1761 function Is_Generic_Instance
(Id
: E
) return B
is
1763 return Flag130
(Id
);
1764 end Is_Generic_Instance
;
1766 function Is_Generic_Type
(Id
: E
) return B
is
1768 pragma Assert
(Nkind
(Id
) in N_Entity
);
1770 end Is_Generic_Type
;
1772 function Is_Hidden
(Id
: E
) return B
is
1777 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
1779 return Flag171
(Id
);
1780 end Is_Hidden_Open_Scope
;
1782 function Is_Immediately_Visible
(Id
: E
) return B
is
1784 pragma Assert
(Nkind
(Id
) in N_Entity
);
1786 end Is_Immediately_Visible
;
1788 function Is_Imported
(Id
: E
) return B
is
1793 function Is_Inlined
(Id
: E
) return B
is
1798 function Is_Interface
(Id
: E
) return B
is
1800 return Flag186
(Id
);
1803 function Is_Instantiated
(Id
: E
) return B
is
1805 return Flag126
(Id
);
1806 end Is_Instantiated
;
1808 function Is_Internal
(Id
: E
) return B
is
1810 pragma Assert
(Nkind
(Id
) in N_Entity
);
1814 function Is_Interrupt_Handler
(Id
: E
) return B
is
1816 pragma Assert
(Nkind
(Id
) in N_Entity
);
1818 end Is_Interrupt_Handler
;
1820 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
1823 end Is_Intrinsic_Subprogram
;
1825 function Is_Itype
(Id
: E
) return B
is
1830 function Is_Known_Non_Null
(Id
: E
) return B
is
1833 end Is_Known_Non_Null
;
1835 function Is_Known_Null
(Id
: E
) return B
is
1837 return Flag204
(Id
);
1840 function Is_Known_Valid
(Id
: E
) return B
is
1842 return Flag170
(Id
);
1845 function Is_Limited_Composite
(Id
: E
) return B
is
1847 return Flag106
(Id
);
1848 end Is_Limited_Composite
;
1850 function Is_Limited_Interface
(Id
: E
) return B
is
1852 return Flag197
(Id
);
1853 end Is_Limited_Interface
;
1855 function Is_Limited_Record
(Id
: E
) return B
is
1858 end Is_Limited_Record
;
1860 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
1862 pragma Assert
(Is_Subprogram
(Id
));
1863 return Flag137
(Id
);
1864 end Is_Machine_Code_Subprogram
;
1866 function Is_Non_Static_Subtype
(Id
: E
) return B
is
1868 pragma Assert
(Is_Type
(Id
));
1869 return Flag109
(Id
);
1870 end Is_Non_Static_Subtype
;
1872 function Is_Null_Init_Proc
(Id
: E
) return B
is
1874 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1875 return Flag178
(Id
);
1876 end Is_Null_Init_Proc
;
1878 function Is_Obsolescent
(Id
: E
) return B
is
1880 return Flag153
(Id
);
1883 function Is_Only_Out_Parameter
(Id
: E
) return B
is
1885 pragma Assert
(Is_Formal
(Id
));
1886 return Flag226
(Id
);
1887 end Is_Only_Out_Parameter
;
1889 function Is_Optional_Parameter
(Id
: E
) return B
is
1891 pragma Assert
(Is_Formal
(Id
));
1892 return Flag134
(Id
);
1893 end Is_Optional_Parameter
;
1895 function Is_Overriding_Operation
(Id
: E
) return B
is
1897 pragma Assert
(Is_Subprogram
(Id
));
1899 end Is_Overriding_Operation
;
1901 function Is_Package_Body_Entity
(Id
: E
) return B
is
1903 return Flag160
(Id
);
1904 end Is_Package_Body_Entity
;
1906 function Is_Packed
(Id
: E
) return B
is
1908 return Flag51
(Implementation_Base_Type
(Id
));
1911 function Is_Packed_Array_Type
(Id
: E
) return B
is
1913 return Flag138
(Id
);
1914 end Is_Packed_Array_Type
;
1916 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
1918 pragma Assert
(Nkind
(Id
) in N_Entity
);
1920 end Is_Potentially_Use_Visible
;
1922 function Is_Preelaborated
(Id
: E
) return B
is
1925 end Is_Preelaborated
;
1927 function Is_Primitive
(Id
: E
) return B
is
1930 (Is_Overloadable
(Id
)
1931 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
1932 return Flag218
(Id
);
1935 function Is_Primitive_Wrapper
(Id
: E
) return B
is
1937 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1938 return Flag195
(Id
);
1939 end Is_Primitive_Wrapper
;
1941 function Is_Private_Composite
(Id
: E
) return B
is
1943 pragma Assert
(Is_Type
(Id
));
1944 return Flag107
(Id
);
1945 end Is_Private_Composite
;
1947 function Is_Private_Descendant
(Id
: E
) return B
is
1950 end Is_Private_Descendant
;
1952 function Is_Private_Primitive
(Id
: E
) return B
is
1954 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1955 return Flag245
(Id
);
1956 end Is_Private_Primitive
;
1958 function Is_Public
(Id
: E
) return B
is
1960 pragma Assert
(Nkind
(Id
) in N_Entity
);
1964 function Is_Pure
(Id
: E
) return B
is
1969 function Is_Pure_Unit_Access_Type
(Id
: E
) return B
is
1971 pragma Assert
(Is_Access_Type
(Id
));
1972 return Flag189
(Id
);
1973 end Is_Pure_Unit_Access_Type
;
1975 function Is_RACW_Stub_Type
(Id
: E
) return B
is
1977 pragma Assert
(Is_Type
(Id
));
1978 return Flag244
(Id
);
1979 end Is_RACW_Stub_Type
;
1981 function Is_Raised
(Id
: E
) return B
is
1983 pragma Assert
(Ekind
(Id
) = E_Exception
);
1984 return Flag224
(Id
);
1987 function Is_Remote_Call_Interface
(Id
: E
) return B
is
1990 end Is_Remote_Call_Interface
;
1992 function Is_Remote_Types
(Id
: E
) return B
is
1995 end Is_Remote_Types
;
1997 function Is_Renaming_Of_Object
(Id
: E
) return B
is
1999 return Flag112
(Id
);
2000 end Is_Renaming_Of_Object
;
2002 function Is_Return_Object
(Id
: E
) return B
is
2004 return Flag209
(Id
);
2005 end Is_Return_Object
;
2007 function Is_Shared_Passive
(Id
: E
) return B
is
2010 end Is_Shared_Passive
;
2012 function Is_Statically_Allocated
(Id
: E
) return B
is
2015 end Is_Statically_Allocated
;
2017 function Is_Tag
(Id
: E
) return B
is
2019 pragma Assert
(Nkind
(Id
) in N_Entity
);
2023 function Is_Tagged_Type
(Id
: E
) return B
is
2028 function Is_Thunk
(Id
: E
) return B
is
2030 pragma Assert
(Is_Subprogram
(Id
));
2031 return Flag225
(Id
);
2034 function Is_Trivial_Subprogram
(Id
: E
) return B
is
2036 return Flag235
(Id
);
2037 end Is_Trivial_Subprogram
;
2039 function Is_True_Constant
(Id
: E
) return B
is
2041 return Flag163
(Id
);
2042 end Is_True_Constant
;
2044 function Is_Unchecked_Union
(Id
: E
) return B
is
2046 return Flag117
(Implementation_Base_Type
(Id
));
2047 end Is_Unchecked_Union
;
2049 function Is_Underlying_Record_View
(Id
: E
) return B
is
2051 return Flag246
(Id
);
2052 end Is_Underlying_Record_View
;
2054 function Is_Unsigned_Type
(Id
: E
) return B
is
2056 pragma Assert
(Is_Type
(Id
));
2057 return Flag144
(Id
);
2058 end Is_Unsigned_Type
;
2060 function Is_Valued_Procedure
(Id
: E
) return B
is
2062 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2063 return Flag127
(Id
);
2064 end Is_Valued_Procedure
;
2066 function Is_Visible_Child_Unit
(Id
: E
) return B
is
2068 pragma Assert
(Is_Child_Unit
(Id
));
2069 return Flag116
(Id
);
2070 end Is_Visible_Child_Unit
;
2072 function Is_Visible_Formal
(Id
: E
) return B
is
2074 return Flag206
(Id
);
2075 end Is_Visible_Formal
;
2077 function Is_VMS_Exception
(Id
: E
) return B
is
2079 return Flag133
(Id
);
2080 end Is_VMS_Exception
;
2082 function Is_Volatile
(Id
: E
) return B
is
2084 pragma Assert
(Nkind
(Id
) in N_Entity
);
2086 if Is_Type
(Id
) then
2087 return Flag16
(Base_Type
(Id
));
2093 function Itype_Printed
(Id
: E
) return B
is
2095 pragma Assert
(Is_Itype
(Id
));
2096 return Flag202
(Id
);
2099 function Kill_Elaboration_Checks
(Id
: E
) return B
is
2102 end Kill_Elaboration_Checks
;
2104 function Kill_Range_Checks
(Id
: E
) return B
is
2107 end Kill_Range_Checks
;
2109 function Kill_Tag_Checks
(Id
: E
) return B
is
2112 end Kill_Tag_Checks
;
2114 function Known_To_Have_Preelab_Init
(Id
: E
) return B
is
2116 pragma Assert
(Is_Type
(Id
));
2117 return Flag207
(Id
);
2118 end Known_To_Have_Preelab_Init
;
2120 function Last_Assignment
(Id
: E
) return N
is
2122 pragma Assert
(Is_Assignable
(Id
));
2124 end Last_Assignment
;
2126 function Last_Entity
(Id
: E
) return E
is
2131 function Limited_View
(Id
: E
) return E
is
2133 pragma Assert
(Ekind
(Id
) = E_Package
);
2137 function Lit_Indexes
(Id
: E
) return E
is
2139 pragma Assert
(Is_Enumeration_Type
(Id
));
2143 function Lit_Strings
(Id
: E
) return E
is
2145 pragma Assert
(Is_Enumeration_Type
(Id
));
2149 function Low_Bound_Tested
(Id
: E
) return B
is
2151 return Flag205
(Id
);
2152 end Low_Bound_Tested
;
2154 function Machine_Radix_10
(Id
: E
) return B
is
2156 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
2158 end Machine_Radix_10
;
2160 function Master_Id
(Id
: E
) return E
is
2162 pragma Assert
(Is_Access_Type
(Id
));
2166 function Materialize_Entity
(Id
: E
) return B
is
2168 return Flag168
(Id
);
2169 end Materialize_Entity
;
2171 function Mechanism
(Id
: E
) return M
is
2173 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
2174 return UI_To_Int
(Uint8
(Id
));
2177 function Modulus
(Id
: E
) return Uint
is
2179 pragma Assert
(Is_Modular_Integer_Type
(Id
));
2180 return Uint17
(Base_Type
(Id
));
2183 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
2185 pragma Assert
(Is_Type
(Id
));
2186 return Flag183
(Id
);
2187 end Must_Be_On_Byte_Boundary
;
2189 function Must_Have_Preelab_Init
(Id
: E
) return B
is
2191 pragma Assert
(Is_Type
(Id
));
2192 return Flag208
(Id
);
2193 end Must_Have_Preelab_Init
;
2195 function Needs_Debug_Info
(Id
: E
) return B
is
2197 return Flag147
(Id
);
2198 end Needs_Debug_Info
;
2200 function Needs_No_Actuals
(Id
: E
) return B
is
2203 (Is_Overloadable
(Id
)
2204 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
2206 end Needs_No_Actuals
;
2208 function Never_Set_In_Source
(Id
: E
) return B
is
2210 return Flag115
(Id
);
2211 end Never_Set_In_Source
;
2213 function Next_Inlined_Subprogram
(Id
: E
) return E
is
2216 end Next_Inlined_Subprogram
;
2218 function No_Pool_Assigned
(Id
: E
) return B
is
2220 pragma Assert
(Is_Access_Type
(Id
));
2221 return Flag131
(Root_Type
(Id
));
2222 end No_Pool_Assigned
;
2224 function No_Return
(Id
: E
) return B
is
2226 return Flag113
(Id
);
2229 function No_Strict_Aliasing
(Id
: E
) return B
is
2231 pragma Assert
(Is_Access_Type
(Id
));
2232 return Flag136
(Base_Type
(Id
));
2233 end No_Strict_Aliasing
;
2235 function Non_Binary_Modulus
(Id
: E
) return B
is
2237 pragma Assert
(Is_Type
(Id
));
2238 return Flag58
(Base_Type
(Id
));
2239 end Non_Binary_Modulus
;
2241 function Non_Limited_View
(Id
: E
) return E
is
2243 pragma Assert
(Ekind
(Id
) in Incomplete_Kind
);
2245 end Non_Limited_View
;
2247 function Nonzero_Is_True
(Id
: E
) return B
is
2249 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
2250 return Flag162
(Base_Type
(Id
));
2251 end Nonzero_Is_True
;
2253 function Normalized_First_Bit
(Id
: E
) return U
is
2255 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2257 end Normalized_First_Bit
;
2259 function Normalized_Position
(Id
: E
) return U
is
2261 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2263 end Normalized_Position
;
2265 function Normalized_Position_Max
(Id
: E
) return U
is
2267 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2269 end Normalized_Position_Max
;
2271 function OK_To_Rename
(Id
: E
) return B
is
2273 pragma Assert
(Ekind
(Id
) = E_Variable
);
2274 return Flag247
(Id
);
2277 function OK_To_Reorder_Components
(Id
: E
) return B
is
2279 pragma Assert
(Is_Record_Type
(Id
));
2280 return Flag239
(Base_Type
(Id
));
2281 end OK_To_Reorder_Components
;
2283 function Optimize_Alignment_Space
(Id
: E
) return B
is
2286 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2287 return Flag241
(Id
);
2288 end Optimize_Alignment_Space
;
2290 function Optimize_Alignment_Time
(Id
: E
) return B
is
2293 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2294 return Flag242
(Id
);
2295 end Optimize_Alignment_Time
;
2297 function Original_Array_Type
(Id
: E
) return E
is
2299 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
2301 end Original_Array_Type
;
2303 function Original_Record_Component
(Id
: E
) return E
is
2305 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
2307 end Original_Record_Component
;
2309 function Overlays_Constant
(Id
: E
) return B
is
2311 return Flag243
(Id
);
2312 end Overlays_Constant
;
2314 function Overridden_Operation
(Id
: E
) return E
is
2317 end Overridden_Operation
;
2319 function Package_Instantiation
(Id
: E
) return N
is
2321 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
2323 end Package_Instantiation
;
2325 function Packed_Array_Type
(Id
: E
) return E
is
2327 pragma Assert
(Is_Array_Type
(Id
));
2329 end Packed_Array_Type
;
2331 function Parent_Subtype
(Id
: E
) return E
is
2333 pragma Assert
(Is_Record_Type
(Id
));
2334 return Node19
(Base_Type
(Id
));
2337 function Postcondition_Proc
(Id
: E
) return E
is
2339 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2341 end Postcondition_Proc
;
2343 function Primitive_Operations
(Id
: E
) return L
is
2345 pragma Assert
(Is_Tagged_Type
(Id
));
2346 return Elist15
(Id
);
2347 end Primitive_Operations
;
2349 function Prival
(Id
: E
) return E
is
2351 pragma Assert
(Is_Protected_Component
(Id
));
2355 function Prival_Link
(Id
: E
) return E
is
2357 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2361 function Private_Dependents
(Id
: E
) return L
is
2363 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
2364 return Elist18
(Id
);
2365 end Private_Dependents
;
2367 function Private_View
(Id
: E
) return N
is
2369 pragma Assert
(Is_Private_Type
(Id
));
2373 function Protected_Body_Subprogram
(Id
: E
) return E
is
2375 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
2377 end Protected_Body_Subprogram
;
2379 function Protected_Formal
(Id
: E
) return E
is
2381 pragma Assert
(Is_Formal
(Id
));
2383 end Protected_Formal
;
2385 function Protection_Object
(Id
: E
) return E
is
2388 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
, E_Function
, E_Procedure
));
2390 end Protection_Object
;
2392 function Reachable
(Id
: E
) return B
is
2397 function Referenced
(Id
: E
) return B
is
2399 return Flag156
(Id
);
2402 function Referenced_As_LHS
(Id
: E
) return B
is
2405 end Referenced_As_LHS
;
2407 function Referenced_As_Out_Parameter
(Id
: E
) return B
is
2409 return Flag227
(Id
);
2410 end Referenced_As_Out_Parameter
;
2412 function Referenced_Object
(Id
: E
) return N
is
2414 pragma Assert
(Is_Type
(Id
));
2416 end Referenced_Object
;
2418 function Register_Exception_Call
(Id
: E
) return N
is
2420 pragma Assert
(Ekind
(Id
) = E_Exception
);
2422 end Register_Exception_Call
;
2424 function Related_Array_Object
(Id
: E
) return E
is
2426 pragma Assert
(Is_Array_Type
(Id
));
2428 end Related_Array_Object
;
2430 function Related_Expression
(Id
: E
) return N
is
2432 pragma Assert
(Ekind
(Id
) in Type_Kind
2433 or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2435 end Related_Expression
;
2437 function Related_Instance
(Id
: E
) return E
is
2439 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
2441 end Related_Instance
;
2443 function Related_Type
(Id
: E
) return E
is
2445 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
));
2449 function Relative_Deadline_Variable
(Id
: E
) return E
is
2451 pragma Assert
(Is_Task_Type
(Id
));
2452 return Node26
(Implementation_Base_Type
(Id
));
2453 end Relative_Deadline_Variable
;
2455 function Renamed_Entity
(Id
: E
) return N
is
2460 function Renamed_In_Spec
(Id
: E
) return B
is
2462 pragma Assert
(Ekind
(Id
) = E_Package
);
2463 return Flag231
(Id
);
2464 end Renamed_In_Spec
;
2466 function Renamed_Object
(Id
: E
) return N
is
2471 function Renaming_Map
(Id
: E
) return U
is
2476 function Requires_Overriding
(Id
: E
) return B
is
2478 pragma Assert
(Is_Overloadable
(Id
));
2479 return Flag213
(Id
);
2480 end Requires_Overriding
;
2482 function Return_Present
(Id
: E
) return B
is
2487 function Return_Applies_To
(Id
: E
) return N
is
2490 end Return_Applies_To
;
2492 function Returns_By_Ref
(Id
: E
) return B
is
2497 function Reverse_Bit_Order
(Id
: E
) return B
is
2499 pragma Assert
(Is_Record_Type
(Id
));
2500 return Flag164
(Base_Type
(Id
));
2501 end Reverse_Bit_Order
;
2503 function RM_Size
(Id
: E
) return U
is
2505 pragma Assert
(Is_Type
(Id
));
2509 function Scalar_Range
(Id
: E
) return N
is
2514 function Scale_Value
(Id
: E
) return U
is
2519 function Scope_Depth_Value
(Id
: E
) return U
is
2522 end Scope_Depth_Value
;
2524 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
2526 return Flag167
(Id
);
2527 end Sec_Stack_Needed_For_Return
;
2529 function Shadow_Entities
(Id
: E
) return S
is
2531 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
2533 end Shadow_Entities
;
2535 function Shared_Var_Procs_Instance
(Id
: E
) return E
is
2537 pragma Assert
(Ekind
(Id
) = E_Variable
);
2539 end Shared_Var_Procs_Instance
;
2541 function Size_Check_Code
(Id
: E
) return N
is
2543 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2545 end Size_Check_Code
;
2547 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
2549 return Flag177
(Id
);
2550 end Size_Depends_On_Discriminant
;
2552 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
2555 end Size_Known_At_Compile_Time
;
2557 function Small_Value
(Id
: E
) return R
is
2559 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2560 return Ureal21
(Id
);
2563 function Spec_Entity
(Id
: E
) return E
is
2565 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
2569 function Spec_PPC_List
(Id
: E
) return N
is
2571 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
2575 function Storage_Size_Variable
(Id
: E
) return E
is
2577 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
2578 return Node15
(Implementation_Base_Type
(Id
));
2579 end Storage_Size_Variable
;
2581 function Static_Elaboration_Desired
(Id
: E
) return B
is
2583 pragma Assert
(Ekind
(Id
) = E_Package
);
2585 end Static_Elaboration_Desired
;
2587 function Static_Initialization
(Id
: E
) return N
is
2590 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
2592 end Static_Initialization
;
2594 function Stored_Constraint
(Id
: E
) return L
is
2597 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
2598 return Elist23
(Id
);
2599 end Stored_Constraint
;
2601 function Strict_Alignment
(Id
: E
) return B
is
2603 return Flag145
(Implementation_Base_Type
(Id
));
2604 end Strict_Alignment
;
2606 function String_Literal_Length
(Id
: E
) return U
is
2609 end String_Literal_Length
;
2611 function String_Literal_Low_Bound
(Id
: E
) return N
is
2614 end String_Literal_Low_Bound
;
2616 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
2618 return Flag148
(Id
);
2619 end Suppress_Elaboration_Warnings
;
2621 function Suppress_Init_Proc
(Id
: E
) return B
is
2623 return Flag105
(Base_Type
(Id
));
2624 end Suppress_Init_Proc
;
2626 function Suppress_Style_Checks
(Id
: E
) return B
is
2628 return Flag165
(Id
);
2629 end Suppress_Style_Checks
;
2631 function Suppress_Value_Tracking_On_Call
(Id
: E
) return B
is
2633 return Flag217
(Id
);
2634 end Suppress_Value_Tracking_On_Call
;
2636 function Task_Body_Procedure
(Id
: E
) return N
is
2638 pragma Assert
(Ekind
(Id
) in Task_Kind
);
2640 end Task_Body_Procedure
;
2642 function Treat_As_Volatile
(Id
: E
) return B
is
2645 end Treat_As_Volatile
;
2647 function Underlying_Full_View
(Id
: E
) return E
is
2649 pragma Assert
(Ekind
(Id
) in Private_Kind
);
2651 end Underlying_Full_View
;
2653 function Underlying_Record_View
(Id
: E
) return E
is
2656 end Underlying_Record_View
;
2658 function Universal_Aliasing
(Id
: E
) return B
is
2660 pragma Assert
(Is_Type
(Id
));
2661 return Flag216
(Base_Type
(Id
));
2662 end Universal_Aliasing
;
2664 function Unset_Reference
(Id
: E
) return N
is
2667 end Unset_Reference
;
2669 function Used_As_Generic_Actual
(Id
: E
) return B
is
2671 return Flag222
(Id
);
2672 end Used_As_Generic_Actual
;
2674 function Uses_Sec_Stack
(Id
: E
) return B
is
2679 function Vax_Float
(Id
: E
) return B
is
2681 return Flag151
(Base_Type
(Id
));
2684 function Warnings_Off
(Id
: E
) return B
is
2689 function Warnings_Off_Used
(Id
: E
) return B
is
2691 return Flag236
(Id
);
2692 end Warnings_Off_Used
;
2694 function Warnings_Off_Used_Unmodified
(Id
: E
) return B
is
2696 return Flag237
(Id
);
2697 end Warnings_Off_Used_Unmodified
;
2699 function Warnings_Off_Used_Unreferenced
(Id
: E
) return B
is
2701 return Flag238
(Id
);
2702 end Warnings_Off_Used_Unreferenced
;
2704 function Wrapped_Entity
(Id
: E
) return E
is
2706 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
2707 and then Is_Primitive_Wrapper
(Id
));
2711 function Was_Hidden
(Id
: E
) return B
is
2713 return Flag196
(Id
);
2716 ------------------------------
2717 -- Classification Functions --
2718 ------------------------------
2720 function Is_Access_Type
(Id
: E
) return B
is
2722 return Ekind
(Id
) in Access_Kind
;
2725 function Is_Access_Protected_Subprogram_Type
(Id
: E
) return B
is
2727 return Ekind
(Id
) in Access_Protected_Kind
;
2728 end Is_Access_Protected_Subprogram_Type
;
2730 function Is_Access_Subprogram_Type
(Id
: E
) return B
is
2732 return Ekind
(Id
) in Access_Subprogram_Kind
;
2733 end Is_Access_Subprogram_Type
;
2735 function Is_Array_Type
(Id
: E
) return B
is
2737 return Ekind
(Id
) in Array_Kind
;
2740 function Is_Assignable
(Id
: E
) return B
is
2742 return Ekind
(Id
) in Assignable_Kind
;
2745 function Is_Class_Wide_Type
(Id
: E
) return B
is
2747 return Ekind
(Id
) in Class_Wide_Kind
;
2748 end Is_Class_Wide_Type
;
2750 function Is_Composite_Type
(Id
: E
) return B
is
2752 return Ekind
(Id
) in Composite_Kind
;
2753 end Is_Composite_Type
;
2755 function Is_Concurrent_Body
(Id
: E
) return B
is
2757 return Ekind
(Id
) in
2758 Concurrent_Body_Kind
;
2759 end Is_Concurrent_Body
;
2761 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
2764 end Is_Concurrent_Record_Type
;
2766 function Is_Concurrent_Type
(Id
: E
) return B
is
2768 return Ekind
(Id
) in Concurrent_Kind
;
2769 end Is_Concurrent_Type
;
2771 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
2773 return Ekind
(Id
) in
2774 Decimal_Fixed_Point_Kind
;
2775 end Is_Decimal_Fixed_Point_Type
;
2777 function Is_Digits_Type
(Id
: E
) return B
is
2779 return Ekind
(Id
) in Digits_Kind
;
2782 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
2784 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
2785 end Is_Discrete_Or_Fixed_Point_Type
;
2787 function Is_Discrete_Type
(Id
: E
) return B
is
2789 return Ekind
(Id
) in Discrete_Kind
;
2790 end Is_Discrete_Type
;
2792 function Is_Elementary_Type
(Id
: E
) return B
is
2794 return Ekind
(Id
) in Elementary_Kind
;
2795 end Is_Elementary_Type
;
2797 function Is_Entry
(Id
: E
) return B
is
2799 return Ekind
(Id
) in Entry_Kind
;
2802 function Is_Enumeration_Type
(Id
: E
) return B
is
2804 return Ekind
(Id
) in
2806 end Is_Enumeration_Type
;
2808 function Is_Fixed_Point_Type
(Id
: E
) return B
is
2810 return Ekind
(Id
) in
2812 end Is_Fixed_Point_Type
;
2814 function Is_Floating_Point_Type
(Id
: E
) return B
is
2816 return Ekind
(Id
) in Float_Kind
;
2817 end Is_Floating_Point_Type
;
2819 function Is_Formal
(Id
: E
) return B
is
2821 return Ekind
(Id
) in Formal_Kind
;
2824 function Is_Formal_Object
(Id
: E
) return B
is
2826 return Ekind
(Id
) in Formal_Object_Kind
;
2827 end Is_Formal_Object
;
2829 function Is_Generic_Subprogram
(Id
: E
) return B
is
2831 return Ekind
(Id
) in Generic_Subprogram_Kind
;
2832 end Is_Generic_Subprogram
;
2834 function Is_Generic_Unit
(Id
: E
) return B
is
2836 return Ekind
(Id
) in Generic_Unit_Kind
;
2837 end Is_Generic_Unit
;
2839 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
2841 return Ekind
(Id
) in
2842 Incomplete_Or_Private_Kind
;
2843 end Is_Incomplete_Or_Private_Type
;
2845 function Is_Incomplete_Type
(Id
: E
) return B
is
2847 return Ekind
(Id
) in
2849 end Is_Incomplete_Type
;
2851 function Is_Integer_Type
(Id
: E
) return B
is
2853 return Ekind
(Id
) in Integer_Kind
;
2854 end Is_Integer_Type
;
2856 function Is_Modular_Integer_Type
(Id
: E
) return B
is
2858 return Ekind
(Id
) in
2859 Modular_Integer_Kind
;
2860 end Is_Modular_Integer_Type
;
2862 function Is_Named_Number
(Id
: E
) return B
is
2864 return Ekind
(Id
) in Named_Kind
;
2865 end Is_Named_Number
;
2867 function Is_Numeric_Type
(Id
: E
) return B
is
2869 return Ekind
(Id
) in Numeric_Kind
;
2870 end Is_Numeric_Type
;
2872 function Is_Object
(Id
: E
) return B
is
2874 return Ekind
(Id
) in Object_Kind
;
2877 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
2879 return Ekind
(Id
) in
2880 Ordinary_Fixed_Point_Kind
;
2881 end Is_Ordinary_Fixed_Point_Type
;
2883 function Is_Overloadable
(Id
: E
) return B
is
2885 return Ekind
(Id
) in Overloadable_Kind
;
2886 end Is_Overloadable
;
2888 function Is_Private_Type
(Id
: E
) return B
is
2890 return Ekind
(Id
) in Private_Kind
;
2891 end Is_Private_Type
;
2893 function Is_Protected_Type
(Id
: E
) return B
is
2895 return Ekind
(Id
) in Protected_Kind
;
2896 end Is_Protected_Type
;
2898 function Is_Real_Type
(Id
: E
) return B
is
2900 return Ekind
(Id
) in Real_Kind
;
2903 function Is_Record_Type
(Id
: E
) return B
is
2905 return Ekind
(Id
) in Record_Kind
;
2908 function Is_Scalar_Type
(Id
: E
) return B
is
2910 return Ekind
(Id
) in Scalar_Kind
;
2913 function Is_Signed_Integer_Type
(Id
: E
) return B
is
2915 return Ekind
(Id
) in Signed_Integer_Kind
;
2916 end Is_Signed_Integer_Type
;
2918 function Is_Subprogram
(Id
: E
) return B
is
2920 return Ekind
(Id
) in Subprogram_Kind
;
2923 function Is_Task_Type
(Id
: E
) return B
is
2925 return Ekind
(Id
) in Task_Kind
;
2928 function Is_Type
(Id
: E
) return B
is
2930 return Ekind
(Id
) in Type_Kind
;
2933 ------------------------------
2934 -- Attribute Set Procedures --
2935 ------------------------------
2937 -- Note: in many of these set procedures an "obvious" assertion is missing.
2938 -- The reason for this is that in many cases, a field is set before the
2939 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
2940 -- it is possible to add assertions that specifically include the E_Void
2941 -- possibility, but in some cases, we just omit the assertions.
2943 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
2945 Set_Elist21
(Id
, V
);
2946 end Set_Accept_Address
;
2948 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
2950 pragma Assert
(Is_Tagged_Type
(Id
) and then Id
= Base_Type
(Id
));
2951 Set_Elist16
(Id
, V
);
2952 end Set_Access_Disp_Table
;
2954 procedure Set_Associated_Final_Chain
(Id
: E
; V
: E
) is
2956 pragma Assert
(Is_Access_Type
(Id
));
2958 end Set_Associated_Final_Chain
;
2960 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
2963 end Set_Associated_Formal_Package
;
2965 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
2968 end Set_Associated_Node_For_Itype
;
2970 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
2972 pragma Assert
(Is_Access_Type
(Id
) and then Id
= Base_Type
(Id
));
2974 end Set_Associated_Storage_Pool
;
2976 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
2979 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
2980 or else Is_Formal
(Id
));
2982 end Set_Actual_Subtype
;
2984 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
2986 Set_Flag104
(Id
, V
);
2987 end Set_Address_Taken
;
2989 procedure Set_Alias
(Id
: E
; V
: E
) is
2992 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
2996 procedure Set_Alignment
(Id
: E
; V
: U
) is
2998 pragma Assert
(Is_Type
(Id
)
2999 or else Is_Formal
(Id
)
3000 or else Ekind_In
(Id
, E_Loop_Parameter
,
3007 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
3009 pragma Assert
(Is_Entry
(Id
));
3011 end Set_Barrier_Function
;
3013 procedure Set_Block_Node
(Id
: E
; V
: N
) is
3015 pragma Assert
(Ekind
(Id
) = E_Block
);
3019 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
3021 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3023 end Set_Body_Entity
;
3025 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
3028 (Ekind
(Id
) = E_Package
3029 or else Is_Subprogram
(Id
)
3030 or else Is_Generic_Unit
(Id
));
3032 end Set_Body_Needed_For_SAL
;
3034 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
3036 pragma Assert
(Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
3037 Set_Flag125
(Id
, V
);
3038 end Set_C_Pass_By_Copy
;
3040 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
3043 end Set_Can_Never_Be_Null
;
3045 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
3048 end Set_Checks_May_Be_Suppressed
;
3050 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
3052 pragma Assert
(Is_Type
(Id
));
3054 end Set_Class_Wide_Type
;
3056 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
3058 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
3060 end Set_Cloned_Subtype
;
3062 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
3064 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
3066 end Set_Component_Bit_Offset
;
3068 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
3070 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
3072 end Set_Component_Clause
;
3074 procedure Set_Component_Size
(Id
: E
; V
: U
) is
3076 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
3078 end Set_Component_Size
;
3080 procedure Set_Component_Type
(Id
: E
; V
: E
) is
3082 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
3084 end Set_Component_Type
;
3086 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
3089 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
3091 end Set_Corresponding_Concurrent_Type
;
3093 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
3095 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3097 end Set_Corresponding_Discriminant
;
3099 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
3102 (Ekind
(Id
) = E_Function
3103 and then not Comes_From_Source
(Id
)
3104 and then Chars
(Id
) = Name_Op_Ne
);
3106 end Set_Corresponding_Equality
;
3108 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
3110 pragma Assert
(Is_Concurrent_Type
(Id
));
3112 end Set_Corresponding_Record_Type
;
3114 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
3117 end Set_Corresponding_Remote_Type
;
3119 procedure Set_Current_Use_Clause
(Id
: E
; V
: E
) is
3121 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
3123 end Set_Current_Use_Clause
;
3125 procedure Set_Current_Value
(Id
: E
; V
: N
) is
3127 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
3129 end Set_Current_Value
;
3131 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
3134 end Set_CR_Discriminant
;
3136 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
3138 Set_Flag166
(Id
, V
);
3139 end Set_Debug_Info_Off
;
3141 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
3144 end Set_Debug_Renaming_Link
;
3146 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
3148 pragma Assert
(Is_Formal
(Id
));
3150 end Set_Default_Expr_Function
;
3152 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
3154 Set_Flag108
(Id
, V
);
3155 end Set_Default_Expressions_Processed
;
3157 procedure Set_Default_Value
(Id
: E
; V
: N
) is
3159 pragma Assert
(Is_Formal
(Id
));
3161 end Set_Default_Value
;
3163 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
3167 or else Is_Task_Type
(Id
)
3168 or else Ekind
(Id
) = E_Block
);
3169 Set_Flag114
(Id
, V
);
3170 end Set_Delay_Cleanups
;
3172 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
3175 (Is_Subprogram
(Id
) or else Ekind_In
(Id
, E_Package
, E_Package_Body
));
3177 end Set_Delay_Subprogram_Descriptors
;
3179 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
3181 pragma Assert
(Is_Fixed_Point_Type
(Id
));
3182 Set_Ureal18
(Id
, V
);
3183 end Set_Delta_Value
;
3185 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
3187 pragma Assert
(Is_Generic_Instance
(Id
));
3189 end Set_Dependent_Instances
;
3191 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
3193 pragma Assert
(Nkind
(Id
) in N_Entity
);
3195 end Set_Depends_On_Private
;
3197 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
3200 (Is_Floating_Point_Type
(Id
)
3201 or else Is_Decimal_Fixed_Point_Type
(Id
));
3203 end Set_Digits_Value
;
3205 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
3208 end Set_Directly_Designated_Type
;
3210 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
3213 end Set_Discard_Names
;
3215 procedure Set_Discriminal
(Id
: E
; V
: E
) is
3217 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3219 end Set_Discriminal
;
3221 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
3224 end Set_Discriminal_Link
;
3226 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
3228 pragma Assert
(Ekind
(Id
) = E_Component
);
3230 end Set_Discriminant_Checking_Func
;
3232 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
3234 pragma Assert
(Nkind
(Id
) in N_Entity
);
3235 Set_Elist21
(Id
, V
);
3236 end Set_Discriminant_Constraint
;
3238 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
3241 end Set_Discriminant_Default_Value
;
3243 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
3246 end Set_Discriminant_Number
;
3248 procedure Set_Dispatch_Table_Wrappers
(Id
: E
; V
: L
) is
3250 pragma Assert
(Is_Tagged_Type
(Id
) and then Id
= Base_Type
(Id
));
3251 Set_Elist26
(Id
, V
);
3252 end Set_Dispatch_Table_Wrappers
;
3254 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
3256 pragma Assert
(Ekind
(Id
) = E_Component
);
3258 end Set_DT_Entry_Count
;
3260 procedure Set_DT_Offset_To_Top_Func
(Id
: E
; V
: E
) is
3262 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
3264 end Set_DT_Offset_To_Top_Func
;
3266 procedure Set_DT_Position
(Id
: E
; V
: U
) is
3268 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3270 end Set_DT_Position
;
3272 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
3274 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3278 procedure Set_Elaborate_Body_Desirable
(Id
: E
; V
: B
:= True) is
3280 pragma Assert
(Ekind
(Id
) = E_Package
);
3281 Set_Flag210
(Id
, V
);
3282 end Set_Elaborate_Body_Desirable
;
3284 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
3289 Ekind
(Id
) = E_Package
3291 Is_Generic_Unit
(Id
));
3293 end Set_Elaboration_Entity
;
3295 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
3300 Ekind
(Id
) = E_Package
3302 Is_Generic_Unit
(Id
));
3303 Set_Flag174
(Id
, V
);
3304 end Set_Elaboration_Entity_Required
;
3306 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
3309 end Set_Enclosing_Scope
;
3311 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
3313 pragma Assert
(Is_Entry
(Id
));
3314 Set_Flag152
(Id
, V
);
3315 end Set_Entry_Accepted
;
3317 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
3320 end Set_Entry_Bodies_Array
;
3322 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
3325 end Set_Entry_Cancel_Parameter
;
3327 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
3330 end Set_Entry_Component
;
3332 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
3335 end Set_Entry_Formal
;
3337 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
3339 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
3341 end Set_Entry_Index_Constant
;
3343 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
3346 end Set_Entry_Parameters_Type
;
3348 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
3350 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
3352 end Set_Enum_Pos_To_Rep
;
3354 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
3356 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3358 end Set_Enumeration_Pos
;
3360 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
3362 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3364 end Set_Enumeration_Rep
;
3366 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
3368 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3370 end Set_Enumeration_Rep_Expr
;
3372 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
3375 (Ekind_In
(Id
, E_Class_Wide_Type
,
3376 E_Class_Wide_Subtype
,
3377 E_Access_Protected_Subprogram_Type
,
3378 E_Anonymous_Access_Protected_Subprogram_Type
,
3379 E_Access_Subprogram_Type
,
3382 end Set_Equivalent_Type
;
3384 procedure Set_Esize
(Id
: E
; V
: U
) is
3389 procedure Set_Exception_Code
(Id
: E
; V
: U
) is
3391 pragma Assert
(Ekind
(Id
) = E_Exception
);
3393 end Set_Exception_Code
;
3395 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
3397 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
3399 end Set_Extra_Accessibility
;
3401 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
3403 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
3405 end Set_Extra_Constrained
;
3407 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
3410 end Set_Extra_Formal
;
3412 procedure Set_Extra_Formals
(Id
: E
; V
: E
) is
3415 (Is_Overloadable
(Id
)
3416 or else Ekind_In
(Id
, E_Entry_Family
,
3418 E_Subprogram_Type
));
3420 end Set_Extra_Formals
;
3422 procedure Set_Can_Use_Internal_Rep
(Id
: E
; V
: B
:= True) is
3425 (Is_Access_Subprogram_Type
(Id
)
3426 and then Id
= Base_Type
(Id
));
3427 Set_Flag229
(Id
, V
);
3428 end Set_Can_Use_Internal_Rep
;
3430 procedure Set_Finalization_Chain_Entity
(Id
: E
; V
: E
) is
3433 end Set_Finalization_Chain_Entity
;
3435 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
3437 pragma Assert
(Is_Type
(Id
) and then Id
= Base_Type
(Id
));
3438 Set_Flag158
(Id
, V
);
3439 end Set_Finalize_Storage_Only
;
3441 procedure Set_First_Entity
(Id
: E
; V
: E
) is
3444 end Set_First_Entity
;
3446 procedure Set_First_Exit_Statement
(Id
: E
; V
: N
) is
3448 pragma Assert
(Ekind
(Id
) = E_Loop
);
3450 end Set_First_Exit_Statement
;
3452 procedure Set_First_Index
(Id
: E
; V
: N
) is
3454 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
3456 end Set_First_Index
;
3458 procedure Set_First_Literal
(Id
: E
; V
: E
) is
3460 pragma Assert
(Is_Enumeration_Type
(Id
));
3462 end Set_First_Literal
;
3464 procedure Set_First_Optional_Parameter
(Id
: E
; V
: E
) is
3466 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3468 end Set_First_Optional_Parameter
;
3470 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
3472 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
3473 or else Ekind
(Id
) in Concurrent_Kind
);
3475 end Set_First_Private_Entity
;
3477 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
3480 end Set_First_Rep_Item
;
3482 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
3485 end Set_Freeze_Node
;
3487 procedure Set_From_With_Type
(Id
: E
; V
: B
:= True) is
3491 or else Ekind
(Id
) = E_Package
);
3492 Set_Flag159
(Id
, V
);
3493 end Set_From_With_Type
;
3495 procedure Set_Full_View
(Id
: E
; V
: E
) is
3497 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
3501 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
3504 end Set_Generic_Homonym
;
3506 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
3508 Set_Elist23
(Id
, V
);
3509 end Set_Generic_Renamings
;
3511 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
3514 end Set_Handler_Records
;
3516 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
3518 pragma Assert
(Id
= Base_Type
(Id
));
3519 Set_Flag135
(Id
, V
);
3520 end Set_Has_Aliased_Components
;
3522 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
3525 end Set_Has_Alignment_Clause
;
3527 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
3530 end Set_Has_All_Calls_Remote
;
3532 procedure Set_Has_Anon_Block_Suffix
(Id
: E
; V
: B
:= True) is
3534 Set_Flag201
(Id
, V
);
3535 end Set_Has_Anon_Block_Suffix
;
3537 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
3539 pragma Assert
(not Is_Type
(Id
) or else Id
= Base_Type
(Id
));
3541 end Set_Has_Atomic_Components
;
3543 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
3546 ((V
= False) or else (Is_Discrete_Type
(Id
) or else Is_Object
(Id
)));
3547 Set_Flag139
(Id
, V
);
3548 end Set_Has_Biased_Representation
;
3550 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
3553 end Set_Has_Completion
;
3555 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
3557 pragma Assert
(Is_Type
(Id
));
3559 end Set_Has_Completion_In_Body
;
3561 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
3563 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3564 Set_Flag140
(Id
, V
);
3565 end Set_Has_Complex_Representation
;
3567 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
3569 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
3571 end Set_Has_Component_Size_Clause
;
3573 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
3575 pragma Assert
(Is_Type
(Id
));
3576 Set_Flag187
(Id
, V
);
3577 end Set_Has_Constrained_Partial_View
;
3579 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
3581 Set_Flag181
(Id
, V
);
3582 end Set_Has_Contiguous_Rep
;
3584 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
3586 pragma Assert
(Id
= Base_Type
(Id
));
3588 end Set_Has_Controlled_Component
;
3590 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
3593 end Set_Has_Controlling_Result
;
3595 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
3597 Set_Flag119
(Id
, V
);
3598 end Set_Has_Convention_Pragma
;
3600 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
3602 pragma Assert
(Nkind
(Id
) in N_Entity
);
3604 end Set_Has_Delayed_Freeze
;
3606 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
3608 pragma Assert
(Nkind
(Id
) in N_Entity
);
3610 end Set_Has_Discriminants
;
3612 procedure Set_Has_Dispatch_Table
(Id
: E
; V
: B
:= True) is
3614 pragma Assert
(Ekind
(Id
) = E_Record_Type
3615 and then Is_Tagged_Type
(Id
));
3616 Set_Flag220
(Id
, V
);
3617 end Set_Has_Dispatch_Table
;
3619 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
3621 pragma Assert
(Is_Enumeration_Type
(Id
));
3623 end Set_Has_Enumeration_Rep_Clause
;
3625 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
3630 procedure Set_Has_External_Tag_Rep_Clause
(Id
: E
; V
: B
:= True) is
3632 pragma Assert
(Is_Tagged_Type
(Id
));
3633 Set_Flag110
(Id
, V
);
3634 end Set_Has_External_Tag_Rep_Clause
;
3636 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
3638 Set_Flag175
(Id
, V
);
3639 end Set_Has_Forward_Instantiation
;
3641 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
3643 Set_Flag173
(Id
, V
);
3644 end Set_Has_Fully_Qualified_Name
;
3646 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
3649 end Set_Has_Gigi_Rep_Item
;
3651 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
3654 end Set_Has_Homonym
;
3656 procedure Set_Has_Initial_Value
(Id
: E
; V
: B
:= True) is
3658 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Out_Parameter
));
3659 Set_Flag219
(Id
, V
);
3660 end Set_Has_Initial_Value
;
3662 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
3664 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3666 end Set_Has_Machine_Radix_Clause
;
3668 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
3671 end Set_Has_Master_Entity
;
3673 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
3675 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
3676 Set_Flag142
(Id
, V
);
3677 end Set_Has_Missing_Return
;
3679 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
3681 Set_Flag101
(Id
, V
);
3682 end Set_Has_Nested_Block_With_Handler
;
3684 procedure Set_Has_Up_Level_Access
(Id
: E
; V
: B
:= True) is
3686 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Constant
, E_Loop_Parameter
));
3687 Set_Flag215
(Id
, V
);
3688 end Set_Has_Up_Level_Access
;
3690 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
3692 pragma Assert
(Id
= Base_Type
(Id
));
3694 end Set_Has_Non_Standard_Rep
;
3696 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
3698 pragma Assert
(Is_Type
(Id
));
3699 Set_Flag172
(Id
, V
);
3700 end Set_Has_Object_Size_Clause
;
3702 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
3704 Set_Flag154
(Id
, V
);
3705 end Set_Has_Per_Object_Constraint
;
3707 procedure Set_Has_Persistent_BSS
(Id
: E
; V
: B
:= True) is
3709 Set_Flag188
(Id
, V
);
3710 end Set_Has_Persistent_BSS
;
3712 procedure Set_Has_Postconditions
(Id
: E
; V
: B
:= True) is
3714 pragma Assert
(Is_Subprogram
(Id
));
3715 Set_Flag240
(Id
, V
);
3716 end Set_Has_Postconditions
;
3718 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
3720 pragma Assert
(Is_Access_Type
(Id
));
3721 Set_Flag27
(Base_Type
(Id
), V
);
3722 end Set_Has_Pragma_Controlled
;
3724 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
3726 Set_Flag150
(Id
, V
);
3727 end Set_Has_Pragma_Elaborate_Body
;
3729 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
3731 Set_Flag157
(Id
, V
);
3732 end Set_Has_Pragma_Inline
;
3734 procedure Set_Has_Pragma_Inline_Always
(Id
: E
; V
: B
:= True) is
3736 Set_Flag230
(Id
, V
);
3737 end Set_Has_Pragma_Inline_Always
;
3739 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
3741 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
3742 pragma Assert
(Id
= Base_Type
(Id
));
3743 Set_Flag121
(Id
, V
);
3744 end Set_Has_Pragma_Pack
;
3746 procedure Set_Has_Pragma_Preelab_Init
(Id
: E
; V
: B
:= True) is
3748 Set_Flag221
(Id
, V
);
3749 end Set_Has_Pragma_Preelab_Init
;
3751 procedure Set_Has_Pragma_Pure
(Id
: E
; V
: B
:= True) is
3753 Set_Flag203
(Id
, V
);
3754 end Set_Has_Pragma_Pure
;
3756 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
3758 Set_Flag179
(Id
, V
);
3759 end Set_Has_Pragma_Pure_Function
;
3761 procedure Set_Has_Pragma_Thread_Local_Storage
(Id
: E
; V
: B
:= True) is
3763 Set_Flag169
(Id
, V
);
3764 end Set_Has_Pragma_Thread_Local_Storage
;
3766 procedure Set_Has_Pragma_Unmodified
(Id
: E
; V
: B
:= True) is
3768 Set_Flag233
(Id
, V
);
3769 end Set_Has_Pragma_Unmodified
;
3771 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
3773 Set_Flag180
(Id
, V
);
3774 end Set_Has_Pragma_Unreferenced
;
3776 procedure Set_Has_Pragma_Unreferenced_Objects
(Id
: E
; V
: B
:= True) is
3778 pragma Assert
(Is_Type
(Id
));
3779 Set_Flag212
(Id
, V
);
3780 end Set_Has_Pragma_Unreferenced_Objects
;
3782 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
3784 pragma Assert
(Id
= Base_Type
(Id
));
3785 Set_Flag120
(Id
, V
);
3786 end Set_Has_Primitive_Operations
;
3788 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
3790 Set_Flag155
(Id
, V
);
3791 end Set_Has_Private_Declaration
;
3793 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
3795 Set_Flag161
(Id
, V
);
3796 end Set_Has_Qualified_Name
;
3798 procedure Set_Has_RACW
(Id
: E
; V
: B
:= True) is
3800 pragma Assert
(Ekind
(Id
) = E_Package
);
3801 Set_Flag214
(Id
, V
);
3804 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
3806 pragma Assert
(Id
= Base_Type
(Id
));
3808 end Set_Has_Record_Rep_Clause
;
3810 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
3812 pragma Assert
(Is_Subprogram
(Id
));
3813 Set_Flag143
(Id
, V
);
3814 end Set_Has_Recursive_Call
;
3816 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
3819 end Set_Has_Size_Clause
;
3821 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
3824 end Set_Has_Small_Clause
;
3826 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
3828 pragma Assert
(Id
= Base_Type
(Id
));
3829 Set_Flag100
(Id
, V
);
3830 end Set_Has_Specified_Layout
;
3832 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
3834 pragma Assert
(Is_Type
(Id
));
3835 Set_Flag190
(Id
, V
);
3836 end Set_Has_Specified_Stream_Input
;
3838 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
3840 pragma Assert
(Is_Type
(Id
));
3841 Set_Flag191
(Id
, V
);
3842 end Set_Has_Specified_Stream_Output
;
3844 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
3846 pragma Assert
(Is_Type
(Id
));
3847 Set_Flag192
(Id
, V
);
3848 end Set_Has_Specified_Stream_Read
;
3850 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
3852 pragma Assert
(Is_Type
(Id
));
3853 Set_Flag193
(Id
, V
);
3854 end Set_Has_Specified_Stream_Write
;
3856 procedure Set_Has_Static_Discriminants
(Id
: E
; V
: B
:= True) is
3858 Set_Flag211
(Id
, V
);
3859 end Set_Has_Static_Discriminants
;
3861 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
3863 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3864 pragma Assert
(Id
= Base_Type
(Id
));
3866 end Set_Has_Storage_Size_Clause
;
3868 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
3870 pragma Assert
(Is_Elementary_Type
(Id
));
3871 Set_Flag184
(Id
, V
);
3872 end Set_Has_Stream_Size_Clause
;
3874 procedure Set_Has_Subprogram_Descriptor
(Id
: E
; V
: B
:= True) is
3877 end Set_Has_Subprogram_Descriptor
;
3879 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
3881 pragma Assert
(Id
= Base_Type
(Id
));
3885 procedure Set_Has_Thunks
(Id
: E
; V
: B
:= True) is
3887 pragma Assert
(Is_Tag
(Id
)
3888 and then Ekind
(Id
) = E_Constant
);
3889 Set_Flag228
(Id
, V
);
3892 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3894 pragma Assert
(Id
= Base_Type
(Id
));
3895 Set_Flag123
(Id
, V
);
3896 end Set_Has_Unchecked_Union
;
3898 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
3900 pragma Assert
(Is_Type
(Id
));
3902 end Set_Has_Unknown_Discriminants
;
3904 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
3906 pragma Assert
(not Is_Type
(Id
) or else Id
= Base_Type
(Id
));
3908 end Set_Has_Volatile_Components
;
3910 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
3912 Set_Flag182
(Id
, V
);
3913 end Set_Has_Xref_Entry
;
3915 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
3917 pragma Assert
(Ekind
(Id
) = E_Variable
);
3919 end Set_Hiding_Loop_Variable
;
3921 procedure Set_Homonym
(Id
: E
; V
: E
) is
3923 pragma Assert
(Id
/= V
);
3927 procedure Set_Implemented_By_Entry
(Id
: E
; V
: B
:= True) is
3929 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3930 Set_Flag232
(Id
, V
);
3931 end Set_Implemented_By_Entry
;
3933 procedure Set_Interfaces
(Id
: E
; V
: L
) is
3935 pragma Assert
(Is_Record_Type
(Id
));
3936 Set_Elist25
(Id
, V
);
3939 procedure Set_Interface_Alias
(Id
: E
; V
: E
) is
3943 and then Is_Hidden
(Id
)
3944 and then (Ekind_In
(Id
, E_Procedure
, E_Function
)));
3946 end Set_Interface_Alias
;
3948 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
3951 end Set_In_Package_Body
;
3953 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
3956 end Set_In_Private_Part
;
3958 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
3960 pragma Assert
(Nkind
(Id
) in N_Entity
);
3964 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
3966 Set_Elist23
(Id
, V
);
3967 end Set_Inner_Instances
;
3969 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
3972 end Set_Interface_Name
;
3974 procedure Set_Is_Abstract_Subprogram
(Id
: E
; V
: B
:= True) is
3976 pragma Assert
(Is_Overloadable
(Id
));
3978 end Set_Is_Abstract_Subprogram
;
3980 procedure Set_Is_Abstract_Type
(Id
: E
; V
: B
:= True) is
3982 pragma Assert
(Is_Type
(Id
));
3983 Set_Flag146
(Id
, V
);
3984 end Set_Is_Abstract_Type
;
3986 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
3988 pragma Assert
(Is_Access_Type
(Id
));
3989 Set_Flag194
(Id
, V
);
3990 end Set_Is_Local_Anonymous_Access
;
3992 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
3994 pragma Assert
(Is_Access_Type
(Id
));
3996 end Set_Is_Access_Constant
;
3998 procedure Set_Is_Ada_2005_Only
(Id
: E
; V
: B
:= True) is
4000 Set_Flag185
(Id
, V
);
4001 end Set_Is_Ada_2005_Only
;
4003 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
4005 pragma Assert
(Nkind
(Id
) in N_Entity
);
4009 procedure Set_Is_AST_Entry
(Id
: E
; V
: B
:= True) is
4011 pragma Assert
(Is_Entry
(Id
));
4012 Set_Flag132
(Id
, V
);
4013 end Set_Is_AST_Entry
;
4015 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
4018 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
4020 end Set_Is_Asynchronous
;
4022 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
4027 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
4029 pragma Assert
((not V
)
4030 or else (Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
)));
4032 Set_Flag122
(Id
, V
);
4033 end Set_Is_Bit_Packed_Array
;
4035 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
4037 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
4038 Set_Flag102
(Id
, V
);
4041 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
4044 end Set_Is_Character_Type
;
4046 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
4049 end Set_Is_Child_Unit
;
4051 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
4054 end Set_Is_Class_Wide_Equivalent_Type
;
4056 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
4058 Set_Flag149
(Id
, V
);
4059 end Set_Is_Compilation_Unit
;
4061 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
4063 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4064 Set_Flag103
(Id
, V
);
4065 end Set_Is_Completely_Hidden
;
4067 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
4070 end Set_Is_Concurrent_Record_Type
;
4072 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
4075 end Set_Is_Constr_Subt_For_U_Nominal
;
4077 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
4079 Set_Flag141
(Id
, V
);
4080 end Set_Is_Constr_Subt_For_UN_Aliased
;
4082 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
4084 pragma Assert
(Nkind
(Id
) in N_Entity
);
4086 end Set_Is_Constrained
;
4088 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
4091 end Set_Is_Constructor
;
4093 procedure Set_Is_Controlled
(Id
: E
; V
: B
:= True) is
4095 pragma Assert
(Id
= Base_Type
(Id
));
4097 end Set_Is_Controlled
;
4099 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
4101 pragma Assert
(Is_Formal
(Id
));
4103 end Set_Is_Controlling_Formal
;
4105 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
4108 end Set_Is_CPP_Class
;
4110 procedure Set_Is_Descendent_Of_Address
(Id
: E
; V
: B
:= True) is
4112 pragma Assert
(Is_Type
(Id
));
4113 Set_Flag223
(Id
, V
);
4114 end Set_Is_Descendent_Of_Address
;
4116 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
4118 Set_Flag176
(Id
, V
);
4119 end Set_Is_Discrim_SO_Function
;
4121 procedure Set_Is_Dispatch_Table_Entity
(Id
: E
; V
: B
:= True) is
4123 Set_Flag234
(Id
, V
);
4124 end Set_Is_Dispatch_Table_Entity
;
4126 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
4131 Is_Overloadable
(Id
)
4133 Ekind
(Id
) = E_Subprogram_Type
);
4136 end Set_Is_Dispatching_Operation
;
4138 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
4140 Set_Flag124
(Id
, V
);
4141 end Set_Is_Eliminated
;
4143 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
4146 end Set_Is_Entry_Formal
;
4148 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
4151 end Set_Is_Exported
;
4153 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
4156 end Set_Is_First_Subtype
;
4158 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
4160 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
4161 Set_Flag118
(Id
, V
);
4162 end Set_Is_For_Access_Subtype
;
4164 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
4166 Set_Flag111
(Id
, V
);
4167 end Set_Is_Formal_Subprogram
;
4169 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
4171 pragma Assert
(Nkind
(Id
) in N_Entity
);
4175 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
4177 pragma Assert
(Is_Type
(Id
));
4179 end Set_Is_Generic_Actual_Type
;
4181 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
4183 Set_Flag130
(Id
, V
);
4184 end Set_Is_Generic_Instance
;
4186 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
4188 pragma Assert
(Nkind
(Id
) in N_Entity
);
4190 end Set_Is_Generic_Type
;
4192 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
4197 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
4199 Set_Flag171
(Id
, V
);
4200 end Set_Is_Hidden_Open_Scope
;
4202 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
4204 pragma Assert
(Nkind
(Id
) in N_Entity
);
4206 end Set_Is_Immediately_Visible
;
4208 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
4211 end Set_Is_Imported
;
4213 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
4218 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
4221 (Ekind_In
(Id
, E_Record_Type
,
4223 E_Record_Type_With_Private
,
4224 E_Record_Subtype_With_Private
,
4226 E_Class_Wide_Subtype
));
4227 Set_Flag186
(Id
, V
);
4228 end Set_Is_Interface
;
4230 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
4232 Set_Flag126
(Id
, V
);
4233 end Set_Is_Instantiated
;
4235 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
4237 pragma Assert
(Nkind
(Id
) in N_Entity
);
4239 end Set_Is_Internal
;
4241 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
4243 pragma Assert
(Nkind
(Id
) in N_Entity
);
4245 end Set_Is_Interrupt_Handler
;
4247 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
4250 end Set_Is_Intrinsic_Subprogram
;
4252 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
4257 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
4260 end Set_Is_Known_Non_Null
;
4262 procedure Set_Is_Known_Null
(Id
: E
; V
: B
:= True) is
4264 Set_Flag204
(Id
, V
);
4265 end Set_Is_Known_Null
;
4267 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
4269 Set_Flag170
(Id
, V
);
4270 end Set_Is_Known_Valid
;
4272 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
4274 pragma Assert
(Is_Type
(Id
));
4275 Set_Flag106
(Id
, V
);
4276 end Set_Is_Limited_Composite
;
4278 procedure Set_Is_Limited_Interface
(Id
: E
; V
: B
:= True) is
4280 pragma Assert
(Is_Interface
(Id
));
4281 Set_Flag197
(Id
, V
);
4282 end Set_Is_Limited_Interface
;
4284 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
4287 end Set_Is_Limited_Record
;
4289 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
4291 pragma Assert
(Is_Subprogram
(Id
));
4292 Set_Flag137
(Id
, V
);
4293 end Set_Is_Machine_Code_Subprogram
;
4295 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
4297 pragma Assert
(Is_Type
(Id
));
4298 Set_Flag109
(Id
, V
);
4299 end Set_Is_Non_Static_Subtype
;
4301 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
4303 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4304 Set_Flag178
(Id
, V
);
4305 end Set_Is_Null_Init_Proc
;
4307 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
4309 Set_Flag153
(Id
, V
);
4310 end Set_Is_Obsolescent
;
4312 procedure Set_Is_Only_Out_Parameter
(Id
: E
; V
: B
:= True) is
4314 pragma Assert
(Ekind
(Id
) = E_Out_Parameter
);
4315 Set_Flag226
(Id
, V
);
4316 end Set_Is_Only_Out_Parameter
;
4318 procedure Set_Is_Optional_Parameter
(Id
: E
; V
: B
:= True) is
4320 pragma Assert
(Is_Formal
(Id
));
4321 Set_Flag134
(Id
, V
);
4322 end Set_Is_Optional_Parameter
;
4324 procedure Set_Is_Overriding_Operation
(Id
: E
; V
: B
:= True) is
4326 pragma Assert
(Is_Subprogram
(Id
));
4328 end Set_Is_Overriding_Operation
;
4330 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
4332 Set_Flag160
(Id
, V
);
4333 end Set_Is_Package_Body_Entity
;
4335 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
4337 pragma Assert
(Id
= Base_Type
(Id
));
4341 procedure Set_Is_Packed_Array_Type
(Id
: E
; V
: B
:= True) is
4343 Set_Flag138
(Id
, V
);
4344 end Set_Is_Packed_Array_Type
;
4346 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
4348 pragma Assert
(Nkind
(Id
) in N_Entity
);
4350 end Set_Is_Potentially_Use_Visible
;
4352 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
4355 end Set_Is_Preelaborated
;
4357 procedure Set_Is_Primitive
(Id
: E
; V
: B
:= True) is
4360 (Is_Overloadable
(Id
)
4361 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
4362 Set_Flag218
(Id
, V
);
4363 end Set_Is_Primitive
;
4365 procedure Set_Is_Primitive_Wrapper
(Id
: E
; V
: B
:= True) is
4367 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4368 Set_Flag195
(Id
, V
);
4369 end Set_Is_Primitive_Wrapper
;
4371 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
4373 pragma Assert
(Is_Type
(Id
));
4374 Set_Flag107
(Id
, V
);
4375 end Set_Is_Private_Composite
;
4377 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
4380 end Set_Is_Private_Descendant
;
4382 procedure Set_Is_Private_Primitive
(Id
: E
; V
: B
:= True) is
4384 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4385 Set_Flag245
(Id
, V
);
4386 end Set_Is_Private_Primitive
;
4388 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
4390 pragma Assert
(Nkind
(Id
) in N_Entity
);
4394 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
4399 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
4401 pragma Assert
(Is_Access_Type
(Id
));
4402 Set_Flag189
(Id
, V
);
4403 end Set_Is_Pure_Unit_Access_Type
;
4405 procedure Set_Is_RACW_Stub_Type
(Id
: E
; V
: B
:= True) is
4407 pragma Assert
(Is_Type
(Id
));
4408 Set_Flag244
(Id
, V
);
4409 end Set_Is_RACW_Stub_Type
;
4411 procedure Set_Is_Raised
(Id
: E
; V
: B
:= True) is
4413 pragma Assert
(Ekind
(Id
) = E_Exception
);
4414 Set_Flag224
(Id
, V
);
4417 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
4420 end Set_Is_Remote_Call_Interface
;
4422 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
4425 end Set_Is_Remote_Types
;
4427 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
4429 Set_Flag112
(Id
, V
);
4430 end Set_Is_Renaming_Of_Object
;
4432 procedure Set_Is_Return_Object
(Id
: E
; V
: B
:= True) is
4434 Set_Flag209
(Id
, V
);
4435 end Set_Is_Return_Object
;
4437 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
4440 end Set_Is_Shared_Passive
;
4442 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
4446 or else Ekind_In
(Id
, E_Exception
,
4451 end Set_Is_Statically_Allocated
;
4453 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
4455 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
));
4459 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
4462 end Set_Is_Tagged_Type
;
4464 procedure Set_Is_Thunk
(Id
: E
; V
: B
:= True) is
4466 Set_Flag225
(Id
, V
);
4469 procedure Set_Is_Trivial_Subprogram
(Id
: E
; V
: B
:= True) is
4471 Set_Flag235
(Id
, V
);
4472 end Set_Is_Trivial_Subprogram
;
4474 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
4476 Set_Flag163
(Id
, V
);
4477 end Set_Is_True_Constant
;
4479 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
4481 pragma Assert
(Id
= Base_Type
(Id
));
4482 Set_Flag117
(Id
, V
);
4483 end Set_Is_Unchecked_Union
;
4485 procedure Set_Is_Underlying_Record_View
(Id
: E
; V
: B
:= True) is
4487 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
4488 Set_Flag246
(Id
, V
);
4489 end Set_Is_Underlying_Record_View
;
4491 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
4493 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
4494 Set_Flag144
(Id
, V
);
4495 end Set_Is_Unsigned_Type
;
4497 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
4499 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4500 Set_Flag127
(Id
, V
);
4501 end Set_Is_Valued_Procedure
;
4503 procedure Set_Is_Visible_Child_Unit
(Id
: E
; V
: B
:= True) is
4505 pragma Assert
(Is_Child_Unit
(Id
));
4506 Set_Flag116
(Id
, V
);
4507 end Set_Is_Visible_Child_Unit
;
4509 procedure Set_Is_Visible_Formal
(Id
: E
; V
: B
:= True) is
4511 Set_Flag206
(Id
, V
);
4512 end Set_Is_Visible_Formal
;
4514 procedure Set_Is_VMS_Exception
(Id
: E
; V
: B
:= True) is
4516 pragma Assert
(Ekind
(Id
) = E_Exception
);
4517 Set_Flag133
(Id
, V
);
4518 end Set_Is_VMS_Exception
;
4520 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
4522 pragma Assert
(Nkind
(Id
) in N_Entity
);
4524 end Set_Is_Volatile
;
4526 procedure Set_Itype_Printed
(Id
: E
; V
: B
:= True) is
4528 pragma Assert
(Is_Itype
(Id
));
4529 Set_Flag202
(Id
, V
);
4530 end Set_Itype_Printed
;
4532 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
4535 end Set_Kill_Elaboration_Checks
;
4537 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
4540 end Set_Kill_Range_Checks
;
4542 procedure Set_Kill_Tag_Checks
(Id
: E
; V
: B
:= True) is
4545 end Set_Kill_Tag_Checks
;
4547 procedure Set_Known_To_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
4549 pragma Assert
(Is_Type
(Id
));
4550 Set_Flag207
(Id
, V
);
4551 end Set_Known_To_Have_Preelab_Init
;
4553 procedure Set_Last_Assignment
(Id
: E
; V
: N
) is
4555 pragma Assert
(Is_Assignable
(Id
));
4557 end Set_Last_Assignment
;
4559 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
4562 end Set_Last_Entity
;
4564 procedure Set_Limited_View
(Id
: E
; V
: E
) is
4566 pragma Assert
(Ekind
(Id
) = E_Package
);
4568 end Set_Limited_View
;
4570 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
4572 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
4574 end Set_Lit_Indexes
;
4576 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
4578 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
4580 end Set_Lit_Strings
;
4582 procedure Set_Low_Bound_Tested
(Id
: E
; V
: B
:= True) is
4584 pragma Assert
(Is_Formal
(Id
));
4585 Set_Flag205
(Id
, V
);
4586 end Set_Low_Bound_Tested
;
4588 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
4590 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4592 end Set_Machine_Radix_10
;
4594 procedure Set_Master_Id
(Id
: E
; V
: E
) is
4596 pragma Assert
(Is_Access_Type
(Id
));
4600 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
4602 Set_Flag168
(Id
, V
);
4603 end Set_Materialize_Entity
;
4605 procedure Set_Mechanism
(Id
: E
; V
: M
) is
4607 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
4608 Set_Uint8
(Id
, UI_From_Int
(V
));
4611 procedure Set_Modulus
(Id
: E
; V
: U
) is
4613 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
4617 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
4619 pragma Assert
(Is_Type
(Id
));
4620 Set_Flag183
(Id
, V
);
4621 end Set_Must_Be_On_Byte_Boundary
;
4623 procedure Set_Must_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
4625 pragma Assert
(Is_Type
(Id
));
4626 Set_Flag208
(Id
, V
);
4627 end Set_Must_Have_Preelab_Init
;
4629 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
4631 Set_Flag147
(Id
, V
);
4632 end Set_Needs_Debug_Info
;
4634 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
4637 (Is_Overloadable
(Id
)
4638 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
4640 end Set_Needs_No_Actuals
;
4642 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
4644 Set_Flag115
(Id
, V
);
4645 end Set_Never_Set_In_Source
;
4647 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
4650 end Set_Next_Inlined_Subprogram
;
4652 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
4654 pragma Assert
(Is_Access_Type
(Id
) and then Id
= Base_Type
(Id
));
4655 Set_Flag131
(Id
, V
);
4656 end Set_No_Pool_Assigned
;
4658 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
4661 (V
= False or else Ekind_In
(Id
, E_Procedure
, E_Generic_Procedure
));
4662 Set_Flag113
(Id
, V
);
4665 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
4667 pragma Assert
(Is_Access_Type
(Id
) and then Id
= Base_Type
(Id
));
4668 Set_Flag136
(Id
, V
);
4669 end Set_No_Strict_Aliasing
;
4671 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
4673 pragma Assert
(Is_Type
(Id
) and then Id
= Base_Type
(Id
));
4675 end Set_Non_Binary_Modulus
;
4677 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
4679 pragma Assert
(Ekind
(Id
) in Incomplete_Kind
);
4681 end Set_Non_Limited_View
;
4683 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
4686 (Root_Type
(Id
) = Standard_Boolean
4687 and then Ekind
(Id
) = E_Enumeration_Type
);
4688 Set_Flag162
(Id
, V
);
4689 end Set_Nonzero_Is_True
;
4691 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
4693 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4695 end Set_Normalized_First_Bit
;
4697 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
4699 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4701 end Set_Normalized_Position
;
4703 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
4705 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4707 end Set_Normalized_Position_Max
;
4709 procedure Set_OK_To_Rename
(Id
: E
; V
: B
:= True) is
4711 pragma Assert
(Ekind
(Id
) = E_Variable
);
4712 Set_Flag247
(Id
, V
);
4713 end Set_OK_To_Rename
;
4715 procedure Set_OK_To_Reorder_Components
(Id
: E
; V
: B
:= True) is
4718 (Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
4719 Set_Flag239
(Id
, V
);
4720 end Set_OK_To_Reorder_Components
;
4722 procedure Set_Optimize_Alignment_Space
(Id
: E
; V
: B
:= True) is
4725 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
4726 Set_Flag241
(Id
, V
);
4727 end Set_Optimize_Alignment_Space
;
4729 procedure Set_Optimize_Alignment_Time
(Id
: E
; V
: B
:= True) is
4732 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
4733 Set_Flag242
(Id
, V
);
4734 end Set_Optimize_Alignment_Time
;
4736 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
4738 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
4740 end Set_Original_Array_Type
;
4742 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
4744 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
4746 end Set_Original_Record_Component
;
4748 procedure Set_Overlays_Constant
(Id
: E
; V
: B
:= True) is
4750 Set_Flag243
(Id
, V
);
4751 end Set_Overlays_Constant
;
4753 procedure Set_Overridden_Operation
(Id
: E
; V
: E
) is
4756 end Set_Overridden_Operation
;
4758 procedure Set_Package_Instantiation
(Id
: E
; V
: N
) is
4760 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Generic_Package
, E_Package
));
4762 end Set_Package_Instantiation
;
4764 procedure Set_Packed_Array_Type
(Id
: E
; V
: E
) is
4766 pragma Assert
(Is_Array_Type
(Id
));
4768 end Set_Packed_Array_Type
;
4770 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
4772 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
4774 end Set_Parent_Subtype
;
4776 procedure Set_Postcondition_Proc
(Id
: E
; V
: E
) is
4778 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4780 end Set_Postcondition_Proc
;
4782 procedure Set_Primitive_Operations
(Id
: E
; V
: L
) is
4784 pragma Assert
(Is_Tagged_Type
(Id
));
4785 Set_Elist15
(Id
, V
);
4786 end Set_Primitive_Operations
;
4788 procedure Set_Prival
(Id
: E
; V
: E
) is
4790 pragma Assert
(Is_Protected_Component
(Id
));
4794 procedure Set_Prival_Link
(Id
: E
; V
: E
) is
4796 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4798 end Set_Prival_Link
;
4800 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
4802 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
4803 Set_Elist18
(Id
, V
);
4804 end Set_Private_Dependents
;
4806 procedure Set_Private_View
(Id
: E
; V
: N
) is
4808 pragma Assert
(Is_Private_Type
(Id
));
4810 end Set_Private_View
;
4812 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
4814 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
4816 end Set_Protected_Body_Subprogram
;
4818 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
4820 pragma Assert
(Is_Formal
(Id
));
4822 end Set_Protected_Formal
;
4824 procedure Set_Protection_Object
(Id
: E
; V
: E
) is
4826 pragma Assert
(Ekind_In
(Id
, E_Entry
,
4831 end Set_Protection_Object
;
4833 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
4838 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
4840 Set_Flag156
(Id
, V
);
4843 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
4846 end Set_Referenced_As_LHS
;
4848 procedure Set_Referenced_As_Out_Parameter
(Id
: E
; V
: B
:= True) is
4850 Set_Flag227
(Id
, V
);
4851 end Set_Referenced_As_Out_Parameter
;
4853 procedure Set_Referenced_Object
(Id
: E
; V
: N
) is
4855 pragma Assert
(Is_Type
(Id
));
4857 end Set_Referenced_Object
;
4859 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
4861 pragma Assert
(Ekind
(Id
) = E_Exception
);
4863 end Set_Register_Exception_Call
;
4865 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
4867 pragma Assert
(Is_Array_Type
(Id
));
4869 end Set_Related_Array_Object
;
4871 procedure Set_Related_Expression
(Id
: E
; V
: N
) is
4873 pragma Assert
(Ekind
(Id
) in Type_Kind
4874 or else Ekind_In
(Id
, E_Constant
, E_Variable
, E_Void
));
4876 end Set_Related_Expression
;
4878 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
4880 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
4882 end Set_Related_Instance
;
4884 procedure Set_Related_Type
(Id
: E
; V
: E
) is
4886 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
));
4888 end Set_Related_Type
;
4890 procedure Set_Relative_Deadline_Variable
(Id
: E
; V
: E
) is
4892 pragma Assert
(Is_Task_Type
(Id
) and then Id
= Base_Type
(Id
));
4894 end Set_Relative_Deadline_Variable
;
4896 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
4899 end Set_Renamed_Entity
;
4901 procedure Set_Renamed_In_Spec
(Id
: E
; V
: B
:= True) is
4903 pragma Assert
(Ekind
(Id
) = E_Package
);
4904 Set_Flag231
(Id
, V
);
4905 end Set_Renamed_In_Spec
;
4907 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
4910 end Set_Renamed_Object
;
4912 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
4915 end Set_Renaming_Map
;
4917 procedure Set_Requires_Overriding
(Id
: E
; V
: B
:= True) is
4919 pragma Assert
(Is_Overloadable
(Id
));
4920 Set_Flag213
(Id
, V
);
4921 end Set_Requires_Overriding
;
4923 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
4926 end Set_Return_Present
;
4928 procedure Set_Return_Applies_To
(Id
: E
; V
: N
) is
4931 end Set_Return_Applies_To
;
4933 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
4936 end Set_Returns_By_Ref
;
4938 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
4941 (Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
4942 Set_Flag164
(Id
, V
);
4943 end Set_Reverse_Bit_Order
;
4945 procedure Set_RM_Size
(Id
: E
; V
: U
) is
4947 pragma Assert
(Is_Type
(Id
));
4951 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
4954 end Set_Scalar_Range
;
4956 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
4959 end Set_Scale_Value
;
4961 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
4963 pragma Assert
(not Is_Record_Type
(Id
));
4965 end Set_Scope_Depth_Value
;
4967 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
4969 Set_Flag167
(Id
, V
);
4970 end Set_Sec_Stack_Needed_For_Return
;
4972 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
4974 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
4976 end Set_Shadow_Entities
;
4978 procedure Set_Shared_Var_Procs_Instance
(Id
: E
; V
: E
) is
4980 pragma Assert
(Ekind
(Id
) = E_Variable
);
4982 end Set_Shared_Var_Procs_Instance
;
4984 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
4986 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4988 end Set_Size_Check_Code
;
4990 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
4992 Set_Flag177
(Id
, V
);
4993 end Set_Size_Depends_On_Discriminant
;
4995 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
4998 end Set_Size_Known_At_Compile_Time
;
5000 procedure Set_Small_Value
(Id
: E
; V
: R
) is
5002 pragma Assert
(Is_Fixed_Point_Type
(Id
));
5003 Set_Ureal21
(Id
, V
);
5004 end Set_Small_Value
;
5006 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
5008 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
5010 end Set_Spec_Entity
;
5012 procedure Set_Spec_PPC_List
(Id
: E
; V
: N
) is
5014 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
5016 end Set_Spec_PPC_List
;
5018 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
5020 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
5021 pragma Assert
(Id
= Base_Type
(Id
));
5023 end Set_Storage_Size_Variable
;
5025 procedure Set_Static_Elaboration_Desired
(Id
: E
; V
: B
) is
5027 pragma Assert
(Ekind
(Id
) = E_Package
);
5029 end Set_Static_Elaboration_Desired
;
5031 procedure Set_Static_Initialization
(Id
: E
; V
: N
) is
5034 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
5036 end Set_Static_Initialization
;
5038 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
5040 pragma Assert
(Nkind
(Id
) in N_Entity
);
5041 Set_Elist23
(Id
, V
);
5042 end Set_Stored_Constraint
;
5044 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
5046 pragma Assert
(Id
= Base_Type
(Id
));
5047 Set_Flag145
(Id
, V
);
5048 end Set_Strict_Alignment
;
5050 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
5052 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
5054 end Set_String_Literal_Length
;
5056 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
5058 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
5060 end Set_String_Literal_Low_Bound
;
5062 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
5064 Set_Flag148
(Id
, V
);
5065 end Set_Suppress_Elaboration_Warnings
;
5067 procedure Set_Suppress_Init_Proc
(Id
: E
; V
: B
:= True) is
5069 pragma Assert
(Id
= Base_Type
(Id
));
5070 Set_Flag105
(Id
, V
);
5071 end Set_Suppress_Init_Proc
;
5073 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
5075 Set_Flag165
(Id
, V
);
5076 end Set_Suppress_Style_Checks
;
5078 procedure Set_Suppress_Value_Tracking_On_Call
(Id
: E
; V
: B
:= True) is
5080 Set_Flag217
(Id
, V
);
5081 end Set_Suppress_Value_Tracking_On_Call
;
5083 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
5085 pragma Assert
(Ekind
(Id
) in Task_Kind
);
5087 end Set_Task_Body_Procedure
;
5089 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
5092 end Set_Treat_As_Volatile
;
5094 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
5096 pragma Assert
(Ekind
(Id
) in Private_Kind
);
5098 end Set_Underlying_Full_View
;
5100 procedure Set_Underlying_Record_View
(Id
: E
; V
: E
) is
5102 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5104 end Set_Underlying_Record_View
;
5106 procedure Set_Universal_Aliasing
(Id
: E
; V
: B
:= True) is
5108 pragma Assert
(Is_Type
(Id
) and then Id
= Base_Type
(Id
));
5109 Set_Flag216
(Id
, V
);
5110 end Set_Universal_Aliasing
;
5112 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
5115 end Set_Unset_Reference
;
5117 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
5120 end Set_Uses_Sec_Stack
;
5122 procedure Set_Used_As_Generic_Actual
(Id
: E
; V
: B
:= True) is
5124 Set_Flag222
(Id
, V
);
5125 end Set_Used_As_Generic_Actual
;
5127 procedure Set_Vax_Float
(Id
: E
; V
: B
:= True) is
5129 pragma Assert
(Id
= Base_Type
(Id
));
5130 Set_Flag151
(Id
, V
);
5133 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
5136 end Set_Warnings_Off
;
5138 procedure Set_Warnings_Off_Used
(Id
: E
; V
: B
:= True) is
5140 Set_Flag236
(Id
, V
);
5141 end Set_Warnings_Off_Used
;
5143 procedure Set_Warnings_Off_Used_Unmodified
(Id
: E
; V
: B
:= True) is
5145 Set_Flag237
(Id
, V
);
5146 end Set_Warnings_Off_Used_Unmodified
;
5148 procedure Set_Warnings_Off_Used_Unreferenced
(Id
: E
; V
: B
:= True) is
5150 Set_Flag238
(Id
, V
);
5151 end Set_Warnings_Off_Used_Unreferenced
;
5153 procedure Set_Was_Hidden
(Id
: E
; V
: B
:= True) is
5155 Set_Flag196
(Id
, V
);
5158 procedure Set_Wrapped_Entity
(Id
: E
; V
: E
) is
5160 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
5161 and then Is_Primitive_Wrapper
(Id
));
5163 end Set_Wrapped_Entity
;
5165 -----------------------------------
5166 -- Field Initialization Routines --
5167 -----------------------------------
5169 procedure Init_Alignment
(Id
: E
) is
5171 Set_Uint14
(Id
, Uint_0
);
5174 procedure Init_Alignment
(Id
: E
; V
: Int
) is
5176 Set_Uint14
(Id
, UI_From_Int
(V
));
5179 procedure Init_Component_Bit_Offset
(Id
: E
) is
5181 Set_Uint11
(Id
, No_Uint
);
5182 end Init_Component_Bit_Offset
;
5184 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
5186 Set_Uint11
(Id
, UI_From_Int
(V
));
5187 end Init_Component_Bit_Offset
;
5189 procedure Init_Component_Size
(Id
: E
) is
5191 Set_Uint22
(Id
, Uint_0
);
5192 end Init_Component_Size
;
5194 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
5196 Set_Uint22
(Id
, UI_From_Int
(V
));
5197 end Init_Component_Size
;
5199 procedure Init_Digits_Value
(Id
: E
) is
5201 Set_Uint17
(Id
, Uint_0
);
5202 end Init_Digits_Value
;
5204 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
5206 Set_Uint17
(Id
, UI_From_Int
(V
));
5207 end Init_Digits_Value
;
5209 procedure Init_Esize
(Id
: E
) is
5211 Set_Uint12
(Id
, Uint_0
);
5214 procedure Init_Esize
(Id
: E
; V
: Int
) is
5216 Set_Uint12
(Id
, UI_From_Int
(V
));
5219 procedure Init_Normalized_First_Bit
(Id
: E
) is
5221 Set_Uint8
(Id
, No_Uint
);
5222 end Init_Normalized_First_Bit
;
5224 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
5226 Set_Uint8
(Id
, UI_From_Int
(V
));
5227 end Init_Normalized_First_Bit
;
5229 procedure Init_Normalized_Position
(Id
: E
) is
5231 Set_Uint14
(Id
, No_Uint
);
5232 end Init_Normalized_Position
;
5234 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
5236 Set_Uint14
(Id
, UI_From_Int
(V
));
5237 end Init_Normalized_Position
;
5239 procedure Init_Normalized_Position_Max
(Id
: E
) is
5241 Set_Uint10
(Id
, No_Uint
);
5242 end Init_Normalized_Position_Max
;
5244 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
5246 Set_Uint10
(Id
, UI_From_Int
(V
));
5247 end Init_Normalized_Position_Max
;
5249 procedure Init_RM_Size
(Id
: E
) is
5251 Set_Uint13
(Id
, Uint_0
);
5254 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
5256 Set_Uint13
(Id
, UI_From_Int
(V
));
5259 -----------------------------
5260 -- Init_Component_Location --
5261 -----------------------------
5263 procedure Init_Component_Location
(Id
: E
) is
5265 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
5266 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
5267 Set_Uint11
(Id
, No_Uint
); -- Component_Bit_Offset
5268 Set_Uint12
(Id
, Uint_0
); -- Esize
5269 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
5270 end Init_Component_Location
;
5276 procedure Init_Size
(Id
: E
; V
: Int
) is
5278 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
5279 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
5282 ---------------------
5283 -- Init_Size_Align --
5284 ---------------------
5286 procedure Init_Size_Align
(Id
: E
) is
5288 Set_Uint12
(Id
, Uint_0
); -- Esize
5289 Set_Uint13
(Id
, Uint_0
); -- RM_Size
5290 Set_Uint14
(Id
, Uint_0
); -- Alignment
5291 end Init_Size_Align
;
5293 ----------------------------------------------
5294 -- Type Representation Attribute Predicates --
5295 ----------------------------------------------
5297 function Known_Alignment
(E
: Entity_Id
) return B
is
5299 return Uint14
(E
) /= Uint_0
5300 and then Uint14
(E
) /= No_Uint
;
5301 end Known_Alignment
;
5303 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5305 return Uint11
(E
) /= No_Uint
;
5306 end Known_Component_Bit_Offset
;
5308 function Known_Component_Size
(E
: Entity_Id
) return B
is
5310 return Uint22
(Base_Type
(E
)) /= Uint_0
5311 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
5312 end Known_Component_Size
;
5314 function Known_Esize
(E
: Entity_Id
) return B
is
5316 return Uint12
(E
) /= Uint_0
5317 and then Uint12
(E
) /= No_Uint
;
5320 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5322 return Uint8
(E
) /= No_Uint
;
5323 end Known_Normalized_First_Bit
;
5325 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
5327 return Uint14
(E
) /= No_Uint
;
5328 end Known_Normalized_Position
;
5330 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5332 return Uint10
(E
) /= No_Uint
;
5333 end Known_Normalized_Position_Max
;
5335 function Known_RM_Size
(E
: Entity_Id
) return B
is
5337 return Uint13
(E
) /= No_Uint
5338 and then (Uint13
(E
) /= Uint_0
5339 or else Is_Discrete_Type
(E
)
5340 or else Is_Fixed_Point_Type
(E
));
5343 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5345 return Uint11
(E
) /= No_Uint
5346 and then Uint11
(E
) >= Uint_0
;
5347 end Known_Static_Component_Bit_Offset
;
5349 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
5351 return Uint22
(Base_Type
(E
)) > Uint_0
;
5352 end Known_Static_Component_Size
;
5354 function Known_Static_Esize
(E
: Entity_Id
) return B
is
5356 return Uint12
(E
) > Uint_0
5357 and then not Is_Generic_Type
(E
);
5358 end Known_Static_Esize
;
5360 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5362 return Uint8
(E
) /= No_Uint
5363 and then Uint8
(E
) >= Uint_0
;
5364 end Known_Static_Normalized_First_Bit
;
5366 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
5368 return Uint14
(E
) /= No_Uint
5369 and then Uint14
(E
) >= Uint_0
;
5370 end Known_Static_Normalized_Position
;
5372 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5374 return Uint10
(E
) /= No_Uint
5375 and then Uint10
(E
) >= Uint_0
;
5376 end Known_Static_Normalized_Position_Max
;
5378 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
5380 return (Uint13
(E
) > Uint_0
5381 or else Is_Discrete_Type
(E
)
5382 or else Is_Fixed_Point_Type
(E
))
5383 and then not Is_Generic_Type
(E
);
5384 end Known_Static_RM_Size
;
5386 function Unknown_Alignment
(E
: Entity_Id
) return B
is
5388 return Uint14
(E
) = Uint_0
5389 or else Uint14
(E
) = No_Uint
;
5390 end Unknown_Alignment
;
5392 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5394 return Uint11
(E
) = No_Uint
;
5395 end Unknown_Component_Bit_Offset
;
5397 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
5399 return Uint22
(Base_Type
(E
)) = Uint_0
5401 Uint22
(Base_Type
(E
)) = No_Uint
;
5402 end Unknown_Component_Size
;
5404 function Unknown_Esize
(E
: Entity_Id
) return B
is
5406 return Uint12
(E
) = No_Uint
5408 Uint12
(E
) = Uint_0
;
5411 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5413 return Uint8
(E
) = No_Uint
;
5414 end Unknown_Normalized_First_Bit
;
5416 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
5418 return Uint14
(E
) = No_Uint
;
5419 end Unknown_Normalized_Position
;
5421 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5423 return Uint10
(E
) = No_Uint
;
5424 end Unknown_Normalized_Position_Max
;
5426 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
5428 return (Uint13
(E
) = Uint_0
5429 and then not Is_Discrete_Type
(E
)
5430 and then not Is_Fixed_Point_Type
(E
))
5431 or else Uint13
(E
) = No_Uint
;
5432 end Unknown_RM_Size
;
5434 --------------------
5435 -- Address_Clause --
5436 --------------------
5438 function Address_Clause
(Id
: E
) return N
is
5440 return Rep_Clause
(Id
, Name_Address
);
5443 ----------------------
5444 -- Alignment_Clause --
5445 ----------------------
5447 function Alignment_Clause
(Id
: E
) return N
is
5449 return Rep_Clause
(Id
, Name_Alignment
);
5450 end Alignment_Clause
;
5456 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
5458 if Last_Entity
(V
) = Empty
then
5459 Set_First_Entity
(Id
=> V
, V
=> Id
);
5461 Set_Next_Entity
(Last_Entity
(V
), Id
);
5464 Set_Next_Entity
(Id
, Empty
);
5466 Set_Last_Entity
(Id
=> V
, V
=> Id
);
5473 function Base_Type
(Id
: E
) return E
is
5476 when E_Enumeration_Subtype |
5478 E_Signed_Integer_Subtype |
5479 E_Modular_Integer_Subtype |
5480 E_Floating_Point_Subtype |
5481 E_Ordinary_Fixed_Point_Subtype |
5482 E_Decimal_Fixed_Point_Subtype |
5487 E_Record_Subtype_With_Private |
5488 E_Limited_Private_Subtype |
5490 E_Protected_Subtype |
5492 E_String_Literal_Subtype |
5493 E_Class_Wide_Subtype
=>
5501 -------------------------
5502 -- Component_Alignment --
5503 -------------------------
5505 -- Component Alignment is encoded using two flags, Flag128/129 as
5506 -- follows. Note that both flags False = Align_Default, so that the
5507 -- default initialization of flags to False initializes component
5508 -- alignment to the default value as required.
5510 -- Flag128 Flag129 Value
5511 -- ------- ------- -----
5512 -- False False Calign_Default
5513 -- False True Calign_Component_Size
5514 -- True False Calign_Component_Size_4
5515 -- True True Calign_Storage_Unit
5517 function Component_Alignment
(Id
: E
) return C
is
5518 BT
: constant Node_Id
:= Base_Type
(Id
);
5521 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
5523 if Flag128
(BT
) then
5524 if Flag129
(BT
) then
5525 return Calign_Storage_Unit
;
5527 return Calign_Component_Size_4
;
5531 if Flag129
(BT
) then
5532 return Calign_Component_Size
;
5534 return Calign_Default
;
5537 end Component_Alignment
;
5539 ----------------------
5540 -- Declaration_Node --
5541 ----------------------
5543 function Declaration_Node
(Id
: E
) return N
is
5547 if Ekind
(Id
) = E_Incomplete_Type
5548 and then Present
(Full_View
(Id
))
5550 P
:= Parent
(Full_View
(Id
));
5556 if Nkind
(P
) /= N_Selected_Component
5557 and then Nkind
(P
) /= N_Expanded_Name
5559 not (Nkind
(P
) = N_Defining_Program_Unit_Name
5560 and then Is_Child_Unit
(Id
))
5567 end Declaration_Node
;
5569 ---------------------
5570 -- Designated_Type --
5571 ---------------------
5573 function Designated_Type
(Id
: E
) return E
is
5577 Desig_Type
:= Directly_Designated_Type
(Id
);
5579 if Ekind
(Desig_Type
) = E_Incomplete_Type
5580 and then Present
(Full_View
(Desig_Type
))
5582 return Full_View
(Desig_Type
);
5584 elsif Is_Class_Wide_Type
(Desig_Type
)
5585 and then Ekind
(Etype
(Desig_Type
)) = E_Incomplete_Type
5586 and then Present
(Full_View
(Etype
(Desig_Type
)))
5587 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
5589 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
5594 end Designated_Type
;
5596 ----------------------
5597 -- Entry_Index_Type --
5598 ----------------------
5600 function Entry_Index_Type
(Id
: E
) return N
is
5602 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
5603 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
5604 end Entry_Index_Type
;
5606 ---------------------
5607 -- First_Component --
5608 ---------------------
5610 function First_Component
(Id
: E
) return E
is
5615 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
5617 Comp_Id
:= First_Entity
(Id
);
5618 while Present
(Comp_Id
) loop
5619 exit when Ekind
(Comp_Id
) = E_Component
;
5620 Comp_Id
:= Next_Entity
(Comp_Id
);
5624 end First_Component
;
5626 -------------------------------------
5627 -- First_Component_Or_Discriminant --
5628 -------------------------------------
5630 function First_Component_Or_Discriminant
(Id
: E
) return E
is
5635 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
5637 Comp_Id
:= First_Entity
(Id
);
5638 while Present
(Comp_Id
) loop
5639 exit when Ekind
(Comp_Id
) = E_Component
5641 Ekind
(Comp_Id
) = E_Discriminant
;
5642 Comp_Id
:= Next_Entity
(Comp_Id
);
5646 end First_Component_Or_Discriminant
;
5652 function First_Formal
(Id
: E
) return E
is
5657 (Is_Overloadable
(Id
)
5658 or else Ekind_In
(Id
, E_Entry_Family
,
5660 E_Subprogram_Type
));
5662 if Ekind
(Id
) = E_Enumeration_Literal
then
5666 Formal
:= First_Entity
(Id
);
5668 if Present
(Formal
) and then Is_Formal
(Formal
) then
5676 ------------------------------
5677 -- First_Formal_With_Extras --
5678 ------------------------------
5680 function First_Formal_With_Extras
(Id
: E
) return E
is
5685 (Is_Overloadable
(Id
)
5686 or else Ekind_In
(Id
, E_Entry_Family
,
5688 E_Subprogram_Type
));
5690 if Ekind
(Id
) = E_Enumeration_Literal
then
5694 Formal
:= First_Entity
(Id
);
5696 if Present
(Formal
) and then Is_Formal
(Formal
) then
5699 return Extra_Formals
(Id
); -- Empty if no extra formals
5702 end First_Formal_With_Extras
;
5704 -------------------------------------
5705 -- Get_Attribute_Definition_Clause --
5706 -------------------------------------
5708 function Get_Attribute_Definition_Clause
5710 Id
: Attribute_Id
) return Node_Id
5715 N
:= First_Rep_Item
(E
);
5716 while Present
(N
) loop
5717 if Nkind
(N
) = N_Attribute_Definition_Clause
5718 and then Get_Attribute_Id
(Chars
(N
)) = Id
5727 end Get_Attribute_Definition_Clause
;
5733 function Get_Full_View
(T
: Entity_Id
) return Entity_Id
is
5735 if Ekind
(T
) = E_Incomplete_Type
and then Present
(Full_View
(T
)) then
5736 return Full_View
(T
);
5738 elsif Is_Class_Wide_Type
(T
)
5739 and then Ekind
(Root_Type
(T
)) = E_Incomplete_Type
5740 and then Present
(Full_View
(Root_Type
(T
)))
5742 return Class_Wide_Type
(Full_View
(Root_Type
(T
)));
5749 --------------------------------------
5750 -- Get_Record_Representation_Clause --
5751 --------------------------------------
5753 function Get_Record_Representation_Clause
(E
: Entity_Id
) return Node_Id
is
5757 N
:= First_Rep_Item
(E
);
5758 while Present
(N
) loop
5759 if Nkind
(N
) = N_Record_Representation_Clause
then
5767 end Get_Record_Representation_Clause
;
5769 --------------------
5770 -- Get_Rep_Pragma --
5771 --------------------
5773 function Get_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Node_Id
is
5777 N
:= First_Rep_Item
(E
);
5778 while Present
(N
) loop
5779 if Nkind
(N
) = N_Pragma
and then Pragma_Name
(N
) = Nam
then
5789 ------------------------
5790 -- Has_Attach_Handler --
5791 ------------------------
5793 function Has_Attach_Handler
(Id
: E
) return B
is
5797 pragma Assert
(Is_Protected_Type
(Id
));
5799 Ritem
:= First_Rep_Item
(Id
);
5800 while Present
(Ritem
) loop
5801 if Nkind
(Ritem
) = N_Pragma
5802 and then Pragma_Name
(Ritem
) = Name_Attach_Handler
5806 Ritem
:= Next_Rep_Item
(Ritem
);
5811 end Has_Attach_Handler
;
5813 -------------------------------------
5814 -- Has_Attribute_Definition_Clause --
5815 -------------------------------------
5817 function Has_Attribute_Definition_Clause
5819 Id
: Attribute_Id
) return Boolean
5822 return Present
(Get_Attribute_Definition_Clause
(E
, Id
));
5823 end Has_Attribute_Definition_Clause
;
5829 function Has_Entries
(Id
: E
) return B
is
5833 pragma Assert
(Is_Concurrent_Type
(Id
));
5835 Ent
:= First_Entity
(Id
);
5836 while Present
(Ent
) loop
5837 if Is_Entry
(Ent
) then
5841 Ent
:= Next_Entity
(Ent
);
5847 ----------------------------
5848 -- Has_Foreign_Convention --
5849 ----------------------------
5851 function Has_Foreign_Convention
(Id
: E
) return B
is
5853 -- While regular Intrinsics such as the Standard operators fit in the
5854 -- "Ada" convention, those with an Interface_Name materialize GCC
5855 -- builtin imports for which Ada special treatments shouldn't apply.
5857 return Convention
(Id
) in Foreign_Convention
5858 or else (Convention
(Id
) = Convention_Intrinsic
5859 and then Present
(Interface_Name
(Id
)));
5860 end Has_Foreign_Convention
;
5862 ---------------------------
5863 -- Has_Interrupt_Handler --
5864 ---------------------------
5866 function Has_Interrupt_Handler
(Id
: E
) return B
is
5870 pragma Assert
(Is_Protected_Type
(Id
));
5872 Ritem
:= First_Rep_Item
(Id
);
5873 while Present
(Ritem
) loop
5874 if Nkind
(Ritem
) = N_Pragma
5875 and then Pragma_Name
(Ritem
) = Name_Interrupt_Handler
5879 Ritem
:= Next_Rep_Item
(Ritem
);
5884 end Has_Interrupt_Handler
;
5886 --------------------------
5887 -- Has_Private_Ancestor --
5888 --------------------------
5890 function Has_Private_Ancestor
(Id
: E
) return B
is
5891 R
: constant Entity_Id
:= Root_Type
(Id
);
5892 T1
: Entity_Id
:= Id
;
5895 if Is_Private_Type
(T1
) then
5903 end Has_Private_Ancestor
;
5905 --------------------
5906 -- Has_Rep_Pragma --
5907 --------------------
5909 function Has_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Boolean is
5911 return Present
(Get_Rep_Pragma
(E
, Nam
));
5914 --------------------
5915 -- Has_Unmodified --
5916 --------------------
5918 function Has_Unmodified
(E
: Entity_Id
) return Boolean is
5920 if Has_Pragma_Unmodified
(E
) then
5922 elsif Warnings_Off
(E
) then
5923 Set_Warnings_Off_Used_Unmodified
(E
);
5930 ---------------------
5931 -- Has_Unreferenced --
5932 ---------------------
5934 function Has_Unreferenced
(E
: Entity_Id
) return Boolean is
5936 if Has_Pragma_Unreferenced
(E
) then
5938 elsif Warnings_Off
(E
) then
5939 Set_Warnings_Off_Used_Unreferenced
(E
);
5944 end Has_Unreferenced
;
5946 ----------------------
5947 -- Has_Warnings_Off --
5948 ----------------------
5950 function Has_Warnings_Off
(E
: Entity_Id
) return Boolean is
5952 if Warnings_Off
(E
) then
5953 Set_Warnings_Off_Used
(E
);
5958 end Has_Warnings_Off
;
5960 ------------------------------
5961 -- Implementation_Base_Type --
5962 ------------------------------
5964 function Implementation_Base_Type
(Id
: E
) return E
is
5969 Bastyp
:= Base_Type
(Id
);
5971 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
5972 Imptyp
:= Underlying_Type
(Bastyp
);
5974 -- If we have an implementation type, then just return it,
5975 -- otherwise we return the Base_Type anyway. This can only
5976 -- happen in error situations and should avoid some error bombs.
5978 if Present
(Imptyp
) then
5979 return Base_Type
(Imptyp
);
5987 end Implementation_Base_Type
;
5989 ---------------------
5990 -- Is_Boolean_Type --
5991 ---------------------
5993 function Is_Boolean_Type
(Id
: E
) return B
is
5995 return Root_Type
(Id
) = Standard_Boolean
;
5996 end Is_Boolean_Type
;
5998 ------------------------
5999 -- Is_Constant_Object --
6000 ------------------------
6002 function Is_Constant_Object
(Id
: E
) return B
is
6003 K
: constant Entity_Kind
:= Ekind
(Id
);
6006 K
= E_Constant
or else K
= E_In_Parameter
or else K
= E_Loop_Parameter
;
6007 end Is_Constant_Object
;
6009 --------------------
6010 -- Is_Discriminal --
6011 --------------------
6013 function Is_Discriminal
(Id
: E
) return B
is
6015 return (Ekind_In
(Id
, E_Constant
, E_In_Parameter
)
6016 and then Present
(Discriminal_Link
(Id
)));
6019 ----------------------
6020 -- Is_Dynamic_Scope --
6021 ----------------------
6023 function Is_Dynamic_Scope
(Id
: E
) return B
is
6026 Ekind
(Id
) = E_Block
6028 Ekind
(Id
) = E_Function
6030 Ekind
(Id
) = E_Procedure
6032 Ekind
(Id
) = E_Subprogram_Body
6034 Ekind
(Id
) = E_Task_Type
6036 Ekind
(Id
) = E_Entry
6038 Ekind
(Id
) = E_Entry_Family
6040 Ekind
(Id
) = E_Return_Statement
;
6041 end Is_Dynamic_Scope
;
6043 --------------------
6044 -- Is_Entity_Name --
6045 --------------------
6047 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
6048 Kind
: constant Node_Kind
:= Nkind
(N
);
6051 -- Identifiers, operator symbols, expanded names are entity names
6053 return Kind
= N_Identifier
6054 or else Kind
= N_Operator_Symbol
6055 or else Kind
= N_Expanded_Name
6057 -- Attribute references are entity names if they refer to an entity.
6058 -- Note that we don't do this by testing for the presence of the
6059 -- Entity field in the N_Attribute_Reference node, since it may not
6060 -- have been set yet.
6062 or else (Kind
= N_Attribute_Reference
6063 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
6066 -----------------------------------
6067 -- Is_Package_Or_Generic_Package --
6068 -----------------------------------
6070 function Is_Package_Or_Generic_Package
(Id
: E
) return B
is
6073 Ekind
(Id
) = E_Package
6075 Ekind
(Id
) = E_Generic_Package
;
6076 end Is_Package_Or_Generic_Package
;
6082 function Is_Prival
(Id
: E
) return B
is
6084 return (Ekind_In
(Id
, E_Constant
, E_Variable
)
6085 and then Present
(Prival_Link
(Id
)));
6088 ----------------------------
6089 -- Is_Protected_Component --
6090 ----------------------------
6092 function Is_Protected_Component
(Id
: E
) return B
is
6094 return Ekind
(Id
) = E_Component
6095 and then Is_Protected_Type
(Scope
(Id
));
6096 end Is_Protected_Component
;
6098 ----------------------------
6099 -- Is_Protected_Interface --
6100 ----------------------------
6102 function Is_Protected_Interface
(Id
: E
) return B
is
6103 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6105 if not Is_Interface
(Typ
) then
6107 elsif Is_Class_Wide_Type
(Typ
) then
6108 return Is_Protected_Interface
(Etype
(Typ
));
6110 return Protected_Present
(Type_Definition
(Parent
(Typ
)));
6112 end Is_Protected_Interface
;
6114 ------------------------------
6115 -- Is_Protected_Record_Type --
6116 ------------------------------
6118 function Is_Protected_Record_Type
(Id
: E
) return B
is
6121 Is_Concurrent_Record_Type
(Id
)
6122 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
6123 end Is_Protected_Record_Type
;
6125 --------------------------------
6126 -- Is_Standard_Character_Type --
6127 --------------------------------
6129 function Is_Standard_Character_Type
(Id
: E
) return B
is
6131 if Is_Type
(Id
) then
6133 R
: constant Entity_Id
:= Root_Type
(Id
);
6136 R
= Standard_Character
6138 R
= Standard_Wide_Character
6140 R
= Standard_Wide_Wide_Character
;
6146 end Is_Standard_Character_Type
;
6148 --------------------
6149 -- Is_String_Type --
6150 --------------------
6152 function Is_String_Type
(Id
: E
) return B
is
6154 return Ekind
(Id
) in String_Kind
6155 or else (Is_Array_Type
(Id
)
6156 and then Number_Dimensions
(Id
) = 1
6157 and then Is_Character_Type
(Component_Type
(Id
)));
6160 -------------------------------
6161 -- Is_Synchronized_Interface --
6162 -------------------------------
6164 function Is_Synchronized_Interface
(Id
: E
) return B
is
6165 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6168 if not Is_Interface
(Typ
) then
6171 elsif Is_Class_Wide_Type
(Typ
) then
6172 return Is_Synchronized_Interface
(Etype
(Typ
));
6175 return Protected_Present
(Type_Definition
(Parent
(Typ
)))
6176 or else Synchronized_Present
(Type_Definition
(Parent
(Typ
)))
6177 or else Task_Present
(Type_Definition
(Parent
(Typ
)));
6179 end Is_Synchronized_Interface
;
6181 -----------------------
6182 -- Is_Task_Interface --
6183 -----------------------
6185 function Is_Task_Interface
(Id
: E
) return B
is
6186 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6188 if not Is_Interface
(Typ
) then
6190 elsif Is_Class_Wide_Type
(Typ
) then
6191 return Is_Task_Interface
(Etype
(Typ
));
6193 return Task_Present
(Type_Definition
(Parent
(Typ
)));
6195 end Is_Task_Interface
;
6197 -------------------------
6198 -- Is_Task_Record_Type --
6199 -------------------------
6201 function Is_Task_Record_Type
(Id
: E
) return B
is
6204 Is_Concurrent_Record_Type
(Id
)
6205 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
6206 end Is_Task_Record_Type
;
6208 ------------------------
6209 -- Is_Wrapper_Package --
6210 ------------------------
6212 function Is_Wrapper_Package
(Id
: E
) return B
is
6214 return (Ekind
(Id
) = E_Package
6215 and then Present
(Related_Instance
(Id
)));
6216 end Is_Wrapper_Package
;
6222 function Last_Formal
(Id
: E
) return E
is
6227 (Is_Overloadable
(Id
)
6228 or else Ekind_In
(Id
, E_Entry_Family
,
6230 E_Subprogram_Type
));
6232 if Ekind
(Id
) = E_Enumeration_Literal
then
6236 Formal
:= First_Formal
(Id
);
6238 if Present
(Formal
) then
6239 while Present
(Next_Formal
(Formal
)) loop
6240 Formal
:= Next_Formal
(Formal
);
6248 --------------------
6249 -- Next_Component --
6250 --------------------
6252 function Next_Component
(Id
: E
) return E
is
6256 Comp_Id
:= Next_Entity
(Id
);
6257 while Present
(Comp_Id
) loop
6258 exit when Ekind
(Comp_Id
) = E_Component
;
6259 Comp_Id
:= Next_Entity
(Comp_Id
);
6265 ------------------------------------
6266 -- Next_Component_Or_Discriminant --
6267 ------------------------------------
6269 function Next_Component_Or_Discriminant
(Id
: E
) return E
is
6273 Comp_Id
:= Next_Entity
(Id
);
6274 while Present
(Comp_Id
) loop
6275 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
6276 Comp_Id
:= Next_Entity
(Comp_Id
);
6280 end Next_Component_Or_Discriminant
;
6282 -----------------------
6283 -- Next_Discriminant --
6284 -----------------------
6286 -- This function actually implements both Next_Discriminant and
6287 -- Next_Stored_Discriminant by making sure that the Discriminant
6288 -- returned is of the same variety as Id.
6290 function Next_Discriminant
(Id
: E
) return E
is
6292 -- Derived Tagged types with private extensions look like this...
6294 -- E_Discriminant d1
6295 -- E_Discriminant d2
6297 -- E_Discriminant d1
6298 -- E_Discriminant d2
6301 -- so it is critical not to go past the leading discriminants
6306 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
6309 D
:= Next_Entity
(D
);
6311 or else (Ekind
(D
) /= E_Discriminant
6312 and then not Is_Itype
(D
))
6317 exit when Ekind
(D
) = E_Discriminant
6318 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
6322 end Next_Discriminant
;
6328 function Next_Formal
(Id
: E
) return E
is
6332 -- Follow the chain of declared entities as long as the kind of the
6333 -- entity corresponds to a formal parameter. Skip internal entities
6334 -- that may have been created for implicit subtypes, in the process
6335 -- of analyzing default expressions.
6340 P
:= Next_Entity
(P
);
6342 if No
(P
) or else Is_Formal
(P
) then
6344 elsif not Is_Internal
(P
) then
6350 -----------------------------
6351 -- Next_Formal_With_Extras --
6352 -----------------------------
6354 function Next_Formal_With_Extras
(Id
: E
) return E
is
6356 if Present
(Extra_Formal
(Id
)) then
6357 return Extra_Formal
(Id
);
6359 return Next_Formal
(Id
);
6361 end Next_Formal_With_Extras
;
6367 function Next_Index
(Id
: Node_Id
) return Node_Id
is
6376 function Next_Literal
(Id
: E
) return E
is
6378 pragma Assert
(Nkind
(Id
) in N_Entity
);
6382 ------------------------------
6383 -- Next_Stored_Discriminant --
6384 ------------------------------
6386 function Next_Stored_Discriminant
(Id
: E
) return E
is
6388 -- See comment in Next_Discriminant
6390 return Next_Discriminant
(Id
);
6391 end Next_Stored_Discriminant
;
6393 -----------------------
6394 -- Number_Dimensions --
6395 -----------------------
6397 function Number_Dimensions
(Id
: E
) return Pos
is
6402 if Ekind
(Id
) in String_Kind
then
6407 T
:= First_Index
(Id
);
6408 while Present
(T
) loop
6415 end Number_Dimensions
;
6417 --------------------
6418 -- Number_Entries --
6419 --------------------
6421 function Number_Entries
(Id
: E
) return Nat
is
6426 pragma Assert
(Is_Concurrent_Type
(Id
));
6429 Ent
:= First_Entity
(Id
);
6430 while Present
(Ent
) loop
6431 if Is_Entry
(Ent
) then
6435 Ent
:= Next_Entity
(Ent
);
6441 --------------------
6442 -- Number_Formals --
6443 --------------------
6445 function Number_Formals
(Id
: E
) return Pos
is
6451 Formal
:= First_Formal
(Id
);
6452 while Present
(Formal
) loop
6454 Formal
:= Next_Formal
(Formal
);
6460 --------------------
6461 -- Parameter_Mode --
6462 --------------------
6464 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
6469 ---------------------
6470 -- Record_Rep_Item --
6471 ---------------------
6473 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
6475 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
6476 Set_First_Rep_Item
(E
, N
);
6477 end Record_Rep_Item
;
6483 function Root_Type
(Id
: E
) return E
is
6487 pragma Assert
(Nkind
(Id
) in N_Entity
);
6489 T
:= Base_Type
(Id
);
6491 if Ekind
(T
) = E_Class_Wide_Type
then
6494 elsif Ekind
(T
) = E_Class_Wide_Subtype
then
6495 return Etype
(Base_Type
(T
));
6497 -- ??? T comes from Base_Type, how can it be a subtype?
6498 -- Also Base_Type is supposed to be idempotent, so either way
6499 -- this is equivalent to "return Etype (T)" and should be merged
6500 -- with the E_Class_Wide_Type case.
6511 -- Following test catches some error cases resulting from
6514 elsif No
(Etyp
) then
6517 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
6520 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
6526 -- Return if there is a circularity in the inheritance chain. This
6527 -- happens in some error situations and we do not want to get
6528 -- stuck in this loop.
6530 if T
= Base_Type
(Id
) then
6541 function Scope_Depth
(Id
: E
) return Uint
is
6546 while Is_Record_Type
(Scop
) loop
6547 Scop
:= Scope
(Scop
);
6550 return Scope_Depth_Value
(Scop
);
6553 ---------------------
6554 -- Scope_Depth_Set --
6555 ---------------------
6557 function Scope_Depth_Set
(Id
: E
) return B
is
6559 return not Is_Record_Type
(Id
)
6560 and then Field22
(Id
) /= Union_Id
(Empty
);
6561 end Scope_Depth_Set
;
6563 -----------------------------
6564 -- Set_Component_Alignment --
6565 -----------------------------
6567 -- Component Alignment is encoded using two flags, Flag128/129 as
6568 -- follows. Note that both flags False = Align_Default, so that the
6569 -- default initialization of flags to False initializes component
6570 -- alignment to the default value as required.
6572 -- Flag128 Flag129 Value
6573 -- ------- ------- -----
6574 -- False False Calign_Default
6575 -- False True Calign_Component_Size
6576 -- True False Calign_Component_Size_4
6577 -- True True Calign_Storage_Unit
6579 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
6581 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
6582 and then Id
= Base_Type
(Id
));
6585 when Calign_Default
=>
6586 Set_Flag128
(Id
, False);
6587 Set_Flag129
(Id
, False);
6589 when Calign_Component_Size
=>
6590 Set_Flag128
(Id
, False);
6591 Set_Flag129
(Id
, True);
6593 when Calign_Component_Size_4
=>
6594 Set_Flag128
(Id
, True);
6595 Set_Flag129
(Id
, False);
6597 when Calign_Storage_Unit
=>
6598 Set_Flag128
(Id
, True);
6599 Set_Flag129
(Id
, True);
6601 end Set_Component_Alignment
;
6607 function Size_Clause
(Id
: E
) return N
is
6609 return Rep_Clause
(Id
, Name_Size
);
6612 ------------------------
6613 -- Stream_Size_Clause --
6614 ------------------------
6616 function Stream_Size_Clause
(Id
: E
) return N
is
6618 return Rep_Clause
(Id
, Name_Stream_Size
);
6619 end Stream_Size_Clause
;
6625 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
6631 Kind
:= E_Access_Subtype
;
6635 Kind
:= E_Array_Subtype
;
6637 when E_Class_Wide_Type |
6638 E_Class_Wide_Subtype
=>
6639 Kind
:= E_Class_Wide_Subtype
;
6641 when E_Decimal_Fixed_Point_Type |
6642 E_Decimal_Fixed_Point_Subtype
=>
6643 Kind
:= E_Decimal_Fixed_Point_Subtype
;
6645 when E_Ordinary_Fixed_Point_Type |
6646 E_Ordinary_Fixed_Point_Subtype
=>
6647 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
6649 when E_Private_Type |
6650 E_Private_Subtype
=>
6651 Kind
:= E_Private_Subtype
;
6653 when E_Limited_Private_Type |
6654 E_Limited_Private_Subtype
=>
6655 Kind
:= E_Limited_Private_Subtype
;
6657 when E_Record_Type_With_Private |
6658 E_Record_Subtype_With_Private
=>
6659 Kind
:= E_Record_Subtype_With_Private
;
6661 when E_Record_Type |
6663 Kind
:= E_Record_Subtype
;
6665 when E_String_Type |
6667 Kind
:= E_String_Subtype
;
6669 when Enumeration_Kind
=>
6670 Kind
:= E_Enumeration_Subtype
;
6673 Kind
:= E_Floating_Point_Subtype
;
6675 when Signed_Integer_Kind
=>
6676 Kind
:= E_Signed_Integer_Subtype
;
6678 when Modular_Integer_Kind
=>
6679 Kind
:= E_Modular_Integer_Subtype
;
6681 when Protected_Kind
=>
6682 Kind
:= E_Protected_Subtype
;
6685 Kind
:= E_Task_Subtype
;
6689 raise Program_Error
;
6695 ---------------------
6696 -- Type_High_Bound --
6697 ---------------------
6699 function Type_High_Bound
(Id
: E
) return Node_Id
is
6700 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
6702 if Nkind
(Rng
) = N_Subtype_Indication
then
6703 return High_Bound
(Range_Expression
(Constraint
(Rng
)));
6705 return High_Bound
(Rng
);
6707 end Type_High_Bound
;
6709 --------------------
6710 -- Type_Low_Bound --
6711 --------------------
6713 function Type_Low_Bound
(Id
: E
) return Node_Id
is
6714 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
6716 if Nkind
(Rng
) = N_Subtype_Indication
then
6717 return Low_Bound
(Range_Expression
(Constraint
(Rng
)));
6719 return Low_Bound
(Rng
);
6723 ---------------------
6724 -- Underlying_Type --
6725 ---------------------
6727 function Underlying_Type
(Id
: E
) return E
is
6729 -- For record_with_private the underlying type is always the direct
6730 -- full view. Never try to take the full view of the parent it
6731 -- doesn't make sense.
6733 if Ekind
(Id
) = E_Record_Type_With_Private
then
6734 return Full_View
(Id
);
6736 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
6738 -- If we have an incomplete or private type with a full view,
6739 -- then we return the Underlying_Type of this full view
6741 if Present
(Full_View
(Id
)) then
6742 if Id
= Full_View
(Id
) then
6744 -- Previous error in declaration
6749 return Underlying_Type
(Full_View
(Id
));
6752 -- If we have an incomplete entity that comes from the limited
6753 -- view then we return the Underlying_Type of its non-limited
6756 elsif From_With_Type
(Id
)
6757 and then Present
(Non_Limited_View
(Id
))
6759 return Underlying_Type
(Non_Limited_View
(Id
));
6761 -- Otherwise check for the case where we have a derived type or
6762 -- subtype, and if so get the Underlying_Type of the parent type.
6764 elsif Etype
(Id
) /= Id
then
6765 return Underlying_Type
(Etype
(Id
));
6767 -- Otherwise we have an incomplete or private type that has
6768 -- no full view, which means that we have not encountered the
6769 -- completion, so return Empty to indicate the underlying type
6770 -- is not yet known.
6776 -- For non-incomplete, non-private types, return the type itself
6777 -- Also for entities that are not types at all return the entity
6783 end Underlying_Type
;
6785 ------------------------
6786 -- Write_Entity_Flags --
6787 ------------------------
6789 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
6791 procedure W
(Flag_Name
: String; Flag
: Boolean);
6792 -- Write out given flag if it is set
6798 procedure W
(Flag_Name
: String; Flag
: Boolean) is
6802 Write_Str
(Flag_Name
);
6803 Write_Str
(" = True");
6808 -- Start of processing for Write_Entity_Flags
6811 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
6812 and then Id
= Base_Type
(Id
)
6815 Write_Str
("Component_Alignment = ");
6817 case Component_Alignment
(Id
) is
6818 when Calign_Default
=>
6819 Write_Str
("Calign_Default");
6821 when Calign_Component_Size
=>
6822 Write_Str
("Calign_Component_Size");
6824 when Calign_Component_Size_4
=>
6825 Write_Str
("Calign_Component_Size_4");
6827 when Calign_Storage_Unit
=>
6828 Write_Str
("Calign_Storage_Unit");
6834 W
("Address_Taken", Flag104
(Id
));
6835 W
("Body_Needed_For_SAL", Flag40
(Id
));
6836 W
("C_Pass_By_Copy", Flag125
(Id
));
6837 W
("Can_Never_Be_Null", Flag38
(Id
));
6838 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
6839 W
("Debug_Info_Off", Flag166
(Id
));
6840 W
("Default_Expressions_Processed", Flag108
(Id
));
6841 W
("Delay_Cleanups", Flag114
(Id
));
6842 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
6843 W
("Depends_On_Private", Flag14
(Id
));
6844 W
("Discard_Names", Flag88
(Id
));
6845 W
("Elaboration_Entity_Required", Flag174
(Id
));
6846 W
("Elaborate_Body_Desirable", Flag210
(Id
));
6847 W
("Entry_Accepted", Flag152
(Id
));
6848 W
("Can_Use_Internal_Rep", Flag229
(Id
));
6849 W
("Finalize_Storage_Only", Flag158
(Id
));
6850 W
("From_With_Type", Flag159
(Id
));
6851 W
("Has_Aliased_Components", Flag135
(Id
));
6852 W
("Has_Alignment_Clause", Flag46
(Id
));
6853 W
("Has_All_Calls_Remote", Flag79
(Id
));
6854 W
("Has_Anon_Block_Suffix", Flag201
(Id
));
6855 W
("Has_Atomic_Components", Flag86
(Id
));
6856 W
("Has_Biased_Representation", Flag139
(Id
));
6857 W
("Has_Completion", Flag26
(Id
));
6858 W
("Has_Completion_In_Body", Flag71
(Id
));
6859 W
("Has_Complex_Representation", Flag140
(Id
));
6860 W
("Has_Component_Size_Clause", Flag68
(Id
));
6861 W
("Has_Contiguous_Rep", Flag181
(Id
));
6862 W
("Has_Controlled_Component", Flag43
(Id
));
6863 W
("Has_Controlling_Result", Flag98
(Id
));
6864 W
("Has_Convention_Pragma", Flag119
(Id
));
6865 W
("Has_Delayed_Freeze", Flag18
(Id
));
6866 W
("Has_Discriminants", Flag5
(Id
));
6867 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
6868 W
("Has_Exit", Flag47
(Id
));
6869 W
("Has_External_Tag_Rep_Clause", Flag110
(Id
));
6870 W
("Has_Forward_Instantiation", Flag175
(Id
));
6871 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
6872 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
6873 W
("Has_Homonym", Flag56
(Id
));
6874 W
("Has_Initial_Value", Flag219
(Id
));
6875 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
6876 W
("Has_Master_Entity", Flag21
(Id
));
6877 W
("Has_Missing_Return", Flag142
(Id
));
6878 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
6879 W
("Has_Non_Standard_Rep", Flag75
(Id
));
6880 W
("Has_Object_Size_Clause", Flag172
(Id
));
6881 W
("Has_Per_Object_Constraint", Flag154
(Id
));
6882 W
("Has_Persistent_BSS", Flag188
(Id
));
6883 W
("Has_Postconditions", Flag240
(Id
));
6884 W
("Has_Pragma_Controlled", Flag27
(Id
));
6885 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
6886 W
("Has_Pragma_Inline", Flag157
(Id
));
6887 W
("Has_Pragma_Inline_Always", Flag230
(Id
));
6888 W
("Has_Pragma_Pack", Flag121
(Id
));
6889 W
("Has_Pragma_Preelab_Init", Flag221
(Id
));
6890 W
("Has_Pragma_Pure", Flag203
(Id
));
6891 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
6892 W
("Has_Pragma_Thread_Local_Storage", Flag169
(Id
));
6893 W
("Has_Pragma_Unmodified", Flag233
(Id
));
6894 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
6895 W
("Has_Pragma_Unreferenced_Objects", Flag212
(Id
));
6896 W
("Has_Primitive_Operations", Flag120
(Id
));
6897 W
("Has_Private_Declaration", Flag155
(Id
));
6898 W
("Has_Qualified_Name", Flag161
(Id
));
6899 W
("Has_RACW", Flag214
(Id
));
6900 W
("Has_Record_Rep_Clause", Flag65
(Id
));
6901 W
("Has_Recursive_Call", Flag143
(Id
));
6902 W
("Has_Size_Clause", Flag29
(Id
));
6903 W
("Has_Small_Clause", Flag67
(Id
));
6904 W
("Has_Specified_Layout", Flag100
(Id
));
6905 W
("Has_Specified_Stream_Input", Flag190
(Id
));
6906 W
("Has_Specified_Stream_Output", Flag191
(Id
));
6907 W
("Has_Specified_Stream_Read", Flag192
(Id
));
6908 W
("Has_Specified_Stream_Write", Flag193
(Id
));
6909 W
("Has_Static_Discriminants", Flag211
(Id
));
6910 W
("Has_Storage_Size_Clause", Flag23
(Id
));
6911 W
("Has_Stream_Size_Clause", Flag184
(Id
));
6912 W
("Has_Subprogram_Descriptor", Flag93
(Id
));
6913 W
("Has_Task", Flag30
(Id
));
6914 W
("Has_Thunks", Flag228
(Id
));
6915 W
("Has_Unchecked_Union", Flag123
(Id
));
6916 W
("Has_Unknown_Discriminants", Flag72
(Id
));
6917 W
("Has_Up_Level_Access", Flag215
(Id
));
6918 W
("Has_Volatile_Components", Flag87
(Id
));
6919 W
("Has_Xref_Entry", Flag182
(Id
));
6920 W
("Implemented_By_Entry", Flag232
(Id
));
6921 W
("In_Package_Body", Flag48
(Id
));
6922 W
("In_Private_Part", Flag45
(Id
));
6923 W
("In_Use", Flag8
(Id
));
6924 W
("Is_AST_Entry", Flag132
(Id
));
6925 W
("Is_Abstract_Subprogram", Flag19
(Id
));
6926 W
("Is_Abstract_Type", Flag146
(Id
));
6927 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
6928 W
("Is_Access_Constant", Flag69
(Id
));
6929 W
("Is_Ada_2005_Only", Flag185
(Id
));
6930 W
("Is_Aliased", Flag15
(Id
));
6931 W
("Is_Asynchronous", Flag81
(Id
));
6932 W
("Is_Atomic", Flag85
(Id
));
6933 W
("Is_Bit_Packed_Array", Flag122
(Id
));
6934 W
("Is_CPP_Class", Flag74
(Id
));
6935 W
("Is_Called", Flag102
(Id
));
6936 W
("Is_Character_Type", Flag63
(Id
));
6937 W
("Is_Child_Unit", Flag73
(Id
));
6938 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
6939 W
("Is_Compilation_Unit", Flag149
(Id
));
6940 W
("Is_Completely_Hidden", Flag103
(Id
));
6941 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
6942 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
6943 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
6944 W
("Is_Constrained", Flag12
(Id
));
6945 W
("Is_Constructor", Flag76
(Id
));
6946 W
("Is_Controlled", Flag42
(Id
));
6947 W
("Is_Controlling_Formal", Flag97
(Id
));
6948 W
("Is_Descendent_Of_Address", Flag223
(Id
));
6949 W
("Is_Discrim_SO_Function", Flag176
(Id
));
6950 W
("Is_Dispatch_Table_Entity", Flag234
(Id
));
6951 W
("Is_Dispatching_Operation", Flag6
(Id
));
6952 W
("Is_Eliminated", Flag124
(Id
));
6953 W
("Is_Entry_Formal", Flag52
(Id
));
6954 W
("Is_Exported", Flag99
(Id
));
6955 W
("Is_First_Subtype", Flag70
(Id
));
6956 W
("Is_For_Access_Subtype", Flag118
(Id
));
6957 W
("Is_Formal_Subprogram", Flag111
(Id
));
6958 W
("Is_Frozen", Flag4
(Id
));
6959 W
("Is_Generic_Actual_Type", Flag94
(Id
));
6960 W
("Is_Generic_Instance", Flag130
(Id
));
6961 W
("Is_Generic_Type", Flag13
(Id
));
6962 W
("Is_Hidden", Flag57
(Id
));
6963 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
6964 W
("Is_Immediately_Visible", Flag7
(Id
));
6965 W
("Is_Imported", Flag24
(Id
));
6966 W
("Is_Inlined", Flag11
(Id
));
6967 W
("Is_Instantiated", Flag126
(Id
));
6968 W
("Is_Interface", Flag186
(Id
));
6969 W
("Is_Internal", Flag17
(Id
));
6970 W
("Is_Interrupt_Handler", Flag89
(Id
));
6971 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
6972 W
("Is_Itype", Flag91
(Id
));
6973 W
("Is_Known_Non_Null", Flag37
(Id
));
6974 W
("Is_Known_Null", Flag204
(Id
));
6975 W
("Is_Known_Valid", Flag170
(Id
));
6976 W
("Is_Limited_Composite", Flag106
(Id
));
6977 W
("Is_Limited_Interface", Flag197
(Id
));
6978 W
("Is_Limited_Record", Flag25
(Id
));
6979 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
6980 W
("Is_Non_Static_Subtype", Flag109
(Id
));
6981 W
("Is_Null_Init_Proc", Flag178
(Id
));
6982 W
("Is_Obsolescent", Flag153
(Id
));
6983 W
("Is_Only_Out_Parameter", Flag226
(Id
));
6984 W
("Is_Optional_Parameter", Flag134
(Id
));
6985 W
("Is_Overriding_Operation", Flag39
(Id
));
6986 W
("Is_Package_Body_Entity", Flag160
(Id
));
6987 W
("Is_Packed", Flag51
(Id
));
6988 W
("Is_Packed_Array_Type", Flag138
(Id
));
6989 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
6990 W
("Is_Preelaborated", Flag59
(Id
));
6991 W
("Is_Primitive", Flag218
(Id
));
6992 W
("Is_Primitive_Wrapper", Flag195
(Id
));
6993 W
("Is_Private_Composite", Flag107
(Id
));
6994 W
("Is_Private_Descendant", Flag53
(Id
));
6995 W
("Is_Private_Primitive", Flag245
(Id
));
6996 W
("Is_Public", Flag10
(Id
));
6997 W
("Is_Pure", Flag44
(Id
));
6998 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
6999 W
("Is_RACW_Stub_Type", Flag244
(Id
));
7000 W
("Is_Raised", Flag224
(Id
));
7001 W
("Is_Remote_Call_Interface", Flag62
(Id
));
7002 W
("Is_Remote_Types", Flag61
(Id
));
7003 W
("Is_Renaming_Of_Object", Flag112
(Id
));
7004 W
("Is_Return_Object", Flag209
(Id
));
7005 W
("Is_Shared_Passive", Flag60
(Id
));
7006 W
("Is_Statically_Allocated", Flag28
(Id
));
7007 W
("Is_Tag", Flag78
(Id
));
7008 W
("Is_Tagged_Type", Flag55
(Id
));
7009 W
("Is_Thunk", Flag225
(Id
));
7010 W
("Is_Trivial_Subprogram", Flag235
(Id
));
7011 W
("Is_True_Constant", Flag163
(Id
));
7012 W
("Is_Unchecked_Union", Flag117
(Id
));
7013 W
("Is_Underlying_Record_View", Flag246
(Id
));
7014 W
("Is_Unsigned_Type", Flag144
(Id
));
7015 W
("Is_VMS_Exception", Flag133
(Id
));
7016 W
("Is_Valued_Procedure", Flag127
(Id
));
7017 W
("Is_Visible_Child_Unit", Flag116
(Id
));
7018 W
("Is_Visible_Formal", Flag206
(Id
));
7019 W
("Is_Volatile", Flag16
(Id
));
7020 W
("Itype_Printed", Flag202
(Id
));
7021 W
("Kill_Elaboration_Checks", Flag32
(Id
));
7022 W
("Kill_Range_Checks", Flag33
(Id
));
7023 W
("Kill_Tag_Checks", Flag34
(Id
));
7024 W
("Known_To_Have_Preelab_Init", Flag207
(Id
));
7025 W
("Low_Bound_Tested", Flag205
(Id
));
7026 W
("Machine_Radix_10", Flag84
(Id
));
7027 W
("Materialize_Entity", Flag168
(Id
));
7028 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
7029 W
("Must_Have_Preelab_Init", Flag208
(Id
));
7030 W
("Needs_Debug_Info", Flag147
(Id
));
7031 W
("Needs_No_Actuals", Flag22
(Id
));
7032 W
("Never_Set_In_Source", Flag115
(Id
));
7033 W
("No_Pool_Assigned", Flag131
(Id
));
7034 W
("No_Return", Flag113
(Id
));
7035 W
("No_Strict_Aliasing", Flag136
(Id
));
7036 W
("Non_Binary_Modulus", Flag58
(Id
));
7037 W
("Nonzero_Is_True", Flag162
(Id
));
7038 W
("OK_To_Rename", Flag247
(Id
));
7039 W
("OK_To_Reorder_Components", Flag239
(Id
));
7040 W
("Optimize_Alignment_Space", Flag241
(Id
));
7041 W
("Optimize_Alignment_Time", Flag242
(Id
));
7042 W
("Overlays_Constant", Flag243
(Id
));
7043 W
("Reachable", Flag49
(Id
));
7044 W
("Referenced", Flag156
(Id
));
7045 W
("Referenced_As_LHS", Flag36
(Id
));
7046 W
("Referenced_As_Out_Parameter", Flag227
(Id
));
7047 W
("Renamed_In_Spec", Flag231
(Id
));
7048 W
("Requires_Overriding", Flag213
(Id
));
7049 W
("Return_Present", Flag54
(Id
));
7050 W
("Returns_By_Ref", Flag90
(Id
));
7051 W
("Reverse_Bit_Order", Flag164
(Id
));
7052 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
7053 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
7054 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
7055 W
("Static_Elaboration_Desired", Flag77
(Id
));
7056 W
("Strict_Alignment", Flag145
(Id
));
7057 W
("Suppress_Elaboration_Warnings", Flag148
(Id
));
7058 W
("Suppress_Init_Proc", Flag105
(Id
));
7059 W
("Suppress_Style_Checks", Flag165
(Id
));
7060 W
("Suppress_Value_Tracking_On_Call", Flag217
(Id
));
7061 W
("Treat_As_Volatile", Flag41
(Id
));
7062 W
("Universal_Aliasing", Flag216
(Id
));
7063 W
("Used_As_Generic_Actual", Flag222
(Id
));
7064 W
("Uses_Sec_Stack", Flag95
(Id
));
7065 W
("Vax_Float", Flag151
(Id
));
7066 W
("Warnings_Off", Flag96
(Id
));
7067 W
("Warnings_Off_Used", Flag236
(Id
));
7068 W
("Warnings_Off_Used_Unmodified", Flag237
(Id
));
7069 W
("Warnings_Off_Used_Unreferenced", Flag238
(Id
));
7070 W
("Was_Hidden", Flag196
(Id
));
7071 end Write_Entity_Flags
;
7073 -----------------------
7074 -- Write_Entity_Info --
7075 -----------------------
7077 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
7079 procedure Write_Attribute
(Which
: String; Nam
: E
);
7080 -- Write attribute value with given string name
7082 procedure Write_Kind
(Id
: Entity_Id
);
7083 -- Write Ekind field of entity
7085 ---------------------
7086 -- Write_Attribute --
7087 ---------------------
7089 procedure Write_Attribute
(Which
: String; Nam
: E
) is
7093 Write_Int
(Int
(Nam
));
7095 Write_Name
(Chars
(Nam
));
7097 end Write_Attribute
;
7103 procedure Write_Kind
(Id
: Entity_Id
) is
7104 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
7108 Write_Str
(" Kind ");
7110 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
7111 Write_Str
("TAGGED ");
7114 Write_Str
(K
(3 .. K
'Length));
7117 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
7118 Write_Str
("Depends_On_Private ");
7122 -- Start of processing for Write_Entity_Info
7126 Write_Attribute
("Name ", Id
);
7127 Write_Int
(Int
(Id
));
7131 Write_Attribute
(" Type ", Etype
(Id
));
7133 Write_Attribute
(" Scope ", Scope
(Id
));
7138 when Discrete_Kind
=>
7139 Write_Str
("Bounds: Id = ");
7141 if Present
(Scalar_Range
(Id
)) then
7142 Write_Int
(Int
(Type_Low_Bound
(Id
)));
7143 Write_Str
(" .. Id = ");
7144 Write_Int
(Int
(Type_High_Bound
(Id
)));
7146 Write_Str
("Empty");
7157 (" Component Type ", Component_Type
(Id
));
7160 Write_Str
(" Indices ");
7162 Index
:= First_Index
(Id
);
7163 while Present
(Index
) loop
7164 Write_Attribute
(" ", Etype
(Index
));
7165 Index
:= Next_Index
(Index
);
7173 (" Directly Designated Type ",
7174 Directly_Designated_Type
(Id
));
7177 when Overloadable_Kind
=>
7178 if Present
(Homonym
(Id
)) then
7179 Write_Str
(" Homonym ");
7180 Write_Name
(Chars
(Homonym
(Id
)));
7182 Write_Int
(Int
(Homonym
(Id
)));
7189 if Ekind
(Scope
(Id
)) in Record_Kind
then
7191 " Original_Record_Component ",
7192 Original_Record_Component
(Id
));
7193 Write_Int
(Int
(Original_Record_Component
(Id
)));
7197 when others => null;
7199 end Write_Entity_Info
;
7201 -----------------------
7202 -- Write_Field6_Name --
7203 -----------------------
7205 procedure Write_Field6_Name
(Id
: Entity_Id
) is
7206 pragma Warnings
(Off
, Id
);
7208 Write_Str
("First_Rep_Item");
7209 end Write_Field6_Name
;
7211 -----------------------
7212 -- Write_Field7_Name --
7213 -----------------------
7215 procedure Write_Field7_Name
(Id
: Entity_Id
) is
7216 pragma Warnings
(Off
, Id
);
7218 Write_Str
("Freeze_Node");
7219 end Write_Field7_Name
;
7221 -----------------------
7222 -- Write_Field8_Name --
7223 -----------------------
7225 procedure Write_Field8_Name
(Id
: Entity_Id
) is
7230 Write_Str
("Normalized_First_Bit");
7234 E_Subprogram_Body
=>
7235 Write_Str
("Mechanism");
7238 Write_Str
("Associated_Node_For_Itype");
7241 Write_Str
("First_Exit_Statement");
7244 Write_Str
("Dependent_Instances");
7247 Write_Str
("Postcondition_Proc");
7249 when E_Return_Statement
=>
7250 Write_Str
("Return_Applies_To");
7253 Write_Str
("Hiding_Loop_Variable");
7256 Write_Str
("Field8??");
7258 end Write_Field8_Name
;
7260 -----------------------
7261 -- Write_Field9_Name --
7262 -----------------------
7264 procedure Write_Field9_Name
(Id
: Entity_Id
) is
7268 Write_Str
("Class_Wide_Type");
7271 E_Generic_Function |
7273 E_Generic_Procedure |
7276 Write_Str
("Renaming_Map");
7279 Write_Str
("Current_Value");
7282 Write_Str
("Field9??");
7284 end Write_Field9_Name
;
7286 ------------------------
7287 -- Write_Field10_Name --
7288 ------------------------
7290 procedure Write_Field10_Name
(Id
: Entity_Id
) is
7294 Write_Str
("Referenced_Object");
7296 when E_In_Parameter |
7298 Write_Str
("Discriminal_Link");
7304 Write_Str
("Handler_Records");
7308 Write_Str
("Normalized_Position_Max");
7311 Write_Str
("Field10??");
7313 end Write_Field10_Name
;
7315 ------------------------
7316 -- Write_Field11_Name --
7317 ------------------------
7319 procedure Write_Field11_Name
(Id
: Entity_Id
) is
7323 Write_Str
("Entry_Component");
7327 Write_Str
("Component_Bit_Offset");
7330 Write_Str
("Full_View");
7332 when E_Enumeration_Literal
=>
7333 Write_Str
("Enumeration_Pos");
7336 Write_Str
("Block_Node");
7342 Write_Str
("Protected_Body_Subprogram");
7344 when E_Generic_Package
=>
7345 Write_Str
("Generic_Homonym");
7348 Write_Str
("Full_View");
7351 Write_Str
("Field11??");
7353 end Write_Field11_Name
;
7355 ------------------------
7356 -- Write_Field12_Name --
7357 ------------------------
7359 procedure Write_Field12_Name
(Id
: Entity_Id
) is
7363 Write_Str
("Barrier_Function");
7365 when E_Enumeration_Literal
=>
7366 Write_Str
("Enumeration_Rep");
7374 E_In_Out_Parameter |
7378 Write_Str
("Esize");
7382 Write_Str
("Next_Inlined_Subprogram");
7385 Write_Str
("Associated_Formal_Package");
7388 Write_Str
("Field12??");
7390 end Write_Field12_Name
;
7392 ------------------------
7393 -- Write_Field13_Name --
7394 ------------------------
7396 procedure Write_Field13_Name
(Id
: Entity_Id
) is
7400 Write_Str
("RM_Size");
7404 Write_Str
("Component_Clause");
7407 if not Comes_From_Source
(Id
)
7409 Chars
(Id
) = Name_Op_Ne
7411 Write_Str
("Corresponding_Equality");
7413 elsif Comes_From_Source
(Id
) then
7414 Write_Str
("Elaboration_Entity");
7417 Write_Str
("Field13??");
7422 Write_Str
("Extra_Accessibility");
7426 Generic_Unit_Kind
=>
7427 Write_Str
("Elaboration_Entity");
7430 Write_Str
("Field13??");
7432 end Write_Field13_Name
;
7434 -----------------------
7435 -- Write_Field14_Name --
7436 -----------------------
7438 procedure Write_Field14_Name
(Id
: Entity_Id
) is
7447 Write_Str
("Alignment");
7451 Write_Str
("Normalized_Position");
7455 Write_Str
("First_Optional_Parameter");
7458 E_Generic_Package
=>
7459 Write_Str
("Shadow_Entities");
7462 Write_Str
("Field14??");
7464 end Write_Field14_Name
;
7466 ------------------------
7467 -- Write_Field15_Name --
7468 ------------------------
7470 procedure Write_Field15_Name
(Id
: Entity_Id
) is
7475 Write_Str
("Storage_Size_Variable");
7477 when Class_Wide_Kind |
7481 Write_Str
("Primitive_Operations");
7484 Write_Str
("DT_Entry_Count");
7486 when Decimal_Fixed_Point_Kind
=>
7487 Write_Str
("Scale_Value");
7489 when E_Discriminant
=>
7490 Write_Str
("Discriminant_Number");
7493 Write_Str
("Extra_Formal");
7497 Write_Str
("DT_Position");
7500 Write_Str
("Entry_Parameters_Type");
7502 when Enumeration_Kind
=>
7503 Write_Str
("Lit_Indexes");
7507 Write_Str
("Related_Instance");
7509 when E_Protected_Type
=>
7510 Write_Str
("Entry_Bodies_Array");
7512 when E_String_Literal_Subtype
=>
7513 Write_Str
("String_Literal_Low_Bound");
7516 Write_Str
("Field15??");
7518 end Write_Field15_Name
;
7520 ------------------------
7521 -- Write_Field16_Name --
7522 ------------------------
7524 procedure Write_Field16_Name
(Id
: Entity_Id
) is
7528 Write_Str
("Entry_Formal");
7532 Write_Str
("DTC_Entity");
7537 Write_Str
("First_Private_Entity");
7539 when E_Record_Type |
7540 E_Record_Type_With_Private
=>
7541 Write_Str
("Access_Disp_Table");
7543 when E_String_Literal_Subtype
=>
7544 Write_Str
("String_Literal_Length");
7546 when Enumeration_Kind
=>
7547 Write_Str
("Lit_Strings");
7551 Write_Str
("Unset_Reference");
7553 when E_Record_Subtype |
7554 E_Class_Wide_Subtype
=>
7555 Write_Str
("Cloned_Subtype");
7558 Write_Str
("Field16??");
7560 end Write_Field16_Name
;
7562 ------------------------
7563 -- Write_Field17_Name --
7564 ------------------------
7566 procedure Write_Field17_Name
(Id
: Entity_Id
) is
7570 Write_Str
("Digits_Value");
7573 Write_Str
("Prival");
7575 when E_Discriminant
=>
7576 Write_Str
("Discriminal");
7585 E_Generic_Function |
7587 E_Generic_Procedure |
7595 E_Return_Statement |
7597 E_Subprogram_Type
=>
7598 Write_Str
("First_Entity");
7601 Write_Str
("First_Index");
7603 when Enumeration_Kind
=>
7604 Write_Str
("First_Literal");
7607 Write_Str
("Master_Id");
7609 when Modular_Integer_Kind
=>
7610 Write_Str
("Modulus");
7614 E_Generic_In_Out_Parameter |
7616 Write_Str
("Actual_Subtype");
7618 when E_Incomplete_Type
=>
7619 Write_Str
("Non_Limited_View");
7621 when E_Incomplete_Subtype
=>
7622 if From_With_Type
(Id
) then
7623 Write_Str
("Non_Limited_View");
7627 Write_Str
("Field17??");
7629 end Write_Field17_Name
;
7631 ------------------------
7632 -- Write_Field18_Name --
7633 ------------------------
7635 procedure Write_Field18_Name
(Id
: Entity_Id
) is
7638 when E_Enumeration_Literal |
7642 Write_Str
("Alias");
7644 when E_Record_Type
=>
7645 Write_Str
("Corresponding_Concurrent_Type");
7647 when E_Entry_Index_Parameter
=>
7648 Write_Str
("Entry_Index_Constant");
7650 when E_Class_Wide_Subtype |
7651 E_Access_Protected_Subprogram_Type |
7652 E_Anonymous_Access_Protected_Subprogram_Type |
7653 E_Access_Subprogram_Type |
7655 Write_Str
("Equivalent_Type");
7657 when Fixed_Point_Kind
=>
7658 Write_Str
("Delta_Value");
7661 Write_Str
("Renamed_Object");
7665 E_Generic_Function |
7666 E_Generic_Procedure |
7667 E_Generic_Package
=>
7668 Write_Str
("Renamed_Entity");
7670 when Incomplete_Or_Private_Kind
=>
7671 Write_Str
("Private_Dependents");
7673 when Concurrent_Kind
=>
7674 Write_Str
("Corresponding_Record_Type");
7679 Write_Str
("Enclosing_Scope");
7682 Write_Str
("Field18??");
7684 end Write_Field18_Name
;
7686 -----------------------
7687 -- Write_Field19_Name --
7688 -----------------------
7690 procedure Write_Field19_Name
(Id
: Entity_Id
) is
7695 Write_Str
("Related_Array_Object");
7701 E_Return_Statement |
7703 Write_Str
("Finalization_Chain_Entity");
7705 when E_Constant | E_Variable
=>
7706 Write_Str
("Size_Check_Code");
7708 when E_Discriminant
=>
7709 Write_Str
("Corresponding_Discriminant");
7712 E_Generic_Package
=>
7713 Write_Str
("Body_Entity");
7715 when E_Package_Body |
7717 Write_Str
("Spec_Entity");
7719 when Private_Kind
=>
7720 Write_Str
("Underlying_Full_View");
7722 when E_Record_Type
=>
7723 Write_Str
("Parent_Subtype");
7726 Write_Str
("Field19??");
7728 end Write_Field19_Name
;
7730 -----------------------
7731 -- Write_Field20_Name --
7732 -----------------------
7734 procedure Write_Field20_Name
(Id
: Entity_Id
) is
7738 Write_Str
("Component_Type");
7740 when E_In_Parameter |
7741 E_Generic_In_Parameter
=>
7742 Write_Str
("Default_Value");
7745 Write_Str
("Directly_Designated_Type");
7748 Write_Str
("Discriminant_Checking_Func");
7752 Write_Str
("Prival_Link");
7754 when E_Discriminant
=>
7755 Write_Str
("Discriminant_Default_Value");
7764 E_Generic_Function |
7766 E_Generic_Procedure |
7774 E_Return_Statement |
7776 E_Subprogram_Type
=>
7778 Write_Str
("Last_Entity");
7781 Write_Str
("Scalar_Range");
7784 Write_Str
("Register_Exception_Call");
7787 Write_Str
("Field20??");
7789 end Write_Field20_Name
;
7791 -----------------------
7792 -- Write_Field21_Name --
7793 -----------------------
7795 procedure Write_Field21_Name
(Id
: Entity_Id
) is
7801 E_Generic_Function |
7803 E_Generic_Procedure |
7805 Write_Str
("Interface_Name");
7807 when Concurrent_Kind |
7808 Incomplete_Or_Private_Kind |
7812 Write_Str
("Discriminant_Constraint");
7815 Write_Str
("Accept_Address");
7817 when Fixed_Point_Kind
=>
7818 Write_Str
("Small_Value");
7820 when E_In_Parameter
=>
7821 Write_Str
("Default_Expr_Function");
7824 Modular_Integer_Kind
=>
7825 Write_Str
("Original_Array_Type");
7828 Write_Str
("Field21??");
7830 end Write_Field21_Name
;
7832 -----------------------
7833 -- Write_Field22_Name --
7834 -----------------------
7836 procedure Write_Field22_Name
(Id
: Entity_Id
) is
7840 Write_Str
("Associated_Storage_Pool");
7843 Write_Str
("Component_Size");
7847 Write_Str
("Original_Record_Component");
7849 when E_Enumeration_Literal
=>
7850 Write_Str
("Enumeration_Rep_Expr");
7853 Write_Str
("Exception_Code");
7856 Write_Str
("Protected_Formal");
7858 when E_Record_Type
=>
7859 Write_Str
("Corresponding_Remote_Type");
7869 E_Generic_Function |
7870 E_Generic_Procedure |
7873 E_Return_Statement |
7876 Write_Str
("Scope_Depth_Value");
7878 when E_Record_Type_With_Private |
7879 E_Record_Subtype_With_Private |
7882 E_Limited_Private_Type |
7883 E_Limited_Private_Subtype
=>
7884 Write_Str
("Private_View");
7887 Write_Str
("Shared_Var_Procs_Instance");
7890 Write_Str
("Field22??");
7892 end Write_Field22_Name
;
7894 ------------------------
7895 -- Write_Field23_Name --
7896 ------------------------
7898 procedure Write_Field23_Name
(Id
: Entity_Id
) is
7902 Write_Str
("Associated_Final_Chain");
7905 Write_Str
("Packed_Array_Type");
7908 Write_Str
("Entry_Cancel_Parameter");
7910 when E_Discriminant
=>
7911 Write_Str
("CR_Discriminant");
7913 when E_Enumeration_Type
=>
7914 Write_Str
("Enum_Pos_To_Rep");
7918 Write_Str
("Extra_Constrained");
7920 when E_Generic_Function |
7922 E_Generic_Procedure
=>
7923 Write_Str
("Inner_Instances");
7925 when Concurrent_Kind |
7926 Incomplete_Or_Private_Kind |
7930 Write_Str
("Stored_Constraint");
7934 if Present
(Scope
(Id
))
7935 and then Is_Protected_Type
(Scope
(Id
))
7937 Write_Str
("Protection_Object");
7939 Write_Str
("Generic_Renamings");
7943 if Is_Generic_Instance
(Id
) then
7944 Write_Str
("Generic_Renamings");
7946 Write_Str
("Limited_View");
7950 Write_Str
("Protection_Object");
7953 Write_Str
("Field23??");
7955 end Write_Field23_Name
;
7957 ------------------------
7958 -- Write_Field24_Name --
7959 ------------------------
7961 procedure Write_Field24_Name
(Id
: Entity_Id
) is
7964 when Subprogram_Kind
=>
7965 Write_Str
("Spec_PPC_List");
7967 when E_Variable | E_Constant | Type_Kind
=>
7968 Write_Str
("Related_Expression");
7971 Write_Str
("Field24???");
7973 end Write_Field24_Name
;
7975 ------------------------
7976 -- Write_Field25_Name --
7977 ------------------------
7979 procedure Write_Field25_Name
(Id
: Entity_Id
) is
7983 Write_Str
("DT_Offset_To_Top_Func");
7987 Write_Str
("Interface_Alias");
7989 when E_Record_Type |
7991 E_Record_Type_With_Private |
7992 E_Record_Subtype_With_Private
=>
7993 Write_Str
("Interfaces");
7996 Write_Str
("Task_Body_Procedure");
7999 Write_Str
("Debug_Renaming_Link");
8002 Write_Str
("Field25??");
8004 end Write_Field25_Name
;
8006 ------------------------
8007 -- Write_Field26_Name --
8008 ------------------------
8010 procedure Write_Field26_Name
(Id
: Entity_Id
) is
8015 Write_Str
("Related_Type");
8017 when E_Generic_Package |
8019 Write_Str
("Package_Instantiation");
8024 if Is_Dispatching_Operation
(Id
) then
8025 Write_Str
("Overridden_Operation");
8027 Write_Str
("Static_Initialization");
8030 when E_Record_Type |
8031 E_Record_Type_With_Private
=>
8032 Write_Str
("Dispatch_Table_Wrappers");
8034 when E_In_Out_Parameter |
8037 Write_Str
("Last_Assignment");
8040 Write_Str
("Relative_Deadline_Variable");
8043 Write_Str
("Field26??");
8045 end Write_Field26_Name
;
8047 ------------------------
8048 -- Write_Field27_Name --
8049 ------------------------
8051 procedure Write_Field27_Name
(Id
: Entity_Id
) is
8055 Write_Str
("Wrapped_Entity");
8057 when E_Package | Type_Kind
=>
8058 Write_Str
("Current_Use_Clause");
8061 Write_Str
("Field27??");
8063 end Write_Field27_Name
;
8065 ------------------------
8066 -- Write_Field28_Name --
8067 ------------------------
8069 procedure Write_Field28_Name
(Id
: Entity_Id
) is
8072 when E_Procedure | E_Function | E_Entry
=>
8073 Write_Str
("Extra_Formals");
8075 when E_Record_Type
=>
8076 Write_Str
("Underlying_Record_View");
8079 Write_Str
("Field28??");
8081 end Write_Field28_Name
;
8083 -------------------------
8084 -- Iterator Procedures --
8085 -------------------------
8087 procedure Proc_Next_Component
(N
: in out Node_Id
) is
8089 N
:= Next_Component
(N
);
8090 end Proc_Next_Component
;
8092 procedure Proc_Next_Component_Or_Discriminant
(N
: in out Node_Id
) is
8094 N
:= Next_Entity
(N
);
8095 while Present
(N
) loop
8096 exit when Ekind_In
(N
, E_Component
, E_Discriminant
);
8097 N
:= Next_Entity
(N
);
8099 end Proc_Next_Component_Or_Discriminant
;
8101 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
8103 N
:= Next_Discriminant
(N
);
8104 end Proc_Next_Discriminant
;
8106 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
8108 N
:= Next_Formal
(N
);
8109 end Proc_Next_Formal
;
8111 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
8113 N
:= Next_Formal_With_Extras
(N
);
8114 end Proc_Next_Formal_With_Extras
;
8116 procedure Proc_Next_Index
(N
: in out Node_Id
) is
8118 N
:= Next_Index
(N
);
8119 end Proc_Next_Index
;
8121 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
8123 N
:= Next_Inlined_Subprogram
(N
);
8124 end Proc_Next_Inlined_Subprogram
;
8126 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
8128 N
:= Next_Literal
(N
);
8129 end Proc_Next_Literal
;
8131 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
8133 N
:= Next_Stored_Discriminant
(N
);
8134 end Proc_Next_Stored_Discriminant
;