summaryrefslogtreecommitdiffstats
path: root/gcc/ada/lib.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 14:41:21 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 14:41:21 +0000
commit5eff8174eaf4360ecdaae13f89dafb7ce58c88ff (patch)
tree9cb2b579aa839975138da83d1ecbd610d043dbc7 /gcc/ada/lib.ads
parent14ade791121ae888d626b3dd558f9b6ffb4db622 (diff)
downloadppe42-gcc-5eff8174eaf4360ecdaae13f89dafb7ce58c88ff.tar.gz
ppe42-gcc-5eff8174eaf4360ecdaae13f89dafb7ce58c88ff.zip
2010-09-10 Robert Dewar <dewar@adacore.com>
* errout.adb: Remove tests of Parsing_Main_Subunit, since this test is now done in In_Extended_Main_Source_Unit. * errout.ads (Compiler_State[_Type]): Moved from Errout to Lib (Parsing_Main_Subunit): Moved from Errout to Lib and renamed as Parsing_Main_Extended_Source. * frontend.adb: Set Parsing_Main_Extended_Source True for parsing main unit. * lib-load.adb (Load_Unit): Add PMES parameter Set PMES appropriately in all calls to Load_Unit * lib-load.ads (Load_Unit): Add PMES parameter * lib.adb (In_Extended_Main_Source_Unit): When called with Compiler_State set to Parsing, test new flag Compiling_Main_Extended_Source. * lib.ads (Compiler_State[_Type]): Moved from Errout to Lib (Parsing_Main_Subunit): Moved from Errout to Lib and renamed as Parsing_Main_Extended_Source * par-load.adb (Load): Set PMES properly in call to Load_Unit 2010-09-10 Ed Schonberg <schonberg@adacore.com> * exp_cg.adb: Use proper entity to handle overloads. * sem_res.adb (Check_Parameterless_Call): An operator node without actuals cannot be a call, and must be treated as a string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164182 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib.ads')
-rw-r--r--gcc/ada/lib.ads12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads
index 4a956b5118f..0aac6f04da4 100644
--- a/gcc/ada/lib.ads
+++ b/gcc/ada/lib.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, 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- --
@@ -39,6 +39,16 @@ with Types; use Types;
package Lib is
+ type Compiler_State_Type is (Parsing, Analyzing);
+ Compiler_State : Compiler_State_Type;
+ -- Indicates current state of compilation. This is used to implement the
+ -- function In_Extended_Main_Source_Unit.
+
+ Parsing_Main_Extended_Source : Boolean := False;
+ -- Set True if we are currently parsing a file that is part of the main
+ -- extended source (the main unit, its spec, or one of its subunits). This
+ -- flag to implement In_Extended_Main_Source_Unit.
+
--------------------------------------------
-- General Approach to Library Management --
--------------------------------------------
OpenPOWER on IntegriCloud