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
gdb
ChangeLogaarch64-tdep.cada-exp.yada-lang.cada-tasks.cada-typeprint.cada-valprint.cada-varobj.calpha-tdep.camd64-tdep.camd64-windows-tdep.carc-tdep.carm-tdep.cavr-tdep.cax-gdb.cblockframe.cbreakpoint.cc-exp.yc-lang.cc-typeprint.cc-valprint.cc-varobj.c
cli
coffread.c
compile
completer.ccp-namespace.ccp-support.ccp-valprint.ccris-tdep.cctfread.cd-exp.yd-namespace.cd-valprint.c
dwarf2
eval.cexpprint.cf-lang.cf-typeprint.cf-valprint.cfbsd-tdep.cfindvar.cfrv-tdep.cgdbarch-selftests.cgdbtypes.cgdbtypes.hgnu-v2-abi.cgnu-v3-abi.cgo-exp.ygo-lang.cgo-typeprint.cgo-valprint.c
guile
h8300-tdep.chppa-tdep.ci386-darwin-tdep.ci386-tdep.ci386-windows-tdep.ci387-tdep.cia64-tdep.cinfcall.cinfcmd.ciq2000-tdep.clanguage.clinespec.clm32-tdep.cm2-lang.cm2-typeprint.cm2-valprint.cm32c-tdep.cm32r-tdep.cm68hc11-tdep.cm68k-tdep.cmdebugread.c
mi
mips-tdep.cmn10300-tdep.cmsp430-tdep.cnds32-tdep.cnios2-tdep.cobjc-lang.copencl-lang.cor1k-tdep.cp-exp.yp-lang.cp-typeprint.cp-valprint.cppc-linux-tdep.cppc-nbsd-tdep.cppc-sysv-tdep.cprintcmd.c
python
regcache.creggroups.criscv-tdep.crl78-tdep.crs6000-aix-tdep.crs6000-lynx178-tdep.crs6000-tdep.crust-exp.yrust-lang.crx-tdep.cs12z-tdep.cs390-tdep.cscore-tdep.csh-tdep.csparc-tdep.csparc64-tdep.cstabsread.cstack.csymmisc.csymtab.ctarget-float.ctic6x-tdep.ctilegx-tdep.ctracepoint.ctypeprint.cv850-tdep.cvalarith.cvalops.cvalprint.cvalue.cvarobj.cvax-tdep.cxstormy16-tdep.cxtensa-tdep.c

@ -240,9 +240,9 @@ py_print_value (struct ui_out *out, struct value *val,
if (args_type == MI_PRINT_ALL_VALUES)
should_print = 1;
else if (args_type == MI_PRINT_SIMPLE_VALUES
&& TYPE_CODE (type) != TYPE_CODE_ARRAY
&& TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_UNION)
&& type->code () != TYPE_CODE_ARRAY
&& type->code () != TYPE_CODE_STRUCT
&& type->code () != TYPE_CODE_UNION)
should_print = 1;
}
else if (args_type != NO_VALUES)