expression_context_block); }
| CLASS COMPLETE
{
- mark_completion_tag (TYPE_CODE_CLASS, "", 0);
+ mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
$$ = NULL;
}
| CLASS name COMPLETE
{
- mark_completion_tag (TYPE_CODE_CLASS, $2.ptr,
+ mark_completion_tag (TYPE_CODE_STRUCT, $2.ptr,
$2.length);
$$ = NULL;
}
/* Print nothing. */
}
else if (options->objectprint
- && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
+ && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
{
int is_ref = TYPE_CODE (type) == TYPE_CODE_REF;
if (!value_initialized (val))
fprintf_filtered (stream, " [uninitialized] ");
- if (options->objectprint && (TYPE_CODE (type) == TYPE_CODE_CLASS))
+ if (options->objectprint && (TYPE_CODE (type) == TYPE_CODE_STRUCT))
{
/* Attempt to determine real type of object. */
real_type = value_rtti_type (val, &full, &top, &using_enc);
}
/* Check public base type */
- if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{
if (BASETYPE_VIA_PUBLIC (type, i))
switch (TYPE_CODE (rtti_type))
{
- case TYPE_CODE_CLASS:
+ case TYPE_CODE_STRUCT:
break;
case TYPE_CODE_NAMESPACE:
/* chastain/2003-11-26: the symbol tables often contain fake
{ $$ = lookup_struct (copy_name ($2),
expression_context_block); }
| CLASS_KEYWORD COMPLETE
- { mark_completion_tag (TYPE_CODE_CLASS, "", 0);
+ { mark_completion_tag (TYPE_CODE_STRUCT, "", 0);
$$ = NULL; }
| CLASS_KEYWORD IdentifierExp COMPLETE
- { mark_completion_tag (TYPE_CODE_CLASS, $2.ptr, $2.length);
+ { mark_completion_tag (TYPE_CODE_STRUCT, $2.ptr, $2.length);
$$ = NULL; }
| STRUCT_KEYWORD IdentifierExp
{ $$ = lookup_struct (copy_name ($2),
}
else
{
- TYPE_CODE (type) = TYPE_CODE_CLASS;
+ TYPE_CODE (type) = TYPE_CODE_STRUCT;
}
if (cu->language == language_cplus && die->tag == DW_TAG_class_type)
get_user_print_options (&opts);
if (opts.objectprint && TYPE_TARGET_TYPE(type)
- && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
+ && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
{
real_type = value_rtti_indirect_type (arg1, &full, &top,
&using_enc);
}
break;
case TYPE_CODE_STRUCT:
- /* currently same as TYPE_CODE_CLASS. */
switch (TYPE_CODE (arg))
{
case TYPE_CODE_STRUCT:
TYPE_CODE_XMETHOD
};
-/* * For now allow source to use TYPE_CODE_CLASS for C++ classes, as
- an alias for TYPE_CODE_STRUCT. This is for DWARF, which has a
- distinct "class" attribute. Perhaps we should actually have a
- separate TYPE_CODE so that we can print "class" or "struct"
- depending on what the debug info said. It's not clear we should
- bother. */
-
-#define TYPE_CODE_CLASS TYPE_CODE_STRUCT
-
/* * Some constants representing each bit field in the main_type. See
the bit-field-specific macros, below, for documentation of each
constant in this enum. These enum values are only used with
known_type = value_type (v);
CHECK_TYPEDEF (known_type);
/* RTTI works only or class objects. */
- if (TYPE_CODE (known_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (known_type) != TYPE_CODE_STRUCT)
return NULL;
/* Plan on this changing in the future as i get around to setting
char *atsign;
/* We only have RTTI for class objects. */
- if (TYPE_CODE (values_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (values_type) != TYPE_CODE_STRUCT)
return NULL;
/* Java doesn't have RTTI following the C++ ABI. */
struct gdbarch *gdbarch;
/* Some simple sanity checks. */
- if (TYPE_CODE (values_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (values_type) != TYPE_CODE_STRUCT)
error (_("Only classes can have virtual functions."));
/* Determine architecture. */
/* We check for lval_memory because in the "typeid (type-id)" case,
the type is passed via a not_lval value object. */
- if (TYPE_CODE (type) == TYPE_CODE_CLASS
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT
&& value_lval_const (value) == lval_memory
&& gnuv3_dynamic_class (type))
{
/* We're only interested in things that can have methods. */
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
- && TYPE_CODE (type) != TYPE_CODE_CLASS
&& TYPE_CODE (type) != TYPE_CODE_UNION)
return 0;
struct field *field = tyscm_field_smob_to_field (f_smob);
struct type *type = tyscm_field_smob_containing_type (f_smob);
- if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
return scm_from_bool (f_smob->field_num < TYPE_N_BASECLASSES (type));
return SCM_BOOL_F;
}
if (((TYPE_CODE (type) == TYPE_CODE_PTR)
|| (TYPE_CODE (type) == TYPE_CODE_REF))
- && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
+ && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
{
struct value *target;
int was_pointer = TYPE_CODE (type) == TYPE_CODE_PTR;
type = lookup_reference_type (type);
}
}
- else if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
type = value_rtti_type (value, NULL, NULL, NULL);
else
{
{
/* Allow automatic dereference of classes. */
if ((TYPE_CODE (current_type) == TYPE_CODE_PTR)
- && (TYPE_CODE (TYPE_TARGET_TYPE (current_type)) == TYPE_CODE_CLASS)
- && (TYPE_CODE ($1) == TYPE_CODE_CLASS))
+ && (TYPE_CODE (TYPE_TARGET_TYPE (current_type)) == TYPE_CODE_STRUCT)
+ && (TYPE_CODE ($1) == TYPE_CODE_STRUCT))
write_exp_elt_opcode (pstate, UNOP_IND);
}
write_exp_elt_opcode (pstate, UNOP_CAST);
&& expout_last_struct == -1);
gdb_assert (tag == TYPE_CODE_UNION
|| tag == TYPE_CODE_STRUCT
- || tag == TYPE_CODE_CLASS
|| tag == TYPE_CODE_ENUM);
expout_tag_completion_type = tag;
expout_completion_name = xmalloc (length + 1);
goto failarg;
Py_DECREF (arg);
- if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
arg = field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False;
else
arg = Py_False;
if (((TYPE_CODE (type) == TYPE_CODE_PTR)
|| (TYPE_CODE (type) == TYPE_CODE_REF))
- && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
+ && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
{
struct value *target;
int was_pointer = TYPE_CODE (type) == TYPE_CODE_PTR;
type = lookup_reference_type (type);
}
}
- else if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
type = value_rtti_type (val, NULL, NULL, NULL);
else
{
{
gdb_assert (code == TYPE_CODE_UNION
|| code == TYPE_CODE_STRUCT
- || code == TYPE_CODE_CLASS
|| code == TYPE_CODE_ENUM);
return current_language->la_make_symbol_completion_list (text, word, code);
}
{
if (((TYPE_CODE (type) == TYPE_CODE_PTR)
|| (TYPE_CODE (type) == TYPE_CODE_REF))
- && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
+ && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRUCT))
real_type = value_rtti_indirect_type (val, &full, &top, &using_enc);
- else if (TYPE_CODE (type) == TYPE_CODE_CLASS)
+ else if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
real_type = value_rtti_type (val, &full, &top, &using_enc);
}
&& TYPE_CODE (resolved_type) != TYPE_CODE_REF)
error (_("Argument to dynamic_cast must be a pointer or reference type"));
if (TYPE_CODE (TYPE_TARGET_TYPE (resolved_type)) != TYPE_CODE_VOID
- && TYPE_CODE (TYPE_TARGET_TYPE (resolved_type)) != TYPE_CODE_CLASS)
+ && TYPE_CODE (TYPE_TARGET_TYPE (resolved_type)) != TYPE_CODE_STRUCT)
error (_("Argument to dynamic_cast must be pointer to class or `void *'"));
class_type = check_typedef (TYPE_TARGET_TYPE (resolved_type));
if (TYPE_CODE (arg_type) == TYPE_CODE_PTR)
{
arg_type = check_typedef (TYPE_TARGET_TYPE (arg_type));
- if (TYPE_CODE (arg_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT)
error (_("Argument to dynamic_cast does "
"not have pointer to class type"));
}
}
else
{
- if (TYPE_CODE (arg_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT)
error (_("Argument to dynamic_cast does not have class type"));
}