aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-lang.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-08-30 11:49:49 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-09-30 22:05:57 -0400
commit33d16dd987d16fe1eb289853e5a444192bb31d9e (patch)
tree06c5ec20fad9309ab4dace3b6c659fa518d272af /gdb/p-lang.c
parentd3fd12dfc52cf4cbb910830e3ff60dca111f7468 (diff)
downloadgdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.zip
gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.gz
gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.bz2
gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros
Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the call sites to use field::name directly. Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6
Diffstat (limited to 'gdb/p-lang.c')
-rw-r--r--gdb/p-lang.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 3dcc75a..cac8fbe 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -96,10 +96,10 @@ pascal_is_string_type (struct type *type,int *length_pos, int *length_size,
/* Old Borland type pascal strings from Free Pascal Compiler. */
/* Two fields: length and st. */
if (type->num_fields () == 2
- && TYPE_FIELD_NAME (type, 0)
- && strcmp (TYPE_FIELD_NAME (type, 0), "length") == 0
- && TYPE_FIELD_NAME (type, 1)
- && strcmp (TYPE_FIELD_NAME (type, 1), "st") == 0)
+ && type->field (0).name ()
+ && strcmp (type->field (0).name (), "length") == 0
+ && type->field (1).name ()
+ && strcmp (type->field (1).name (), "st") == 0)
{
if (length_pos)
*length_pos = TYPE_FIELD_BITPOS (type, 0) / TARGET_CHAR_BIT;
@@ -110,16 +110,16 @@ pascal_is_string_type (struct type *type,int *length_pos, int *length_size,
if (char_type)
*char_type = TYPE_TARGET_TYPE (type->field (1).type ());
if (arrayname)
- *arrayname = TYPE_FIELD_NAME (type, 1);
+ *arrayname = type->field (1).name ();
return 2;
};
/* GNU pascal strings. */
/* Three fields: Capacity, length and schema$ or _p_schema. */
if (type->num_fields () == 3
- && TYPE_FIELD_NAME (type, 0)
- && strcmp (TYPE_FIELD_NAME (type, 0), "Capacity") == 0
- && TYPE_FIELD_NAME (type, 1)
- && strcmp (TYPE_FIELD_NAME (type, 1), "length") == 0)
+ && type->field (0).name ()
+ && strcmp (type->field (0).name (), "Capacity") == 0
+ && type->field (1).name ()
+ && strcmp (type->field (1).name (), "length") == 0)
{
if (length_pos)
*length_pos = TYPE_FIELD_BITPOS (type, 1) / TARGET_CHAR_BIT;
@@ -136,7 +136,7 @@ pascal_is_string_type (struct type *type,int *length_pos, int *length_size,
*char_type = TYPE_TARGET_TYPE (*char_type);
}
if (arrayname)
- *arrayname = TYPE_FIELD_NAME (type, 2);
+ *arrayname = type->field (2).name ();
return 3;
};
}