gdb: remove TYPE_TARGET_STUB

gdb/ChangeLog:

	* gdbtypes.h (TYPE_TARGET_STUB): Remove, replace all
	uses with type::target_is_stub.

Change-Id: I3e7dadcb485d991af68a1e93693e3895b0e755d5
This commit is contained in:
Simon Marchi
2020-09-14 11:08:00 -04:00
parent 8f53807e5c
commit d218396806
3 changed files with 14 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (TYPE_TARGET_STUB): Remove, replace all
uses with type::target_is_stub.
2020-09-14 Simon Marchi <simon.marchi@efficios.com> 2020-09-14 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (struct type) <target_is_stub, set_target_is_stub>: * gdbtypes.h (struct type) <target_is_stub, set_target_is_stub>:

View File

@ -2864,11 +2864,11 @@ check_typedef (struct type *type)
} }
} }
if (TYPE_TARGET_STUB (type)) if (type->target_is_stub ())
{ {
struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type)); struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
if (target_type->is_stub () || TYPE_TARGET_STUB (target_type)) if (target_type->is_stub () || target_type->target_is_stub ())
{ {
/* Nothing we can do. */ /* Nothing we can do. */
} }
@ -5080,7 +5080,7 @@ recursive_dump_type (struct type *type, int spaces)
{ {
puts_filtered (" TYPE_STUB"); puts_filtered (" TYPE_STUB");
} }
if (TYPE_TARGET_STUB (type)) if (type->target_is_stub ())
{ {
puts_filtered (" TYPE_TARGET_STUB"); puts_filtered (" TYPE_TARGET_STUB");
} }

View File

@ -216,14 +216,6 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags);
#define TYPE_ENDIANITY_NOT_DEFAULT(t) (TYPE_MAIN_TYPE (t)->flag_endianity_not_default) #define TYPE_ENDIANITY_NOT_DEFAULT(t) (TYPE_MAIN_TYPE (t)->flag_endianity_not_default)
/* * The target type of this type is a stub type, and this type needs
to be updated if it gets un-stubbed in check_typedef. Used for
arrays and ranges, in which TYPE_LENGTH of the array/range gets set
based on the TYPE_LENGTH of the target type. Also, set for
TYPE_CODE_TYPEDEF. */
#define TYPE_TARGET_STUB(t) ((t)->target_is_stub ())
/* * This is a function type which appears to have a prototype. We /* * This is a function type which appears to have a prototype. We
need this for function calls in order to tell us if it's necessary need this for function calls in order to tell us if it's necessary
to coerce the args, or to just do the standard conversions. This to coerce the args, or to just do the standard conversions. This
@ -1092,6 +1084,12 @@ struct type
this->main_type->m_flag_stub = is_stub; this->main_type->m_flag_stub = is_stub;
} }
/* The target type of this type is a stub type, and this type needs
to be updated if it gets un-stubbed in check_typedef. Used for
arrays and ranges, in which TYPE_LENGTH of the array/range gets set
based on the TYPE_LENGTH of the target type. Also, set for
TYPE_CODE_TYPEDEF. */
bool target_is_stub () const bool target_is_stub () const
{ {
return this->main_type->m_flag_target_stub; return this->main_type->m_flag_target_stub;