1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 2009-2011, Free Software Foundation, Inc. --
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. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
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.
30 with Types; use Types;
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 disabled (i.e.
54 -- when the Pragma_Enabled flag is unset). Loc is the Sloc of the N_Pragma
55 -- node. This is used to disable 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).
60 function SCO_Pragma_Disabled (Loc : Source_Ptr) return Boolean;
61 -- True if Loc is the source location of a disabled pragma
64 -- Outputs SCO lines for all units, with appropriate section headers, for
65 -- unit U in the ALI file, as recorded by previous calls to SCO_Record,
66 -- possibly modified by calls to Set_SCO_Condition.
69 -- Debug routine to dump internal SCO table. This is a raw format dump
70 -- showing exactly what the table contains.
73 -- Debugging procedure to output contents of SCO binary tables in the
74 -- format in which they appear in an ALI file.