aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb107
1 files changed, 0 insertions, 107 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index d15e20b..64c12cc 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -22886,113 +22886,6 @@ package body Sem_Util is
end if;
end New_Copy_List_Tree;
- ----------------------------
- -- New_Copy_Separate_List --
- ----------------------------
-
- function New_Copy_Separate_List (List : List_Id) return List_Id is
- begin
- if List = No_List then
- return No_List;
-
- else
- declare
- List_Copy : constant List_Id := New_List;
- N : Node_Id := First (List);
-
- begin
- while Present (N) loop
- Append (New_Copy_Separate_Tree (N), List_Copy);
- Next (N);
- end loop;
-
- return List_Copy;
- end;
- end if;
- end New_Copy_Separate_List;
-
- ----------------------------
- -- New_Copy_Separate_Tree --
- ----------------------------
-
- function New_Copy_Separate_Tree (Source : Node_Id) return Node_Id is
- function Search_Decl (N : Node_Id) return Traverse_Result;
- -- Subtree visitor which collects declarations
-
- procedure Search_Declarations is new Traverse_Proc (Search_Decl);
- -- Subtree visitor instantiation
-
- -----------------
- -- Search_Decl --
- -----------------
-
- Decls : Elist_Id;
-
- function Search_Decl (N : Node_Id) return Traverse_Result is
- begin
- if Nkind (N) in N_Declaration then
- Append_New_Elmt (N, Decls);
- end if;
-
- return OK;
- end Search_Decl;
-
- -- Local variables
-
- Source_Copy : constant Node_Id := New_Copy_Tree (Source);
-
- -- Start of processing for New_Copy_Separate_Tree
-
- begin
- Decls := No_Elist;
- Search_Declarations (Source_Copy);
-
- -- Associate a new Entity with all the subtree declarations (keeping
- -- their original name).
-
- if Present (Decls) then
- declare
- Elmt : Elmt_Id;
- Decl : Node_Id;
- New_E : Entity_Id;
-
- begin
- Elmt := First_Elmt (Decls);
- while Present (Elmt) loop
- Decl := Node (Elmt);
- New_E := Make_Temporary (Sloc (Decl), 'P');
-
- if Nkind (Decl) = N_Expression_Function then
- Decl := Specification (Decl);
- end if;
-
- if Nkind (Decl) in N_Function_Instantiation
- | N_Function_Specification
- | N_Generic_Function_Renaming_Declaration
- | N_Generic_Package_Renaming_Declaration
- | N_Generic_Procedure_Renaming_Declaration
- | N_Package_Body
- | N_Package_Instantiation
- | N_Package_Renaming_Declaration
- | N_Package_Specification
- | N_Procedure_Instantiation
- | N_Procedure_Specification
- then
- Set_Chars (New_E, Chars (Defining_Unit_Name (Decl)));
- Set_Defining_Unit_Name (Decl, New_E);
- else
- Set_Chars (New_E, Chars (Defining_Identifier (Decl)));
- Set_Defining_Identifier (Decl, New_E);
- end if;
-
- Next_Elmt (Elmt);
- end loop;
- end;
- end if;
-
- return Source_Copy;
- end New_Copy_Separate_Tree;
-
-------------------
-- New_Copy_Tree --
-------------------