gdb: add type::code / type::set_code
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 7fbdcc4f68fb6742634d328bfd5e73ef26a87cb3..4b2993feb7635c8ae94f781c38ea9739872dbb52 100644 (file)
@@ -1880,7 +1880,7 @@ decode_base_type (struct coff_symbol *cs,
        {
          /* Anonymous structure type.  */
          type = coff_alloc_type (cs->c_symnum);
-         TYPE_CODE (type) = TYPE_CODE_STRUCT;
+         type->set_code (TYPE_CODE_STRUCT);
          TYPE_NAME (type) = NULL;
          INIT_CPLUS_SPECIFIC (type);
          TYPE_LENGTH (type) = 0;
@@ -1914,7 +1914,7 @@ decode_base_type (struct coff_symbol *cs,
                                        aux->x_sym.x_fcnary.x_fcn.x_endndx.l,
                                        objfile);
        }
-      TYPE_CODE (type) = TYPE_CODE_UNION;
+      type->set_code (TYPE_CODE_UNION);
       return type;
 
     case T_ENUM:
@@ -1922,7 +1922,7 @@ decode_base_type (struct coff_symbol *cs,
        {
          /* Anonymous enum type.  */
          type = coff_alloc_type (cs->c_symnum);
-         TYPE_CODE (type) = TYPE_CODE_ENUM;
+         type->set_code (TYPE_CODE_ENUM);
          TYPE_NAME (type) = NULL;
          TYPE_LENGTH (type) = 0;
          TYPE_FIELDS (type) = 0;
@@ -1990,7 +1990,7 @@ coff_read_struct_type (int index, int length, int lastsym,
   int done = 0;
 
   type = coff_alloc_type (index);
-  TYPE_CODE (type) = TYPE_CODE_STRUCT;
+  type->set_code (TYPE_CODE_STRUCT);
   INIT_CPLUS_SPECIFIC (type);
   TYPE_LENGTH (type) = length;
 
@@ -2121,7 +2121,7 @@ coff_read_enum_type (int index, int length, int lastsym,
     TYPE_LENGTH (type) = length;
   else /* Assume ints.  */
     TYPE_LENGTH (type) = gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT;
-  TYPE_CODE (type) = TYPE_CODE_ENUM;
+  type->set_code (TYPE_CODE_ENUM);
   TYPE_NFIELDS (type) = nsyms;
   TYPE_FIELDS (type) = (struct field *)
     TYPE_ALLOC (type, sizeof (struct field) * nsyms);
This page took 0.025138 seconds and 4 git commands to generate.