|
LLVM 24.0.0git
|
Owns LLVM process initialization and an in-process tool registry. More...
#include "llvm/Support/Driver.h"
Classes | |
| struct | Impl |
Public Member Functions | |
| ToolSession (int &Argc, char **&Argv, ArrayRef< CallableTool > Tools, bool InstallPipeSignalExitHandler=true, bool NeedsPOSIXUtilitySignalHandling=false) | |
| ~ToolSession () | |
| ToolSession (const ToolSession &)=delete | |
| ToolSession & | operator= (const ToolSession &)=delete |
| ErrorOr< int > | callTool (ArrayRef< const char * > Args) |
| Invokes the tool named by Args[0]. | |
Friends | |
| class | ToolContext |
Owns LLVM process initialization and an in-process tool registry.
A long-lived host constructs one session and uses it for every embedded tool invocation. The individual tools borrow a ToolContext and therefore do not initialize or shut down LLVM themselves.
LLVM tools may use process-global state. Tool invocations must be externally serialized; concurrent calls are not supported.
| ToolSession::ToolSession | ( | int & | Argc, |
| char **& | Argv, | ||
| ArrayRef< CallableTool > | Tools, | ||
| bool | InstallPipeSignalExitHandler = true, | ||
| bool | NeedsPOSIXUtilitySignalHandling = false ) |
Definition at line 58 of file Driver.cpp.
References assert().
Referenced by operator=(), and ToolSession().
|
default |
|
delete |
References ToolSession().
Invokes the tool named by Args[0].
Args may instead contain a process-style argv beginning with the session executable or an LLVM multicall name.
Definition at line 95 of file Driver.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::ErrorOr< T >::getError(), llvm::make_error_code(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::sys::path::stem(), llvm::StringRef::str(), and ToolContext.
Referenced by operator=().
|
delete |
References callTool(), ToolContext, and ToolSession().
|
friend |
Definition at line 91 of file Driver.h.
References ToolContext.
Referenced by callTool(), operator=(), and ToolContext.