diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-13 11:09:08 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-03-18 11:12:38 -0600 |
commit | 46c04ea32f7f259432a68b002a13cdea86f9f902 (patch) | |
tree | 889d1762b16d7e400171dc36b6903b6b92430a73 /gdb/gdbtypes.h | |
parent | f50b437c3da71d91dfb04db8e06b2cdb69d16294 (diff) | |
download | gdb-46c04ea32f7f259432a68b002a13cdea86f9f902.zip gdb-46c04ea32f7f259432a68b002a13cdea86f9f902.tar.gz gdb-46c04ea32f7f259432a68b002a13cdea86f9f902.tar.bz2 |
Unify arch_boolean_type and init_boolean_type
This unifies arch_boolean_type and init_boolean_type by using a type
allocator.
Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 20a5477..9dcd0e5 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2307,8 +2307,14 @@ extern struct type *init_integer_type (type_allocator &alloc, int bit, extern struct type *init_character_type (type_allocator &alloc, int bit, int unsigned_p, const char *name); -extern struct type *init_boolean_type (struct objfile *, int, int, - const char *); + +/* Allocate a TYPE_CODE_BOOL type structure using ALLOC. BIT is the + type size in bits. If UNSIGNED_P is non-zero, set the type's + TYPE_UNSIGNED flag. NAME is the type name. */ + +extern struct type *init_boolean_type (type_allocator &alloc, int bit, + int unsigned_p, const char *name); + extern struct type *init_float_type (struct objfile *, int, const char *, const struct floatformat **, enum bfd_endian = BFD_ENDIAN_UNKNOWN); @@ -2321,8 +2327,6 @@ extern struct type *init_fixed_point_type (struct objfile *, int, int, const char *); /* Helper functions to construct architecture-owned types. */ -extern struct type *arch_boolean_type (struct gdbarch *, int, int, - const char *); extern struct type *arch_float_type (struct gdbarch *, int, const char *, const struct floatformat **); extern struct type *arch_decfloat_type (struct gdbarch *, int, const char *); |