| 
    clang 22.0.0git
    
   | 
 
Interface for executing clang frontend actions. More...
#include "clang/Tooling/Execution.h"
Public Member Functions | |
| virtual | ~ToolExecutor () | 
| virtual StringRef | getExecutorName () const =0 | 
| Returns the name of a specific executor.   | |
| virtual llvm::Error | execute (llvm::ArrayRef< std::pair< std::unique_ptr< FrontendActionFactory >, ArgumentsAdjuster > > Actions)=0 | 
| Executes each action with a corresponding arguments adjuster.   | |
| llvm::Error | execute (std::unique_ptr< FrontendActionFactory > Action) | 
| Convenient functions for the above execute.   | |
| llvm::Error | execute (std::unique_ptr< FrontendActionFactory > Action, ArgumentsAdjuster Adjuster) | 
| Executes an action with an argument adjuster.   | |
| virtual ExecutionContext * | getExecutionContext ()=0 | 
| Returns a reference to the execution context.   | |
| virtual ToolResults * | getToolResults ()=0 | 
| Returns a reference to the result container.   | |
| virtual void | mapVirtualFile (StringRef FilePath, StringRef Content)=0 | 
| Map a virtual file to be used while running the tool.   | |
Interface for executing clang frontend actions.
This can be extended to support running tool actions in different execution mode, e.g. on a specific set of TUs or many TUs in parallel.
New executors can be registered as ToolExecutorPlugins via the ToolExecutorPluginRegistry. CLI tools can use createExecutorFromCommandLineArgs to create a specific registered executor according to the command-line arguments.
Definition at line 111 of file Execution.h.
      
  | 
  inlinevirtual | 
Definition at line 113 of file Execution.h.
      
  | 
  pure virtual | 
Executes each action with a corresponding arguments adjuster.
Implemented in clang::tooling::AllTUsToolExecutor, and clang::tooling::StandaloneToolExecutor.
| llvm::Error clang::tooling::ToolExecutor::execute | ( | std::unique_ptr< FrontendActionFactory > | Action | ) | 
Convenient functions for the above execute.
Definition at line 43 of file Execution.cpp.
References execute().
| llvm::Error clang::tooling::ToolExecutor::execute | ( | std::unique_ptr< FrontendActionFactory > | Action, | 
| ArgumentsAdjuster | Adjuster ) | 
Executes an action with an argument adjuster.
Definition at line 47 of file Execution.cpp.
References execute().
      
  | 
  pure virtual | 
Returns a reference to the execution context.
This should be passed to tool callbacks, and tool callbacks should report results via the returned context.
Implemented in clang::tooling::AllTUsToolExecutor, and clang::tooling::StandaloneToolExecutor.
      
  | 
  pure virtual | 
Returns the name of a specific executor.
Implemented in clang::tooling::AllTUsToolExecutor, and clang::tooling::StandaloneToolExecutor.
      
  | 
  pure virtual | 
Returns a reference to the result container.
NOTE: This should only be used after the execution finishes. Tool callbacks should report results via ExecutionContext instead.
Implemented in clang::tooling::AllTUsToolExecutor, and clang::tooling::StandaloneToolExecutor.
      
  | 
  pure virtual | 
Map a virtual file to be used while running the tool.
| FilePath | The path at which the content will be mapped. | 
| Content | A buffer of the file's content. | 
Implemented in clang::tooling::AllTUsToolExecutor, and clang::tooling::StandaloneToolExecutor.