clang API Documentation
Tool - Information on a specific compilation tool. More...
#include <Tool.h>
Public Types | |
enum | ResponseFileSupport { RF_Full, RF_FileList, RF_None } |
Public Member Functions | |
Tool (const char *Name, const char *ShortName, const ToolChain &TC, ResponseFileSupport ResponseSupport=RF_None, llvm::sys::WindowsEncodingMethod ResponseEncoding=llvm::sys::WEM_UTF8, const char *ResponseFlag="@") | |
virtual | ~Tool () |
const char * | getName () const |
const char * | getShortName () const |
const ToolChain & | getToolChain () const |
virtual bool | hasIntegratedAssembler () const |
virtual bool | hasIntegratedCPP () const =0 |
virtual bool | isLinkJob () const |
virtual bool | isDsymutilJob () const |
ResponseFileSupport | getResponseFilesSupport () const |
Returns the level of support for response files of this tool, whether it accepts arguments to be passed via a file on disk. | |
llvm::sys::WindowsEncodingMethod | getResponseFileEncoding () const |
Returns which encoding the response file should use. This is only relevant on Windows platforms where there are different encodings being accepted for different tools. On UNIX, UTF8 is universal. | |
const char * | getResponseFileFlag () const |
Returns which prefix to use when passing the name of a response file as a parameter to this tool. | |
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 |
Tool::Tool | ( | const char * | Name, |
const char * | ShortName, | ||
const ToolChain & | TC, | ||
ResponseFileSupport | ResponseSupport = RF_None , |
||
llvm::sys::WindowsEncodingMethod | ResponseEncoding = llvm::sys::WEM_UTF8 , |
||
const char * | ResponseFlag = "@" |
||
) |
Tool::~Tool | ( | ) | [virtual] |
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
.
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::CrossWindows::Link, clang::driver::tools::CrossWindows::Assemble, clang::driver::tools::XCore::Link, clang::driver::tools::XCore::Assemble, clang::driver::tools::visualstudio::Compile, clang::driver::tools::visualstudio::Link, clang::driver::tools::dragonfly::Link, clang::driver::tools::dragonfly::Assemble, clang::driver::tools::solaris::Link, clang::driver::tools::solaris::Assemble, clang::driver::tools::minix::Link, clang::driver::tools::minix::Assemble, clang::driver::tools::gnutools::Link, clang::driver::tools::gnutools::Assemble, clang::driver::tools::netbsd::Link, clang::driver::tools::netbsd::Assemble, clang::driver::tools::freebsd::Link, clang::driver::tools::freebsd::Assemble, clang::driver::tools::bitrig::Link, clang::driver::tools::bitrig::Assemble, clang::driver::tools::openbsd::Link, clang::driver::tools::openbsd::Assemble, clang::driver::tools::darwin::VerifyDebug, clang::driver::tools::darwin::Dsymutil, clang::driver::tools::darwin::Lipo, clang::driver::tools::darwin::Link, clang::driver::tools::darwin::Assemble, clang::driver::tools::hexagon::Link, clang::driver::tools::hexagon::Assemble, clang::driver::tools::gcc::Common, clang::driver::tools::ClangAs, and clang::driver::tools::Clang.
const char* clang::driver::Tool::getName | ( | ) | const [inline] |
Definition at line 80 of file Tool.h.
Referenced by clang::createInvocationFromCommandLine(), and clang::tooling::getCC1Arguments().
llvm::sys::WindowsEncodingMethod clang::driver::Tool::getResponseFileEncoding | ( | ) | const [inline] |
Returns which encoding the response file should use. This is only relevant on Windows platforms where there are different encodings being accepted for different tools. On UNIX, UTF8 is universal.
Windows use cases: - GCC and Binutils on mingw only accept ANSI response files encoded with the system current code page.
FIXME: When GNU tools learn how to parse UTF16 on Windows, we should always use UTF16 for Windows, which is the Windows official encoding for international characters.
Definition at line 107 of file Tool.h.
Referenced by clang::driver::Command::Execute().
const char* clang::driver::Tool::getResponseFileFlag | ( | ) | const [inline] |
Returns which prefix to use when passing the name of a response file as a parameter to this tool.
Definition at line 112 of file Tool.h.
Referenced by clang::driver::Command::setResponseFile().
ResponseFileSupport clang::driver::Tool::getResponseFilesSupport | ( | ) | const [inline] |
Returns the level of support for response files of this tool, whether it accepts arguments to be passed via a file on disk.
Definition at line 92 of file Tool.h.
Referenced by clang::driver::Command::Print().
const char* clang::driver::Tool::getShortName | ( | ) | const [inline] |
Definition at line 82 of file Tool.h.
Referenced by clang::driver::Driver::ExecuteCompilation().
const ToolChain& clang::driver::Tool::getToolChain | ( | ) | const [inline] |
Definition at line 84 of file Tool.h.
Referenced by clang::driver::FallbackCommand::Execute().
virtual bool clang::driver::Tool::hasGoodDiagnostics | ( | ) | const [inline, virtual] |
Does this tool have "good" standardized diagnostics, or should the driver add an additional "command failed" diagnostic on failures.
Reimplemented in clang::driver::tools::gcc::Compile, clang::driver::tools::gcc::Preprocess, clang::driver::tools::ClangAs, and clang::driver::tools::Clang.
Definition at line 116 of file Tool.h.
Referenced by clang::driver::Driver::ExecuteCompilation().
virtual bool clang::driver::Tool::hasIntegratedAssembler | ( | ) | const [inline, virtual] |
Reimplemented in clang::driver::tools::visualstudio::Compile, clang::driver::tools::ClangAs, and clang::driver::tools::Clang.
Definition at line 86 of file Tool.h.
Referenced by SelectToolForJob().
virtual bool clang::driver::Tool::hasIntegratedCPP | ( | ) | const [pure virtual] |
Implemented in clang::driver::tools::CrossWindows::Link, clang::driver::tools::CrossWindows::Assemble, clang::driver::tools::XCore::Link, clang::driver::tools::XCore::Assemble, clang::driver::tools::visualstudio::Compile, clang::driver::tools::visualstudio::Link, clang::driver::tools::dragonfly::Link, clang::driver::tools::dragonfly::Assemble, clang::driver::tools::solaris::Link, clang::driver::tools::solaris::Assemble, clang::driver::tools::minix::Link, clang::driver::tools::minix::Assemble, clang::driver::tools::gnutools::Link, clang::driver::tools::gnutools::Assemble, clang::driver::tools::netbsd::Link, clang::driver::tools::netbsd::Assemble, clang::driver::tools::freebsd::Link, clang::driver::tools::freebsd::Assemble, clang::driver::tools::bitrig::Link, clang::driver::tools::bitrig::Assemble, clang::driver::tools::openbsd::Link, clang::driver::tools::openbsd::Assemble, clang::driver::tools::darwin::VerifyDebug, clang::driver::tools::darwin::Dsymutil, clang::driver::tools::darwin::Lipo, clang::driver::tools::darwin::Link, clang::driver::tools::darwin::Assemble, clang::driver::tools::hexagon::Link, clang::driver::tools::hexagon::Assemble, clang::driver::tools::gcc::Link, clang::driver::tools::gcc::Compile, clang::driver::tools::gcc::Preprocess, clang::driver::tools::ClangAs, and clang::driver::tools::Clang.
Referenced by SelectToolForJob().
virtual bool clang::driver::Tool::isDsymutilJob | ( | ) | const [inline, virtual] |
Reimplemented in clang::driver::tools::darwin::Dsymutil.
Definition at line 89 of file Tool.h.
Referenced by clang::driver::Driver::generateCompilationDiagnostics().
virtual bool clang::driver::Tool::isLinkJob | ( | ) | const [inline, virtual] |
Reimplemented in clang::driver::tools::CrossWindows::Link, clang::driver::tools::XCore::Link, clang::driver::tools::visualstudio::Compile, clang::driver::tools::visualstudio::Link, clang::driver::tools::dragonfly::Link, clang::driver::tools::solaris::Link, clang::driver::tools::minix::Link, clang::driver::tools::gnutools::Link, clang::driver::tools::netbsd::Link, clang::driver::tools::freebsd::Link, clang::driver::tools::bitrig::Link, clang::driver::tools::openbsd::Link, clang::driver::tools::darwin::Link, clang::driver::tools::hexagon::Link, and clang::driver::tools::gcc::Link.
Definition at line 88 of file Tool.h.
Referenced by clang::driver::Driver::generateCompilationDiagnostics().