diff options
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/gnatcmd.adb | 6 | ||||
-rw-r--r-- | gcc/ada/prj.adb | 161 | ||||
-rw-r--r-- | gcc/ada/prj.ads | 23 |
4 files changed, 10 insertions, 184 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3e0f326..a37791e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2009-04-24 Emmanuel Briot <briot@adacore.com> + + * gnatcmd.adb, prj.adb, prj.ads: Remove unused entities + 2009-04-24 Ed Schonberg <schonberg@adacore.com> * sem_warn.adb: Add comment on obsolete warning diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index 66c7148..fa7e25a 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -2269,7 +2269,7 @@ begin -- indicate to gnatstub the name of the body file with -- a -o switch. - if Body_Suffix_Id_Of (Project_Tree, "ada", Data.Naming) /= + if Body_Suffix_Id_Of (Project_Tree, Name_Ada, Data.Naming) /= Prj.Default_Ada_Spec_Suffix then if File_Index /= 0 then @@ -2281,7 +2281,7 @@ begin begin Get_Name_String (Spec_Suffix_Id_Of - (Project_Tree, "ada", Data.Naming)); + (Project_Tree, Name_Ada, Data.Naming)); if Spec'Length > Name_Len and then Spec (Last - Name_Len + 1 .. Last) = @@ -2290,7 +2290,7 @@ begin Last := Last - Name_Len; Get_Name_String (Body_Suffix_Id_Of - (Project_Tree, "ada", Data.Naming)); + (Project_Tree, Name_Ada, Data.Naming)); Last_Switches.Increment_Last; Last_Switches.Table (Last_Switches.Last) := new String'("-o"); diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb index e626525..9b15fd7 100644 --- a/gcc/ada/prj.adb +++ b/gcc/ada/prj.adb @@ -27,7 +27,6 @@ with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Unchecked_Deallocation; with Debug; -with Output; use Output; with Osint; use Osint; with Prj.Attr; with Prj.Env; @@ -196,38 +195,12 @@ package body Prj is ----------------------- function Body_Suffix_Id_Of - (In_Tree : Project_Tree_Ref; - Language : String; - Naming : Naming_Data) return File_Name_Type - is - Language_Id : Name_Id; - - begin - Name_Len := 0; - Add_Str_To_Name_Buffer (Language); - To_Lower (Name_Buffer (1 .. Name_Len)); - Language_Id := Name_Find; - - return - Body_Suffix_Id_Of - (In_Tree => In_Tree, - Language_Id => Language_Id, - Naming => Naming); - end Body_Suffix_Id_Of; - - ----------------------- - -- Body_Suffix_Id_Of -- - ----------------------- - - function Body_Suffix_Id_Of (In_Tree : Project_Tree_Ref; Language_Id : Name_Id; Naming : Naming_Data) return File_Name_Type is Element_Id : Array_Element_Id; Element : Array_Element; - Suffix : File_Name_Type := No_File; - Lang : Language_Ptr; begin -- ??? This seems to be only for Ada_Only mode... @@ -242,19 +215,7 @@ package body Prj is Element_Id := Element.Next; end loop; - if Current_Mode = Multi_Language then - Lang := In_Tree.First_Language; - while Lang /= No_Language_Index loop - if Lang.Name = Language_Id then - Suffix := Lang.Config.Naming_Data.Body_Suffix; - exit; - end if; - - Lang := Lang.Next; - end loop; - end if; - - return Suffix; + return No_File; end Body_Suffix_Id_Of; -------------------- @@ -269,8 +230,6 @@ package body Prj is Language_Id : Name_Id; Element_Id : Array_Element_Id; Element : Array_Element; - Suffix : File_Name_Type := No_File; - Lang : Language_Ptr; begin Name_Len := 0; @@ -289,22 +248,6 @@ package body Prj is Element_Id := Element.Next; end loop; - if Current_Mode = Multi_Language then - Lang := In_Tree.First_Language; - while Lang /= No_Language_Index loop - if Lang.Name = Language_Id then - Suffix := File_Name_Type (Lang.Config.Naming_Data.Body_Suffix); - exit; - end if; - - Lang := Lang.Next; - end loop; - - if Suffix /= No_File then - return Get_Name_String (Suffix); - end if; - end if; - return ""; end Body_Suffix_Of; @@ -369,18 +312,6 @@ package body Prj is end case; end Dependency_Name; - --------------------------- - -- Display_Language_Name -- - --------------------------- - - procedure Display_Language_Name - (Language : Language_Ptr) - is - begin - Get_Name_String (Language.Display_Name); - Write_Str (Name_Buffer (1 .. Name_Len)); - end Display_Language_Name; - ---------------- -- Empty_File -- ---------------- @@ -636,37 +567,6 @@ package body Prj is return False; end Is_Extending; - ----------------------- - -- Objects_Exist_For -- - ----------------------- - - function Objects_Exist_For - (Language : String; - In_Tree : Project_Tree_Ref) return Boolean - is - Language_Id : Name_Id; - Lang : Language_Ptr; - - begin - if Current_Mode = Multi_Language then - Name_Len := 0; - Add_Str_To_Name_Buffer (Language); - To_Lower (Name_Buffer (1 .. Name_Len)); - Language_Id := Name_Find; - - Lang := In_Tree.First_Language; - while Lang /= No_Language_Index loop - if Lang.Name = Language_Id then - return Lang.Config.Object_Generated; - end if; - - Lang := Lang.Next; - end loop; - end if; - - return True; - end Objects_Exist_For; - ----------------- -- Object_Name -- ----------------- @@ -1062,38 +962,12 @@ package body Prj is ----------------------- function Spec_Suffix_Id_Of - (In_Tree : Project_Tree_Ref; - Language : String; - Naming : Naming_Data) return File_Name_Type - is - Language_Id : Name_Id; - - begin - Name_Len := 0; - Add_Str_To_Name_Buffer (Language); - To_Lower (Name_Buffer (1 .. Name_Len)); - Language_Id := Name_Find; - - return - Spec_Suffix_Id_Of - (In_Tree => In_Tree, - Language_Id => Language_Id, - Naming => Naming); - end Spec_Suffix_Id_Of; - - ----------------------- - -- Spec_Suffix_Id_Of -- - ----------------------- - - function Spec_Suffix_Id_Of (In_Tree : Project_Tree_Ref; Language_Id : Name_Id; Naming : Naming_Data) return File_Name_Type is Element_Id : Array_Element_Id; Element : Array_Element; - Suffix : File_Name_Type := No_File; - Lang : Language_Ptr; begin Element_Id := Naming.Spec_Suffix; @@ -1107,19 +981,7 @@ package body Prj is Element_Id := Element.Next; end loop; - if Current_Mode = Multi_Language then - Lang := In_Tree.First_Language; - while Lang /= No_Language_Index loop - if Lang.Name = Language_Id then - Suffix := Lang.Config.Naming_Data.Spec_Suffix; - exit; - end if; - - Lang := Lang.Next; - end loop; - end if; - - return Suffix; + return No_File; end Spec_Suffix_Id_Of; -------------------- @@ -1134,8 +996,6 @@ package body Prj is Language_Id : Name_Id; Element_Id : Array_Element_Id; Element : Array_Element; - Suffix : File_Name_Type := No_File; - Lang : Language_Ptr; begin Name_Len := 0; @@ -1154,23 +1014,6 @@ package body Prj is Element_Id := Element.Next; end loop; - if Current_Mode = Multi_Language then - Lang := In_Tree.First_Language; - while Lang /= No_Language_Index loop - if Lang.Name = Language_Id then - Suffix := - File_Name_Type (Lang.Config.Naming_Data.Spec_Suffix); - exit; - end if; - - Lang := Lang.Next; - end loop; - - if Suffix /= No_File then - return Get_Name_String (Suffix); - end if; - end if; - return ""; end Spec_Suffix_Of; diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads index 6a32fb4..82d1af9 100644 --- a/gcc/ada/prj.ads +++ b/gcc/ada/prj.ads @@ -314,10 +314,6 @@ package Prj is No_Language_Index : constant Language_Ptr := null; -- Constant indicating that there is no language data - procedure Display_Language_Name - (Language : Language_Ptr); - -- Output the name of a language - Max_Header_Num : constant := 6150; type Header_Num is range 0 .. Max_Header_Num; -- Size for hash table below. The upper bound is an arbitrary value, the @@ -899,11 +895,6 @@ package Prj is Naming : Naming_Data) return String; function Spec_Suffix_Id_Of - (In_Tree : Project_Tree_Ref; - Language : String; - Naming : Naming_Data) return File_Name_Type; - - function Spec_Suffix_Id_Of (In_Tree : Project_Tree_Ref; Language_Id : Name_Id; Naming : Naming_Data) return File_Name_Type; @@ -915,11 +906,6 @@ package Prj is Suffix : File_Name_Type); function Body_Suffix_Id_Of - (In_Tree : Project_Tree_Ref; - Language : String; - Naming : Naming_Data) return File_Name_Type; - - function Body_Suffix_Id_Of (In_Tree : Project_Tree_Ref; Language_Id : Name_Id; Naming : Naming_Data) return File_Name_Type; @@ -935,10 +921,6 @@ package Prj is Naming : in out Naming_Data; Suffix : File_Name_Type); - function Objects_Exist_For - (Language : String; - In_Tree : Project_Tree_Ref) return Boolean; - function Standard_Naming_Data (Tree : Project_Tree_Ref := No_Project_Tree) return Naming_Data; pragma Inline (Standard_Naming_Data); @@ -1457,10 +1439,7 @@ package Prj is type Project_Tree_Data is record - -- Languages and sources of the project - - First_Language : Language_Ptr := No_Language_Index; - -- + -- sources of the project First_Source : Source_Id := No_Source; -- |