forked from Imagelibrary/binutils-gdb
Introduce TYPE_SPECIFIC_RUST_STUFF
This adds a new enum constant, TYPE_SPECIFIC_RUST_STUFF, and changes the DWARF reader to set this on Rust types. This will be used as a flag in a later patch. Note that the size of the type_specific_field bitfield had to be increased. I checked that this did not impact the size of main_type.
This commit is contained in:
@@ -501,6 +501,7 @@ enum type_specific_kind
|
||||
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,
|
||||
@@ -856,7 +857,7 @@ struct main_type
|
||||
/* * 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. */
|
||||
@@ -1833,6 +1834,14 @@ extern void allocate_gnat_aux_type (struct type *);
|
||||
|| (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 *) \
|
||||
|
||||
Reference in New Issue
Block a user