|
clang
3.8.0
|
Utility to run a FrontendAction in a single clang invocation. More...
#include <Tooling.h>
Public Member Functions | |
| ToolInvocation (std::vector< std::string > CommandLine, FrontendAction *FAction, FileManager *Files, std::shared_ptr< PCHContainerOperations > PCHContainerOps=std::make_shared< PCHContainerOperations >()) | |
| Create a tool invocation. More... | |
| ToolInvocation (std::vector< std::string > CommandLine, ToolAction *Action, FileManager *Files, std::shared_ptr< PCHContainerOperations > PCHContainerOps) | |
| Create a tool invocation. More... | |
| ~ToolInvocation () | |
| void | setDiagnosticConsumer (DiagnosticConsumer *DiagConsumer) |
Set a DiagnosticConsumer to use during parsing. More... | |
| void | mapVirtualFile (StringRef FilePath, StringRef Content) |
| Map a virtual file to be used while running the tool. More... | |
| bool | run () |
| Run the clang invocation. More... | |
Utility to run a FrontendAction in a single clang invocation.
| clang::tooling::ToolInvocation::ToolInvocation | ( | std::vector< std::string > | CommandLine, |
| FrontendAction * | FAction, | ||
| FileManager * | Files, | ||
| std::shared_ptr< PCHContainerOperations > | PCHContainerOps = std::make_shared<PCHContainerOperations>() |
||
| ) |
Create a tool invocation.
| CommandLine | The command line arguments to clang. Note that clang uses its binary name (CommandLine[0]) to locate its builtin headers. Callers have to ensure that they are installed in a compatible location (see clang driver implementation) or mapped in via mapVirtualFile. |
| FAction | The action to be executed. Class takes ownership. |
| Files | The FileManager used for the execution. Class does not take ownership. |
| PCHContainerOps | The PCHContainerOperations for loading and creating clang modules. |
Definition at line 211 of file Tooling.cpp.
| clang::tooling::ToolInvocation::ToolInvocation | ( | std::vector< std::string > | CommandLine, |
| ToolAction * | Action, | ||
| FileManager * | Files, | ||
| std::shared_ptr< PCHContainerOperations > | PCHContainerOps | ||
| ) |
Create a tool invocation.
| CommandLine | The command line arguments to clang. |
| Action | The action to be executed. |
| Files | The FileManager used for the execution. |
| PCHContainerOps | The PCHContainerOperations for loading and creating clang modules. |
Definition at line 205 of file Tooling.cpp.
| clang::tooling::ToolInvocation::~ToolInvocation | ( | ) |
Definition at line 218 of file Tooling.cpp.
| void clang::tooling::ToolInvocation::mapVirtualFile | ( | StringRef | FilePath, |
| StringRef | Content | ||
| ) |
Map a virtual file to be used while running the tool.
| FilePath | The path at which the content will be mapped. |
| Content | A null terminated buffer of the file's content. |
Definition at line 223 of file Tooling.cpp.
| bool clang::tooling::ToolInvocation::run | ( | ) |
Run the clang invocation.
Definition at line 229 of file Tooling.cpp.
References clang::tooling::getCC1Arguments(), clang::FileManager::getVirtualFileSystem(), Input, clang::tooling::newDriver(), and clang::tooling::newInvocation().
|
inline |
Set a DiagnosticConsumer to use during parsing.
1.8.6