From ea5b45b61fe6917f59c0cb509fa0af5de08287bf Mon Sep 17 00:00:00 2001 From: Andres Tiraboschi Date: Wed, 3 Jun 2015 13:27:11 +0000 Subject: plugins.texi (enum plugin_event): New event. * doc/plugins.texi (enum plugin_event): New event. * plugin.c (register_callback): Handle PLUGIN_START_PARSE_FUNCTION and PLUGIN_FINISH_FUNCTION. * plugin.def (PLUGIN_START_PARSE_FUNCTION): Add plugin event (PLUGIN_FINISH_PARSE_FUNCTION): Likewise. cp/ * decl.c (start_function): Call plugin before parsing. (finish_function): Call plugin after parsing. c/ * c-decl.c (start_function): Call plugin before parsing. (finish_function): Call plugin after parsing. testsuite/ * g++.dg/plugin/plugin.exp: Add def-plugin-test.C. * g++.dg/plugin/def_plugin.c: New file. * g++.dg/plugin/def-plugin-test.C: New file. From-SVN: r224078 --- gcc/plugin.def | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/plugin.def') diff --git a/gcc/plugin.def b/gcc/plugin.def index 98c988a..2a7e4c2 100644 --- a/gcc/plugin.def +++ b/gcc/plugin.def @@ -17,6 +17,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ +/* Called before parsing the body of a function. */ +DEFEVENT (PLUGIN_START_PARSE_FUNCTION) + +/* After finishing parsing a function. */ +DEFEVENT (PLUGIN_FINISH_PARSE_FUNCTION) /* To hook into pass manager. */ DEFEVENT (PLUGIN_PASS_MANAGER_SETUP) -- cgit v1.1