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>
* 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_*):
Two fields removed.
......
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -1221,7 +1221,7 @@ package body Prj.Env is
procedure Create_Mapping_File
(Project : Project_Id;
Language : Name_Id;
Language : Language_Index;
In_Tree : Project_Tree_Ref;
Name : out Path_Name_Type)
is
......@@ -1334,7 +1334,7 @@ package body Prj.Env is
while Source /= No_Source loop
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 Src_Data.Replaced_By = No_Source
and then Src_Data.Path.Name /= No_Path
......
......@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -50,7 +50,7 @@ package Prj.Env is
procedure Create_Mapping_File
(Project : Project_Id;
Language : Name_Id;
Language : Language_Index;
In_Tree : Project_Tree_Ref;
Name : out Path_Name_Type);
-- Create a temporary mapping file for project Project. For each source or
......
......@@ -737,7 +737,6 @@ package body Prj.Nmsc is
end if;
Src_Data.Project := Project;
Src_Data.Language_Name := Lang;
Src_Data.Language := Lang_Id;
Src_Data.Lang_Kind := Lang_Kind;
Src_Data.Compiled := In_Tree.Languages_Data.Table
......@@ -2824,11 +2823,11 @@ package body Prj.Nmsc is
-- Check attributes common to Ada_Only and Multi_Lang modes
procedure Process_Exceptions_File_Based
(Lang_Id : Language_Index;
Kind : Source_Kind);
(Lang_Id : Language_Index;
Kind : Source_Kind);
procedure Process_Exceptions_Unit_Based
(Lang_Id : Language_Index;
Kind : Source_Kind);
(Lang_Id : Language_Index;
Kind : Source_Kind);
-- In Multi_Lang mode, process the naming exceptions for the two types
-- of languages we can have.
......@@ -2989,6 +2988,7 @@ package body Prj.Nmsc is
Element : String_Element;
File_Name : File_Name_Type;
Source : Source_Id;
begin
case Kind is
when Impl | Sep =>
......@@ -3087,6 +3087,7 @@ package body Prj.Nmsc is
Source_To_Replace : Source_Id := No_Source;
Other_Project : Project_Id;
Other_Part : Source_Id := No_Source;
begin
case Kind is
when Impl | Sep =>
......@@ -3363,6 +3364,7 @@ package body Prj.Nmsc is
Sep_Suffix_Loc : Source_Ptr;
Suffix : Variable_Value;
Lang : Name_Id;
begin
Check_Common
(Dot_Replacement => Dot_Replacement,
......@@ -3382,13 +3384,13 @@ package body Prj.Nmsc is
then
Lang_Id := Data.First_Language_Processing;
while Lang_Id /= No_Language_Index loop
if In_Tree.Languages_Data.Table
(Lang_Id).Config.Kind = Unit_Based
if In_Tree.Languages_Data.
Table (Lang_Id).Config.Kind = Unit_Based
then
if Dot_Replacement /= No_File then
In_Tree.Languages_Data.Table
(Lang_Id).Config.Naming_Data.Dot_Replacement :=
Dot_Replacement;
Dot_Replacement;
end if;
if Casing_Defined then
......@@ -3399,12 +3401,11 @@ package body Prj.Nmsc is
if Separate_Suffix /= No_File then
In_Tree.Languages_Data.Table
(Lang_Id).Config.Naming_Data.Separate_Suffix :=
Separate_Suffix;
Separate_Suffix;
end if;
end if;
Lang_Id :=
In_Tree.Languages_Data.Table (Lang_Id).Next;
Lang_Id := In_Tree.Languages_Data.Table (Lang_Id).Next;
end loop;
end if;
......@@ -4542,15 +4543,16 @@ package body Prj.Nmsc is
if Def_Lang_Id = Name_Ada then
In_Tree.Languages_Data.Table
(Data.First_Language_Processing).Config.Kind
:= Unit_Based;
(Data.First_Language_Processing).Config.Kind :=
Unit_Based;
In_Tree.Languages_Data.Table
(Data.First_Language_Processing).Config.Dependency_Kind
:= ALI_File;
(Data.First_Language_Processing).Config.
Dependency_Kind := ALI_File;
else
In_Tree.Languages_Data.Table
(Data.First_Language_Processing).Config.Kind
:= File_Based;
(Data.First_Language_Processing).Config.Kind :=
File_Based;
end if;
end if;
end if;
......@@ -4646,7 +4648,6 @@ package body Prj.Nmsc is
if Lang_Name = Name_Ada then
Lang_Data.Config.Kind := Unit_Based;
Lang_Data.Config.Dependency_Kind := ALI_File;
else
Lang_Data.Config.Kind := File_Based;
Lang_Data.Config.Dependency_Kind := None;
......@@ -4681,9 +4682,10 @@ package body Prj.Nmsc is
elsif Extending then
declare
Data : Project_Data := In_Tree.Projects.Table (Root_Project);
Data : Project_Data;
begin
Data := In_Tree.Projects.Table (Root_Project);
while Data.Extends /= No_Project loop
if P = Data.Extends then
return True;
......
......@@ -639,11 +639,9 @@ package Prj is
Project : Project_Id := No_Project;
-- Project of the source
Language_Name : Name_Id := No_Name;
-- Name of the language of the source
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;
-- Kind of the language
......@@ -760,7 +758,6 @@ package Prj is
No_Source_Data : constant Source_Data :=
(Project => No_Project,
Language_Name => No_Name,
Language => No_Language_Index,
Lang_Kind => File_Based,
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