summaryrefslogtreecommitdiff
path: root/gcc/statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/statistics.c')
-rw-r--r--gcc/statistics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/statistics.c b/gcc/statistics.c
index 4883859f7a3..55ec981f3bb 100644
--- a/gcc/statistics.c
+++ b/gcc/statistics.c
@@ -142,7 +142,7 @@ statistics_fini_pass_2 (void **slot, void *data ATTRIBUTE_UNUSED)
current_pass->static_pass_number,
current_pass->name,
counter->id, counter->val,
- cfun ? IDENTIFIER_POINTER (DECL_NAME (cfun->decl)) : "(nofn)",
+ current_function_name (),
count);
else
fprintf (statistics_dump_file,
@@ -150,7 +150,7 @@ statistics_fini_pass_2 (void **slot, void *data ATTRIBUTE_UNUSED)
current_pass->static_pass_number,
current_pass->name,
counter->id,
- cfun ? IDENTIFIER_POINTER (DECL_NAME (cfun->decl)) : "(nofn)",
+ current_function_name (),
count);
counter->prev_dumped_count = counter->count;
return 1;
@@ -312,7 +312,7 @@ statistics_counter_event (struct function *fn, const char *id, int incr)
current_pass->static_pass_number,
current_pass->name,
id,
- fn ? IDENTIFIER_POINTER (DECL_NAME (fn->decl)) : "(nofn)",
+ function_name (fn),
incr);
}
@@ -342,5 +342,5 @@ statistics_histogram_event (struct function *fn, const char *id, int val)
current_pass->static_pass_number,
current_pass->name,
id, val,
- fn ? IDENTIFIER_POINTER (DECL_NAME (fn->decl)) : "(nofn)");
+ function_name (fn));
}