Turn value_bitsize into method

This changes value_bitsize to be a method of value.  Much of this patch
was written by script.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 09:38:22 -07:00
parent f9ee742cd7
commit f49d5fa263
6 changed files with 37 additions and 46 deletions

View File

@ -173,6 +173,13 @@ struct value
/* Return the gdbarch associated with the value. */
struct gdbarch *arch () const;
/* Only used for bitfields; number of bits contained in them. */
LONGEST bitsize () const
{ return m_bitsize; }
void set_bitsize (LONGEST bit)
{ m_bitsize = bit; }
/* Type of value; either not an lval, or one of the various
different possible kinds of lval. */
@ -351,11 +358,6 @@ struct value
ULONGEST m_limited_length = 0;
};
/* Only used for bitfields; number of bits contained in them. */
extern LONGEST value_bitsize (const struct value *);
extern void set_value_bitsize (struct value *, LONGEST bit);
/* Only used for bitfields; position of start of field. For
little-endian targets, it is the position of the LSB. For
big-endian targets, it is the position of the MSB. */