summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-env.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 14:47:12 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 14:47:12 +0000
commitdb1eed695aae0e64c0012c42849bb86ed1974c53 (patch)
tree43cae609c633bc42287b42a5bbe2fef41a7a770b /gcc/ada/prj-env.adb
parent1eb1395f505ca7c86f1fee40dccbea0797c38568 (diff)
downloadgcc-db1eed695aae0e64c0012c42849bb86ed1974c53.tar.gz
2014-01-24 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb: Minor change of Indices to Indexes (preferred terminology in compiler). 2014-01-24 Robert Dewar <dewar@adacore.com> * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM categories, now that Ada 95 supports raise expressions. 2014-01-24 Robert Dewar <dewar@adacore.com> * freeze.adb (Freeze_Enumeration_Type): Use new target parameter Short_Enums_On_Target. * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target into account. * targparm.ads, targparm.adb: Add new target parameter Short_Enums. 2014-01-24 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): If subtype indication is given explicity, check that it matches the array component type or the container element type of the domain of iteration. 2014-01-24 Tristan Gingold <gingold@adacore.com> * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target. 2014-01-24 Vincent Celier <celier@adacore.com> * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs to cache the result when Including_Libraries is False. * prj-env.ads (Ada_Objects_Path): Update documentation * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs (Get_Object_Directory): Return the Library_Ali_Dir only when when Including_Libraries is True. * prj.ads (Get_Object_Directory): Fix and complete documentation (Project_Data): New component Ada_Objects_Path_No_Libs git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-env.adb')
-rw-r--r--gcc/ada/prj-env.adb26
1 files changed, 21 insertions, 5 deletions
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index 79436721b0e..e6c23469a75 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -219,21 +219,37 @@ package body Prj.Env is
Dummy : Boolean := False;
+ Result : String_Access;
+
-- Start of processing for Ada_Objects_Path
begin
-- If it is the first time we call this function for
-- this project, compute the objects path
- if Project.Ada_Objects_Path = null then
+ if Including_Libraries and then Project.Ada_Objects_Path /= null then
+ return Project.Ada_Objects_Path;
+
+ elsif not Including_Libraries
+ and then Project.Ada_Objects_Path_No_Libs /= null
+ then
+ return Project.Ada_Objects_Path_No_Libs;
+
+ else
Buffer := new String (1 .. 4096);
For_All_Projects (Project, In_Tree, Dummy);
-
- Project.Ada_Objects_Path := new String'(Buffer (1 .. Buffer_Last));
+ Result := new String'(Buffer (1 .. Buffer_Last));
Free (Buffer);
- end if;
- return Project.Ada_Objects_Path;
+ if Including_Libraries then
+ Project.Ada_Objects_Path := Result;
+
+ else
+ Project.Ada_Objects_Path_No_Libs := Result;
+ end if;
+
+ return Result;
+ end if;
end Ada_Objects_Path;
-------------------