diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-15 09:59:16 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-15 09:59:16 +0000 |
commit | 902e21825ec901db53142595695f43568de7e16a (patch) | |
tree | 7269667b0fc6e29ea066148c0a41903f090ce070 /gcc/ada/par.adb | |
parent | b05b9ac656db4e914ed78d7c6e391fbb6ece6ea9 (diff) | |
download | gcc-902e21825ec901db53142595695f43568de7e16a.tar.gz |
2009-07-15 Robert Dewar <dewar@adacore.com>
* debug.adb: Add -gnatd.O to output SCO table
* lib-writ.adb (Write_Unit_Information): Use SCO_Output to output SCO
information.
* lib-writ.ads: Document addition of SCO lines to ALI file
* par_sco.ads, par_sco.adb: New files.
* opt.ads (Generate_SCO): New switch
* par.adb (Par): Call SCO_Record to record SCO information
* sem_warn.adb (Warn_On_Constant_Condition): Adjust SCO condition
* switch-c.adb: Recognize -gnateS to generate SCO information
* usage.adb: Add line for -gnateS
* gcc-interface/Make-lang.in: Add dependency on par_sco.o for gnat1
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149669 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par.adb')
-rw-r--r-- | gcc/ada/par.adb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 51029d6b3f4..03580407b94 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -35,6 +35,7 @@ with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Output; use Output; +with Par_SCO; use Par_SCO; with Scans; use Scans; with Scn; use Scn; with Sinput; use Sinput; @@ -51,6 +52,7 @@ with Tbuild; use Tbuild; --------- function Par (Configuration_Pragmas : Boolean) return List_Id is + Num_Library_Units : Natural := 0; -- Count number of units parsed (relevant only in syntax check only mode, -- since in semantics check mode only a single unit is permitted anyway) @@ -1453,9 +1455,17 @@ begin pragma Assert (Scope.Last = 0); - -- Remaining steps are to create implicit label declarations and to - -- load required subsidiary sources. These steps are required only - -- if we are doing semantic checking. + -- This is where we generate SCO output if required + + if Generate_SCO + and then Operating_Mode = Generate_Code + then + SCO_Record (Current_Source_Unit); + end if; + + -- Remaining steps are to create implicit label declarations and to load + -- required subsidiary sources. These steps are required only if we are + -- doing semantic checking. if Operating_Mode /= Check_Syntax or else Debug_Flag_F then Par.Labl; |