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
+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.
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. */
{
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.
{
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. */
/* Attribute accessors for dynamic properties. */
#define TYPE_DYN_PROP_ADDR(dynprop) \
(dynprop->const_val ())
-#define TYPE_DYN_PROP_KIND(dynprop) \
- (dynprop->kind ())
/* C++ */