Make function fixed_point_scaling_factor a method of struct type

This logically connects this function to the object it inspects.

gdb/ChangeLog:

        * gdbtypes.h (struct type) <fixed_point_scaling_factor>: New method,
        replacing fixed_point_scaling_factor.  All callers updated
        throughout this project.
        (fixed_point_scaling_factor): Delete declaration.
        * gdbtypes.c (type::fixed_point_scaling_factor): Replaces
        fixed_point_scaling_factor.  Adjust implementation accordingly.
This commit is contained in:
Joel Brobecker
2020-11-23 21:49:13 -05:00
parent d19937a74c
commit e6fcee3a73
8 changed files with 26 additions and 15 deletions

View File

@ -1224,6 +1224,11 @@ struct type
struct type *fixed_point_type_base_type ();
/* * Assuming that THIS is a TYPE_CODE_FIXED_POINT, return its scaling
factor. */
const gdb_mpq &fixed_point_scaling_factor ();
/* * Return the dynamic property of the requested KIND from this type's
list of dynamic properties. */
dynamic_prop *dyn_prop (dynamic_prop_node_kind kind) const;
@ -2596,9 +2601,6 @@ extern int type_not_associated (const struct type *type);
a range type whose base type is a TYPE_CODE_FIXED_POINT. */
extern bool is_fixed_point_type (struct type *type);
/* Given TYPE, which is a fixed point type, return its scaling factor. */
extern const gdb_mpq &fixed_point_scaling_factor (struct type *type);
/* Allocate a fixed-point type info for TYPE. This should only be
called by INIT_FIXED_POINT_SPECIFIC. */
extern void allocate_fixed_point_type_info (struct type *type);