[Ada] Reuse Append_New_Elmt where possible
gcc/ada/ * cstand.adb: Simplify with Append_New_Elmt. * sem_util.adb: Likewise.
This commit is contained in:
parent
4a3b4c2a45
commit
586f6dd1f6
@ -2074,11 +2074,7 @@ package body CStand is
|
|||||||
Build_Float_Type
|
Build_Float_Type
|
||||||
(Ent, Pos (Digs), Float_Rep, Int (Size), Int (Alignment / 8));
|
(Ent, Pos (Digs), Float_Rep, Int (Size), Int (Alignment / 8));
|
||||||
|
|
||||||
if No (Back_End_Float_Types) then
|
Append_New_Elmt (Ent, Back_End_Float_Types);
|
||||||
Back_End_Float_Types := New_Elmt_List;
|
|
||||||
end if;
|
|
||||||
|
|
||||||
Append_Elmt (Ent, Back_End_Float_Types);
|
|
||||||
end Register_Float_Type;
|
end Register_Float_Type;
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -6454,11 +6454,7 @@ package body Sem_Util is
|
|||||||
and then Etype (First_Formal (Id)) =
|
and then Etype (First_Formal (Id)) =
|
||||||
Etype (Next_Formal (First_Formal (Id)))
|
Etype (Next_Formal (First_Formal (Id)))
|
||||||
then
|
then
|
||||||
if No (Eq_Prims_List) then
|
Append_New_Elmt (Id, Eq_Prims_List);
|
||||||
Eq_Prims_List := New_Elmt_List;
|
|
||||||
end if;
|
|
||||||
|
|
||||||
Append_Elmt (Id, Eq_Prims_List);
|
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
@ -22455,11 +22451,7 @@ package body Sem_Util is
|
|||||||
function Search_Decl (N : Node_Id) return Traverse_Result is
|
function Search_Decl (N : Node_Id) return Traverse_Result is
|
||||||
begin
|
begin
|
||||||
if Nkind (N) in N_Declaration then
|
if Nkind (N) in N_Declaration then
|
||||||
if No (Decls) then
|
Append_New_Elmt (N, Decls);
|
||||||
Decls := New_Elmt_List;
|
|
||||||
end if;
|
|
||||||
|
|
||||||
Append_Elmt (N, Decls);
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user