aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-06-08 15:26:06 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-06-08 15:26:06 -0400
commitb6cdac4b80c1d32726227305e16483cef9d40e2c (patch)
treee0c9024b3fdc965e0543515761772f6e154e04cc /gdb/dwarf2/read.c
parent5d14b6e5d6525ce462c30501644922a10f8682eb (diff)
downloadgdb-b6cdac4b80c1d32726227305e16483cef9d40e2c.zip
gdb-b6cdac4b80c1d32726227305e16483cef9d40e2c.tar.gz
gdb-b6cdac4b80c1d32726227305e16483cef9d40e2c.tar.bz2
gdb: remove FIELD_TYPE macro
Remove the `FIELD_TYPE` macro, changing all the call sites to use `field::type` directly. gdb/ChangeLog: * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites to use field::type instead. Change-Id: I7673fedaa276e485189c87991a9043495da22ef5
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r--gdb/dwarf2/read.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 52feff0..f44e4ee 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -9605,7 +9605,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile)
/* We need a way to find the correct discriminant given a
variant name. For convenience we build a map here. */
- struct type *enum_type = FIELD_TYPE (*disr_field);
+ struct type *enum_type = disr_field->type ();
std::unordered_map<std::string, ULONGEST> discriminant_map;
for (int i = 0; i < enum_type->num_fields (); ++i)
{
@@ -14867,8 +14867,7 @@ create_one_variant_part (variant_part &result,
{
result.discriminant_index = iter->second;
result.is_unsigned
- = TYPE_UNSIGNED (FIELD_TYPE
- (fi->fields[result.discriminant_index].field));
+ = TYPE_UNSIGNED (fi->fields[result.discriminant_index].field.type ());
}
size_t n = builder.variants.size ();