mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
ada: Get rid of unused node/entity fields (Set_ only)
The following fields are Set_ but not used in GNAT. We get rid of them
or document them as follows:
- Has_Pragma_Controlled
Remove.
- Corresponding_Entry_Body
Document that it is used by codepeer.
- Is_Activation_Record
Document that it is used by llvm.
- Is_Discriminant_Check_Function
Document that it is used by codepeer.
- Original_Access_Type
No change (already documented that it is used by codepeer).
gcc/ada/ChangeLog:
* einfo.ads (Has_Pragma_Controlled): Remove.
(Is_Activation_Record): Document usage by llvm.
* gen_il-fields.ads (Opt_Field_Enum):
Remove Has_Pragma_Controlled.
* gen_il-gen-gen_entities.adb (Access_Kind):
Remove Has_Pragma_Controlled.
* sem_prag.adb:
Remove setting of Has_Pragma_Controlled.
* sinfo.ads (Corresponding_Entry_Body):
Document usage by codepeer.
This commit is contained in:
@@ -1889,10 +1889,6 @@ package Einfo is
|
||||
-- 5. N_Range_Constraint - when the range expression uses the
|
||||
-- discriminant of the enclosing type.
|
||||
|
||||
-- Has_Pragma_Controlled [implementation base type only]
|
||||
-- Defined in access type entities. It is set if a pragma Controlled
|
||||
-- applies to the access type.
|
||||
|
||||
-- Has_Pragma_Elaborate_Body
|
||||
-- Defined in all entities. Set in compilation unit entities if a
|
||||
-- pragma Elaborate_Body applies to the compilation unit.
|
||||
@@ -2383,7 +2379,7 @@ package Einfo is
|
||||
-- Is_Activation_Record
|
||||
-- Applies to E_In_Parameters generated in Exp_Unst for nested
|
||||
-- subprograms, to mark the added formal that carries the activation
|
||||
-- record created in the enclosing subprogram.
|
||||
-- record created in the enclosing subprogram. Used by the llvm back end.
|
||||
|
||||
-- Is_Actual_Subtype
|
||||
-- Defined on all types, true for the generated constrained subtypes
|
||||
@@ -2596,7 +2592,7 @@ package Einfo is
|
||||
|
||||
-- Is_Discriminant_Check_Function
|
||||
-- Defined in all entities. Set only in E_Function entities for functions
|
||||
-- created to do discriminant checks.
|
||||
-- created to do discriminant checks. Used by CodePeer.
|
||||
|
||||
-- Is_Discriminal (synthesized)
|
||||
-- Applies to all entities, true for renamings of discriminants. Such
|
||||
@@ -5220,7 +5216,6 @@ package Einfo is
|
||||
-- Associated_Storage_Pool (root type only)
|
||||
-- Finalization_Collection (root type only)
|
||||
-- Storage_Size_Variable (base type only)
|
||||
-- Has_Pragma_Controlled (base type only)
|
||||
-- Has_Storage_Size_Clause (base type only)
|
||||
-- Is_Access_Constant
|
||||
-- Is_Local_Anonymous_Access
|
||||
|
||||
@@ -614,7 +614,6 @@ package Gen_IL.Fields is
|
||||
Has_Own_Invariants,
|
||||
Has_Partial_Visible_Refinement,
|
||||
Has_Per_Object_Constraint,
|
||||
Has_Pragma_Controlled,
|
||||
Has_Pragma_Elaborate_Body,
|
||||
Has_Pragma_Inline,
|
||||
Has_Pragma_Inline_Always,
|
||||
|
||||
@@ -647,7 +647,6 @@ begin -- Gen_IL.Gen.Gen_Entities
|
||||
(Sm (Associated_Storage_Pool, Node_Id, Root_Type_Only),
|
||||
Sm (Directly_Designated_Type, Node_Id),
|
||||
Sm (Finalization_Collection, Node_Id, Root_Type_Only),
|
||||
Sm (Has_Pragma_Controlled, Flag, Impl_Base_Type_Only),
|
||||
Sm (Has_Storage_Size_Clause, Flag, Impl_Base_Type_Only),
|
||||
Sm (Is_Access_Constant, Flag),
|
||||
Sm (Is_Local_Anonymous_Access, Flag),
|
||||
|
||||
@@ -16449,8 +16449,6 @@ package body Sem_Prag is
|
||||
or else not Is_Access_Type (Entity (Arg))
|
||||
then
|
||||
Error_Pragma_Arg ("pragma% requires access type", Arg1);
|
||||
else
|
||||
Set_Has_Pragma_Controlled (Base_Type (Entity (Arg)));
|
||||
end if;
|
||||
end Controlled;
|
||||
|
||||
|
||||
@@ -1003,9 +1003,10 @@ package Sinfo is
|
||||
-- to the defining entity for the corresponding body (NOT the node for
|
||||
-- the body itself).
|
||||
|
||||
-- Corresponding_Entry_Body
|
||||
-- Corresponding_Entry_Body
|
||||
-- Defined in N_Subprogram_Body. Set for subprogram bodies that implement
|
||||
-- a protected type entry; points to the body for the entry.
|
||||
-- Used by codepeer.
|
||||
|
||||
-- Corresponding_Formal_Spec
|
||||
-- This field is set in subprogram renaming declarations, where it points
|
||||
|
||||
Reference in New Issue
Block a user