summaryrefslogtreecommitdiff
path: root/gcc/coverage.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-11-11 20:08:44 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2009-11-11 19:08:44 +0000
commit0bc1b77f3219f3f8038fcc34f13eddc08ba86ce8 (patch)
tree866b6afdd093937e7194ff58fa04991fef160e5f /gcc/coverage.c
parent17e7cb855000baa6598005571d7dd49cfac5282a (diff)
downloadgcc-0bc1b77f3219f3f8038fcc34f13eddc08ba86ce8.tar.gz
lto-cgraph.c: Include gcov-io.h
* lto-cgraph.c: Include gcov-io.h (output_profile_summary): New function. (output_cgraph): Use it. (input_profile_summary): New function. (input_cgraph): Use it. * coverage.c (build_ctr_info_value): Use varpool; initalize DECL_ASSEMBLER_NAME. (create_coverage): Likewise. * tree-profile.c (tree_init_ic_make_global_vars): Likewise. (tree_init_edge_profiler): Likewise. * Makefile.in (lto-cgraph.o): Add dependency on gcov-io.h. From-SVN: r154100
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r--gcc/coverage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c
index ebdc696218b..a223bc067e6 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -776,7 +776,7 @@ build_ctr_info_value (unsigned int counter, tree type)
TREE_TYPE (tree_ctr_tables[counter]) = array_type;
DECL_SIZE (tree_ctr_tables[counter]) = TYPE_SIZE (array_type);
DECL_SIZE_UNIT (tree_ctr_tables[counter]) = TYPE_SIZE_UNIT (array_type);
- assemble_variable (tree_ctr_tables[counter], 0, 0, 0);
+ varpool_finalize_decl (tree_ctr_tables[counter]);
value = tree_cons (fields,
build1 (ADDR_EXPR, TREE_TYPE (fields),
@@ -795,6 +795,7 @@ build_ctr_info_value (unsigned int counter, tree type)
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
TREE_NOTHROW (fn) = 1;
+ DECL_ASSEMBLER_NAME (fn); /* Initialize assembler name so we can stream out. */
value = tree_cons (fields,
build1 (ADDR_EXPR, TREE_TYPE (fields), fn),
value);
@@ -971,7 +972,7 @@ create_coverage (void)
DECL_INITIAL (gcov_info) = t;
/* Build structure. */
- assemble_variable (gcov_info, 0, 0, 0);
+ varpool_finalize_decl (gcov_info);
/* Build a decl for __gcov_init. */
t = build_pointer_type (TREE_TYPE (gcov_info));
@@ -980,6 +981,7 @@ create_coverage (void)
FUNCTION_DECL, get_identifier ("__gcov_init"), t);
TREE_PUBLIC (t) = 1;
DECL_EXTERNAL (t) = 1;
+ DECL_ASSEMBLER_NAME (t); /* Initialize assembler name so we can stream out. */
gcov_init = t;
/* Generate a call to __gcov_init(&gcov_info). */