Remove leftover references to dwarf2_per_cu_data::dwarf2_per_objfile
[deliverable/binutils-gdb.git] / gdb / ada-typeprint.c
index 0ae8f9314514662277fa0d4bb6edd3c47124a594..2021edf011182e2b587126ac305105d81d66ed86 100644 (file)
@@ -180,8 +180,8 @@ print_range (struct type *type, struct ui_file *stream,
       break;
     default:
       fprintf_filtered (stream, "%.*s",
-                       ada_name_prefix_len (TYPE_NAME (type)),
-                       TYPE_NAME (type));
+                       ada_name_prefix_len (type->name ()),
+                       type->name ());
       break;
     }
 }
@@ -267,7 +267,7 @@ print_range_type (struct type *raw_type, struct ui_file *stream,
   const char *subtype_info;
 
   gdb_assert (raw_type != NULL);
-  name = TYPE_NAME (raw_type);
+  name = raw_type->name ();
   gdb_assert (name != NULL);
 
   if (raw_type->code () == TYPE_CODE_RANGE)
@@ -312,7 +312,7 @@ print_range_type (struct type *raw_type, struct ui_file *stream,
 static void
 print_enum_type (struct type *type, struct ui_file *stream)
 {
-  int len = TYPE_NFIELDS (type);
+  int len = type->num_fields ();
   int i;
   LONGEST lastval;
 
@@ -342,9 +342,9 @@ print_enum_type (struct type *type, struct ui_file *stream)
 /* Print representation of Ada fixed-point type TYPE on STREAM.  */
 
 static void
-print_fixed_point_type (struct type *type, struct ui_file *stream)
+print_gnat_encoded_fixed_point_type (struct type *type, struct ui_file *stream)
 {
-  struct value *delta = ada_delta (type);
+  struct value *delta = gnat_encoded_fixed_point_delta (type);
   struct value *small = ada_scaling_factor (type);
 
   if (delta == nullptr)
@@ -417,7 +417,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show,
        {
          int k;
 
-         n_indices = TYPE_NFIELDS (range_desc_type);
+         n_indices = range_desc_type->num_fields ();
          for (k = 0, arr_type = type;
               k < n_indices;
               k += 1, arr_type = TYPE_TARGET_TYPE (arr_type))
@@ -563,7 +563,7 @@ print_variant_clauses (struct type *type, int field_num,
   if (par_type != NULL)
     var_type = par_type;
 
-  for (i = 0; i < TYPE_NFIELDS (var_type); i += 1)
+  for (i = 0; i < var_type->num_fields (); i += 1)
     {
       fprintf_filtered (stream, "\n%*swhen ", level + 4, "");
       if (print_choices (var_type, i, stream, discr_type))
@@ -786,13 +786,13 @@ print_record_field_types (struct type *type, struct type *outer_type,
        }
       gdb_assert (prop->kind == PROP_VARIANT_PARTS);
       print_record_field_types_dynamic (*prop->data.variant_parts,
-                                       0, TYPE_NFIELDS (type),
+                                       0, type->num_fields (),
                                        type, stream, show, level, flags);
-      return TYPE_NFIELDS (type);
+      return type->num_fields ();
     }
 
   return print_selected_record_field_types (type, outer_type,
-                                           0, TYPE_NFIELDS (type) - 1,
+                                           0, type->num_fields () - 1,
                                            stream, show, level, flags);
 }
    
@@ -863,7 +863,7 @@ print_unchecked_union_type (struct type *type, struct ui_file *stream,
 {
   if (show < 0)
     fprintf_filtered (stream, "record (?) is ... end record");
-  else if (TYPE_NFIELDS (type) == 0)
+  else if (type->num_fields () == 0)
     fprintf_filtered (stream, "record (?) is null; end record");
   else
     {
@@ -871,7 +871,7 @@ print_unchecked_union_type (struct type *type, struct ui_file *stream,
 
       fprintf_filtered (stream, "record (?) is\n%*scase ? is", level + 4, "");
 
-      for (i = 0; i < TYPE_NFIELDS (type); i += 1)
+      for (i = 0; i < type->num_fields (); i += 1)
        {
          fprintf_filtered (stream, "\n%*swhen ? =>\n%*s", level + 8, "",
                            level + 12, "");
@@ -895,7 +895,7 @@ static void
 print_func_type (struct type *type, struct ui_file *stream, const char *name,
                 const struct type_print_options *flags)
 {
-  int i, len = TYPE_NFIELDS (type);
+  int i, len = type->num_fields ();
 
   if (TYPE_TARGET_TYPE (type) != NULL
       && TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_VOID)
@@ -1012,8 +1012,8 @@ ada_print_type (struct type *type0, const char *varstring,
        fprintf_filtered (stream, "(false, true)");
        break;
       case TYPE_CODE_INT:
-       if (ada_is_fixed_point_type (type))
-         print_fixed_point_type (type, stream);
+       if (ada_is_gnat_encoded_fixed_point_type (type))
+         print_gnat_encoded_fixed_point_type (type, stream);
        else
          {
            const char *name = ada_type_name (type);
@@ -1030,8 +1030,8 @@ ada_print_type (struct type *type0, const char *varstring,
          }
        break;
       case TYPE_CODE_RANGE:
-       if (ada_is_fixed_point_type (type))
-         print_fixed_point_type (type, stream);
+       if (ada_is_gnat_encoded_fixed_point_type (type))
+         print_gnat_encoded_fixed_point_type (type, stream);
        else if (ada_is_modular_type (type))
          fprintf_filtered (stream, "mod %s", 
                            int_string (ada_modulus (type), 10, 0, 0, 1));
This page took 0.025886 seconds and 4 git commands to generate.