attribute_plugin.c: Include gcc-plugin.h first.
2009-05-27 Rafael Avila de Espindola <espindola@google.com> * g++.dg/plugin/attribute_plugin.c: Include gcc-plugin.h first. * g++.dg/plugin/dumb_plugin.c: Include gcc-plugin.h first. * g++.dg/plugin/selfassign.c: Include gcc-plugin.h first. * gcc.dg/plugin/selfassign.c: Include gcc-plugin.h first. 2009-05-27 Rafael Avila de Espindola <espindola@google.com> * Makefile.in (GCC_PLUGIN_H): New. Replace all uses of gcc-plugin.h with it. * doc/plugins.texi: Document that gcc-plugin.h must be the first to be included. * gcc-plugin.h: Include config.h and system.h. (IN_GCC): Define if not defined. From-SVN: r147908
This commit is contained in:
parent
5e370570a5
commit
3e17e31d47
|
@ -1,3 +1,12 @@
|
||||||
|
2009-05-27 Rafael Avila de Espindola <espindola@google.com>
|
||||||
|
|
||||||
|
* Makefile.in (GCC_PLUGIN_H): New. Replace all uses of gcc-plugin.h with
|
||||||
|
it.
|
||||||
|
* doc/plugins.texi: Document that gcc-plugin.h must be the first to be
|
||||||
|
included.
|
||||||
|
* gcc-plugin.h: Include config.h and system.h.
|
||||||
|
(IN_GCC): Define if not defined.
|
||||||
|
|
||||||
2009-05-27 Hans-Peter Nilsson <hp@axis.com>
|
2009-05-27 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
PR middle-end/40249
|
PR middle-end/40249
|
||||||
|
|
|
@ -893,7 +893,8 @@ EBIMAP_H = ebitmap.h sbitmap.h
|
||||||
IPA_PROP_H = ipa-prop.h $(TREE_H) vec.h $(CGRAPH_H)
|
IPA_PROP_H = ipa-prop.h $(TREE_H) vec.h $(CGRAPH_H)
|
||||||
GSTAB_H = gstab.h stab.def
|
GSTAB_H = gstab.h stab.def
|
||||||
BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h
|
BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h
|
||||||
PLUGIN_H = plugin.h gcc-plugin.h
|
GCC_PLUGIN_H = gcc-plugin.h $(CONFIG_H) $(SYSTEM_H)
|
||||||
|
PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
|
||||||
PLUGIN_VERSION_H = plugin-version.h configargs.h
|
PLUGIN_VERSION_H = plugin-version.h configargs.h
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -4035,8 +4036,8 @@ installdirs:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(man7dir)
|
$(mkinstalldirs) $(DESTDIR)$(man7dir)
|
||||||
|
|
||||||
PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||||
$(TOPLEV_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_PASS_H) gcc-plugin.h intl.h \
|
$(TOPLEV_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_PASS_H) $(GCC_PLUGIN_H) \
|
||||||
$(PLUGIN_VERSION_H)
|
intl.h $(PLUGIN_VERSION_H)
|
||||||
|
|
||||||
# Install the headers needed to build a plugin.
|
# Install the headers needed to build a plugin.
|
||||||
install-plugin: installdirs
|
install-plugin: installdirs
|
||||||
|
|
|
@ -30,6 +30,8 @@ Plugins are activated by the compiler at specific events as defined in
|
||||||
call @code{register_callback} specifying the name of the event and
|
call @code{register_callback} specifying the name of the event and
|
||||||
address of the callback function that will handle that event.
|
address of the callback function that will handle that event.
|
||||||
|
|
||||||
|
The header @file{gcc-plugin.h} must be the first gcc header to be included.
|
||||||
|
|
||||||
@subsection Plugin initialization
|
@subsection Plugin initialization
|
||||||
|
|
||||||
Every plugin should export a function called @code{plugin_init} that
|
Every plugin should export a function called @code{plugin_init} that
|
||||||
|
|
|
@ -20,6 +20,13 @@ along with GCC; see the file COPYING3. If not see
|
||||||
#ifndef GCC_PLUGIN_H
|
#ifndef GCC_PLUGIN_H
|
||||||
#define GCC_PLUGIN_H
|
#define GCC_PLUGIN_H
|
||||||
|
|
||||||
|
#ifndef IN_GCC
|
||||||
|
#define IN_GCC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "system.h"
|
||||||
|
|
||||||
/* Event names. Keep in sync with plugin_event_name[]. */
|
/* Event names. Keep in sync with plugin_event_name[]. */
|
||||||
enum plugin_event
|
enum plugin_event
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2009-05-27 Rafael Avila de Espindola <espindola@google.com>
|
||||||
|
|
||||||
|
* g++.dg/plugin/attribute_plugin.c: Include gcc-plugin.h first.
|
||||||
|
* g++.dg/plugin/dumb_plugin.c: Include gcc-plugin.h first.
|
||||||
|
* g++.dg/plugin/selfassign.c: Include gcc-plugin.h first.
|
||||||
|
* gcc.dg/plugin/selfassign.c: Include gcc-plugin.h first.
|
||||||
|
|
||||||
2009-05-27 Kai TIetz <kai.tietz@onevision.com>
|
2009-05-27 Kai TIetz <kai.tietz@onevision.com>
|
||||||
|
|
||||||
* g++.old-deja/g++.brendan/array1.C (array): Use __SIZE_TYPE__
|
* g++.old-deja/g++.brendan/array1.C (array): Use __SIZE_TYPE__
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Demonstrates how to add custom attributes */
|
/* Demonstrates how to add custom attributes */
|
||||||
|
|
||||||
|
#include "gcc-plugin.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
@ -7,7 +8,6 @@
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "tree-pass.h"
|
#include "tree-pass.h"
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "gcc-plugin.h"
|
|
||||||
|
|
||||||
/* Attribute handler callback */
|
/* Attribute handler callback */
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* A trivial (dumb) plugin example that shows how to use the GCC plugin
|
/* A trivial (dumb) plugin example that shows how to use the GCC plugin
|
||||||
mechanism. */
|
mechanism. */
|
||||||
|
|
||||||
|
#include "gcc-plugin.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
@ -8,7 +9,6 @@
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "tree-pass.h"
|
#include "tree-pass.h"
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "gcc-plugin.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Callback function to invoke after GCC finishes parsing a struct. */
|
/* Callback function to invoke after GCC finishes parsing a struct. */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
self-assignment statements. */
|
self-assignment statements. */
|
||||||
/* { dg-options "-O" } */
|
/* { dg-options "-O" } */
|
||||||
|
|
||||||
|
#include "gcc-plugin.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "coretypes.h"
|
#include "coretypes.h"
|
||||||
|
@ -12,7 +13,6 @@
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "tree-pass.h"
|
#include "tree-pass.h"
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "gcc-plugin.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Indicate whether to check overloaded operator '=', which is performed by
|
/* Indicate whether to check overloaded operator '=', which is performed by
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
self-assignment statements. */
|
self-assignment statements. */
|
||||||
/* { dg-options "-O" } */
|
/* { dg-options "-O" } */
|
||||||
|
|
||||||
|
#include "gcc-plugin.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "coretypes.h"
|
#include "coretypes.h"
|
||||||
|
@ -12,7 +13,6 @@
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "tree-pass.h"
|
#include "tree-pass.h"
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "gcc-plugin.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Indicate whether to check overloaded operator '=', which is performed by
|
/* Indicate whether to check overloaded operator '=', which is performed by
|
||||||
|
|
Loading…
Reference in New Issue