summaryrefslogtreecommitdiff
path: root/gcc/plugin.c
diff options
context:
space:
mode:
authorespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-06 19:20:39 +0000
committerespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-06 19:20:39 +0000
commit329786f768e46cd0451bba1aea787283ea8cdea3 (patch)
tree9a9a21a6222d8d5e0d4faa8b2d2a263613b6cd83 /gcc/plugin.c
parent8514bbf47ce34666037de6d6d2805c98ff70a9e2 (diff)
downloadgcc-329786f768e46cd0451bba1aea787283ea8cdea3.tar.gz
2009-11-06 Basile Starynkevitch <basile@starynkevitch.net>
* doc/plugins.texi (Plugin callbacks): added PLUGIN_PRAGMAS. * c-pragma.c: Include "plugin.h". (init_pragma): Invoke PLUGIN_PRAGMAS. * gcc-plugin.h: Added PLUGIN_PRAGMAS. * plugin.c (plugin_event_name): Added PLUGIN_PRAGMAS & the missing PLUGIN_ATTRIBUTES. (register_callback): Added PLUGIN_PRAGMAS. Fixed typo in message error for unknown callback event. (invoke_plugin_callbacks): Added PLUGIN_PRAGMAS. * Makefile.in (c-pragma.o): Added dependency upon plugin.h. (PLUGIN_HEADERS): added plugin.h. 2009-11-06 Basile Starynkevitch <basile@starynkevitch.net> * g++.dg/plugin/pragma_plugin-test-1.C: new testcase for PLUGIN_PRAGMAS. * g++.dg/plugin/pragma_plugin.c: new test plugin for PLUGIN_PRAGMAS. * g++.dg/plugin/plugin.exp (plugin_test_list): Add pragma_plugin.c and pragma_plugin-test-1.C. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/plugin.c')
-rw-r--r--gcc/plugin.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/plugin.c b/gcc/plugin.c
index 18b7c8aecad..2d64422787e 100644
--- a/gcc/plugin.c
+++ b/gcc/plugin.c
@@ -58,7 +58,9 @@ const char *plugin_event_name[] =
"PLUGIN_GGC_END",
"PLUGIN_REGISTER_GGC_ROOTS",
"PLUGIN_REGISTER_GGC_CACHES",
- "PLUGIN_START_UNIT",
+ "PLUGIN_ATTRIBUTES",
+ "PLUGIN_START_UNIT",
+ "PLUGIN_PRAGMAS",
"PLUGIN_EVENT_LAST"
};
@@ -325,6 +327,7 @@ register_callback (const char *plugin_name,
case PLUGIN_GGC_MARKING:
case PLUGIN_GGC_END:
case PLUGIN_ATTRIBUTES:
+ case PLUGIN_PRAGMAS:
case PLUGIN_FINISH:
{
struct callback_info *new_callback;
@@ -344,7 +347,7 @@ register_callback (const char *plugin_name,
break;
case PLUGIN_EVENT_LAST:
default:
- error ("Unkown callback event registered by plugin %s",
+ error ("Unknown callback event registered by plugin %s",
plugin_name);
}
}
@@ -368,6 +371,7 @@ invoke_plugin_callbacks (enum plugin_event event, void *gcc_data)
case PLUGIN_FINISH_UNIT:
case PLUGIN_CXX_CP_PRE_GENERICIZE:
case PLUGIN_ATTRIBUTES:
+ case PLUGIN_PRAGMAS:
case PLUGIN_FINISH:
case PLUGIN_GGC_START:
case PLUGIN_GGC_MARKING: