summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-proc.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-20 12:45:54 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-20 12:45:54 +0000
commitba381ae5404608221a17b0f895bade166e5cb587 (patch)
tree4f65013f967ac2ea1c063adc21103b17e57712c4 /gcc/ada/prj-proc.adb
parent4ef962616dc83114d9e1312777963c0ce6e9b97a (diff)
downloadgcc-ba381ae5404608221a17b0f895bade166e5cb587.tar.gz
2008-05-20 Vincent Celier <celier@adacore.com>
* prj.adb (Hash (Project_Id)): New function (Project_Empty): Add new component Interfaces_Defined * prj.ads (Source_Data): New component Object_Linked (Language_Config): New components Object_Generated and Objects_Linked (Hash (Project_Id)): New function (Source_Data): New Boolean components In_Interfaces and Declared_In_Interfaces. (Project_Data): New Boolean component Interfaces_Defined * prj-attr.adb: New project level attribute Object_Generated and Objects_Linked Add new project level attribute Interfaces * prj-dect.adb: Use functions Present and No throughout (Parse_Variable_Declaration): If a string type is specified as a simple name and is not found in the current project, look for it also in the ancestors of the project. * prj-makr.adb: Replace procedure Make with procedures Initialize, Process and Finalize to implement H414-023: process different directories with different patterns. Use functions Present and No throughout * prj-makr.ads: Replace procedure Make with procedures Initialize, Process and Finalize * prj-nmsc.adb (Add_Source): Set component Object_Exists and Object_Linked accordnig to the language configuration. (Process_Project_Level_Array_Attributes): Process new attributes Object_Generated and Object_Linked. (Report_No_Sources): New Boolean parameter Continuation, defaulted to False, to indicate that the erreor/warning is a continuation. (Check): Call Report_No_Sources with Contnuation = True after the first call. (Error_Msg): Process successively contnuation character and warning character. (Find_Explicit_Sources): Check that all declared sources have been found (Check_File): Indicate in hash table Source_Names when a declared source is found. (Check_File): Set Other_Part when found (Find_Explicit_Sources): In multi language mode, check if all exceptions to the naming scheme have been found. For Ada, report an error if an exception has not been found. Otherwise, disregard the exception. (Check_Interfaces): New procedure (Add_Source): When Other_Part is defined, set mutual pointers in spec and body. (Check): In multi-language mode, call Check_Interfaces (Process_Sources_In_Multi_Language_Mode): Set In_Interfaces to False for an excluded source. (Remove_Source): A source replacing a source in the interfaces is also in the interfaces. * prj-pars.adb: Use function Present * prj-part.adb: Use functions Present and No throughout (Parse_Single_Project): Set the parent project for child projects (Create_Virtual_Extending_Project): Register project with no qualifier (Parse_Single_Project): Allow an abstract project to be extend several times. Do not allow an abstract project to extend a non abstract project. * prj-pp.adb: Use functions Present and No throughout (Print): Take into account the full associative array attribute declarations. * prj-proc.adb: Use functions Present and No throughout (Expression): Call itself with the same From_Project_Node for the default value of an external reference. * prj-strt.adb: Use functions Present and No throughout (Parse_Variable_Reference): If a variable is specified as a simple name and is not found in the current project, look for it also in the ancestors of the project. * prj-tree.ads, prj-tree.adb (Present): New function (No): New function Use functions Present and No throughout (Parent_Project_Of): New function (Set_Parent_Project_Of): New procedure * snames.ads, snames.adb: Add new standard names Object_Generated and Objects_Linked git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r--gcc/ada/prj-proc.adb94
1 files changed, 47 insertions, 47 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb
index 638bf18ca48..13f1d947804 100644
--- a/gcc/ada/prj-proc.adb
+++ b/gcc/ada/prj-proc.adb
@@ -463,7 +463,7 @@ package body Prj.Proc is
-- Process each term of the expression, starting with First_Term
- while The_Term /= Empty_Node loop
+ while Present (The_Term) loop
The_Current_Term := Current_Term (The_Term, From_Project_Node_Tree);
case Kind_Of (The_Current_Term, From_Project_Node_Tree) is
@@ -535,7 +535,7 @@ package body Prj.Proc is
Value : Variable_Value;
begin
- if String_Node /= Empty_Node then
+ if Present (String_Node) then
-- If String_Node is nil, it is an empty list,
-- there is nothing to do
@@ -586,7 +586,7 @@ package body Prj.Proc is
Next_Expression_In_List
(String_Node, From_Project_Node_Tree);
- exit when String_Node = Empty_Node;
+ exit when No (String_Node);
Value :=
Expression
@@ -637,7 +637,7 @@ package body Prj.Proc is
Index : Name_Id := No_Name;
begin
- if Term_Project /= Empty_Node and then
+ if Present (Term_Project) and then
Term_Project /= From_Project_Node
then
-- This variable or attribute comes from another project
@@ -650,7 +650,7 @@ package body Prj.Proc is
With_Name => The_Name);
end if;
- if Term_Package /= Empty_Node then
+ if Present (Term_Package) then
-- This is an attribute of a package
@@ -1003,11 +1003,11 @@ package body Prj.Proc is
-- If there is a default value for the external reference,
-- get its value.
- if Default_Node /= Empty_Node then
+ if Present (Default_Node) then
Def_Var := Expression
(Project => Project,
In_Tree => In_Tree,
- From_Project_Node => Default_Node,
+ From_Project_Node => From_Project_Node,
From_Project_Node_Tree => From_Project_Node_Tree,
Pkg => Pkg,
First_Term =>
@@ -1252,7 +1252,7 @@ package body Prj.Proc is
Current_Item := Empty_Node;
Current_Declarative_Item := Item;
- while Current_Declarative_Item /= Empty_Node loop
+ while Present (Current_Declarative_Item) loop
-- Get its data
@@ -1314,7 +1314,7 @@ package body Prj.Proc is
In_Tree.Packages.Table (New_Pkg) :=
The_New_Package;
- if Project_Of_Renamed_Package /= Empty_Node then
+ if Present (Project_Of_Renamed_Package) then
-- Renamed package
@@ -1472,9 +1472,9 @@ package body Prj.Proc is
if Pkg /= No_Package then
In_Tree.Arrays.Table (New_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Packages.Table (Pkg).Decl.Arrays);
In_Tree.Packages.Table (Pkg).Decl.Arrays :=
@@ -1482,9 +1482,9 @@ package body Prj.Proc is
else
In_Tree.Arrays.Table (New_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Projects.Table (Project).Decl.Arrays);
In_Tree.Projects.Table (Project).Decl.Arrays :=
@@ -1515,8 +1515,8 @@ package body Prj.Proc is
pragma Assert (Orig_Project /= No_Project,
"original project not found");
- if Associative_Package_Of
- (Current_Item, From_Project_Node_Tree) = Empty_Node
+ if No (Associative_Package_Of
+ (Current_Item, From_Project_Node_Tree))
then
Orig_Array :=
In_Tree.Projects.Table
@@ -1732,7 +1732,7 @@ package body Prj.Proc is
(String_Type_Of (Current_Item,
From_Project_Node_Tree),
From_Project_Node_Tree);
- while Current_String /= Empty_Node
+ while Present (Current_String)
and then
String_Value_Of
(Current_String, From_Project_Node_Tree) /=
@@ -1746,7 +1746,7 @@ package body Prj.Proc is
-- Report an error if the string value is not
-- one for the string type.
- if Current_String = Empty_Node then
+ if No (Current_String) then
Error_Msg_Name_1 := New_Value.Value;
Error_Msg_Name_2 :=
Name_Of
@@ -1849,21 +1849,21 @@ package body Prj.Proc is
if Pkg /= No_Package then
In_Tree.Variable_Elements.Table (The_Variable) :=
- (Next =>
+ (Next =>
In_Tree.Packages.Table
(Pkg).Decl.Variables,
- Name => Current_Item_Name,
- Value => New_Value);
+ Name => Current_Item_Name,
+ Value => New_Value);
In_Tree.Packages.Table
(Pkg).Decl.Variables := The_Variable;
else
In_Tree.Variable_Elements.Table (The_Variable) :=
- (Next =>
+ (Next =>
In_Tree.Projects.Table
(Project).Decl.Variables,
- Name => Current_Item_Name,
- Value => New_Value);
+ Name => Current_Item_Name,
+ Value => New_Value);
In_Tree.Projects.Table
(Project).Decl.Variables :=
The_Variable;
@@ -1957,9 +1957,9 @@ package body Prj.Proc is
if Pkg /= No_Package then
In_Tree.Arrays.Table (The_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Packages.Table
(Pkg).Decl.Arrays);
@@ -1968,9 +1968,9 @@ package body Prj.Proc is
else
In_Tree.Arrays.Table (The_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Projects.Table
(Project).Decl.Arrays);
@@ -2019,7 +2019,7 @@ package body Prj.Proc is
not Case_Insensitive
(Current_Item, From_Project_Node_Tree),
Value => New_Value,
- Next => In_Tree.Arrays.Table
+ Next => In_Tree.Arrays.Table
(The_Array).Value);
In_Tree.Arrays.Table
(The_Array).Value := The_Array_Element;
@@ -2068,8 +2068,8 @@ package body Prj.Proc is
-- If a project was specified for the case variable,
-- get its id.
- if Project_Node_Of
- (Variable_Node, From_Project_Node_Tree) /= Empty_Node
+ if Present (Project_Node_Of
+ (Variable_Node, From_Project_Node_Tree))
then
Name :=
Name_Of
@@ -2084,8 +2084,8 @@ package body Prj.Proc is
-- If a package were specified for the case variable,
-- get its id.
- if Package_Node_Of
- (Variable_Node, From_Project_Node_Tree) /= Empty_Node
+ if Present (Package_Node_Of
+ (Variable_Node, From_Project_Node_Tree))
then
Name :=
Name_Of
@@ -2121,8 +2121,8 @@ package body Prj.Proc is
if Var_Id = No_Variable
and then
- Package_Node_Of
- (Variable_Node, From_Project_Node_Tree) = Empty_Node
+ No (Package_Node_Of
+ (Variable_Node, From_Project_Node_Tree))
then
Var_Id := In_Tree.Projects.Table
(The_Project).Decl.Variables;
@@ -2172,14 +2172,14 @@ package body Prj.Proc is
Case_Item :=
First_Case_Item_Of (Current_Item, From_Project_Node_Tree);
Case_Item_Loop :
- while Case_Item /= Empty_Node loop
+ while Present (Case_Item) loop
Choice_String :=
First_Choice_Of (Case_Item, From_Project_Node_Tree);
-- When Choice_String is nil, it means that it is
-- the "when others =>" alternative.
- if Choice_String = Empty_Node then
+ if No (Choice_String) then
Decl_Item :=
First_Declarative_Item_Of
(Case_Item, From_Project_Node_Tree);
@@ -2189,7 +2189,7 @@ package body Prj.Proc is
-- Look into all the alternative of this case item
Choice_Loop :
- while Choice_String /= Empty_Node loop
+ while Present (Choice_String) loop
if Case_Value =
String_Value_Of
(Choice_String, From_Project_Node_Tree)
@@ -2211,7 +2211,7 @@ package body Prj.Proc is
-- If there is an alternative, then we process it
- if Decl_Item /= Empty_Node then
+ if Present (Decl_Item) then
Process_Declarative_Items
(Project => Project,
In_Tree => In_Tree,
@@ -2486,7 +2486,7 @@ package body Prj.Proc is
With_Clause : Project_Node_Id;
begin
- if From_Project_Node = Empty_Node then
+ if No (From_Project_Node) then
Project := No_Project;
else
@@ -2591,7 +2591,7 @@ package body Prj.Proc is
With_Clause :=
First_With_Clause_Of (From_Project_Node, From_Project_Node_Tree);
- while With_Clause /= Empty_Node loop
+ while Present (With_Clause) loop
declare
New_Project : Project_Id;
New_Data : Project_Data;
@@ -2602,7 +2602,7 @@ package body Prj.Proc is
Non_Limited_Project_Node_Of
(With_Clause, From_Project_Node_Tree);
- if Proj_Node /= Empty_Node then
+ if Present (Proj_Node) then
Recursive_Process
(In_Tree => In_Tree,
Project => New_Project,
@@ -2799,7 +2799,7 @@ package body Prj.Proc is
With_Clause :=
First_With_Clause_Of
(From_Project_Node, From_Project_Node_Tree);
- while With_Clause /= Empty_Node loop
+ while Present (With_Clause) loop
declare
New_Project : Project_Id;
New_Data : Project_Data;
@@ -2810,7 +2810,7 @@ package body Prj.Proc is
Non_Limited_Project_Node_Of
(With_Clause, From_Project_Node_Tree);
- if Proj_Node = Empty_Node then
+ if No (Proj_Node) then
Recursive_Process
(In_Tree => In_Tree,
Project => New_Project,