]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove TYPE_DATA_LOCATION_KIND
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 23 Oct 2025 19:07:00 +0000 (15:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 24 Oct 2025 15:16:47 +0000 (11:16 -0400)
Remove it in favor of accessing the dynamic_prop::kind method directly.

Change-Id: I8e5da4443b0df558286ce46eba5754c61f1b95db
Approved-By: Tom Tromey <tom@tromey.com>
gdb/gdbtypes.c
gdb/gdbtypes.h

index c396d6574d9acfac2c5ac525349afd94617519f3..ac622d54201c10cef406ef59b4afb4f23b699851 100644 (file)
@@ -2072,9 +2072,10 @@ is_dynamic_type_internal (struct type *type, bool top_level)
      but it makes sense in this context, because the point is to determine
      whether any part of the type needs to be resolved before it can
      be exploited.  */
-  if (type->dyn_prop (DYN_PROP_DATA_LOCATION) != NULL
-      && (TYPE_DATA_LOCATION_KIND (type) == PROP_LOCEXPR
-         || TYPE_DATA_LOCATION_KIND (type) == PROP_LOCLIST))
+  if (dynamic_prop *dyn_prop = type->dyn_prop (DYN_PROP_DATA_LOCATION);
+      (dyn_prop != nullptr
+       && (dyn_prop->kind () == PROP_LOCEXPR
+          || dyn_prop->kind () == PROP_LOCLIST)))
     return true;
 
   if (type->dyn_prop (DYN_PROP_ASSOCIATED))
index 8c397ef65746f9679320eb94cb08959f6e41ca6b..e0d0c3431c93b4990d8c82d4c7907800880543aa 100644 (file)
@@ -1934,8 +1934,6 @@ extern bool set_type_align (struct type *, ULONGEST);
 /* Property accessors for the type data location.  */
 #define TYPE_DATA_LOCATION_ADDR(thistype) \
   ((thistype)->dyn_prop (DYN_PROP_DATA_LOCATION)->const_val ())
-#define TYPE_DATA_LOCATION_KIND(thistype) \
-  ((thistype)->dyn_prop (DYN_PROP_DATA_LOCATION)->kind ())
 
 /* C++ */