aboutsummaryrefslogtreecommitdiff
path: root/gcc/plugin.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-142009-05-13 Taras Glek <tglek@mozilla.com>Taras Glek1-0/+2
gcc/ * attribs.c moved out attribute registration into register_attribute * doc/plugins.texi Documented register_attribute and PLUGIN_ATTRIBUTES * gcc-plugin.h Added forward decl for register_attribute * plugin.c Added PLUGIN_ATTRIBUTES boilerplate * plugin.h Added PLUGIN_ATTRIBUTES gcc/testsuite/ * g++.dg/plugin/attribute_plugin-test-1.C Testcase input for custom attributes and decl smashing * g++.dg/plugin/attribute_plugin.c Testcase plugin to test user attributes * g++.dg/plugin/dumb_plugin.c Fixed typo * g++.dg/plugin/plugin.exp Added attribute_plugin test From-SVN: r147516
2009-05-06plugin-support.exp: New file containing support procs for plugin testcases.Le-Chun Wu1-1/+0
2009-05-06 Le-Chun Wu <lcwu@google.com> * lib/plugin-support.exp: New file containing support procs for plugin testcases. * lib/target-supports.exp (check_plugin_available): New proc. * gcc.dg/plugin/plugin.exp: New driver script for gcc testcases. * gcc.dg/plugin/selfassign.c: New plugin source file. * gcc.dg/plugin/self-assign-test-1.c: New test. * gcc.dg/plugin/self-assign-test-2.c: Likewise. * g++.dg/README: Add description for plugin test. * g++.dg/dg.exp: Exclude plugin tests from the general test list. * g++.dg/plugin/plugin.exp: New driver script for g++ testcases. * g++.dg/plugin/selfassign.c: New plugin source file. * g++.dg/plugin/self-assign-test-1.C: New test. * g++.dg/plugin/self-assign-test-2.C: Likewise. * g++.dg/plugin/self-assign-test-3.C: Likewise. * g++.dg/plugin/dumb_plugin.c: New plugin source file. * g++.dg/plugin/dumb-plugin-test-1.C: New test. From-SVN: r147185
2009-04-30plugin.c: Include plugin-version.h only if ENABLE_PLUGIN is defined.Rafael Avila de Espindola1-0/+2
2009-04-30 Rafael Avila de Espindola <espindola@google.com> * plugin.c: Include plugin-version.h only if ENABLE_PLUGIN is defined. From-SVN: r146998
2009-04-29Makefile.in (PLUGIN_VERSION_H): New.Rafael Avila de Espindola1-16/+12
2009-04-29 Rafael Avila de Espindola <espindola@google.com> * Makefile.in (PLUGIN_VERSION_H): New. (OBJS-common): Remove plugin-version.o. (plugin.o): Depend on (PLUGIN_VERSION_H). (plugin-version.o): Remove. * configure: Regenerate * configure.ac: Create plugin-version.h. * gcc-plugin.h (plugin_gcc_version): Remove. (plugin_default_version_check): Change signature. * plugin-version.c: Remove. * plugin.c: Include plugin-version.h. (str_plugin_gcc_version_name): Remove. (try_init_one_plugin): Pass gcc version to plugin_init. (plugin_default_version_check): Both gcc and plugin versions are now arguments. From-SVN: r146962
2009-04-17Makefile.in (REVISION_s): Always include quotes.Rafael Avila de Espindola1-1/+31
2009-04-17 Rafael Avila de Espindola <espindola@google.com> * Makefile.in (REVISION_s): Always include quotes. Change ifdef to use REVISION_c. (OBJS-common): Add plugin-version.o. (plugin-version.o): New. * gcc-plugin.h (plugin_gcc_version): New. (plugin_default_version_check): New. (plugin_init_func, plugin_init): Add version argument. * plugin-version.c: New. * plugin.c (str_plugin_gcc_version_name): New. (try_init_one_plugin): Read plugin_gcc_version from the plugin and pass it to the init function. (plugin_default_version_check): New. From-SVN: r146274
2009-04-16common.opt (fhelp): Add Var(help_flag).Rafael Avila de Espindola1-0/+47
2009-04-16 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. From-SVN: r146195
2009-04-16gcc-plugin.h (plugin_event): Add PLUGIN_INFO.Rafael Avila de Espindola1-19/+107
2009-04-16 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. Only free plugin_name_args if failed to init. (finalize_one_plugin): New. (finalize_plugins): New. (print_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. Print version if needed. Call finalize_plugins. From-SVN: r146187
2009-04-14diagnostic.c (diagnostic_report_diagnostic): Do not warn about loaded ↵Diego Novillo1-1/+1
plugins for DK_ERROR and DK_WARNING. * diagnostic.c (diagnostic_report_diagnostic): Do not warn about loaded plugins for DK_ERROR and DK_WARNING. * c-decl.c (declspecs_add_type): Move call to invoke_plugin_callbacks ... * c-parser.c (c_parser_declspecs): ... here. * plugin.c (dump_active_plugins): Tidy output. cp/ChangeLog * parser.c (cp_parser_type_specifier_seq): Move call to invoke_plugin_callbacks ... (cp_parser_type_specifier_seq): ... here. From-SVN: r146078
2009-04-14[multiple changes]Diego Novillo1-0/+672
2009-04-14 Diego Novillo <dnovillo@google.com> Le-Chun Wu <lcwu@google.com> * configure.ac: Add --enable-plugin support. Define ENABLE_PLUGIN and PLUGINLIBS when specified. * Makefile.in (PLUGIN_H): Define. Export ENABLE_PLUGIN and GMPINC to site.exp. Add PLUGINLIBS to link command. Add/modify dependencies for plugin.o and files including plugin.h. (plugin.o): New. * config.in: Regenerate. * opts.c (common_handle_option): Handle OPT_fplugin_ and OPT_fplugin_arg_. 2009-04-14 Le-Chun Wu <lcwu@google.com> * tree-pass.h (register_one_dump_file): Add a prototype for register_one_dump_file. * toplev.c (compile_file): Call initialize_plugins. (do_compile): Call invoke_plugin_callbacks. (toplev_main): Call invoke_plugin_callbacks. * common.opt: Add -fplugin= and -fplugin-arg-. * gcc-plugin.h: New public header file for plugins to include. * plugin.c: New source file. * plugin.h: New internal header file. * passes.c (register_one_dump_file): Make it external. * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks. 2009-04-14 Diego Novillo <dnovillo@google.com> * doc/plugins.texi: New. * doc/gccint.texi: Add reference to Plugins chapter. * doc/invoke.texi: Document -fplugin and -fplugin-arg * diagnostic.c (diagnostic_report_diagnostic): Warn about loaded plugins, if any. * timevar.def (TV_PLUGIN_INIT): Define. (TV_PLUGIN_RUN): Define. * plugin.c: Include timevar.h (plugins_active_p): New. (dump_active_plugins): New. (debug_active_plugins): New. cp/ChangeLog 2009-04-14 Le-Chun Wu <lcwu@google.com> * Make-lang.in: Modify dependencies of files including plugin.h. * decl.c (finish_function): Call invoke_plugin_callbacks. * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks. From-SVN: r146059