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