aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-08-31 11:46:22 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-08-31 13:16:11 -0400
commit321d8b3f28cc04fe8c58ac391025e8b18134ca60 (patch)
treea57696273f1047593243f5398e3c8bad53d965ab /gdb/dwarf2
parent4bea97df59d505e1e74876b94cd3f99a42f742d9 (diff)
downloadgdb-321d8b3f28cc04fe8c58ac391025e8b18134ca60.zip
gdb-321d8b3f28cc04fe8c58ac391025e8b18134ca60.tar.gz
gdb-321d8b3f28cc04fe8c58ac391025e8b18134ca60.tar.bz2
gdb: introduce field::is_artificial / field::set_is_artificial
Add these two methods, rename the field to m_artificial to make it pseudo private. Change-Id: If3a3825473d1d79bb586a8a074b87bba9b43fb1a Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/read.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 94d98fe..63b099c 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -6060,7 +6060,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile)
/* Put the discriminant at index 0. */
type->field (0).set_type (field_type);
- TYPE_FIELD_ARTIFICIAL (type, 0) = 1;
+ type->field (0).set_is_artificial (true);
type->field (0).set_name ("<<discriminant>>");
type->field (0).set_loc_bitpos (bit_offset);
@@ -6158,7 +6158,7 @@ quirk_rust_enum (struct type *type, struct objfile *objfile)
/* Install the discriminant at index 0 in the union. */
type->field (0) = *disr_field;
- TYPE_FIELD_ARTIFICIAL (type, 0) = 1;
+ type->field (0).set_is_artificial (true);
type->field (0).set_name ("<<discriminant>>");
/* We need a way to find the correct discriminant given a
@@ -11743,7 +11743,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
pointer or virtual base class pointer) to private. */
if (dwarf2_attr (die, DW_AT_artificial, cu))
{
- FIELD_ARTIFICIAL (*fp) = 1;
+ fp->set_is_artificial (true);
new_field->accessibility = DW_ACCESS_private;
fip->non_public_fields = true;
}
@@ -13588,10 +13588,10 @@ quirk_ada_thick_pointer (struct die_info *die, struct dwarf2_cu *cu,
struct field &upper = range_fields[range_fields.size () - 1];
lower.set_type (underlying);
- FIELD_ARTIFICIAL (lower) = 1;
+ lower.set_is_artificial (true);
upper.set_type (underlying);
- FIELD_ARTIFICIAL (upper) = 1;
+ upper.set_is_artificial (true);
if (!recognize_bound_expression (child_die, DW_AT_lower_bound,
&bounds_offset, &lower, cu)
@@ -14713,9 +14713,9 @@ read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
4.5 does not yet generate. */
attr = dwarf2_attr (child_die, DW_AT_artificial, cu);
if (attr != nullptr)
- TYPE_FIELD_ARTIFICIAL (ftype, iparams) = attr->as_boolean ();
+ ftype->field (iparams).set_is_artificial (attr->as_boolean ());
else
- TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;
+ ftype->field (iparams).set_is_artificial (false);
arg_type = die_type (child_die, cu);
/* RealView does not mark THIS as const, which the testsuite