From 86b6369622fb5ab4b0fc6e5bd2ff40cb25ad4166 Mon Sep 17 00:00:00 2001 From: baldrick Date: Mon, 28 Sep 2009 08:50:39 +0000 Subject: Add support for using ggc cache tables from plugins. Approved by Ian Lance Taylor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152232 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/plugin.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/plugin.c') diff --git a/gcc/plugin.c b/gcc/plugin.c index 906068387b7..7d6e85f9cef 100644 --- a/gcc/plugin.c +++ b/gcc/plugin.c @@ -57,6 +57,7 @@ const char *plugin_event_name[] = "PLUGIN_GGC_MARKING", "PLUGIN_GGC_END", "PLUGIN_REGISTER_GGC_ROOTS", + "PLUGIN_REGISTER_GGC_CACHES", "PLUGIN_START_UNIT", "PLUGIN_EVENT_LAST" }; @@ -499,6 +500,10 @@ register_callback (const char *plugin_name, gcc_assert (!callback); ggc_register_root_tab ((const struct ggc_root_tab*) user_data); break; + case PLUGIN_REGISTER_GGC_CACHES: + gcc_assert (!callback); + ggc_register_cache_tab ((const struct ggc_cache_tab*) user_data); + break; case PLUGIN_FINISH_TYPE: case PLUGIN_START_UNIT: case PLUGIN_FINISH_UNIT: @@ -566,6 +571,7 @@ invoke_plugin_callbacks (enum plugin_event event, void *gcc_data) case PLUGIN_PASS_MANAGER_SETUP: case PLUGIN_EVENT_LAST: case PLUGIN_REGISTER_GGC_ROOTS: + case PLUGIN_REGISTER_GGC_CACHES: default: gcc_assert (false); } -- cgit v1.2.1