aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-08-04 14:47:39 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-08-04 14:47:39 -0400
commit66d6346b25658e74251d5f0f1647e59035177d9c (patch)
tree761ca77bfddd86388fb8f59ae9c866d4483c7702
parent8a6d5e35fec07197dac1cf7d2a3e62d58567d4e3 (diff)
downloadgdb-66d6346b25658e74251d5f0f1647e59035177d9c.zip
gdb-66d6346b25658e74251d5f0f1647e59035177d9c.tar.gz
gdb-66d6346b25658e74251d5f0f1647e59035177d9c.tar.bz2
gdb: remove TYPE_DYN_PROP_ADDR
Remove TYPE_DYN_PROP_ADDR, replacing its uses with calling dynamic_prop::const_val directly. gdb/ChangeLog: * gdbtypes.h (TYPE_DYN_PROP_ADDR): Remove, replace uses with dynamic_prop::const_val. Change-Id: Ie99b9cd9a0627488c1c69a75e57f020d34e392af
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbtypes.c4
-rw-r--r--gdb/gdbtypes.h4
3 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index da68b11..bcf3963 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_ADDR): Remove, replace uses with
+ dynamic_prop::const_val.
+
+2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
+
* gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with
dynamic_prop::kind.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 4b1f40a..0cd4b19 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4134,7 +4134,7 @@ type_not_allocated (const struct type *type)
struct dynamic_prop *prop = TYPE_ALLOCATED_PROP (type);
return (prop != nullptr && prop->kind () == PROP_CONST
- && !TYPE_DYN_PROP_ADDR (prop));
+ && prop->const_val () != 0);
}
/* Associated status of type TYPE. Return zero if type TYPE is associated.
@@ -4146,7 +4146,7 @@ type_not_associated (const struct type *type)
struct dynamic_prop *prop = TYPE_ASSOCIATED_PROP (type);
return (prop != nullptr && prop->kind () == PROP_CONST
- && !TYPE_DYN_PROP_ADDR (prop));
+ && prop->const_val () != 0);
}
/* 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 de54a5e..55a6daf 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1635,10 +1635,6 @@ extern bool set_type_align (struct type *, ULONGEST);
#define TYPE_ASSOCIATED_PROP(thistype) \
((thistype)->dyn_prop (DYN_PROP_ASSOCIATED))
-/* Attribute accessors for dynamic properties. */
-#define TYPE_DYN_PROP_ADDR(dynprop) \
- (dynprop->const_val ())
-
/* C++ */
#define TYPE_SELF_TYPE(thistype) internal_type_self_type (thistype)