From 20aadb931ddf2c6c4f9209fffd1fbfda50215342 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 21 Sep 2023 10:36:23 -0600 Subject: Remove some type field accessor macros This removes TYPE_FIELD_PRIVATE, TYPE_FIELD_PROTECTED, TYPE_FIELD_IGNORE, and TYPE_FIELD_VIRTUAL. In c-varobj.c, match_accessibility can be removed entirely now. Note that the comment before this function was incorrect. Acked-By: Simon Marchi Reviewed-by: Keith Seitz --- gdb/p-typeprint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/p-typeprint.c') diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index 41058a8..b5d6626 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -486,7 +486,9 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int if (HAVE_CPLUS_STRUCT (type)) { - if (TYPE_FIELD_PROTECTED (type, i)) + field &fld = type->field (i); + + if (fld.is_protected ()) { if (section_type != s_protected) { @@ -495,7 +497,7 @@ pascal_language::type_print_base (struct type *type, struct ui_file *stream, int level + 2, ""); } } - else if (TYPE_FIELD_PRIVATE (type, i)) + else if (fld.is_private ()) { if (section_type != s_private) { -- cgit v1.1