[PATCH] D108283: [flang][driver] Add documentation for Plugins

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 20 13:52:04 PDT 2021


Meinersbur added a comment.

Is `PluginParseTreeAction` the only supported kind of plugin? It seems clang's equivalent would be `PluginASTAction` which is abstract, why does `PluginParseTreeAction` provide a default implementation?

Note that clang/LLVM's newer `-fpass-plugin` has a different design that avoids global registries and instead calls a function in the loaded library.



================
Comment at: flang/docs/FlangDriver.md:289
+There are three parts required for Plugins to work:
+1. A class that wraps everything together and represents the Frontend Action
+   corresponding to your Plugin, which inherits from `PluginParseTreeAction`
----------------
awarzynski wrote:
> Also, could make these items link to the corresponding sections in the document? The descriptions that I am deleting here could be moved to the corresponding sections.



================
Comment at: flang/docs/FlangDriver.md:361
+* `-load <dsopath>` for loading the dynamic shared object of the Plugin
+* `-plugin <name>` for calling the registered Plugin
+
----------------
clang also supports `-fplugin`. Does flang as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108283/new/

https://reviews.llvm.org/D108283



More information about the llvm-commits mailing list