aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
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/compile
parenta3e9fbf7e889228b091a7454cb5d862ddbc5b7ca (diff)
downloadbinutils-20aadb931ddf2c6c4f9209fffd1fbfda50215342.zip
binutils-20aadb931ddf2c6c4f9209fffd1fbfda50215342.tar.gz
binutils-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/compile')
-rw-r--r--gdb/compile/compile-cplus-types.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c
index ac27e83..a59d77b 100644
--- a/gdb/compile/compile-cplus-types.c
+++ b/gdb/compile/compile-cplus-types.c
@@ -73,9 +73,10 @@ compile_cplus_instance::decl_name (const char *natural)
static enum gcc_cp_symbol_kind
get_field_access_flag (const struct type *type, int num)
{
- if (TYPE_FIELD_PROTECTED (type, num))
+ field &fld = type->field (num);
+ if (fld.is_protected ())
return GCC_CP_ACCESS_PROTECTED;
- else if (TYPE_FIELD_PRIVATE (type, num))
+ else if (fld.is_private ())
return GCC_CP_ACCESS_PRIVATE;
/* GDB assumes everything else is public. */
@@ -583,7 +584,7 @@ compile_cplus_convert_struct_or_union_members
{
const char *field_name = type->field (i).name ();
- if (TYPE_FIELD_IGNORE (type, i)
+ if (type->field (i).is_ignored ()
|| type->field (i).is_artificial ())
continue;