[binutils-gdb] gdb: remove INIT_NONE_SPECIFIC
Simon Marchi via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=62fbc7d600836b3c502682e9165938e6973039f2 commit 62fbc7d600836b3c502682e9165938e6973039f2 Author: Simon Marchi <[email protected]> Date: Mon Mar 16 10:25:18 2026 -0400 gdb: remove INIT_NONE_SPECIFIC This macro seems unnecessary. It is only used right after allocating a new type, and it only sets some fields to 0, which is the default state of a struct type anyway. Change-Id: I9dab6825b07875964505c387daf5f6b1e12c8144 Approved-By: Andrew Burgess <[email protected]> Diff: --- gdb/ada-lang.c | 5 ----- gdb/gdbtypes.h | 4 ---- 2 files changed, 9 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index ddffc2973e4..5611e61ee25 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -7696,7 +7696,6 @@ empty_record (struct type *templ) struct type *type = type_allocator (templ).new_type (); type->set_code (TYPE_CODE_STRUCT); - INIT_NONE_SPECIFIC (type); type->set_name ("<empty>"); type->set_length (0); return type; @@ -7751,7 +7750,6 @@ ada_template_to_fixed_record_type_1 (struct type *type, rtype = type_allocator (type).new_type (); rtype->set_code (TYPE_CODE_STRUCT); - INIT_NONE_SPECIFIC (rtype); rtype->alloc_fields (nfields); rtype->set_name (ada_type_name (type)); rtype->set_is_fixed_instance (true); @@ -8003,8 +8001,6 @@ template_to_static_fixed_type (struct type *type0) type = type_allocator (type0).new_type (); type0->set_target_type (type); type->set_code (type0->code ()); - INIT_NONE_SPECIFIC (type); - type->copy_fields (type0); type->set_name (ada_type_name (type0)); @@ -8050,7 +8046,6 @@ to_record_with_fixed_variant_part (struct type *type, const gdb_byte *valaddr, rtype = type_allocator (type).new_type (); rtype->set_code (TYPE_CODE_STRUCT); - INIT_NONE_SPECIFIC (rtype); rtype->copy_fields (type); rtype->set_name (ada_type_name (type)); diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index fae89cd2474..3917b40e366 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1865,10 +1865,6 @@ extern void allocate_cplus_struct_type (struct type *); (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF \ && TYPE_RAW_CPLUS_SPECIFIC (type) != &cplus_struct_default) -#define INIT_NONE_SPECIFIC(type) \ - (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_NONE, \ - TYPE_MAIN_TYPE (type)->type_specific = {}) - extern const struct gnat_aux_type gnat_aux_default; extern void allocate_gnat_aux_type (struct type *);