diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-23 23:47:08 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-10-29 16:44:21 -0400 |
commit | 5d2038e3f55df1621c69d005446a09f505c00886 (patch) | |
tree | 59e9aac528e10987b38976d7b769b183e102e6fa | |
parent | 3a543e211e963c6ff131e9275524d4632309f15b (diff) | |
download | gdb-5d2038e3f55df1621c69d005446a09f505c00886.zip gdb-5d2038e3f55df1621c69d005446a09f505c00886.tar.gz gdb-5d2038e3f55df1621c69d005446a09f505c00886.tar.bz2 |
gdb: remove FIELD_ENUMVAL macro
Remove FIELD_ENUMVAL, replace its uses with field::loc_enumval.
Change-Id: Id4861cee91a8bb583a9836f1aa5da0a320fbf4d9
-rw-r--r-- | gdb/gdbtypes.c | 2 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 3 | ||||
-rw-r--r-- | gdb/guile/scm-type.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 659123a..adaaa30 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4215,7 +4215,7 @@ check_types_equal (struct type *type1, struct type *type2, return false; break; case FIELD_LOC_KIND_ENUMVAL: - if (FIELD_ENUMVAL (*field1) != FIELD_ENUMVAL (*field2)) + if (field1->loc_enumval () != field2->loc_enumval ()) return false; /* Don't compare types of enum fields, because they don't have a type. */ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 39b5fcf..a84b3bc 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2125,7 +2125,6 @@ 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_ENUMVAL(thisfld) ((thisfld).loc_enumval ()) #define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc_physname ()) #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc_physaddr ()) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc_dwarf_block ()) @@ -2134,7 +2133,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define TYPE_FIELD_LOC_KIND(thistype, n) ((thistype)->field (n).loc_kind ()) #define TYPE_FIELD_BITPOS(thistype, n) ((thistype)->field (n).loc_bitpos ()) -#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL ((thistype)->field (n)) +#define TYPE_FIELD_ENUMVAL(thistype, n) ((thistype)->field (n).loc_enumval ()) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME ((thistype)->field (n)) #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR ((thistype)->field (n)) #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK ((thistype)->field (n)) diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index bd8c113..eef50de 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -1166,7 +1166,7 @@ gdbscm_field_enumval (SCM self) SCM_ASSERT_TYPE (type->code () == TYPE_CODE_ENUM, self, SCM_ARG1, FUNC_NAME, _("enum type")); - return scm_from_long (FIELD_ENUMVAL (*field)); + return scm_from_long (field->loc_enumval ()); } /* (field-bitpos <gdb:field>) -> integer |