/* This shouldn't happen since we are not attempting to
loop over user input. This name is generated by GDB
from debug info. */
- internal_error (__FILE__, __LINE__,
- _("malformed TYPE_NAME during parsing"));
+ internal_error (_("malformed TYPE_NAME during parsing"));
}
}
}
compile_cplus_convert_reference (compile_cplus_instance *instance,
struct type *type)
{
- gcc_type target = instance->convert_type (TYPE_TARGET_TYPE (type));
+ gcc_type target = instance->convert_type (type->target_type ());
enum gcc_cp_ref_qualifiers quals = GCC_CP_REF_QUAL_NONE;
switch (type->code ())
compile_cplus_convert_pointer (compile_cplus_instance *instance,
struct type *type)
{
- gcc_type target = instance->convert_type (TYPE_TARGET_TYPE (type));
+ gcc_type target = instance->convert_type (type->target_type ());
return instance->convert_pointer_base (target);
}
struct type *type)
{
struct type *range = type->index_type ();
- gcc_type element_type = instance->convert_type (TYPE_TARGET_TYPE (type));
+ gcc_type element_type = instance->convert_type (type->target_type ());
if (range->bounds ()->low.kind () != PROP_CONST)
{
| get_field_access_flag (type, i);
if (bitsize == 0)
- bitsize = 8 * TYPE_LENGTH (type->field (i).type ());
+ bitsize = 8 * type->field (i).type ()->length ();
instance->plugin ().build_field
(field_name, field_type, field_flags, bitsize,
gcc_type class_type = instance->convert_type (containing_class);
gcc_type member_type
- = instance->convert_type (TYPE_TARGET_TYPE (type));
+ = instance->convert_type (type->target_type ());
return instance->plugin ().build_pointer_to_member_type
(class_type, member_type);
const char *filename = sym.symbol->symtab ()->filename;
unsigned int line = sym.symbol->line ();
- CORE_ADDR address = BLOCK_START (sym.symbol->value_block ());
+ CORE_ADDR address = sym.symbol->value_block()->start ();
const char *kind;
if (TYPE_FN_FIELD_STATIC_P (methods, j))
compile_cplus_convert_struct_or_union_members (instance, type, result);
/* All finished. */
- instance->plugin ().finish_class_type (name.get (), TYPE_LENGTH (type));
+ instance->plugin ().finish_class_type (name.get (), type->length ());
/* Pop all scopes. */
instance->leave_scope ();
gcc_type int_type
= instance->plugin ().get_int_type (type->is_unsigned (),
- TYPE_LENGTH (type), nullptr);
+ type->length (), nullptr);
gcc_type result
= instance->plugin ().start_enum_type (name.get (), int_type,
GCC_CP_SYMBOL_ENUM | nested_access
struct type *type, bool strip_artificial)
{
int is_varargs = type->has_varargs ();
- struct type *target_type = TYPE_TARGET_TYPE (type);
+ struct type *target_type = type->target_type ();
/* Functions with no debug info have no return type. Ideally we'd
want to fallback to the type of the cast just before the
{
if (type->has_no_signedness ())
{
- gdb_assert (TYPE_LENGTH (type) == 1);
+ gdb_assert (type->length () == 1);
return instance->plugin ().get_char_type ();
}
return instance->plugin ().get_int_type
- (type->is_unsigned (), TYPE_LENGTH (type), type->name ());
+ (type->is_unsigned (), type->length (), type->name ());
}
/* Convert a floating-point type to its gcc representation. */
struct type *type)
{
return instance->plugin ().get_float_type
- (TYPE_LENGTH (type), type->name ());
+ (type->length (), type->name ());
}
/* Convert the 'void' type to its gcc representation. */
compile_cplus_convert_complex (compile_cplus_instance *instance,
struct type *type)
{
- gcc_type base = instance->convert_type (TYPE_TARGET_TYPE (type));
+ gcc_type base = instance->convert_type (type->target_type ());
return instance->plugin ().build_complex_type (base);
}