[plugins][patch] Print plugin help.

Rafael Espindola espindola@google.com
Wed Apr 8 09:18:00 GMT 2009


> OK with:

You approved the second patch but not the first one :-)

I have attached both and updated them with the comments.

version.patch:

2009-04-08  Rafael Avila de Espindola  <espindola@google.com>
        * gcc-plugin.h (plugin_event): Add PLUGIN_INFO.
	(plugin_info): New.
	* opts.c (common_handle_option): Don't call print_version.
	* plugin.c (plugin_name_args): Add version.
	(register_plugin_info): New.
	(register_callback): Handle PLUGIN_INFO.
	(try_init_one_plugin): New.
	(init_one_plugin): Use try_init_one_plugin.
	(finalize_one_plugin): New.
	(finalize_plugins): New.
	(print_options): New.
	(print_version_one_plugin): New.
	(print_plugins_versions): New.
	* plugin.h (print_plugins_versions): New.
	(finalize_plugins): New.
	* toplev.c (compile_file): Don't call initialize_plugins.
	(print_version): Call print_plugins_versions.
	(toplev_main): Call initialize_plugins. Call print_version if needed.
	Call finalize_plugins.

help.patch:
2009-04-08  Rafael Avila de Espindola  <espindola@google.com>
	* common.opt (fhelp): Add Var(help_flag).
	* gcc-plugin.h (plugin_info): Add help.
	* plugin.c (plugin_name_args): Add help.
	(register_plugin_info): Set plugin->help.
	(print_help_one_plugin): New.
	(print_plugins_help): New.
	* plugin.h (print_plugins_help): New.
	* toplev.c (toplev_main): Call print_plugins_help if needed.

2009-04-08  Rafael Avila de Espindola  <espindola@google.com>
	* g++.dg/plugin/selfassign.c (plugin_init): Add version and help.
	* gcc.dg/plugin/selfassign.c (plugin_init): Add version and help.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: version.patch
Type: text/x-patch
Size: 8611 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090408/2f27d125/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: help.patch
Type: text/x-patch
Size: 6037 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090408/2f27d125/attachment-0001.bin>


More information about the Gcc-patches mailing list