[gdb/testsuite] Fix incorrect string concat in jit-elf.exp
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index 1444351c518f03c1f1700bf25ab1d37064221eb6..3f829241f0530cda6d6b0e17fac4190f5a04c175 100644 (file)
@@ -2204,7 +2204,7 @@ resolve_dynamic_array_or_string (struct type *type,
     {
       if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
        {
-         remove_dyn_prop (DYN_PROP_BYTE_STRIDE, type);
+         type->remove_dyn_prop (DYN_PROP_BYTE_STRIDE);
          bit_stride = (unsigned int) (value * 8);
        }
       else
@@ -2621,7 +2621,7 @@ resolve_dynamic_type_internal (struct type *type,
   if (type_length.has_value ())
     {
       TYPE_LENGTH (resolved_type) = *type_length;
-      remove_dyn_prop (DYN_PROP_BYTE_SIZE, resolved_type);
+      resolved_type->remove_dyn_prop (DYN_PROP_BYTE_SIZE);
     }
 
   /* Resolve data_location attribute.  */
@@ -2654,7 +2654,7 @@ resolve_dynamic_type (struct type *type,
 dynamic_prop *
 type::dyn_prop (dynamic_prop_node_kind prop_kind) const
 {
-  dynamic_prop_list *node = TYPE_DYN_PROP_LIST (this);
+  dynamic_prop_list *node = this->main_type->dyn_prop_list;
 
   while (node != NULL)
     {
@@ -2678,32 +2678,31 @@ type::add_dyn_prop (dynamic_prop_node_kind prop_kind, dynamic_prop prop)
                 struct dynamic_prop_list);
   temp->prop_kind = prop_kind;
   temp->prop = prop;
-  temp->next = TYPE_DYN_PROP_LIST (this);
+  temp->next = this->main_type->dyn_prop_list;
 
-  TYPE_DYN_PROP_LIST (this) = temp;
+  this->main_type->dyn_prop_list = temp;
 }
 
-/* Remove dynamic property from TYPE in case it exists.  */
+/* See gdbtypes.h.  */
 
 void
-remove_dyn_prop (enum dynamic_prop_node_kind prop_kind,
-                 struct type *type)
+type::remove_dyn_prop (dynamic_prop_node_kind kind)
 {
   struct dynamic_prop_list *prev_node, *curr_node;
 
-  curr_node = TYPE_DYN_PROP_LIST (type);
+  curr_node = this->main_type->dyn_prop_list;
   prev_node = NULL;
 
   while (NULL != curr_node)
     {
-      if (curr_node->prop_kind == prop_kind)
+      if (curr_node->prop_kind == kind)
        {
          /* Update the linked list but don't free anything.
             The property was allocated on objstack and it is not known
             if we are on top of it.  Nevertheless, everything is released
             when the complete objstack is freed.  */
          if (NULL == prev_node)
-           TYPE_DYN_PROP_LIST (type) = curr_node->next;
+           this->main_type->dyn_prop_list = curr_node->next;
          else
            prev_node->next = curr_node->next;
 
@@ -5351,10 +5350,10 @@ copy_type_recursive (struct objfile *objfile,
       *TYPE_RANGE_DATA (new_type) = *TYPE_RANGE_DATA (type);
     }
 
-  if (TYPE_DYN_PROP_LIST (type) != NULL)
-    TYPE_DYN_PROP_LIST (new_type)
+  if (type->main_type->dyn_prop_list != NULL)
+    new_type->main_type->dyn_prop_list
       = copy_dynamic_prop_list (&objfile->objfile_obstack,
-                               TYPE_DYN_PROP_LIST (type));
+                               type->main_type->dyn_prop_list);
 
 
   /* Copy pointers to other types.  */
@@ -5419,10 +5418,10 @@ copy_type (const struct type *type)
   TYPE_LENGTH (new_type) = TYPE_LENGTH (type);
   memcpy (TYPE_MAIN_TYPE (new_type), TYPE_MAIN_TYPE (type),
          sizeof (struct main_type));
-  if (TYPE_DYN_PROP_LIST (type) != NULL)
-    TYPE_DYN_PROP_LIST (new_type)
+  if (type->main_type->dyn_prop_list != NULL)
+    new_type->main_type->dyn_prop_list
       = copy_dynamic_prop_list (&TYPE_OBJFILE (type) -> objfile_obstack,
-                               TYPE_DYN_PROP_LIST (type));
+                               type->main_type->dyn_prop_list);
 
   return new_type;
 }
This page took 0.028938 seconds and 4 git commands to generate.