clang 20.0.0git
|
Tool - Information on a specific compilation tool. More...
#include "clang/Driver/Tool.h"
Inherited by clang::driver::tools::AMDGCN::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::Clang, clang::driver::tools::ClangAs, clang::driver::tools::CrossWindows::Assembler, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::Flang, clang::driver::tools::HIPSPV::Linker, clang::driver::tools::LinkerWrapper, clang::driver::tools::MinGW::Assembler, clang::driver::tools::MinGW::Linker, clang::driver::tools::NVPTX::Assembler, clang::driver::tools::NVPTX::FatBinary, clang::driver::tools::NVPTX::Linker, clang::driver::tools::OffloadBundler, clang::driver::tools::OffloadPackager, clang::driver::tools::PS4cpu::Linker, clang::driver::tools::PS5cpu::Linker, clang::driver::tools::PScpu::Assembler, clang::driver::tools::RISCV::Linker, clang::driver::tools::SPIRV::Linker, clang::driver::tools::SPIRV::Translator, clang::driver::tools::XCore::Assembler, clang::driver::tools::XCore::Linker, clang::driver::tools::aix::Assembler, clang::driver::tools::aix::Linker, clang::driver::tools::amdgpu::Linker, clang::driver::tools::baremetal::Linker, clang::driver::tools::baremetal::StaticLibTool, clang::driver::tools::darwin::MachOTool, clang::driver::tools::dragonfly::Assembler, clang::driver::tools::dragonfly::Linker, clang::driver::tools::freebsd::Assembler, clang::driver::tools::freebsd::Linker, clang::driver::tools::fuchsia::Linker, clang::driver::tools::fuchsia::StaticLibTool, clang::driver::tools::gcc::Common, clang::driver::tools::gnutools::Assembler, clang::driver::tools::gnutools::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::haiku::Linker, clang::driver::tools::hexagon::Assembler, clang::driver::tools::hexagon::Linker, clang::driver::tools::hlsl::Validator, clang::driver::tools::ifstool::Merger, clang::driver::tools::msp430::Linker, clang::driver::tools::nacltools::Linker, clang::driver::tools::netbsd::Assembler, clang::driver::tools::netbsd::Linker, clang::driver::tools::openbsd::Assembler, clang::driver::tools::openbsd::Linker, clang::driver::tools::solaris::Linker, clang::driver::tools::visualstudio::Linker, clang::driver::tools::wasm::Linker, clang::driver::tools::zos::Assembler, and clang::driver::tools::zos::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 ToolChain & | getToolChain () 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. | |
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 . | |
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 . | |
Tool::Tool | ( | const char * | Name, |
const char * | ShortName, | ||
const ToolChain & | TC | ||
) |
|
inlinevirtual |
Reimplemented in clang::driver::tools::Clang, and clang::driver::tools::Flang.
|
pure virtual |
ConstructJob - Construct jobs to perform the action JA
, writing to Output
and with Inputs
, and add the jobs to C
.
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::aix::Assembler, clang::driver::tools::aix::Linker, clang::driver::tools::amdgpu::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::baremetal::StaticLibTool, clang::driver::tools::baremetal::Linker, clang::driver::tools::Clang, clang::driver::tools::ClangAs, clang::driver::tools::OffloadBundler, clang::driver::tools::OffloadPackager, clang::driver::tools::LinkerWrapper, clang::driver::tools::CrossWindows::Assembler, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::NVPTX::Assembler, clang::driver::tools::NVPTX::FatBinary, clang::driver::tools::NVPTX::Linker, clang::driver::tools::darwin::Assembler, clang::driver::tools::darwin::Linker, clang::driver::tools::darwin::StaticLibTool, clang::driver::tools::darwin::Lipo, clang::driver::tools::darwin::Dsymutil, clang::driver::tools::darwin::VerifyDebug, 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::StaticLibTool, clang::driver::tools::fuchsia::Linker, clang::driver::tools::gnutools::Assembler, clang::driver::tools::gnutools::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::gcc::Common, clang::driver::tools::haiku::Linker, clang::driver::tools::hexagon::Assembler, clang::driver::tools::hexagon::Linker, clang::driver::tools::AMDGCN::Linker, clang::driver::tools::HIPSPV::Linker, clang::driver::tools::hlsl::Validator, clang::driver::tools::ifstool::Merger, clang::driver::tools::MinGW::Assembler, clang::driver::tools::MinGW::Linker, clang::driver::tools::msp430::Linker, clang::driver::tools::visualstudio::Linker, clang::driver::tools::nacltools::AssemblerARM, clang::driver::tools::nacltools::Linker, clang::driver::tools::netbsd::Assembler, clang::driver::tools::netbsd::Linker, clang::driver::tools::openbsd::Assembler, clang::driver::tools::openbsd::Linker, clang::driver::tools::PScpu::Assembler, clang::driver::tools::PS4cpu::Linker, clang::driver::tools::PS5cpu::Linker, clang::driver::tools::RISCV::Linker, clang::driver::tools::solaris::Assembler, clang::driver::tools::solaris::Linker, clang::driver::tools::SPIRV::Translator, clang::driver::tools::SPIRV::Linker, clang::driver::tools::wasm::Linker, clang::driver::tools::XCore::Assembler, clang::driver::tools::XCore::Linker, clang::driver::tools::zos::Assembler, and clang::driver::tools::zos::Linker.
Referenced by clang::driver::tools::LinkerWrapper::ConstructJob(), and ConstructJobMultipleOutputs().
|
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.
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. |
Reimplemented in clang::driver::tools::OffloadBundler.
Definition at line 20 of file Tool.cpp.
References clang::C, and ConstructJob().
|
inline |
Definition at line 50 of file Tool.h.
References ShortName.
Referenced by clang::driver::tools::OffloadBundler::ConstructJob(), clang::driver::tools::OffloadPackager::ConstructJob(), clang::driver::tools::ifstool::Merger::ConstructJob(), clang::driver::tools::OffloadBundler::ConstructJobMultipleOutputs(), and clang::driver::Driver::ExecuteCompilation().
|
inline |
Definition at line 52 of file Tool.h.
Referenced by clang::driver::tools::ClangAs::AddLoongArchTargetArgs(), clang::driver::tools::ClangAs::AddMIPSTargetArgs(), clang::driver::tools::ClangAs::AddRISCVTargetArgs(), clang::driver::tools::ClangAs::AddX86TargetArgs(), clang::driver::tools::aix::Assembler::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), clang::driver::tools::OffloadBundler::ConstructJob(), clang::driver::tools::OffloadPackager::ConstructJob(), clang::driver::tools::LinkerWrapper::ConstructJob(), clang::driver::tools::CrossWindows::Assembler::ConstructJob(), clang::driver::tools::darwin::Assembler::ConstructJob(), clang::driver::tools::dragonfly::Assembler::ConstructJob(), clang::driver::tools::Flang::ConstructJob(), clang::driver::tools::freebsd::Assembler::ConstructJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::tools::haiku::Linker::ConstructJob(), clang::driver::tools::hlsl::Validator::ConstructJob(), clang::driver::tools::ifstool::Merger::ConstructJob(), clang::driver::tools::MinGW::Assembler::ConstructJob(), clang::driver::tools::visualstudio::Linker::ConstructJob(), clang::driver::tools::nacltools::AssemblerARM::ConstructJob(), clang::driver::tools::netbsd::Assembler::ConstructJob(), clang::driver::tools::openbsd::Assembler::ConstructJob(), clang::driver::tools::PScpu::Assembler::ConstructJob(), clang::driver::tools::XCore::Assembler::ConstructJob(), clang::driver::tools::OffloadBundler::ConstructJobMultipleOutputs(), and clang::driver::CC1Command::Execute().
|
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::Clang, clang::driver::tools::ClangAs, clang::driver::tools::Flang, clang::driver::tools::gcc::Preprocessor, and clang::driver::tools::gcc::Compiler.
Definition at line 63 of file Tool.h.
Referenced by clang::driver::Driver::ExecuteCompilation().
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in clang::driver::tools::Clang.
|
pure virtual |
Implemented in clang::driver::tools::aix::Assembler, clang::driver::tools::aix::Linker, clang::driver::tools::amdgpu::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::baremetal::StaticLibTool, clang::driver::tools::baremetal::Linker, clang::driver::tools::Clang, clang::driver::tools::ClangAs, clang::driver::tools::OffloadBundler, clang::driver::tools::OffloadPackager, clang::driver::tools::LinkerWrapper, clang::driver::tools::CrossWindows::Assembler, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::NVPTX::Assembler, clang::driver::tools::NVPTX::FatBinary, clang::driver::tools::NVPTX::Linker, clang::driver::tools::darwin::Assembler, clang::driver::tools::darwin::Linker, clang::driver::tools::darwin::StaticLibTool, clang::driver::tools::darwin::Lipo, clang::driver::tools::darwin::Dsymutil, clang::driver::tools::darwin::VerifyDebug, 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::StaticLibTool, clang::driver::tools::fuchsia::Linker, clang::driver::tools::gnutools::Assembler, clang::driver::tools::gnutools::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::gcc::Preprocessor, clang::driver::tools::gcc::Compiler, clang::driver::tools::gcc::Linker, clang::driver::tools::haiku::Linker, clang::driver::tools::hexagon::Assembler, clang::driver::tools::hexagon::Linker, clang::driver::tools::AMDGCN::Linker, clang::driver::tools::HIPSPV::Linker, clang::driver::tools::hlsl::Validator, clang::driver::tools::ifstool::Merger, clang::driver::tools::MinGW::Assembler, clang::driver::tools::MinGW::Linker, clang::driver::tools::msp430::Linker, clang::driver::tools::visualstudio::Linker, clang::driver::tools::nacltools::Linker, clang::driver::tools::netbsd::Assembler, clang::driver::tools::netbsd::Linker, clang::driver::tools::openbsd::Assembler, clang::driver::tools::openbsd::Linker, clang::driver::tools::PScpu::Assembler, clang::driver::tools::PS4cpu::Linker, clang::driver::tools::PS5cpu::Linker, clang::driver::tools::RISCV::Linker, clang::driver::tools::solaris::Assembler, clang::driver::tools::solaris::Linker, clang::driver::tools::SPIRV::Translator, clang::driver::tools::SPIRV::Linker, clang::driver::tools::wasm::Linker, clang::driver::tools::XCore::Assembler, clang::driver::tools::XCore::Linker, clang::driver::tools::zos::Assembler, and clang::driver::tools::zos::Linker.
|
inlinevirtual |
Reimplemented in clang::driver::tools::darwin::Dsymutil.
Definition at line 59 of file Tool.h.
Referenced by clang::driver::Driver::generateCompilationDiagnostics().
|
inlinevirtual |
Reimplemented in clang::driver::tools::aix::Linker, clang::driver::tools::amdgpu::Linker, clang::driver::tools::AVR::Linker, clang::driver::tools::baremetal::StaticLibTool, clang::driver::tools::baremetal::Linker, clang::driver::tools::CrossWindows::Linker, clang::driver::tools::CSKY::Linker, clang::driver::tools::darwin::Linker, clang::driver::tools::darwin::StaticLibTool, clang::driver::tools::dragonfly::Linker, clang::driver::tools::freebsd::Linker, clang::driver::tools::fuchsia::StaticLibTool, clang::driver::tools::fuchsia::Linker, clang::driver::tools::gnutools::Linker, clang::driver::tools::gnutools::StaticLibTool, clang::driver::tools::gcc::Linker, clang::driver::tools::haiku::Linker, clang::driver::tools::hexagon::Linker, clang::driver::tools::ifstool::Merger, clang::driver::tools::MinGW::Linker, clang::driver::tools::msp430::Linker, clang::driver::tools::visualstudio::Linker, clang::driver::tools::nacltools::Linker, clang::driver::tools::netbsd::Linker, clang::driver::tools::openbsd::Linker, clang::driver::tools::PS4cpu::Linker, clang::driver::tools::PS5cpu::Linker, clang::driver::tools::RISCV::Linker, clang::driver::tools::solaris::Linker, clang::driver::tools::SPIRV::Linker, clang::driver::tools::wasm::Linker, clang::driver::tools::XCore::Linker, and clang::driver::tools::zos::Linker.
Definition at line 58 of file Tool.h.
Referenced by clang::driver::Driver::generateCompilationDiagnostics().