[LIB]: Don't print the decl info in function__print

Its up to its callers, that will be moot soon as tag__print will call
function__print and as it already prints the decl info it'll be just a matter
of making all the function__print callers call tag__print instead and then
function__print will be unexported.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-01-12 16:17:53 -02:00
parent df1832ac4f
commit 26747d0053
3 changed files with 4 additions and 1 deletions

View File

@ -168,6 +168,7 @@ static void emit_function_defs(const char *fn)
if (f != NULL) {
cus__emit_ftype_definitions(kprobes_cus, cu,
&tag__function(f)->proto);
tag__print_decl_info(f);
function__print(f, cu);
puts(";\n");
}

View File

@ -1648,7 +1648,6 @@ void function__print(const struct tag *tag_self, const struct cu *cu)
struct function *self = tag__function(tag_self);
char bf[2048];
tag__print_decl_info(tag_self);
ftype__snprintf(&self->proto, cu, bf, sizeof(bf),
function__name(self, cu),
function__declared_inline(self), 0, 0);

View File

@ -119,6 +119,7 @@ static void fn_stats_size_fmtr(const struct fn_stats *self)
static void fn_stats_fmtr(const struct fn_stats *self)
{
if (verbose) {
tag__print_decl_info(self->tag);
function__print(self->tag, self->cu);
putchar('\n');
if (show_variables || show_inline_expansions)
@ -274,6 +275,7 @@ static int class_iterator(struct tag *tag, struct cu *cu, void *cookie)
if (ftype__has_parm_of_type(&function->proto, cookie, cu)) {
if (verbose) {
tag__print_decl_info(tag);
function__print(tag, cu);
putchar('\n');
} else
@ -301,6 +303,7 @@ static int function_iterator(struct tag *tag, struct cu *cu, void *cookie)
function = tag__function(tag);
if (strcmp(function__name(function, cu), cookie) == 0) {
tag__print_decl_info(tag);
function__print(tag, cu);
putchar('\n');
if (show_variables || show_inline_expansions)