From 344e9841d989cb96316d8d487e004212d4d3090a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 22 Jan 2021 12:23:53 -0500 Subject: 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 --- gdb/parse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gdb/parse.c') 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; -- cgit v1.1