Replace with field::bitsize.
Change-Id: I400be235d6a1f446d0a4aafac01df5e850185d3a
Approved-By: Tom Tromey <tom@tromey.com>
}
fp->set_loc_bitpos (fp->loc_bitpos ()
+ anonymous_size * bits_per_byte
- - bit_offset - FIELD_BITSIZE (*fp));
+ - bit_offset - fp->bitsize ());
}
}
const struct field *field2 = &type2->field (i);
if (field1->is_artificial () != field2->is_artificial ()
- || FIELD_BITSIZE (*field1) != FIELD_BITSIZE (*field2)
+ || field1->bitsize () != field2->bitsize ()
|| field1->loc_kind () != field2->loc_kind ())
return false;
if (!compare_maybe_null_strings (field1->name (), field2->name ()))
(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
: B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index)))
-#define FIELD_BITSIZE(thisfld) ((thisfld).bitsize ())
-
-#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE((thistype)->field (n))
-#define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE((thistype)->field (n))!=0)
+#define TYPE_FIELD_BITSIZE(thistype, n) ((thistype)->field (n).bitsize ())
+#define TYPE_FIELD_PACKED(thistype, n) (((thistype)->field (n).bitsize ())!=0)
#define TYPE_FIELD_PRIVATE_BITS(thistype) \
TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits
}
if (fip->list->field.loc_bitpos () == 0
- && FIELD_BITSIZE (fip->list->field) == 0)
+ && fip->list->field.bitsize () == 0)
{
/* This can happen in two cases: (1) at least for gcc 2.4.5 or so,
it is a field which has been optimized out. The correct stab for
{
fip->list->field.set_bitsize (0);
}
- if ((FIELD_BITSIZE (fip->list->field)
+ if ((fip->list->field.bitsize ()
== TARGET_CHAR_BIT * field_type->length ()
|| (field_type->code () == TYPE_CODE_ENUM
- && FIELD_BITSIZE (fip->list->field)
- == gdbarch_int_bit (gdbarch))
+ && (fip->list->field.bitsize ()
+ == gdbarch_int_bit (gdbarch)))
)
&&
fip->list->field.loc_bitpos () % 8 == 0)