aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2020-08-20 23:41:03 +0100
committerPedro Alves <pedro@palves.net>2020-08-21 15:42:32 +0100
commit3b64e7030f8e8e0fd94c7fbd80edb22ac9856276 (patch)
tree87aac0750c41afaeba954d45ef588a3ef897c22b /gdb/compile
parentd4049ba6cb3c12a2d07b4ade5ea770158f84032d (diff)
downloadgdb-3b64e7030f8e8e0fd94c7fbd80edb22ac9856276.zip
gdb-3b64e7030f8e8e0fd94c7fbd80edb22ac9856276.tar.gz
gdb-3b64e7030f8e8e0fd94c7fbd80edb22ac9856276.tar.bz2
Use type_instance_flags more throughout
The next patch in this series will rewrites enum_flags fixing some API holes. That would cause build failures around code using type_instance_flags. Or rather, that should be using it, but wasn't. This patch fixes it by using type_instance_flags throughout instead of plain integers. Note that we can't make the seemingly obvious change to struct type::instance_flags: - unsigned instance_flags : 9; + ENUM_BITFIELD (type_instance_flag_value) instance_flags : 9; Because G++ complains then that 9 bits isn't sufficient for holding all values of type_instance_flag_value. So the patch adds a cast to TYPE_INSTANCE_FLAGS, and adds a separate SET_TYPE_INSTANCE_FLAGS macro. gdb/ChangeLog: * dwarf2/read.c (read_tag_pointer_type): Use type_instance_flags. * eval.c (fake_method::fake_method): Use SET_TYPE_INSTANCE_FLAGS. * gdbarch.h, gdbarch.c: Regenerate. * gdbarch.sh (address_class_type_flags): Use type_instance_flags. (address_class_name_to_type_flags): Use type_instance_flags and bool. * gdbtypes.c (address_space_name_to_int) (address_space_int_to_name, make_qualified_type): Use type_instance_flags. (make_qualified_type): Use type_instance_flags and SET_TYPE_INSTANCE_FLAGS. (make_type_with_address_space, make_cv_type, make_vector_type) (check_typedef): Use type_instance_flags. (recursive_dump_type): Cast type_instance_flags to unsigned for printing. (copy_type_recursive): Use SET_TYPE_INSTANCE_FLAGS. * gdbtypes.h (TYPE_INSTANCE_FLAGS): Return a type_instance_flags. (SET_TYPE_INSTANCE_FLAGS): New. (address_space_name_to_int, address_space_int_to_name) (make_type_with_address_space): Pass flags using type_instance_flags instead of int. * stabsread.c (cleanup_undefined_types_noname): Use SET_TYPE_INSTANCE_FLAGS. * type-stack.c (type_stack::follow_types): Use type_instance_flags.
Diffstat (limited to 'gdb/compile')
0 files changed, 0 insertions, 0 deletions