Commit 10d2a6f7 by Emmanuel Briot Committed by Arnaud Charlet

2009-04-22 Emmanuel Briot <briot@adacore.com>

	* prj.ads, prj-nmsc.adb, prj-env.adb, prj-env.ads
	(Source_Data.Language_Name): Field removed.

From-SVN: r146584
parent 39d4e04a
2009-04-22 Emmanuel Briot <briot@adacore.com> 2009-04-22 Emmanuel Briot <briot@adacore.com>
* prj.ads, prj-nmsc.adb, prj-env.adb, prj-env.ads
(Source_Data.Language_Name): Field removed.
2009-04-22 Emmanuel Briot <briot@adacore.com>
* prj.adb, prj.ads, prj-nmsc.adb (Project_Data.Unit_Based_Language_*): * prj.adb, prj.ads, prj-nmsc.adb (Project_Data.Unit_Based_Language_*):
Two fields removed. Two fields removed.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2008, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1221,7 +1221,7 @@ package body Prj.Env is ...@@ -1221,7 +1221,7 @@ package body Prj.Env is
procedure Create_Mapping_File procedure Create_Mapping_File
(Project : Project_Id; (Project : Project_Id;
Language : Name_Id; Language : Language_Index;
In_Tree : Project_Tree_Ref; In_Tree : Project_Tree_Ref;
Name : out Path_Name_Type) Name : out Path_Name_Type)
is is
...@@ -1334,7 +1334,7 @@ package body Prj.Env is ...@@ -1334,7 +1334,7 @@ package body Prj.Env is
while Source /= No_Source loop while Source /= No_Source loop
Src_Data := In_Tree.Sources.Table (Source); Src_Data := In_Tree.Sources.Table (Source);
if Src_Data.Language_Name = Language if In_Tree.Sources.Table (Source).Language = Language
and then not Src_Data.Locally_Removed and then not Src_Data.Locally_Removed
and then Src_Data.Replaced_By = No_Source and then Src_Data.Replaced_By = No_Source
and then Src_Data.Path.Name /= No_Path and then Src_Data.Path.Name /= No_Path
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2001-2008, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -50,7 +50,7 @@ package Prj.Env is ...@@ -50,7 +50,7 @@ package Prj.Env is
procedure Create_Mapping_File procedure Create_Mapping_File
(Project : Project_Id; (Project : Project_Id;
Language : Name_Id; Language : Language_Index;
In_Tree : Project_Tree_Ref; In_Tree : Project_Tree_Ref;
Name : out Path_Name_Type); Name : out Path_Name_Type);
-- Create a temporary mapping file for project Project. For each source or -- Create a temporary mapping file for project Project. For each source or
......
...@@ -737,7 +737,6 @@ package body Prj.Nmsc is ...@@ -737,7 +737,6 @@ package body Prj.Nmsc is
end if; end if;
Src_Data.Project := Project; Src_Data.Project := Project;
Src_Data.Language_Name := Lang;
Src_Data.Language := Lang_Id; Src_Data.Language := Lang_Id;
Src_Data.Lang_Kind := Lang_Kind; Src_Data.Lang_Kind := Lang_Kind;
Src_Data.Compiled := In_Tree.Languages_Data.Table Src_Data.Compiled := In_Tree.Languages_Data.Table
...@@ -2824,11 +2823,11 @@ package body Prj.Nmsc is ...@@ -2824,11 +2823,11 @@ package body Prj.Nmsc is
-- Check attributes common to Ada_Only and Multi_Lang modes -- Check attributes common to Ada_Only and Multi_Lang modes
procedure Process_Exceptions_File_Based procedure Process_Exceptions_File_Based
(Lang_Id : Language_Index; (Lang_Id : Language_Index;
Kind : Source_Kind); Kind : Source_Kind);
procedure Process_Exceptions_Unit_Based procedure Process_Exceptions_Unit_Based
(Lang_Id : Language_Index; (Lang_Id : Language_Index;
Kind : Source_Kind); Kind : Source_Kind);
-- In Multi_Lang mode, process the naming exceptions for the two types -- In Multi_Lang mode, process the naming exceptions for the two types
-- of languages we can have. -- of languages we can have.
...@@ -2989,6 +2988,7 @@ package body Prj.Nmsc is ...@@ -2989,6 +2988,7 @@ package body Prj.Nmsc is
Element : String_Element; Element : String_Element;
File_Name : File_Name_Type; File_Name : File_Name_Type;
Source : Source_Id; Source : Source_Id;
begin begin
case Kind is case Kind is
when Impl | Sep => when Impl | Sep =>
...@@ -3087,6 +3087,7 @@ package body Prj.Nmsc is ...@@ -3087,6 +3087,7 @@ package body Prj.Nmsc is
Source_To_Replace : Source_Id := No_Source; Source_To_Replace : Source_Id := No_Source;
Other_Project : Project_Id; Other_Project : Project_Id;
Other_Part : Source_Id := No_Source; Other_Part : Source_Id := No_Source;
begin begin
case Kind is case Kind is
when Impl | Sep => when Impl | Sep =>
...@@ -3363,6 +3364,7 @@ package body Prj.Nmsc is ...@@ -3363,6 +3364,7 @@ package body Prj.Nmsc is
Sep_Suffix_Loc : Source_Ptr; Sep_Suffix_Loc : Source_Ptr;
Suffix : Variable_Value; Suffix : Variable_Value;
Lang : Name_Id; Lang : Name_Id;
begin begin
Check_Common Check_Common
(Dot_Replacement => Dot_Replacement, (Dot_Replacement => Dot_Replacement,
...@@ -3382,13 +3384,13 @@ package body Prj.Nmsc is ...@@ -3382,13 +3384,13 @@ package body Prj.Nmsc is
then then
Lang_Id := Data.First_Language_Processing; Lang_Id := Data.First_Language_Processing;
while Lang_Id /= No_Language_Index loop while Lang_Id /= No_Language_Index loop
if In_Tree.Languages_Data.Table if In_Tree.Languages_Data.
(Lang_Id).Config.Kind = Unit_Based Table (Lang_Id).Config.Kind = Unit_Based
then then
if Dot_Replacement /= No_File then if Dot_Replacement /= No_File then
In_Tree.Languages_Data.Table In_Tree.Languages_Data.Table
(Lang_Id).Config.Naming_Data.Dot_Replacement := (Lang_Id).Config.Naming_Data.Dot_Replacement :=
Dot_Replacement; Dot_Replacement;
end if; end if;
if Casing_Defined then if Casing_Defined then
...@@ -3399,12 +3401,11 @@ package body Prj.Nmsc is ...@@ -3399,12 +3401,11 @@ package body Prj.Nmsc is
if Separate_Suffix /= No_File then if Separate_Suffix /= No_File then
In_Tree.Languages_Data.Table In_Tree.Languages_Data.Table
(Lang_Id).Config.Naming_Data.Separate_Suffix := (Lang_Id).Config.Naming_Data.Separate_Suffix :=
Separate_Suffix; Separate_Suffix;
end if; end if;
end if; end if;
Lang_Id := Lang_Id := In_Tree.Languages_Data.Table (Lang_Id).Next;
In_Tree.Languages_Data.Table (Lang_Id).Next;
end loop; end loop;
end if; end if;
...@@ -4542,15 +4543,16 @@ package body Prj.Nmsc is ...@@ -4542,15 +4543,16 @@ package body Prj.Nmsc is
if Def_Lang_Id = Name_Ada then if Def_Lang_Id = Name_Ada then
In_Tree.Languages_Data.Table In_Tree.Languages_Data.Table
(Data.First_Language_Processing).Config.Kind (Data.First_Language_Processing).Config.Kind :=
:= Unit_Based; Unit_Based;
In_Tree.Languages_Data.Table In_Tree.Languages_Data.Table
(Data.First_Language_Processing).Config.Dependency_Kind (Data.First_Language_Processing).Config.
:= ALI_File; Dependency_Kind := ALI_File;
else else
In_Tree.Languages_Data.Table In_Tree.Languages_Data.Table
(Data.First_Language_Processing).Config.Kind (Data.First_Language_Processing).Config.Kind :=
:= File_Based; File_Based;
end if; end if;
end if; end if;
end if; end if;
...@@ -4646,7 +4648,6 @@ package body Prj.Nmsc is ...@@ -4646,7 +4648,6 @@ package body Prj.Nmsc is
if Lang_Name = Name_Ada then if Lang_Name = Name_Ada then
Lang_Data.Config.Kind := Unit_Based; Lang_Data.Config.Kind := Unit_Based;
Lang_Data.Config.Dependency_Kind := ALI_File; Lang_Data.Config.Dependency_Kind := ALI_File;
else else
Lang_Data.Config.Kind := File_Based; Lang_Data.Config.Kind := File_Based;
Lang_Data.Config.Dependency_Kind := None; Lang_Data.Config.Dependency_Kind := None;
...@@ -4681,9 +4682,10 @@ package body Prj.Nmsc is ...@@ -4681,9 +4682,10 @@ package body Prj.Nmsc is
elsif Extending then elsif Extending then
declare declare
Data : Project_Data := In_Tree.Projects.Table (Root_Project); Data : Project_Data;
begin begin
Data := In_Tree.Projects.Table (Root_Project);
while Data.Extends /= No_Project loop while Data.Extends /= No_Project loop
if P = Data.Extends then if P = Data.Extends then
return True; return True;
......
...@@ -639,11 +639,9 @@ package Prj is ...@@ -639,11 +639,9 @@ package Prj is
Project : Project_Id := No_Project; Project : Project_Id := No_Project;
-- Project of the source -- Project of the source
Language_Name : Name_Id := No_Name;
-- Name of the language of the source
Language : Language_Index := No_Language_Index; Language : Language_Index := No_Language_Index;
-- Index of the language -- Index of the language. This is an index into
-- project_tree.languages_data
Lang_Kind : Language_Kind := File_Based; Lang_Kind : Language_Kind := File_Based;
-- Kind of the language -- Kind of the language
...@@ -760,7 +758,6 @@ package Prj is ...@@ -760,7 +758,6 @@ package Prj is
No_Source_Data : constant Source_Data := No_Source_Data : constant Source_Data :=
(Project => No_Project, (Project => No_Project,
Language_Name => No_Name,
Language => No_Language_Index, Language => No_Language_Index,
Lang_Kind => File_Based, Lang_Kind => File_Based,
Compiled => True, Compiled => True,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment