From 2b4c962d787e092de9af83d2a3ca568ce3ca69bb Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 30 Jul 2014 16:29:05 +0200 Subject: [multiple changes] 2014-07-30 Robert Dewar * clean.adb: Minor reformatting. * opt.ads: Minor fix to incorrect comment. 2014-07-30 Ed Schonberg * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New subprogram, used by bounded hashed sets, to delete a node at a given index, whose element may have been improperly updated through a Reference_Preserving key. * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys. * a-cbhase.adb: Add Adjust and Finalize routines for Reference_Control_Type. (Delete, Insert): Raise Program_Error, not Constraint_Error, when operation is illegal. (Reference_Preserving_Key): Build aggregate for Reference_Control_Type * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add private with_clause for Ada.Finalization. * a-cbmutr.adb: Add Adjust and Finalize routines for Reference_Control_Type. Use it in the construction of Reference and Constant_Reference values. From-SVN: r213285 --- gcc/ada/clean.adb | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'gcc/ada/clean.adb') diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb index 4abbc94..8b34433 100644 --- a/gcc/ada/clean.adb +++ b/gcc/ada/clean.adb @@ -740,11 +740,12 @@ package body Clean is if Last > 4 and then Name (Last - 3 .. Last) = ".ali" then declare Unit : Unit_Index; + begin -- Compare with ALI file names of the project - Unit := Units_Htable.Get_First - (Project_Tree.Units_HT); + Unit := + Units_Htable.Get_First (Project_Tree.Units_HT); while Unit /= No_Unit_Index loop if Unit.File_Names (Impl) /= null and then Unit.File_Names (Impl).Project /= @@ -756,9 +757,10 @@ package body Clean is then Get_Name_String (Unit.File_Names (Impl).File); - Name_Len := Name_Len - - File_Extension - (Name (1 .. Name_Len))'Length; + Name_Len := + Name_Len - + File_Extension + (Name (1 .. Name_Len))'Length; if Name_Buffer (1 .. Name_Len) = Name (1 .. Last - 4) then @@ -772,8 +774,7 @@ package body Clean is (Unit.File_Names (Spec).Project) = Project then - Get_Name_String - (Unit.File_Names (Spec).File); + Get_Name_String (Unit.File_Names (Spec).File); Name_Len := Name_Len - File_Extension @@ -869,7 +870,7 @@ package body Clean is if Project.Object_Directory /= No_Path_Information and then Is_Directory - (Get_Name_String (Project.Object_Directory.Display_Name)) + (Get_Name_String (Project.Object_Directory.Display_Name)) then declare Obj_Dir : constant String := @@ -904,8 +905,9 @@ package body Clean is (Unit.File_Names (Impl).Project, Project)) or else (Unit.File_Names (Spec) /= null - and then In_Extension_Chain - (Unit.File_Names (Spec).Project, Project)) + and then + In_Extension_Chain + (Unit.File_Names (Spec).Project, Project)) then if Unit.File_Names (Impl) /= null then File_Name1 := Unit.File_Names (Impl).File; @@ -942,17 +944,17 @@ package body Clean is declare Asm : constant String := - Assembly_File_Name (Lib_File); + Assembly_File_Name (Lib_File); ALI : constant String := - ALI_File_Name (Lib_File); + ALI_File_Name (Lib_File); Obj : constant String := - Object_File_Name (Lib_File); + Object_File_Name (Lib_File); Adt : constant String := - Tree_File_Name (Lib_File); + Tree_File_Name (Lib_File); Deb : constant String := - Debug_File_Name (File_Name1); + Debug_File_Name (File_Name1); Rep : constant String := - Repinfo_File_Name (File_Name1); + Repinfo_File_Name (File_Name1); Del : Boolean := True; begin @@ -1199,8 +1201,9 @@ package body Clean is end if; if Project.Object_Directory /= No_Path_Information - and then Is_Directory - (Get_Name_String (Project.Object_Directory.Display_Name)) + and then + Is_Directory + (Get_Name_String (Project.Object_Directory.Display_Name)) then Delete_Binder_Generated_Files (Get_Name_String (Project.Object_Directory.Display_Name), @@ -1811,8 +1814,7 @@ package body Clean is declare Prj : constant String := Arg (3 .. Arg'Last); begin - if Prj'Length > 1 and then - Prj (Prj'First) = '=' + if Prj'Length > 1 and then Prj (Prj'First) = '=' then Project_File_Name := new String' -- cgit v1.1