Move die_type_hash to dwarf2_per_objfile
[deliverable/binutils-gdb.git] / gdb / stabsread.c
index daf88c851c72a9110c3b00a7590987b01268fabf..179a0fb610bc8f9b2d1330ec924db8b5875f1999 100644 (file)
@@ -986,8 +986,9 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
            }
 
          /* Allocate parameter information fields and fill them in.  */
-         TYPE_FIELDS (ftype) = (struct field *)
-           TYPE_ALLOC (ftype, nsemi * sizeof (struct field));
+         ftype->set_fields
+           ((struct field *)
+            TYPE_ALLOC (ftype, nsemi * sizeof (struct field)));
          while (*p++ == ';')
            {
              struct type *ptype;
@@ -1836,10 +1837,10 @@ again:
             && arg_types->type->code () == TYPE_CODE_VOID)
           num_args = 0;
 
-        TYPE_FIELDS (func_type)
-          = (struct field *) TYPE_ALLOC (func_type,
-                                         num_args * sizeof (struct field));
-        memset (TYPE_FIELDS (func_type), 0, num_args * sizeof (struct field));
+       func_type->set_fields
+         ((struct field *) TYPE_ALLOC (func_type,
+                                       num_args * sizeof (struct field)));
+        memset (func_type->fields (), 0, num_args * sizeof (struct field));
         {
           int i;
           struct type_list *t;
@@ -3309,9 +3310,10 @@ attach_fields_to_type (struct stab_field_info *fip, struct type *type,
      array of fields, and create blank visibility bitfields if necessary.  */
 
   type->set_num_fields (nfields);
-  TYPE_FIELDS (type) = (struct field *)
-    TYPE_ALLOC (type, sizeof (struct field) * nfields);
-  memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields);
+  type->set_fields
+    ((struct field *)
+     TYPE_ALLOC (type, sizeof (struct field) * nfields));
+  memset (type->fields (), 0, sizeof (struct field) * nfields);
 
   if (non_public_fields)
     {
@@ -3337,7 +3339,7 @@ attach_fields_to_type (struct stab_field_info *fip, struct type *type,
 
   while (nfields-- > 0)
     {
-      TYPE_FIELD (type, nfields) = fip->list->field;
+      type->field (nfields) = fip->list->field;
       switch (fip->list->visibility)
        {
        case VISIBILITY_PRIVATE:
@@ -3655,9 +3657,10 @@ read_enum_type (const char **pp, struct type *type,
   if (unsigned_enum)
     TYPE_UNSIGNED (type) = 1;
   type->set_num_fields (nsyms);
-  TYPE_FIELDS (type) = (struct field *)
-    TYPE_ALLOC (type, sizeof (struct field) * nsyms);
-  memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nsyms);
+  type->set_fields
+    ((struct field *)
+     TYPE_ALLOC (type, sizeof (struct field) * nsyms));
+  memset (type->fields (), 0, sizeof (struct field) * nsyms);
 
   /* Find the symbols for the values and put them into the type.
      The symbols can be found in the symlist that we put them on
@@ -3678,7 +3681,7 @@ read_enum_type (const char **pp, struct type *type,
 
          SYMBOL_TYPE (xsym) = type;
          TYPE_FIELD_NAME (type, n) = xsym->linkage_name ();
-         SET_FIELD_ENUMVAL (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
+         SET_FIELD_ENUMVAL (type->field (n), SYMBOL_VALUE (xsym));
          TYPE_FIELD_BITSIZE (type, n) = 0;
        }
       if (syms == osyms)
This page took 0.023878 seconds and 4 git commands to generate.