[PATCH] D112096: [clang] Add plugin ActionType to run command line plugin before main action

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 19 15:03:21 PDT 2021


aeubanks created this revision.
aeubanks added reviewers: hans, dblaikie.
Herald added a subscriber: mgorny.
aeubanks requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Currently we have a way to run a plugin if specified on the command line
after the main action, and ways to unconditionally run the plugin before
or after the main action, but no way to run a plugin if specified on the
command line before the main action.

This introduces the missing option.

This is helpful because -clear-ast-before-backend clears the AST before
codegen, while some plugins may want access to the AST.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112096

Files:
  clang/examples/CMakeLists.txt
  clang/examples/PluginsOrder/CMakeLists.txt
  clang/examples/PluginsOrder/PluginsOrder.cpp
  clang/include/clang/Frontend/FrontendAction.h
  clang/lib/Frontend/FrontendAction.cpp
  clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
  clang/test/CMakeLists.txt
  clang/test/Frontend/plugins-order.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112096.380784.patch
Type: text/x-patch
Size: 9322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211019/a5accdef/attachment-0001.bin>


More information about the cfe-commits mailing list