From: Simon Marchi Date: Thu, 31 Aug 2023 15:46:23 +0000 (-0400) Subject: gdb: remove FIELD_ARTIFICIAL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c0f749351bb8f46bd6a37f9a36be8b8174f689d;p=binutils-gdb.git gdb: remove FIELD_ARTIFICIAL Replace uses with field::is_artificial. Change-Id: I599616fdd9f4b6d044de492e8151aa6130725cd1 Approved-By: Tom Tromey --- diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 416f63bacf5..57b2c09be8b 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -286,7 +286,7 @@ cp_type_print_method_args (struct type *mtype, const char *prefix, struct field arg = args[i]; /* Skip any artificial arguments. */ - if (FIELD_ARTIFICIAL (arg)) + if (arg.is_artificial ()) continue; if (printed_args > 0) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index ca168b31529..076a0817b26 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4243,7 +4243,7 @@ check_types_equal (struct type *type1, struct type *type2, const struct field *field1 = &type1->field (i); const struct field *field2 = &type2->field (i); - if (FIELD_ARTIFICIAL (*field1) != FIELD_ARTIFICIAL (*field2) + if (field1->is_artificial () != field2->is_artificial () || FIELD_BITSIZE (*field1) != FIELD_BITSIZE (*field2) || field1->loc_kind () != field2->loc_kind ()) return false; diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 43263a90714..9aa4a5c8a85 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1923,10 +1923,9 @@ extern void set_type_vptr_basetype (struct type *, struct type *); (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \ : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index))) -#define FIELD_ARTIFICIAL(thisfld) ((thisfld).is_artificial ()) #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize) -#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->field (n)) +#define TYPE_FIELD_ARTIFICIAL(thistype, n) ((thistype)->field (n).is_artificial ()) #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE((thistype)->field (n)) #define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE((thistype)->field (n))!=0) diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 033b800d8b0..3b0a2752418 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -1213,7 +1213,7 @@ gdbscm_field_artificial_p (SCM self) = tyscm_get_field_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME); struct field *field = tyscm_field_smob_to_field (f_smob); - return scm_from_bool (FIELD_ARTIFICIAL (*field)); + return scm_from_bool (field->is_artificial ()); } /* (field-baseclass? ) -> boolean