aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-decl.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 20122e6..a4bf620 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
+
+ * c-decl.c (start_function): Call plugin before parsing.
+ (finish_function): Call plugin after parsing.
+
2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/49551
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 68c79df..efdf902 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -8239,6 +8239,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, true, NULL,
&attributes, NULL, NULL, DEPRECATED_NORMAL);
+ invoke_plugin_callbacks (PLUGIN_START_PARSE_FUNCTION, decl1);
/* If the declarator is not suitable for a function definition,
cause a syntax error. */
@@ -9083,6 +9084,7 @@ finish_function (void)
It's still in DECL_STRUCT_FUNCTION, and we'll restore it in
tree_rest_of_compilation. */
set_cfun (NULL);
+ invoke_plugin_callbacks (PLUGIN_FINISH_PARSE_FUNCTION, current_function_decl);
current_function_decl = NULL;
}