aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib.ads
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2010-10-04 13:27:57 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-04 15:27:57 +0200
commitea4ce0f7775af81231269f9c39206db30b7cb775 (patch)
tree762cf5586088eb7449e204245ad71d64685bca32 /gcc/ada/lib.ads
parent1366997bf20c36a7d0701a4f4e09b7d8b523e828 (diff)
downloadgcc-ea4ce0f7775af81231269f9c39206db30b7cb775.zip
gcc-ea4ce0f7775af81231269f9c39206db30b7cb775.tar.gz
gcc-ea4ce0f7775af81231269f9c39206db30b7cb775.tar.bz2
frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before loading the main source...
2010-10-04 Vincent Celier <celier@adacore.com> * frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before loading the main source, so that if it is preprocessed and -gnateG is used, the preprocessed file is written. * lib.ads (Analysing_Subunit_Of_Main): New global variable to indicate if a subunit is from the main unit when it is loaded. * sem_ch10.adb (Analyze_Proper_Body): Set Lib.Analysing_Subunit_Of_Main to True before loading a subunit. * sem_ch12.adb (Copy_Generic_Node): Set Lib.Analysing_Subunit_Of_Main to True when the main is a generic unit before loading one of its subunits. * sinput-l.adb (Load_File): If -gnateG is used, write the preprocessed file only for the main unit (spec, body and subunits). From-SVN: r164934
Diffstat (limited to 'gcc/ada/lib.ads')
-rw-r--r--gcc/ada/lib.ads5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads
index 0aac6f0..28e2ec0 100644
--- a/gcc/ada/lib.ads
+++ b/gcc/ada/lib.ads
@@ -49,6 +49,11 @@ package Lib is
-- extended source (the main unit, its spec, or one of its subunits). This
-- flag to implement In_Extended_Main_Source_Unit.
+ Analysing_Subunit_Of_Main : Boolean := False;
+ -- Set to True when analyzing a subunit of the main source. When True, if
+ -- the subunit is preprocessed and -gnateG is specified, then the
+ -- preprocessed file (.prep) is written.
+
--------------------------------------------
-- General Approach to Library Management --
--------------------------------------------