This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Adjust gcc-plugin.h
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 8 Jun 2015 15:32:50 +0200
- Subject: Re: [patch] Adjust gcc-plugin.h
- Authentication-results: sourceware.org; auth=none
- References: <55758574 dot 7070104 at redhat dot com>
On Mon, Jun 8, 2015 at 2:07 PM, Andrew MacLeod <amacleod@redhat.com> wrote:
> During the original flattening process I decided to use gcc-plugin.h as the
> kitchen sink for all includes that plugins might need. I think this has
> worked well for plugins, drastically reducing their dependency on gcc
> internal header file structure.
>
> What I didn't realize was that gcc's internal header (plugin.h) also
> includes gcc-plugin.h. This means that every file which may need to do
> something for plugins ends up indirectly including the gcc world again :-P
>
> Easy fix. (ha). This patch leaves all the #includes in gcc-plugin.h making
> the change transparent to plugins. All the remaining declarations and such
> are moved into a new file gcc-plugin-common.h. Both gcc-plugin.h and gcc's
> internal header plugin.h now include this common file.
>
> The effect is that gcc's source files no longer get anything but the
> required plugin info. Great.. Except there were a few files which were
> apparently picking up some required headers from gcc-plugins.h :-P This
> patch also adds the required headers to those source files.
>
> Compiles on x86_64-unknown-linux-gnu with no new regressions. Also compiles
> across all targets in config-list.mk. OK for trunk?
Err - why not simply remove the gcc-plugin.h include from plugin.h and instead
include plugin.h from gcc-plugin.h?
Richard.
> Andrew
>