gdb: remove TYPE_CODE macro
[deliverable/binutils-gdb.git] / gdb / compile / compile-object-load.c
index be4fa76714209dc7f8eeb55c6fba195afc652711..55a46a31dba3a31b0b2bf3401f22d1b13d6836f4 100644 (file)
@@ -452,7 +452,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
     error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
   gdb_ptr_type = SYMBOL_TYPE (gdb_ptr_type_sym);
   gdb_ptr_type = check_typedef (gdb_ptr_type);
-  if (TYPE_CODE (gdb_ptr_type) != TYPE_CODE_PTR)
+  if (gdb_ptr_type->code () != TYPE_CODE_PTR)
     error (_("Type of \"%s\" is not a pointer"), COMPILE_I_EXPR_PTR_TYPE);
   gdb_type_from_ptr = check_typedef (TYPE_TARGET_TYPE (gdb_ptr_type));
 
@@ -464,14 +464,14 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
       return gdb_type;
     }
 
-  if (TYPE_CODE (gdb_type) != TYPE_CODE_PTR)
+  if (gdb_type->code () != TYPE_CODE_PTR)
     error (_("Invalid type code %d of symbol \"%s\" "
             "in compiled module \"%s\"."),
-          TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_VAL,
+          gdb_type_from_ptr->code (), COMPILE_I_EXPR_VAL,
           objfile_name (objfile));
   
   retval = gdb_type_from_ptr;
-  switch (TYPE_CODE (gdb_type_from_ptr))
+  switch (gdb_type_from_ptr->code ())
     {
     case TYPE_CODE_ARRAY:
       gdb_type_from_ptr = TYPE_TARGET_TYPE (gdb_type_from_ptr);
@@ -481,7 +481,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
     default:
       error (_("Invalid type code %d of symbol \"%s\" "
               "in compiled module \"%s\"."),
-            TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_PTR_TYPE,
+            gdb_type_from_ptr->code (), COMPILE_I_EXPR_PTR_TYPE,
             objfile_name (objfile));
     }
   if (!types_deeply_equal (gdb_type_from_ptr,
@@ -509,17 +509,17 @@ get_regs_type (struct symbol *func_sym, struct objfile *objfile)
     return NULL;
 
   regsp_type = check_typedef (TYPE_FIELD_TYPE (func_type, 0));
-  if (TYPE_CODE (regsp_type) != TYPE_CODE_PTR)
+  if (regsp_type->code () != TYPE_CODE_PTR)
     error (_("Invalid type code %d of first parameter of function \"%s\" "
             "in compiled module \"%s\"."),
-          TYPE_CODE (regsp_type), GCC_FE_WRAPPER_FUNCTION,
+          regsp_type->code (), GCC_FE_WRAPPER_FUNCTION,
           objfile_name (objfile));
 
   regs_type = check_typedef (TYPE_TARGET_TYPE (regsp_type));
-  if (TYPE_CODE (regs_type) != TYPE_CODE_STRUCT)
+  if (regs_type->code () != TYPE_CODE_STRUCT)
     error (_("Invalid type code %d of dereferenced first parameter "
             "of function \"%s\" in compiled module \"%s\"."),
-          TYPE_CODE (regs_type), GCC_FE_WRAPPER_FUNCTION,
+          regs_type->code (), GCC_FE_WRAPPER_FUNCTION,
           objfile_name (objfile));
 
   return regs_type;
@@ -555,10 +555,10 @@ store_regs (struct type *regs_type, CORE_ADDR regs_base)
               reg_name, pulongest (reg_bitpos), pulongest (reg_bitsize));
       reg_offset = reg_bitpos / 8;
 
-      if (TYPE_CODE (reg_type) != TYPE_CODE_INT
-         && TYPE_CODE (reg_type) != TYPE_CODE_PTR)
+      if (reg_type->code () != TYPE_CODE_INT
+         && reg_type->code () != TYPE_CODE_PTR)
        error (_("Invalid register \"%s\" type code %d"), reg_name,
-              TYPE_CODE (reg_type));
+              reg_type->code ());
 
       regnum = compile_register_name_demangle (gdbarch, reg_name);
 
@@ -646,10 +646,10 @@ compile_object_load (const compile_file_names &file_names,
     error (_("Cannot find function \"%s\" in compiled module \"%s\"."),
           GCC_FE_WRAPPER_FUNCTION, objfile_name (objfile));
   func_type = SYMBOL_TYPE (func_sym);
-  if (TYPE_CODE (func_type) != TYPE_CODE_FUNC)
+  if (func_type->code () != TYPE_CODE_FUNC)
     error (_("Invalid type code %d of function \"%s\" in compiled "
             "module \"%s\"."),
-          TYPE_CODE (func_type), GCC_FE_WRAPPER_FUNCTION,
+          func_type->code (), GCC_FE_WRAPPER_FUNCTION,
           objfile_name (objfile));
 
   switch (scope)
This page took 0.026013 seconds and 4 git commands to generate.