aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-typeprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-21 10:36:23 -0600
committerTom Tromey <tromey@adacore.com>2023-11-21 14:52:05 -0700
commit20aadb931ddf2c6c4f9209fffd1fbfda50215342 (patch)
tree14d2c802fac360e1c54896b55f1cc7c652ee619d /gdb/p-typeprint.c
parenta3e9fbf7e889228b091a7454cb5d862ddbc5b7ca (diff)
downloadfsf-binutils-gdb-20aadb931ddf2c6c4f9209fffd1fbfda50215342.zip
fsf-binutils-gdb-20aadb931ddf2c6c4f9209fffd1fbfda50215342.tar.gz
fsf-binutils-gdb-20aadb931ddf2c6c4f9209fffd1fbfda50215342.tar.bz2
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 <simon.marchi@efficios.com> Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/p-typeprint.c')
-rw-r--r--gdb/p-typeprint.c6
1 files changed, 4 insertions, 2 deletions
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)
{