]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove TYPE_DYN_PROP_ADDR
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 4 Aug 2020 18:47:39 +0000 (14:47 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 4 Aug 2020 18:47:39 +0000 (14:47 -0400)
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

gdb/ChangeLog
gdb/gdbtypes.c
gdb/gdbtypes.h

index da68b1194e8e7a81640dc175f3efd3773f94f2d3..bcf3963fec37662af0cee3ed4b6db32ffeecb91b 100644 (file)
@@ -1,3 +1,8 @@
+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
index 4b1f40ab77dc1e8857c2d2a8e24dd314aa5dfdc2..0cd4b194d98276d66d8189a5f24494c703eb4613 100644 (file)
@@ -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.  */
index de54a5ed73b62a437f9493aa264fbe538938f1cf..55a6dafb7e29fde1b6ee8a71c08fb27baeb26bb0 100644 (file)
@@ -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)