clang  16.0.0git
Public Member Functions | List of all members
clang::driver::Tool Class Referenceabstract

Tool - Information on a specific compilation tool. More...

#include "clang/Driver/Tool.h"

Inherited by clang::driver::tools::aix::Assembler, clang::driver::tools::aix::Linker, clang::driver::tools::AMDGCN::Linker, clang::driver::tools::amdgpu::Linker, clang::driver::tools::ananas::Assembler, clang::driver::tools::ananas::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::baremetal::Linker, clang::driver::tools::Clang, clang::driver::tools::ClangAs, clang::driver::tools::cloudabi::Linker, clang::driver::tools::CrossWindows::Assembler, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::darwin::MachOTool, clang::driver::tools::dragonfly::Assembler, clang::driver::tools::dragonfly::Linker, clang::driver::tools::Flang, clang::driver::tools::freebsd::Assembler, clang::driver::tools::freebsd::Linker, clang::driver::tools::fuchsia::Linker, clang::driver::tools::gcc::Common, clang::driver::tools::gnutools::Assembler, clang::driver::tools::gnutools::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::hexagon::Assembler, clang::driver::tools::hexagon::Linker, clang::driver::tools::HIPSPV::Linker, clang::driver::tools::ifstool::Merger, clang::driver::tools::LinkerWrapper, clang::driver::tools::MinGW::Assembler, clang::driver::tools::MinGW::Linker, clang::driver::tools::minix::Assembler, clang::driver::tools::minix::Linker, clang::driver::tools::msp430::Linker, clang::driver::tools::Myriad::Linker, clang::driver::tools::nacltools::Linker, clang::driver::tools::netbsd::Assembler, clang::driver::tools::netbsd::Linker, clang::driver::tools::NVPTX::Assembler, clang::driver::tools::NVPTX::Linker, clang::driver::tools::OffloadBundler, clang::driver::tools::OffloadPackager, clang::driver::tools::OffloadWrapper, clang::driver::tools::openbsd::Assembler, clang::driver::tools::openbsd::Linker, clang::driver::tools::PScpu::Assembler, clang::driver::tools::PScpu::Linker, clang::driver::tools::RISCV::Linker, clang::driver::tools::SHAVE::Assembler, clang::driver::tools::SHAVE::Compiler, clang::driver::tools::solaris::Assembler, clang::driver::tools::solaris::Linker, clang::driver::tools::SPIRV::Linker, clang::driver::tools::SPIRV::Translator, clang::driver::tools::visualstudio::Linker, clang::driver::tools::wasm::Linker, clang::driver::tools::XCore::Assembler, and clang::driver::tools::XCore::Linker.

Public Member Functions

 Tool (const char *Name, const char *ShortName, const ToolChain &TC)
 
virtual ~Tool ()
 
const char * getName () const
 
const char * getShortName () const
 
const ToolChaingetToolChain () const
 
virtual bool hasIntegratedAssembler () const
 
virtual bool hasIntegratedBackend () const
 
virtual bool canEmitIR () const
 
virtual bool hasIntegratedCPP () const =0
 
virtual bool isLinkJob () const
 
virtual bool isDsymutilJob () const
 
virtual bool hasGoodDiagnostics () const
 Does this tool have "good" standardized diagnostics, or should the driver add an additional "command failed" diagnostic on failures. More...
 
