diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-22 12:23:53 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-22 12:23:53 -0500 |
commit | 344e9841d989cb96316d8d487e004212d4d3090a (patch) | |
tree | d8a7b89648a9463e2acbb0037740bf55149bc5a2 /gdb/parse.c | |
parent | 30625020198359db7462a197380c242d91c07f14 (diff) | |
download | fsf-binutils-gdb-344e9841d989cb96316d8d487e004212d4d3090a.zip fsf-binutils-gdb-344e9841d989cb96316d8d487e004212d4d3090a.tar.gz fsf-binutils-gdb-344e9841d989cb96316d8d487e004212d4d3090a.tar.bz2 |
gdb: remove TYPE_OBJFILE macro
Change all users to use the type::objfile method instead.
gdb/ChangeLog:
* gdbtypes.h (TYPE_OBJFILE): Remove, change all users to use the
type::objfile method instead.
Change-Id: I6b3f580913fb1fb0cf986b176dba8db68e1fabf9
Diffstat (limited to 'gdb/parse.c')
-rw-r--r-- | gdb/parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/parse.c b/gdb/parse.c index b3cd91d..7fd5204 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -1320,7 +1320,7 @@ operator_check_standard (struct expression *exp, int pos, for (arg = 0; arg < nargs; arg++) { struct type *inst_type = elts[pos + 3 + arg].type; - struct objfile *inst_objfile = TYPE_OBJFILE (inst_type); + struct objfile *inst_objfile = inst_type->objfile (); if (inst_objfile && (*objfile_func) (inst_objfile, data)) return 1; @@ -1351,9 +1351,10 @@ operator_check_standard (struct expression *exp, int pos, /* Invoke callbacks for TYPE and OBJFILE if they were set as non-NULL. */ - if (type && TYPE_OBJFILE (type) - && (*objfile_func) (TYPE_OBJFILE (type), data)) + if (type != nullptr && type->objfile () != nullptr + && objfile_func (type->objfile (), data)) return 1; + if (objfile && (*objfile_func) (objfile, data)) return 1; |