diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-22 16:55:15 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-22 16:55:15 -0400 |
commit | 1f704f761b34e145f5eabdc222301ce6e9ec9102 (patch) | |
tree | 89c8b6dbf40b606ef045929b718d9271093057a3 /gdb/p-typeprint.c | |
parent | 5e33d5f4e1a5f2c3556ee31715ddc030d039b597 (diff) | |
download | fsf-binutils-gdb-1f704f761b34e145f5eabdc222301ce6e9ec9102.zip fsf-binutils-gdb-1f704f761b34e145f5eabdc222301ce6e9ec9102.tar.gz fsf-binutils-gdb-1f704f761b34e145f5eabdc222301ce6e9ec9102.tar.bz2 |
gdb: remove TYPE_NFIELDS macro
Remove `TYPE_NFIELDS`, changing all the call sites to use
`type::num_fields` directly. This is quite a big diff, but this was
mostly done using sed and coccinelle. A few call sites were done by
hand.
gdb/ChangeLog:
* gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
type::num_fields instead.
Change-Id: Ib73be4c36f9e770e0f729bac3b5257d7cb2f9591
Diffstat (limited to 'gdb/p-typeprint.c')
-rw-r--r-- | gdb/p-typeprint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index 05e28a4..3246d4e 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -309,7 +309,7 @@ static void pascal_print_func_args (struct type *type, struct ui_file *stream, const struct type_print_options *flags) { - int i, len = TYPE_NFIELDS (type); + int i, len = type->num_fields (); if (len) { @@ -559,7 +559,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show, pascal_type_print_derivation_info (stream, type); fprintf_filtered (stream, "\n"); - if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0)) + if ((type->num_fields () == 0) && (TYPE_NFN_FIELDS (type) == 0)) { if (TYPE_STUB (type)) fprintfi_filtered (level + 4, stream, "<incomplete type>\n"); @@ -576,7 +576,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show, /* If there is a base class for this type, do not print the field that it occupies. */ - len = TYPE_NFIELDS (type); + len = type->num_fields (); for (i = TYPE_N_BASECLASSES (type); i < len; i++) { QUIT; @@ -758,7 +758,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show, else if (show > 0 || type->name () == NULL) { fprintf_filtered (stream, "("); - len = TYPE_NFIELDS (type); + len = type->num_fields (); lastval = 0; for (i = 0; i < len; i++) { |