}
type = type_allocator (objfile).new_type ();
- INIT_CPLUS_SPECIFIC (type);
+ if (cu->lang () == language_rust)
+ {
+ /* This is currently only needed for types that might be
+ slices. */
+ INIT_RUST_SPECIFIC (type);
+ }
+ else
+ INIT_CPLUS_SPECIFIC (type);
name = dwarf2_name (die, cu);
if (name != NULL)
print_gnat_stuff (type, spaces);
break;
+ case TYPE_SPECIFIC_RUST_STUFF:
+ gdb_printf ("%*srust\n", spaces, "");
+ break;
+
case TYPE_SPECIFIC_FLOATFORMAT:
gdb_printf ("%*sfloatformat ", spaces, "");
if (TYPE_FLOATFORMAT (type) == NULL
case TYPE_SPECIFIC_GNAT_STUFF:
INIT_GNAT_SPECIFIC (new_type);
break;
+ case TYPE_SPECIFIC_RUST_STUFF:
+ INIT_RUST_SPECIFIC (new_type);
+ break;
case TYPE_SPECIFIC_SELF_TYPE:
set_type_self_type (new_type,
copy_type_recursive (TYPE_SELF_TYPE (type),
TYPE_SPECIFIC_NONE,
TYPE_SPECIFIC_CPLUS_STUFF,
TYPE_SPECIFIC_GNAT_STUFF,
+ TYPE_SPECIFIC_RUST_STUFF,
TYPE_SPECIFIC_FLOATFORMAT,
/* Note: This is used by TYPE_CODE_FUNC and TYPE_CODE_METHOD. */
TYPE_SPECIFIC_FUNC,
/* * A discriminant telling us which field of the type_specific
union is being used for this type, if any. */
- ENUM_BITFIELD(type_specific_kind) type_specific_field : 3;
+ ENUM_BITFIELD(type_specific_kind) type_specific_field : 4;
/* * Number of fields described for this type. This field appears
at this location because it packs nicely here. */
|| (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_NONE \
&& (type)->is_fixed_instance ()))
+/* Currently there isn't any associated data -- this is just a
+ marker. */
+#define INIT_RUST_SPECIFIC(type) \
+ TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_RUST_STUFF
+
+#define HAVE_RUST_SPECIFIC(type) \
+ (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_RUST_STUFF)
+
#define INIT_FUNC_SPECIFIC(type) \
(TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FUNC, \
TYPE_MAIN_TYPE (type)->type_specific.func_stuff = (struct func_type *) \