2014-10-10 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / ada / par_sco.ads
blob62a7467f6478fd14236ed657f1c487684f8b4db6
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-2012, 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 ------------------------------------------------------------------------------
26 -- This package contains the routines used to deal with generation and output
27 -- of Source Coverage Obligations (SCO's) used for coverage analysis purposes.
28 -- See package SCOs for full documentation of format of SCO information.
30 with Types; use Types;
32 package Par_SCO is
34 -----------------
35 -- Subprograms --
36 -----------------
38 procedure Initialize;
39 -- Initialize internal tables for a new compilation
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.
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.
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 statement SCO 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).
60 function SCO_Pragma_Disabled (Loc : Source_Ptr) return Boolean;
61 -- True if Loc is the source location of a disabled pragma
63 procedure SCO_Output;
64 -- Outputs SCO lines for all units, with appropriate section headers, as
65 -- recorded by previous calls to SCO_Record, possibly modified by calls to
66 -- Set_SCO_Condition.
68 procedure dsco;
69 -- Debug routine to dump internal SCO table. This is a raw format dump
70 -- showing exactly what the table contains.
72 procedure pscos;
73 -- Debugging procedure to output contents of SCO binary tables in the
74 -- format in which they appear in an ALI file.
76 end Par_SCO;