xref: /dragonfly/contrib/gcc-4.7/gcc/coverage.h (revision e4b17023)
1*e4b17023SJohn Marino /* coverage.h - Defines data exported from coverage.c
2*e4b17023SJohn Marino    Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008
3*e4b17023SJohn Marino    Free Software Foundation, Inc.
4*e4b17023SJohn Marino 
5*e4b17023SJohn Marino This file is part of GCC.
6*e4b17023SJohn Marino 
7*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under
8*e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free
9*e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later
10*e4b17023SJohn Marino version.
11*e4b17023SJohn Marino 
12*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13*e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or
14*e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15*e4b17023SJohn Marino for more details.
16*e4b17023SJohn Marino 
17*e4b17023SJohn Marino You should have received a copy of the GNU General Public License
18*e4b17023SJohn Marino along with GCC; see the file COPYING3.  If not see
19*e4b17023SJohn Marino <http://www.gnu.org/licenses/>.  */
20*e4b17023SJohn Marino 
21*e4b17023SJohn Marino #ifndef GCC_COVERAGE_H
22*e4b17023SJohn Marino #define GCC_COVERAGE_H
23*e4b17023SJohn Marino 
24*e4b17023SJohn Marino #include "gcov-io.h"
25*e4b17023SJohn Marino 
26*e4b17023SJohn Marino extern void coverage_init (const char *);
27*e4b17023SJohn Marino extern void coverage_finish (void);
28*e4b17023SJohn Marino 
29*e4b17023SJohn Marino /* Start outputting coverage information for the current
30*e4b17023SJohn Marino    function.  */
31*e4b17023SJohn Marino extern int coverage_begin_function (unsigned, unsigned);
32*e4b17023SJohn Marino 
33*e4b17023SJohn Marino /* Complete the coverage information for the current function.  */
34*e4b17023SJohn Marino extern void coverage_end_function (unsigned, unsigned);
35*e4b17023SJohn Marino 
36*e4b17023SJohn Marino /* Compute the control flow checksum for the current function.  */
37*e4b17023SJohn Marino extern unsigned coverage_compute_cfg_checksum (void);
38*e4b17023SJohn Marino 
39*e4b17023SJohn Marino /* Compute the line number checksum for the current function.  */
40*e4b17023SJohn Marino extern unsigned coverage_compute_lineno_checksum (void);
41*e4b17023SJohn Marino 
42*e4b17023SJohn Marino /* Allocate some counters. Repeatable per function.  */
43*e4b17023SJohn Marino extern int coverage_counter_alloc (unsigned /*counter*/, unsigned/*num*/);
44*e4b17023SJohn Marino /* Use a counter from the most recent allocation.  */
45*e4b17023SJohn Marino extern tree tree_coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/);
46*e4b17023SJohn Marino /* Use a counter address from the most recent allocation.  */
47*e4b17023SJohn Marino extern tree tree_coverage_counter_addr (unsigned /*counter*/, unsigned/*num*/);
48*e4b17023SJohn Marino 
49*e4b17023SJohn Marino /* Get all the counters for the current function.  */
50*e4b17023SJohn Marino extern gcov_type *get_coverage_counts (unsigned /*counter*/,
51*e4b17023SJohn Marino 				       unsigned /*expected*/,
52*e4b17023SJohn Marino 				       unsigned /*cfg_checksum*/,
53*e4b17023SJohn Marino 				       unsigned /*lineno_checksum*/,
54*e4b17023SJohn Marino 				       const struct gcov_ctr_summary **);
55*e4b17023SJohn Marino 
56*e4b17023SJohn Marino extern tree get_gcov_type (void);
57*e4b17023SJohn Marino 
58*e4b17023SJohn Marino #endif
59