Lines Matching refs:plugin
15 simple clang plugin.
21 handle plugin command line options. The ``PluginASTAction`` base class declares
22 a ``ParseArgs`` method which you have to implement in your plugin.
36 Registering a plugin
39 A plugin is loaded from a dynamic library at runtime by the compiler. To
40 register a plugin in a library, use ``FrontendPluginRegistry::Add<>``:
44 static FrontendPluginRegistry::Add<MyPlugin> X("my-plugin-name", "my plugin description");
69 Let's look at an example plugin that prints top-level function names. This
74 Running the plugin
81 To run a plugin, the dynamic library containing the plugin registry must be
84 `-plugin` option. Additional parameters for the plugins can be passed with
85 `-plugin-arg-<plugin-name>`.
97 For example, to run the ``print-function-names`` plugin over a source file in
98 clang, first build the plugin, and then call clang with the plugin from the
110 -plugin -Xclang print-fns
112 Also see the print-function-name plugin example's
119 Using `-fplugin=plugin` on the clang command line passes the plugin
120 through as an argument to `-load` on the cc1 command line. If the plugin
121 class implements the ``getActionType`` method then the plugin is run
122 automatically. For example, to run the plugin automatically after the main AST
123 action (i.e. the same as using `-add-plugin`):
127 // Automatically run the plugin after the main AST action