summaryrefslogtreecommitdiff
path: root/gcc/plugin.c
diff options
context:
space:
mode:
authorbaldrick <baldrick@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-28 08:50:39 +0000
committerbaldrick <baldrick@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-28 08:50:39 +0000
commit86b6369622fb5ab4b0fc6e5bd2ff40cb25ad4166 (patch)
tree194a436e90764acef2d9ddd4041e1b96fecade5a /gcc/plugin.c
parent634c15dc444b793c959353a4cb61294ca30fda9c (diff)
downloadgcc-86b6369622fb5ab4b0fc6e5bd2ff40cb25ad4166.tar.gz
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
Diffstat (limited to 'gcc/plugin.c')
-rw-r--r--gcc/plugin.c6
1 files changed, 6 insertions, 0 deletions
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);
}