aboutsummaryrefslogtreecommitdiff
path: root/gcc/plugin.c
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-09-28 10:50:39 +0200
committerDuncan Sands <baldrick@gcc.gnu.org>2009-09-28 08:50:39 +0000
commit32c9b4e92473a94323f4198c4fc2a34f6052f30e (patch)
tree194a436e90764acef2d9ddd4041e1b96fecade5a /gcc/plugin.c
parentbd77e02dac3326a073283468832c6e5bb66291bf (diff)
downloadgcc-32c9b4e92473a94323f4198c4fc2a34f6052f30e.zip
gcc-32c9b4e92473a94323f4198c4fc2a34f6052f30e.tar.gz
gcc-32c9b4e92473a94323f4198c4fc2a34f6052f30e.tar.bz2
Add support for using ggc cache tables from plugins.
Approved by Ian Lance Taylor. From-SVN: r152232
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 9060683..7d6e85f 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);
}