aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
commit7813437494ac39f3aef392d06ed5416e84fe386b (patch)
tree15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/coffread.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadgdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2
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.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 4b2993f..d320332 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1494,7 +1494,7 @@ patch_opaque_types (struct symtab *s)
from different files with the same name. */
if (SYMBOL_CLASS (real_sym) == LOC_TYPEDEF
&& SYMBOL_DOMAIN (real_sym) == VAR_DOMAIN
- && TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR
+ && SYMBOL_TYPE (real_sym)->code () == TYPE_CODE_PTR
&& TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0)
{
const char *name = real_sym->linkage_name ();
@@ -1660,8 +1660,8 @@ process_coff_symbol (struct coff_symbol *cs,
/* If type has no name, give it one. */
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
{
- if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
- || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)
+ if (SYMBOL_TYPE (sym)->code () == TYPE_CODE_PTR
+ || SYMBOL_TYPE (sym)->code () == TYPE_CODE_FUNC)
{
/* If we are giving a name to a type such as
"pointer to foo" or "function returning foo", we
@@ -1694,10 +1694,10 @@ process_coff_symbol (struct coff_symbol *cs,
not an empty structured type, though; the forward
references work themselves out via the magic of
coff_lookup_type. */
- if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
+ if (SYMBOL_TYPE (sym)->code () == TYPE_CODE_PTR
&& TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))) == 0
- && TYPE_CODE (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym)))
- != TYPE_CODE_UNDEF)
+ && TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))->code ()
+ != TYPE_CODE_UNDEF)
{
int i = hashname (sym->linkage_name ());