virtual void ConstructJob (Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const =0
 ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs, and add the jobs to C. More...
 
virtual void ConstructJobMultipleOutputs (Compilation &C, const JobAction &JA, const InputInfoList &Outputs, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const
 Construct jobs to perform the action JA, writing to the Outputs and with Inputs, and add the jobs to C. More...
 

Detailed Description

Tool - Information on a specific compilation tool.

Definition at line 32 of file Tool.h.

Constructor & Destructor Documentation

◆ Tool()

Tool::Tool ( const char *  Name,
const char *  ShortName,
const ToolChain TC 
)

Definition at line 14 of file Tool.cpp.

◆ ~Tool()

Tool::~Tool ( )
virtual

Definition at line 17 of file Tool.cpp.

Member Function Documentation

◆ canEmitIR()

virtual bool clang::driver::Tool::canEmitIR ( ) const
inlinevirtual

Reimplemented in clang::driver::tools::Clang, and clang::driver::tools::Flang.

Definition at line 56 of file Tool.h.

◆ ConstructJob()

virtual void clang::driver::Tool::ConstructJob ( Compilation C,
const JobAction JA,
const InputInfo Output,
const InputInfoList Inputs,
const llvm::opt::ArgList &  TCArgs,
const char *  LinkingOutput 
) const
pure virtual

ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs, and add the jobs to C.

Parameters
TCArgs- The argument list for this toolchain, with any tool chain specific translations applied.
LinkingOutput- If this output will eventually feed the linker, then this is the final output name of the linked image.

Implemented in clang::driver::tools::LinkerWrapper, clang::driver::tools::OffloadPackager, clang::driver::tools::OffloadWrapper, clang::driver::tools::OffloadBundler, clang::driver::tools::ClangAs, clang::driver::tools::darwin::VerifyDebug, clang::driver::tools::Clang, clang::driver::tools::darwin::Dsymutil, clang::driver::tools::NVPTX::Linker, clang::driver::tools::darwin::Lipo, clang::driver::tools::NVPTX::Assembler, clang::driver::tools::gcc::Common, clang::driver::tools::darwin::StaticLibTool, clang::driver::tools::baremetal::Linker, clang::driver::tools::darwin::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::Flang, clang::driver::tools::msp430::Linker, clang::driver::tools::gnutools::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::Myriad::Linker, clang::driver::tools::darwin::Assembler, clang::driver::tools::RISCV::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::PScpu::Linker, clang::driver::tools::gnutools::Assembler, clang::driver::tools::hexagon::Linker, clang::driver::tools::SPIRV::Linker, clang::driver::tools::MinGW::Linker, clang::driver::tools::openbsd::Linker, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::freebsd::Linker, clang::driver::tools::solaris::Linker, clang::driver::tools::aix::Linker, clang::driver::tools::ananas::Linker, clang::driver::tools::dragonfly::Linker, clang::driver::tools::netbsd::Linker, clang::driver::tools::minix::Linker, clang::driver::tools::SHAVE::Assembler, clang::driver::tools::XCore::Linker, clang::driver::tools::nacltools::Linker, clang::driver::tools::PScpu::Assembler, clang::driver::tools::SPIRV::Translator, clang::driver::tools::amdgpu::Linker, clang::driver::tools::visualstudio::Linker, clang::driver::tools::hexagon::Assembler, clang::driver::tools::MinGW::Assembler, clang::driver::tools::AMDGCN::Linker, clang::driver::tools::openbsd::Assembler, clang::driver::tools::cloudabi::Linker, clang::driver::tools::CrossWindows::Assembler, clang::driver::tools::freebsd::Assembler, clang::driver::tools::HIPSPV::Linker, clang::driver::tools::solaris::Assembler, clang::driver::tools::aix::Assembler, clang::driver::tools::ananas::Assembler, clang::driver::tools::dragonfly::Assembler, clang::driver::tools::fuchsia::Linker, clang::driver::tools::SHAVE::Compiler, clang::driver::tools::netbsd::Assembler, clang::driver::tools::XCore::Assembler, clang::driver::tools::minix::Assembler, clang::driver::tools::wasm::Linker, clang::driver::tools::ifstool::Merger, and clang::driver::tools::nacltools::AssemblerARM.

Referenced by clang::driver::tools::LinkerWrapper::ConstructJob(), and ConstructJobMultipleOutputs().

◆ ConstructJobMultipleOutputs()

void Tool::ConstructJobMultipleOutputs ( Compilation C,
const JobAction JA,
const InputInfoList Outputs,
const InputInfoList Inputs,
const llvm::opt::ArgList &  TCArgs,
const char *  LinkingOutput 
) const
virtual

Construct jobs to perform the action JA, writing to the Outputs and with Inputs, and add the jobs to C.

The default implementation assumes a single output and is expected to be overloaded for the tools that support multiple inputs.

Parameters
TCArgsThe argument list for this toolchain, with any tool chain specific translations applied.
LinkingOutputIf this output will eventually feed the linker, then this is the final output name of the linked image.

Reimplemented in clang::driver::tools::OffloadBundler.

Definition at line 20 of file Tool.cpp.

References ConstructJob().

◆ getName()

const char* clang::driver::Tool::getName ( ) const
inline

Definition at line 48 of file Tool.h.

◆ getShortName()

const char* clang::driver::Tool::getShortName ( ) const
inline

◆ getToolChain()

const ToolChain& clang::driver::Tool::getToolChain ( ) const
inline

◆ hasGoodDiagnostics()

virtual bool clang::driver::Tool::hasGoodDiagnostics ( ) const
inlinevirtual

Does this tool have "good" standardized diagnostics, or should the driver add an additional "command failed" diagnostic on failures.

Reimplemented in clang::driver::tools::ClangAs, clang::driver::tools::gcc::Compiler, clang::driver::tools::Clang, clang::driver::tools::gcc::Preprocessor, and clang::driver::tools::Flang.

Definition at line 63 of file Tool.h.

Referenced by clang::driver::Driver::ExecuteCompilation().

◆ hasIntegratedAssembler()

virtual bool clang::driver::Tool::hasIntegratedAssembler ( ) const
inlinevirtual

◆ hasIntegratedBackend()

virtual bool clang::driver::Tool::hasIntegratedBackend ( ) const
inlinevirtual

Reimplemented in clang::driver::tools::Clang.

Definition at line 55 of file Tool.h.

◆ hasIntegratedCPP()

virtual bool clang::driver::Tool::hasIntegratedCPP ( ) const
pure virtual

Implemented in clang::driver::tools::LinkerWrapper, clang::driver::tools::OffloadPackager, clang::driver::tools::OffloadWrapper, clang::driver::tools::OffloadBundler, clang::driver::tools::ClangAs, clang::driver::tools::gcc::Linker, clang::driver::tools::darwin::VerifyDebug, clang::driver::tools::gcc::Compiler, clang::driver::tools::Clang, clang::driver::tools::darwin::Dsymutil, clang::driver::tools::gcc::Preprocessor, clang::driver::tools::NVPTX::Linker, clang::driver::tools::darwin::Lipo, clang::driver::tools::NVPTX::Assembler, clang::driver::tools::darwin::StaticLibTool, clang::driver::tools::baremetal::Linker, clang::driver::tools::darwin::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::Flang, clang::driver::tools::msp430::Linker, clang::driver::tools::gnutools::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::Myriad::Linker, clang::driver::tools::darwin::Assembler, clang::driver::tools::RISCV::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::PScpu::Linker, clang::driver::tools::gnutools::Assembler, clang::driver::tools::SPIRV::Linker, clang::driver::tools::hexagon::Linker, clang::driver::tools::MinGW::Linker, clang::driver::tools::openbsd::Linker, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::freebsd::Linker, clang::driver::tools::solaris::Linker, clang::driver::tools::aix::Linker, clang::driver::tools::ananas::Linker, clang::driver::tools::dragonfly::Linker, clang::driver::tools::SHAVE::Assembler, clang::driver::tools::netbsd::Linker, clang::driver::tools::XCore::Linker, clang::driver::tools::minix::Linker, clang::driver::tools::nacltools::Linker, clang::driver::tools::PScpu::Assembler, clang::driver::tools::amdgpu::Linker, clang::driver::tools::SPIRV::Translator, clang::driver::tools::visualstudio::Linker, clang::driver::tools::MinGW::Assembler, clang::driver::tools::hexagon::Assembler, clang::driver::tools::AMDGCN::Linker, clang::driver::tools::openbsd::Assembler, clang::driver::tools::CrossWindows::Assembler, clang::driver::tools::freebsd::Assembler, clang::driver::tools::HIPSPV::Linker, clang::driver::tools::solaris::Assembler, clang::driver::tools::XCore::Assembler, clang::driver::tools::aix::Assembler, clang::driver::tools::ananas::Assembler, clang::driver::tools::cloudabi::Linker, clang::driver::tools::dragonfly::Assembler, clang::driver::tools::SHAVE::Compiler, clang::driver::tools::netbsd::Assembler, clang::driver::tools::fuchsia::Linker, clang::driver::tools::minix::Assembler, clang::driver::tools::wasm::Linker, and clang::driver::tools::ifstool::Merger.

◆ isDsymutilJob()

virtual bool clang::driver::Tool::isDsymutilJob ( ) const
inlinevirtual

◆ isLinkJob()

virtual bool clang::driver::Tool::isLinkJob ( ) const
inlinevirtual

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