LLVM 24.0.0git
llvm::ToolContext Class Reference

Describes how a tool was invoked and provides access to its host session. More...

#include "llvm/Support/Driver.h"

Public Member Functions

 ToolContext (const char *Path, const char *PrependArg, bool NeedsPrependArg)
LLVM_ABI ErrorOr< CallableToolgetCallableTool (StringRef Name) const
 Finds a tool registered with the session that owns this context.
LLVM_ABI ErrorOr< int > callTool (ArrayRef< const char * > Args) const
 Invokes another tool registered with the same host session.

Public Attributes

const charPath
const charPrependArg
bool NeedsPrependArg

Friends

class ToolSession

Detailed Description

Describes how a tool was invoked and provides access to its host session.

Definition at line 36 of file Driver.h.

Constructor & Destructor Documentation

◆ ToolContext()

llvm::ToolContext::ToolContext ( const char * Path,
const char * PrependArg,
bool NeedsPrependArg )
inline

Definition at line 51 of file Driver.h.

References NeedsPrependArg, Path, and PrependArg.

Member Function Documentation

◆ callTool()

ErrorOr< int > ToolContext::callTool ( ArrayRef< const char * > Args) const

Invokes another tool registered with the same host session.

Definition at line 130 of file Driver.cpp.

References llvm::make_error_code().

◆ getCallableTool()

ErrorOr< CallableTool > ToolContext::getCallableTool ( StringRef Name) const

Finds a tool registered with the session that owns this context.

Definition at line 124 of file Driver.cpp.

References llvm::make_error_code().

◆ ToolSession

friend class ToolSession
friend

Definition at line 39 of file Driver.h.

References ToolSession.

Referenced by ToolSession.

Member Data Documentation

◆ NeedsPrependArg

bool llvm::ToolContext::NeedsPrependArg

Definition at line 49 of file Driver.h.

Referenced by ToolContext().

◆ Path

const char* llvm::ToolContext::Path

Definition at line 42 of file Driver.h.

Referenced by ToolContext().

◆ PrependArg

const char* llvm::ToolContext::PrependArg

Definition at line 43 of file Driver.h.

Referenced by ToolContext().


The documentation for this class was generated from the following files: