1 /* This plugin creates a fake function in the FINISH_UNIT callback, in
2 * other words right after compilation of the translation unit.
4 #include "gcc-plugin.h"
11 #include "basic-block.h"
14 #include "tree-pass.h"
18 int plugin_is_GPL_compatible
;
20 static void finish_unit_callback (void *gcc_data
, void *user_data
)
22 cgraph_build_static_cdtor ('I', NULL
, DEFAULT_INIT_PRIORITY
);
25 int plugin_init (struct plugin_name_args
*plugin_info
,
26 struct plugin_gcc_version
*version
)
28 register_callback ("finish_unit", PLUGIN_FINISH_UNIT
, &finish_unit_callback
, NULL
);