Re: [RFA 5/6] Remove objfile argument from add_dyn_prop

Simon Marchi
2018-01-16T15:33:01Z

On 2018-01-05 07:26 PM, Tom Tromey wrote:
> The objfile argument to add_dyn_prop is redundant, so this patch
> removes it.
>
> 2018-01-05 Tom Tromey <tom@tromey.com>
>
> * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
> * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
> (create_array_type_with_stride): Update.
> * dwarf2read.c (set_die_type): Update.

Hi Tom,

> @@ -2305,13 +2304,13 @@ get_dyn_prop (enum dynamic_prop_node_kind prop_kind, const struct type *type)
>
> void
> add_dyn_prop (enum dynamic_prop_node_kind prop_kind, struct dynamic_prop prop,
> - struct type *type, struct objfile *objfile)
> + struct type *type)
> {
> struct dynamic_prop_list *temp;
>
> gdb_assert (TYPE_OBJFILE_OWNED (type));
>
> - temp = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop_list);
> + temp = XOBNEW (&TYPE_OBJFILE (type)->objfile_obstack, struct dynamic_prop_list);

This line is now too long.

Otherwise, LGTM.

Simon