From 12d8f940d0c09e808f56a898fe5936b2b8f0403c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 15 Sep 2020 18:44:37 -0600 Subject: Remove TYPE_CODE_INT case from f_value_print_inner I looked through the various language value-print functions, to see if any code could be consolidated. Pretty much all I found was that f_value_print_inner does not need to handle TYPE_CODE_INT itself, but can simply dispatch to the generic printer. gdb/ChangeLog 2020-09-15 Tom Tromey * f-valprint.c (f_value_print_inner) : Remove. --- gdb/ChangeLog | 5 +++++ gdb/f-valprint.c | 14 +------------- 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe4b185..40c0c29 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2020-09-15 Tom Tromey + * f-valprint.c (f_value_print_inner) : + Remove. + +2020-09-15 Tom Tromey + * rust-lang.c (rust_value_print_inner): Remove TYPE_CODE_MEMBERPTR and TYPE_CODE_METHODPTR cases. * c-valprint.c (c_value_print_memberptr): Move to valprint.c. diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index fabdf45..b58e10b 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -295,19 +295,6 @@ f_value_print_inner (struct value *val, struct ui_file *stream, int recurse, } break; - case TYPE_CODE_INT: - if (options->format || options->output_format) - { - struct value_print_options opts = *options; - - opts.format = (options->format ? options->format - : options->output_format); - value_print_scalar_formatted (val, &opts, 0, stream); - } - else - value_print_scalar_formatted (val, options, 0, stream); - break; - case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: /* Starting from the Fortran 90 standard, Fortran supports derived @@ -365,6 +352,7 @@ f_value_print_inner (struct value *val, struct ui_file *stream, int recurse, } break; + case TYPE_CODE_INT: case TYPE_CODE_REF: case TYPE_CODE_FUNC: case TYPE_CODE_FLAGS: -- cgit v1.1