aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/plugins.texi
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile@starynkevitch.net>2009-11-06 19:20:39 +0000
committerRafael Espindola <espindola@gcc.gnu.org>2009-11-06 19:20:39 +0000
commit7ac8318c2daf09b9f2e1612b3add3584f58ac3b7 (patch)
tree9a9a21a6222d8d5e0d4faa8b2d2a263613b6cd83 /gcc/doc/plugins.texi
parent87e928642892922f18f1e652f41d8fc9169ae757 (diff)
downloadgcc-7ac8318c2daf09b9f2e1612b3add3584f58ac3b7.zip
gcc-7ac8318c2daf09b9f2e1612b3add3584f58ac3b7.tar.gz
gcc-7ac8318c2daf09b9f2e1612b3add3584f58ac3b7.tar.bz2
plugins.texi (Plugin callbacks): added PLUGIN_PRAGMAS.
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. From-SVN: r153975
Diffstat (limited to 'gcc/doc/plugins.texi')
-rw-r--r--gcc/doc/plugins.texi6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi
index f784953..123f670 100644
--- a/gcc/doc/plugins.texi
+++ b/gcc/doc/plugins.texi
@@ -136,6 +136,7 @@ enum plugin_event
PLUGIN_REGISTER_GGC_CACHES, /* Register an extra GGC cache table. */
PLUGIN_ATTRIBUTES, /* Called during attribute registration */
PLUGIN_START_UNIT, /* Called before processing a translation unit. */
+ PLUGIN_PRAGMAS, /* Called during pragma registration. */
PLUGIN_EVENT_LAST /* Dummy event used for indexing callback
array. */
@};
@@ -156,6 +157,11 @@ For the PLUGIN_PASS_MANAGER_SETUP, PLUGIN_INFO, PLUGIN_REGISTER_GGC_ROOTS
and PLUGIN_REGISTER_GGC_CACHES pseudo-events the @code{callback} should be
null, and the @code{user_data} is specific.
+When the PLUGIN_PRAGMAS event is triggered (with a null
+pointer as data from GCC), plugins may register their own pragmas
+using functions like @code{c_register_pragma} or
+@code{c_register_pragma_with_expansion}.
+
@section Interacting with the pass manager
There needs to be a way to add/reorder/remove passes dynamically. This