diff options
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r-- | gdb/dwarf2/read.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 27bf40a..4809202 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -9325,7 +9325,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile) /* Smash this type to be a structure type. We have to do this because the type has already been recorded. */ - TYPE_CODE (type) = TYPE_CODE_STRUCT; + type->set_code (TYPE_CODE_STRUCT); TYPE_NFIELDS (type) = 3; /* Save the field we care about. */ struct field saved_field = TYPE_FIELD (type, 0); @@ -9368,7 +9368,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile) { /* Smash this type to be a structure type. We have to do this because the type has already been recorded. */ - TYPE_CODE (type) = TYPE_CODE_STRUCT; + type->set_code (TYPE_CODE_STRUCT); struct type *field_type = TYPE_FIELD_TYPE (type, 0); const char *variant_name @@ -9415,7 +9415,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile) /* Smash this type to be a structure type. We have to do this because the type has already been recorded. */ - TYPE_CODE (type) = TYPE_CODE_STRUCT; + type->set_code (TYPE_CODE_STRUCT); /* Make space for the discriminant field. */ struct field *disr_field = &TYPE_FIELD (disr_type, 0); @@ -15369,15 +15369,15 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) if (die->tag == DW_TAG_structure_type) { - TYPE_CODE (type) = TYPE_CODE_STRUCT; + type->set_code (TYPE_CODE_STRUCT); } else if (die->tag == DW_TAG_union_type) { - TYPE_CODE (type) = TYPE_CODE_UNION; + type->set_code (TYPE_CODE_UNION); } else { - TYPE_CODE (type) = TYPE_CODE_STRUCT; + type->set_code (TYPE_CODE_STRUCT); } if (cu->language == language_cplus && die->tag == DW_TAG_class_type) @@ -15937,7 +15937,7 @@ read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) type = alloc_type (objfile); - TYPE_CODE (type) = TYPE_CODE_ENUM; + type->set_code (TYPE_CODE_ENUM); name = dwarf2_full_name (NULL, die, cu); if (name != NULL) TYPE_NAME (type) = name; |