]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gdbtypes.h
gdb: remove TYPE_DYN_PROP_ADDR
[thirdparty/binutils-gdb.git] / gdb / gdbtypes.h
index bf6b270515ff335de020cf54508902bc6aeaf47f..55a6dafb7e29fde1b6ee8a71c08fb27baeb26bb0 100644 (file)
@@ -1040,9 +1040,19 @@ struct type
   /* Get the bounds bounds of this type.  The type must be a range type.  */
   range_bounds *bounds () const
   {
-    gdb_assert (this->code () == TYPE_CODE_RANGE);
-
-    return this->main_type->flds_bnds.bounds;
+    switch (this->code ())
+      {
+      case TYPE_CODE_RANGE:
+       return this->main_type->flds_bnds.bounds;
+
+      case TYPE_CODE_ARRAY:
+      case TYPE_CODE_STRING:
+       return this->index_type ()->bounds ();
+
+      default:
+       gdb_assert_not_reached
+         ("type::bounds called on type with invalid code");
+      }
   }
 
   /* Set the bounds of this type.  The type must be a range type.  */
@@ -1625,21 +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_BATON(dynprop) \
-  dynprop->data.baton
-#define TYPE_DYN_PROP_ADDR(dynprop) \
-  (dynprop->const_val ())
-#define TYPE_DYN_PROP_KIND(dynprop) \
-  (dynprop->kind ())
-
-
-/* Accessors for struct range_bounds data attached to an array type's
-   index type.  */
-
-#define TYPE_ARRAY_BIT_STRIDE(arraytype) \
-  ((arraytype)->index_type ()->bounds ()->bit_stride ())
-
 /* C++ */
 
 #define TYPE_SELF_TYPE(thistype) internal_type_self_type (thistype)