summaryrefslogtreecommitdiff
path: root/gcc/coverage.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-01-01 13:49:18 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-01-01 12:49:18 +0000
commit962e88a9f5a19736412f8b17b24464e2b700f002 (patch)
tree1f3f47a623168992283688de2d7a2a6b07341b11 /gcc/coverage.c
parenta5544970246db337977bb8b69ab120e9ef209317 (diff)
coverage.c (get_coverage_counts): Use current_function_decl.
* coverage.c (get_coverage_counts): Use current_function_decl. * profile.c (read_thunk_profile): New function. (branch_prob): Add THUNK parameter. * tree-profile.c (tree_profiling): Handle thunks. * value-prof.c (init_node_map): Handle thunks. * value-prof.h (branch_prob): Upate prototype. (read_thunk_profile): Declare. * g++.dg/tree-prof/devirt.C: Update testcase. From-SVN: r267495
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r--gcc/coverage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 0e1873b9589..a34c5da49bf 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -329,7 +329,7 @@ get_coverage_counts (unsigned counter, unsigned cfg_checksum,
else
{
gcc_assert (coverage_node_map_initialized_p ());
- elt.ident = cgraph_node::get (cfun->decl)->profile_id;
+ elt.ident = cgraph_node::get (current_function_decl)->profile_id;
}
elt.ctr = counter;
entry = counts_hash->find (&elt);