PATCH [trunk] gengtype should generate ggc_alloc macros in plugin mode on for plugin files

Laurynas Biveinis laurynas.biveinis@gmail.com
Tue Apr 19 07:13:00 GMT 2011


On 04/11/2011 04:35 AM, Basile Starynkevitch wrote:
> 2011-04-11  Basile Starynkevitch  <basile@starynkevitch.net>
>
>         * gengtype.h (struct input_file_st): Add inpisplugin field.
> 	(type_fileloc): New function.
> 	* gengtype.c
> 	(write_typed_struct_alloc_def): Add gcc_assert.
> 	(write_typed_alloc_defns): Ditto. Don't output for plugin files.
> 	(write_typed_alloc_defns): Don't output for plugin files.
> 	(input_file_by_name): Clear inpisplugin field.
> 	(main): Set inpisplugin field for plugin files.

Did you test this patch that it bootstraps and that a GTY-using plugin
gets the right set of definitions in the output?

> @@ -4814,6 +4830,7 @@ input_file_by_name (const char* name)
>    f = XCNEWVAR (input_file, sizeof (input_file)+namlen+2);
>    f->inpbitmap = 0;
>    f->inpoutf = NULL;
> +  f->inpisplugin = 0;

= false;

> @@ -304,6 +305,7 @@ struct type {
>    } u;
>  };
>
> +
>  /* The one and only TYPE_STRING.  */
>  extern struct type string_type;
>

Please drop this.

OK with these changes and confirmation that the patch was tested.

Thanks,
Laurynas



More information about the Gcc-patches mailing list