OSDN Git Service

PR target/50678
[pf3gnuchains/gcc-fork.git] / gcc / ada / par_sco.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              P A R _ S C O                               --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --             Copyright (C) 2009, Free Software Foundation, Inc.           --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license.          --
20 --                                                                          --
21 -- GNAT was originally developed  by the GNAT team at  New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
23 --                                                                          --
24 ------------------------------------------------------------------------------
25
26 --  This package contains the routines used to deal with generation and output
27 --  of Soure Coverage Obligations (SCO's) used for coverage analysis purposes.
28 --  See package SCOs for full documentation of format of SCO information.
29
30 with Types; use Types;
31
32 package Par_SCO is
33
34    -----------------
35    -- Subprograms --
36    -----------------
37
38    procedure Initialize;
39    --  Initialize internal tables for a new compilation
40
41    procedure SCO_Record (U : Unit_Number_Type);
42    --  This procedure scans the tree for the unit identified by U, populating
43    --  internal tables recording the SCO information. Note that this is done
44    --  before any semantic analysis/expansion happens.
45
46    procedure Set_SCO_Condition (Cond : Node_Id; Val : Boolean);
47    --  This procedure is called during semantic analysis to record a condition
48    --  which has been identified as always True or always False, as indicated
49    --  by Val. The condition is identified by the First_Sloc value in the
50    --  original tree associated with Cond.
51
52    procedure Set_SCO_Pragma_Enabled (Loc : Source_Ptr);
53    --  This procedure is called from Sem_Prag when a pragma is enabled (i.e.
54    --  when the Pragma_Enabled flag is set). Loc is the Sloc of the N_Pragma
55    --  node. This is used to enable the corresponding SCO table entry. Note
56    --  that we use the Sloc as the key here, since in the generic case, the
57    --  analysis is on a copy of the node, which is different from the node
58    --  seen by Par_SCO in the parse tree (but the Sloc values are the same).
59
60    procedure SCO_Output;
61    --  Outputs SCO lines for all units, with appropriate section headers, for
62    --  unit U in the ALI file, as recorded by previous calls to SCO_Record,
63    --  possibly modified by calls to Set_SCO_Condition.
64
65    procedure dsco;
66    --  Debug routine to dump internal SCO table. This is a raw format dump
67    --  showing exactly what the table contains.
68
69    procedure pscos;
70    --  Debugging procedure to output contents of SCO binary tables in the
71    --  format in which they appear in an ALI file.
72
73 end Par_SCO;