Fix CL.
[official-gcc.git] / gcc / ada / par_sco.ads
blob29dfe7e388669193e46efc3ac1ccf1f07b870a8b
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-2014, 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_Raw (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_Logical_Operator (Op : Node_Id);
53 -- Mark some putative logical operator as a short circuit one
55 procedure Set_SCO_Pragma_Enabled (Loc : Source_Ptr);
56 -- This procedure is called from Sem_Prag when a pragma is enabled (i.e.
57 -- when the Pragma_Enabled flag is set). Loc is the Sloc of the N_Pragma
58 -- node. This is used to enable the corresponding statement SCO entry. Note
59 -- that we use the Sloc as the key here, since in the generic case, the
60 -- analysis is on a copy of the node, which is different from the node
61 -- seen by Par_SCO in the parse tree (but the Sloc values are the same).
63 function SCO_Pragma_Disabled (Loc : Source_Ptr) return Boolean;
64 -- True if Loc is the source location of a disabled pragma
66 procedure SCO_Record_Filtered;
67 -- This procedure filters remaining putative AND/OR short-circuit operators
68 -- from the internal SCO raw table after the semantic analysis and fills
69 -- the filtered SCO table.
71 procedure SCO_Output;
72 -- Outputs SCO lines for all units, with appropriate section headers, as
73 -- recorded by previous calls to SCO_Record, possibly modified by calls to
74 -- Set_SCO_Condition.
76 procedure dsco;
77 -- Debug routine to dump internal SCO tables. This is a raw format dump
78 -- showing exactly what the tables contain.
80 procedure pscos;
81 -- Debugging procedure to output contents of SCO binary tables in the
82 -- format in which they appear in an ALI file.
84 end Par_SCO;