From 33d16dd987d16fe1eb289853e5a444192bb31d9e Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 30 Aug 2021 11:49:49 -0400 Subject: gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the call sites to use field::name directly. Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6 --- gdb/cp-valprint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/cp-valprint.c') diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 7442ec0..f6969a5 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -231,12 +231,12 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, { fputs_filtered ("static ", stream); fprintf_symbol_filtered (stream, - TYPE_FIELD_NAME (type, i), + type->field (i).name (), current_language->la_language, DMGL_PARAMS | DMGL_ANSI); } else - fputs_styled (TYPE_FIELD_NAME (type, i), + fputs_styled (type->field (i).name (), variable_name_style.style (), stream); annotate_field_name_end (); @@ -246,7 +246,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream, /* Do not print leading '=' in case of anonymous unions. */ - if (strcmp (TYPE_FIELD_NAME (type, i), "")) + if (strcmp (type->field (i).name (), "")) fputs_filtered (" = ", stream); else { @@ -710,7 +710,7 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type, else c_type_print_base (self_type, stream, 0, 0, &type_print_raw_options); fprintf_filtered (stream, "::"); - fputs_styled (TYPE_FIELD_NAME (self_type, fieldno), + fputs_styled (self_type->field (fieldno).name (), variable_name_style.style (), stream); } else -- cgit v1.1