diff options
author | Robert Dewar <dewar@adacore.com> | 2009-07-15 09:59:16 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-15 11:59:16 +0200 |
commit | 6f12117afc93e5af5f2cdb1cfc99e285a15f9a91 (patch) | |
tree | 7269667b0fc6e29ea066148c0a41903f090ce070 /gcc/ada/par.adb | |
parent | 3a3362620167fd31b30aa391bf6d84c45a3d6af2 (diff) | |
download | gcc-6f12117afc93e5af5f2cdb1cfc99e285a15f9a91.zip gcc-6f12117afc93e5af5f2cdb1cfc99e285a15f9a91.tar.gz gcc-6f12117afc93e5af5f2cdb1cfc99e285a15f9a91.tar.bz2 |
debug.adb: Add -gnatd.O to output SCO table
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
From-SVN: r149669
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 51029d6..0358040 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; |