[all-commits] [llvm/llvm-project] fe6643: [clang] Add plugin ActionType to run command line ...

aeubanks via All-commits all-commits at lists.llvm.org
Wed Oct 20 08:58:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe66433fe119819a033827610f7eae4cdd8b1470
      https://github.com/llvm/llvm-project/commit/fe66433fe119819a033827610f7eae4cdd8b1470
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-10-20 (Wed, 20 Oct 2021)

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

  Log Message:
  -----------
  [clang] Add plugin ActionType to run command line plugin before main action

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.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D112096




More information about the All-commits mailing list