diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-05-23 17:39:54 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-05-23 17:39:54 -0400 |
commit | ceacbf6edf2c72aaa16280205a9bfc8513e9ed27 (patch) | |
tree | 0e801f13f8c4c59f584af1e1cd5c9e49b225c3ab /gdb/coffread.c | |
parent | 26f16254544873f4d7450f6fbbc8f34bf3d2e359 (diff) | |
download | gdb-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.zip gdb-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.tar.gz gdb-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.tar.bz2 |
gdb: remove TYPE_FIELD macro
Replace all uses of it by type::field.
Note that since type::field returns a reference to the field, some spots
are used to assign the whole field structure. See ctfread.c, function
attach_fields_to_type, for example. This is the same as was happening
with the macro, so I don't think it's a problem, but if anybody sees a
really nicer way to do this, now could be a good time to implement it.
gdb/ChangeLog:
* gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
type::field.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index 9b2f638..8b1f040 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -2045,7 +2045,7 @@ coff_read_struct_type (int index, int length, int lastsym, /* Copy the saved-up fields into the field vector. */ for (n = nfields; list; list = list->next) - TYPE_FIELD (type, --n) = list->field; + type->field (--n) = list->field; return type; } @@ -2142,7 +2142,7 @@ coff_read_enum_type (int index, int length, int lastsym, SYMBOL_TYPE (xsym) = type; TYPE_FIELD_NAME (type, n) = xsym->linkage_name (); - SET_FIELD_ENUMVAL (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym)); + SET_FIELD_ENUMVAL (type->field (n), SYMBOL_VALUE (xsym)); if (SYMBOL_VALUE (xsym) < 0) unsigned_enum = 0; TYPE_FIELD_BITSIZE (type, n) = 0; |