gdb: remove TYPE_CODE macro

Remove TYPE_CODE, changing all the call sites to use type::code
directly.  This is quite a big diff, but this was mostly done using sed
and coccinelle.  A few call sites were done by hand.

gdb/ChangeLog:

	* gdbtypes.h (TYPE_CODE): Remove.  Change all call sites to use
	type::code instead.
This commit is contained in:
Simon Marchi
2020-05-14 13:46:38 -04:00
parent 67607e24d0
commit 7813437494
145 changed files with 1744 additions and 1746 deletions

View File

@@ -1806,8 +1806,8 @@ update_watchpoint (struct watchpoint *b, int reparse)
for it explicitly, never if they just happen to
appear in the middle of some value chain. */
if (v == result
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
|| (vtype->code () != TYPE_CODE_STRUCT
&& vtype->code () != TYPE_CODE_ARRAY))
{
CORE_ADDR addr;
enum target_hw_bp_type type;
@@ -10806,8 +10806,8 @@ can_use_hardware_watchpoint (const std::vector<value_ref_ptr> &vals)
explicitly, never if they just happen to appear in a
middle of some value chain. */
if (v == head
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
|| (vtype->code () != TYPE_CODE_STRUCT
&& vtype->code () != TYPE_CODE_ARRAY))
{
CORE_ADDR vaddr = value_address (v);
int len;