diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-08-04 14:47:36 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-08-04 14:47:36 -0400 |
commit | 8a6d5e35fec07197dac1cf7d2a3e62d58567d4e3 (patch) | |
tree | 92a4213a047d269806fb8b8d000782ad619de8da | |
parent | 51d6067d78461449ed056cccdd5e1467d767fdd6 (diff) | |
download | gdb-8a6d5e35fec07197dac1cf7d2a3e62d58567d4e3.zip gdb-8a6d5e35fec07197dac1cf7d2a3e62d58567d4e3.tar.gz gdb-8a6d5e35fec07197dac1cf7d2a3e62d58567d4e3.tar.bz2 |
gdb: remove TYPE_DYN_PROP_KIND
Replace uses with calling the dynamic_prop::kind method directly.
gdb/ChangeLog:
* gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with
dynamic_prop::kind.
Change-Id: I78a3e2890f0b3e3950e9a19ad657b976cbb9610b
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/f-typeprint.c | 6 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 8 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 2 |
4 files changed, 12 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a2dbd41..da68b11 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca> + * gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with + dynamic_prop::kind. + +2020-08-04 Simon Marchi <simon.marchi@polymtl.ca> + * gdbtypes.h (TYPE_DYN_PROP_BATON): Remove. 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com> diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index 65ec93a..c3a0167 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c @@ -196,11 +196,11 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream, else if (type_not_allocated (type)) print_rank_only = true; else if ((TYPE_ASSOCIATED_PROP (type) - && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ASSOCIATED_PROP (type))) + && PROP_CONST != TYPE_ASSOCIATED_PROP (type)->kind ()) || (TYPE_ALLOCATED_PROP (type) - && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_ALLOCATED_PROP (type))) + && PROP_CONST != TYPE_ALLOCATED_PROP (type)->kind ()) || (TYPE_DATA_LOCATION (type) - && PROP_CONST != TYPE_DYN_PROP_KIND (TYPE_DATA_LOCATION (type)))) + && PROP_CONST != TYPE_DATA_LOCATION (type)->kind ())) { /* This case exist when we ptype a typename which has the dynamic properties but cannot be resolved as there is no object. */ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index e876488..4b1f40a 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4133,8 +4133,8 @@ type_not_allocated (const struct type *type) { struct dynamic_prop *prop = TYPE_ALLOCATED_PROP (type); - return (prop && TYPE_DYN_PROP_KIND (prop) == PROP_CONST - && !TYPE_DYN_PROP_ADDR (prop)); + return (prop != nullptr && prop->kind () == PROP_CONST + && !TYPE_DYN_PROP_ADDR (prop)); } /* Associated status of type TYPE. Return zero if type TYPE is associated. @@ -4145,8 +4145,8 @@ type_not_associated (const struct type *type) { struct dynamic_prop *prop = TYPE_ASSOCIATED_PROP (type); - return (prop && TYPE_DYN_PROP_KIND (prop) == PROP_CONST - && !TYPE_DYN_PROP_ADDR (prop)); + return (prop != nullptr && prop->kind () == PROP_CONST + && !TYPE_DYN_PROP_ADDR (prop)); } /* rank_one_type helper for when PARM's type code is TYPE_CODE_PTR. */ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 9ea2371..de54a5e 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1638,8 +1638,6 @@ extern bool set_type_align (struct type *, ULONGEST); /* Attribute accessors for dynamic properties. */ #define TYPE_DYN_PROP_ADDR(dynprop) \ (dynprop->const_val ()) -#define TYPE_DYN_PROP_KIND(dynprop) \ - (dynprop->kind ()) /* C++ */ |