This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add plugin ActionType to run command line plugin before main action
ClosedPublic

Authored by aeubanks on Oct 19 2021, 3:03 PM.

Details

Summary

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.

Diff Detail