diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-10 14:49:04 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-10 14:49:04 +0000 |
commit | 975af22d5e38e70e14cf8a7696ecb76c5847c442 (patch) | |
tree | 11a99217237ee63bd01d9d3a2e417bcc54bb787f /gcc/ada/prj-conf.adb | |
parent | 3ad60f63386178ef069d70c27bf8de6fbe08b4c3 (diff) | |
download | gcc-975af22d5e38e70e14cf8a7696ecb76c5847c442.tar.gz |
2014-10-10 Robert Dewar <dewar@adacore.com>
* freeze.adb, sem_attr.adb: Minor reformatting.
2014-10-10 Johannes Kanig <kanig@adacore.com>
* a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
to container type.
2014-10-10 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
any configuration switches from the project file.
2014-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
(Build_Function_Wrapper): New function, to construct a wrapper
function for actuals that are functions with an arbitrary
number of parameters. Used in GNATProve mode to simplify proof
propagation in instantiations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216092 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-conf.adb')
-rw-r--r-- | gcc/ada/prj-conf.adb | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index 095c2d1c020..fe1be8fcff8 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -172,7 +172,7 @@ package body Prj.Conf is begin if Config_File = Empty_Node then - -- Create a dummy config file is none was found + -- Create a dummy config file if none was found Name_Len := Auto_Cgpr'Length; Name_Buffer (1 .. Name_Len) := Auto_Cgpr; @@ -587,7 +587,7 @@ package body Prj.Conf is or else (Tgt_Name /= No_Name and then (Length_Of_Name (Tgt_Name) = 0 - or else Target = Get_Name_String (Tgt_Name))); + or else Target = Get_Name_String (Tgt_Name))); if not OK then if Autoconf_Specified then @@ -931,7 +931,8 @@ package body Prj.Conf is declare Obj_Dir : constant String := Name_Buffer (1 .. Name_Len); - Config_Switches : Argument_List_Access; + Config_Switches : Argument_List_Access := + new Argument_List'(1 .. 0 => null); Db_Switches : Argument_List_Access; Args : Argument_List (1 .. 5); Arg_Last : Positive; @@ -979,10 +980,13 @@ package body Prj.Conf is end case; end if; - -- Get the config switches. This should be done only now, as some - -- runtimes may have been found if the Builder switches. + -- If not in Codepeer mode, get the config switches. This should + -- be done only now, as some runtimes may have been found if the + -- Builder switches. - Config_Switches := Get_Config_Switches; + if not CodePeer_Mode then + Config_Switches := Get_Config_Switches; + end if; -- Get eventual --db switches @@ -1082,12 +1086,11 @@ package body Prj.Conf is Write_Eol; elsif not Quiet_Output then + -- Display no message if we are creating auto.cgpr, unless in - -- verbose mode + -- verbose mode. - if Config_File_Name'Length > 0 - or else Verbose_Mode - then + if Config_File_Name'Length > 0 or else Verbose_Mode then Write_Str ("creating "); Write_Str (Simple_Name (Args (3).all)); Write_Eol; @@ -1300,8 +1303,7 @@ package body Prj.Conf is Config_Command : constant String := "--config=" & Get_Name_String (Name); - Runtime_Name : constant String := - Runtime_Name_For (Name); + Runtime_Name : constant String := Runtime_Name_For (Name); begin if Variable = Nil_Variable_Value @@ -1321,14 +1323,14 @@ package body Prj.Conf is if Is_Absolute_Path (Compiler_Command) then Result (Count) := new String' - (Config_Command & ",," & Runtime_Name & "," & - Containing_Directory (Compiler_Command) & "," & - Simple_Name (Compiler_Command)); + (Config_Command & ",," & Runtime_Name & "," + & Containing_Directory (Compiler_Command) & "," + & Simple_Name (Compiler_Command)); else Result (Count) := new String' - (Config_Command & ",," & Runtime_Name & ",," & - Compiler_Command); + (Config_Command & ",," & Runtime_Name & ",," + & Compiler_Command); end if; end; end if; @@ -1350,20 +1352,14 @@ package body Prj.Conf is begin Variable := - Value_Of - (Name_Source_Dirs, - Project.Decl.Attributes, - Shared); + Value_Of (Name_Source_Dirs, Project.Decl.Attributes, Shared); if Variable = Nil_Variable_Value or else Variable.Default or else Variable.Values /= Nil_String then Variable := - Value_Of - (Name_Source_Files, - Project.Decl.Attributes, - Shared); + Value_Of (Name_Source_Files, Project.Decl.Attributes, Shared); return Variable = Nil_Variable_Value or else Variable.Default or else Variable.Values /= Nil_String; @@ -1373,9 +1369,13 @@ package body Prj.Conf is end if; end Might_Have_Sources; + -- Local Variables + Success : Boolean; Config_Project_Node : Project_Node_Id := Empty_Node; + -- Start of processing for Get_Or_Create_Configuration_File + begin pragma Assert (Prj.Env.Is_Initialized (Env.Project_Path)); @@ -1472,9 +1472,7 @@ package body Prj.Conf is On_New_Tree_Loaded => null); end if; - if Config_Project_Node = Empty_Node - or else Config = No_Project - then + if Config_Project_Node = Empty_Node or else Config = No_Project then Raise_Invalid_Config ("processing of configuration project """ & Config_File_Path.all & """ failed"); @@ -1606,7 +1604,6 @@ package body Prj.Conf is Implicit_Project => Implicit_Project); if User_Project_Node = Empty_Node then - User_Project_Node := Empty_Node; return; end if; |