diff options
author | Emmanuel Briot <briot@adacore.com> | 2009-04-29 09:52:34 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 11:52:34 +0200 |
commit | d45871da6e9ec5907510d65834ab69e781b3afa5 (patch) | |
tree | 8c7c972f643916965294bb7ff102908a09236dcf /gcc/ada/clean.adb | |
parent | 4f87ded359716679d2b3c6225e7569ff4cb4b76f (diff) | |
download | gcc-d45871da6e9ec5907510d65834ab69e781b3afa5.zip gcc-d45871da6e9ec5907510d65834ab69e781b3afa5.tar.gz gcc-d45871da6e9ec5907510d65834ab69e781b3afa5.tar.bz2 |
prj-ext.adb, [...]: Fix memory leaks.
2009-04-29 Emmanuel Briot <briot@adacore.com>
* prj-ext.adb, prj.adb, prj.ads: Fix memory leaks.
* clean.adb (Ultimate_Extension_Of): removed, since duplicate of
Prj.Ultimate_Extending_Project_Of
From-SVN: r146940
Diffstat (limited to 'gcc/ada/clean.adb')
-rw-r--r-- | gcc/ada/clean.adb | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb index 54b408a..eac1929 100644 --- a/gcc/ada/clean.adb +++ b/gcc/ada/clean.adb @@ -242,11 +242,6 @@ package body Clean is -- Returns True iff Prj is an extension of Of_Project or if Of_Project is -- an extension of Prj. - function Ultimate_Extension_Of (Project : Project_Id) return Project_Id; - -- Returns either Project, if it is not extended by another project, or - -- the project that extends Project, directly or indirectly, and that is - -- not itself extended. Returns No_Project if Project is No_Project. - procedure Usage; -- Display the usage. If called several times, the usage is displayed only -- the first time. @@ -582,7 +577,7 @@ package body Clean is loop Unit := Project_Tree.Units.Table (Index); - if Ultimate_Extension_Of + if Ultimate_Extending_Project_Of (Unit.File_Names (Body_Part).Project) = Project and then Get_Name_String @@ -593,7 +588,7 @@ package body Clean is exit; end if; - if Ultimate_Extension_Of + if Ultimate_Extending_Project_Of (Unit.File_Names (Specification).Project) = Project and then Get_Name_String @@ -749,7 +744,7 @@ package body Clean is if Unit.File_Names (Body_Part).Project /= No_Project then - if Ultimate_Extension_Of + if Ultimate_Extending_Project_Of (Unit.File_Names (Body_Part).Project) = Project then @@ -766,7 +761,7 @@ package body Clean is end if; end if; - elsif Ultimate_Extension_Of + elsif Ultimate_Extending_Project_Of (Unit.File_Names (Specification).Project) = Project then @@ -1905,24 +1900,6 @@ package body Clean is return Src & Tree_Suffix; end Tree_File_Name; - --------------------------- - -- Ultimate_Extension_Of -- - --------------------------- - - function Ultimate_Extension_Of (Project : Project_Id) return Project_Id is - Result : Project_Id := Project; - - begin - if Project /= No_Project then - loop - exit when Result.Extended_By = No_Project; - Result := Result.Extended_By; - end loop; - end if; - - return Result; - end Ultimate_Extension_Of; - ----------- -- Usage -- ----------- |