clang API Documentation
ToolChain - Access to tools for a single platform. More...
#include <ToolChain.h>
Public Types | |
enum | CXXStdlibType { CST_Libcxx, CST_Libstdcxx } |
enum | RuntimeLibType { RLT_CompilerRT, RLT_Libgcc } |
typedef SmallVector < std::string, 16 > | path_list |
Public Member Functions | |
virtual | ~ToolChain () |
const Driver & | getDriver () const |
const llvm::Triple & | getTriple () const |
llvm::Triple::ArchType | getArch () const |
StringRef | getArchName () const |
StringRef | getPlatform () const |
StringRef | getOS () const |
StringRef | getDefaultUniversalArchName () const |
Provide the default architecture name (as expected by -arch) for this toolchain. Note t. | |
std::string | getTripleString () const |
path_list & | getFilePaths () |
const path_list & | getFilePaths () const |
path_list & | getProgramPaths () |
const path_list & | getProgramPaths () const |
const MultilibSet & | getMultilibs () const |
const SanitizerArgs & | getSanitizerArgs () const |
virtual llvm::opt::DerivedArgList * | TranslateArgs (const llvm::opt::DerivedArgList &Args, const char *BoundArch) const |
Tool * | SelectTool (const JobAction &JA) const |
Choose a tool to use to handle the action JA . | |
std::string | GetFilePath (const char *Name) const |
std::string | GetProgramPath (const char *Name) const |
std::string | GetLinkerPath () const |
virtual void | printVerboseInfo (raw_ostream &OS) const |
Dispatch to the specific toolchain for verbose printing. | |
virtual bool | isCrossCompiling () const |
Returns true if the toolchain is targeting a non-native architecture. | |
virtual bool | HasNativeLLVMSupport () const |
virtual types::ID | LookupTypeForExtension (const char *Ext) const |
virtual bool | IsBlocksDefault () const |
IsBlocksDefault - Does this tool chain enable -fblocks by default. | |
virtual bool | IsIntegratedAssemblerDefault () const |
bool | useIntegratedAs () const |
Check if the toolchain should use the integrated assembler. | |
virtual bool | IsMathErrnoDefault () const |
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default. | |
virtual bool | IsEncodeExtendedBlockSignatureDefault () const |
virtual bool | IsObjCNonFragileABIDefault () const |
virtual bool | UseObjCMixedDispatch () const |
virtual unsigned | GetDefaultStackProtectorLevel (bool KernelOrKext) const |
virtual RuntimeLibType | GetDefaultRuntimeLibType () const |
GetDefaultRuntimeLibType - Get the default runtime library variant to use. | |
virtual bool | IsUnwindTablesDefault () const |
virtual bool | isPICDefault () const =0 |
Test whether this toolchain defaults to PIC. | |
virtual bool | isPIEDefault () const =0 |
Test whether this toolchain defaults to PIE. | |
virtual bool | isPICDefaultForced () const =0 |
Tests whether this toolchain forces its default for PIC, PIE or non-PIC. If this returns true, any PIC related flags should be ignored and instead the results of isPICDefault() and isPIEDefault() are used exclusively. | |
virtual bool | SupportsProfiling () const |
SupportsProfiling - Does this tool chain support -pg. | |
virtual bool | SupportsObjCGC () const |
Does this tool chain support Objective-C garbage collection. | |
virtual void | CheckObjCARC () const |
Complain if this tool chain doesn't support Objective-C ARC. | |
virtual bool | UseDwarfDebugFlags () const |
virtual bool | UseSjLjExceptions () const |
UseSjLjExceptions - Does this tool chain use SjLj exceptions. | |
virtual std::string | getThreadModel () const |
getThreadModel() - Which thread model does this target use? | |
virtual bool | isThreadModelSupported (const StringRef Model) const |
supportsThreadModel() - Does this target support a thread model? | |
virtual std::string | ComputeLLVMTriple (const llvm::opt::ArgList &Args, types::ID InputType=types::TY_INVALID) const |
virtual std::string | ComputeEffectiveClangTriple (const llvm::opt::ArgList &Args, types::ID InputType=types::TY_INVALID) const |
virtual ObjCRuntime | getDefaultObjCRuntime (bool isNonFragile) const |
virtual bool | hasBlocksRuntime () const |
virtual void | AddClangSystemIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
Add the clang cc1 arguments for system include paths. | |
virtual void | addClangTargetOptions (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
Add options that need to be passed to cc1 for this target. | |
virtual void | addClangWarningOptions (llvm::opt::ArgStringList &CC1Args) const |
Add warning options that need to be passed to cc1 for this target. | |
virtual RuntimeLibType | GetRuntimeLibType (const llvm::opt::ArgList &Args) const |
virtual CXXStdlibType | GetCXXStdlibType (const llvm::opt::ArgList &Args) const |
virtual void | AddClangCXXStdlibIncludeArgs (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const |
virtual void | AddCXXStdlibLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
virtual void | AddCCKextLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
virtual bool | AddFastMathRuntimeIfAvailable (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
Protected Member Functions | |
ToolChain (const Driver &D, const llvm::Triple &T, const llvm::opt::ArgList &Args) | |
virtual Tool * | buildAssembler () const |
virtual Tool * | buildLinker () const |
virtual Tool * | getTool (Action::ActionClass AC) const |
Static Protected Member Functions | |
Utilities for implementing subclasses. | |
static void | addSystemInclude (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path) |
Utility function to add a system include directory to CC1 arguments. | |
static void | addExternCSystemInclude (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path) |
Utility function to add a system include directory with extern "C" semantics to CC1 arguments. | |
static void | addExternCSystemIncludeIfExists (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path) |
static void | addSystemIncludes (const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, ArrayRef< StringRef > Paths) |
Utility function to add a list of system include directories to CC1. | |
Protected Attributes | |
MultilibSet | Multilibs |
ToolChain - Access to tools for a single platform.
Definition at line 42 of file ToolChain.h.
typedef SmallVector<std::string, 16> clang::driver::ToolChain::path_list |
Definition at line 44 of file ToolChain.h.
Definition at line 46 of file ToolChain.h.
Definition at line 51 of file ToolChain.h.
ToolChain::ToolChain | ( | const Driver & | D, |
const llvm::Triple & | T, | ||
const llvm::opt::ArgList & | Args | ||
) | [protected] |
Definition at line 29 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), and isThreadModelSupported().
ToolChain::~ToolChain | ( | ) | [virtual] |
Definition at line 39 of file ToolChain.cpp.
void ToolChain::AddCCKextLibArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [virtual] |
AddCCKextLibArgs - Add the system specific linker arguments to use for kernel extensions (Darwin-specific).
Reimplemented in clang::driver::toolchains::DarwinClang.
Definition at line 422 of file ToolChain.cpp.
Referenced by AddLinkerInputs().
void ToolChain::AddClangCXXStdlibIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const [virtual] |
AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set the include paths to use for the given C++ standard library type.
Reimplemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::Hexagon_TC, clang::driver::toolchains::Linux, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, and clang::driver::toolchains::Bitrig.
Definition at line 393 of file ToolChain.cpp.
void ToolChain::AddClangSystemIncludeArgs | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const [virtual] |
Add the clang cc1 arguments for system include paths.
This routine is responsible for adding the necessary cc1 arguments to include headers from standard system header directories.
Reimplemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::Hexagon_TC, and clang::driver::toolchains::Linux.
Definition at line 311 of file ToolChain.cpp.
void ToolChain::addClangTargetOptions | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args | ||
) | const [virtual] |
Add options that need to be passed to cc1 for this target.
Reimplemented in clang::driver::toolchains::XCore, and clang::driver::toolchains::Generic_ELF.
Definition at line 316 of file ToolChain.cpp.
void ToolChain::addClangWarningOptions | ( | llvm::opt::ArgStringList & | CC1Args | ) | const [virtual] |
Add warning options that need to be passed to cc1 for this target.
Reimplemented in clang::driver::toolchains::DarwinClang.
Definition at line 320 of file ToolChain.cpp.
void ToolChain::AddCXXStdlibLibArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [virtual] |
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard library type.
Reimplemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::Bitrig, and clang::driver::toolchains::DarwinClang.
Definition at line 407 of file ToolChain.cpp.
References CST_Libcxx, CST_Libstdcxx, and GetCXXStdlibType().
Referenced by AddLinkerInputs(), clang::driver::tools::hexagon::Link::ConstructJob(), clang::driver::tools::freebsd::Link::ConstructJob(), and clang::driver::tools::gnutools::Link::ConstructJob().
void ToolChain::addExternCSystemInclude | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args, | ||
const Twine & | Path | ||
) | [static, protected] |
Utility function to add a system include directory with extern "C" semantics to CC1 arguments.
Note that this should be used rarely, and only for directories that historically and for legacy reasons are treated as having implicit extern "C" semantics. These semantics are *ignored* by and large today, but its important to preserve the preprocessor changes resulting from the classification.
Definition at line 368 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hexagon_TC::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), and addExternCSystemIncludeIfExists().
void ToolChain::addExternCSystemIncludeIfExists | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args, | ||
const Twine & | Path | ||
) | [static, protected] |
Definition at line 375 of file ToolChain.cpp.
References addExternCSystemInclude().
Referenced by clang::driver::toolchains::Linux::AddClangSystemIncludeArgs().
bool ToolChain::AddFastMathRuntimeIfAvailable | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [virtual] |
AddFastMathRuntimeIfAvailable - If a runtime library exists that sets global flags for unsafe floating point math, add it and return true.
This checks for presence of the -Ofast, -ffast-math or -funsafe-math flags.
Definition at line 427 of file ToolChain.cpp.
References GetFilePath(), and clang::driver::isOptimizationLevelFast().
Referenced by clang::driver::tools::gnutools::Link::ConstructJob().
void ToolChain::addSystemInclude | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args, | ||
const Twine & | Path | ||
) | [static, protected] |
Utility function to add a system include directory to CC1 arguments.
Definition at line 353 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::Bitrig::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::FreeBSD::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::NetBSD::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Hexagon_TC::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), and clang::driver::toolchains::MSVCToolChain::AddSystemIncludeWithSubfolder().
void ToolChain::addSystemIncludes | ( | const llvm::opt::ArgList & | DriverArgs, |
llvm::opt::ArgStringList & | CC1Args, | ||
ArrayRef< StringRef > | Paths | ||
) | [static, protected] |
Utility function to add a list of system include directories to CC1.
Definition at line 383 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs().
Tool * ToolChain::buildAssembler | ( | ) | const [protected, virtual] |
Reimplemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::Hexagon_TC, clang::driver::toolchains::Linux, clang::driver::toolchains::DragonFly, clang::driver::toolchains::Minix, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Bitrig, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::Solaris, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
Definition at line 85 of file ToolChain.cpp.
Tool * ToolChain::buildLinker | ( | ) | const [protected, virtual] |
Reimplemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::Hexagon_TC, clang::driver::toolchains::Linux, clang::driver::toolchains::DragonFly, clang::driver::toolchains::Minix, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Bitrig, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::Solaris, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
Definition at line 89 of file ToolChain.cpp.
virtual void clang::driver::ToolChain::CheckObjCARC | ( | ) | const [inline, virtual] |
Complain if this tool chain doesn't support Objective-C ARC.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 242 of file ToolChain.h.
std::string ToolChain::ComputeEffectiveClangTriple | ( | const llvm::opt::ArgList & | Args, |
types::ID | InputType = types::TY_INVALID |
||
) | const [virtual] |
ComputeEffectiveClangTriple - Return the Clang triple to use for this target, which may take into account the command line arguments. For example, on Darwin the -mmacosx-version-min= command line argument (which sets the deployment target) determines the version in the triple passed to Clang.
Reimplemented in clang::driver::toolchains::Darwin, and clang::driver::toolchains::MachO.
Definition at line 306 of file ToolChain.cpp.
References ComputeLLVMTriple().
std::string ToolChain::ComputeLLVMTriple | ( | const llvm::opt::ArgList & | Args, |
types::ID | InputType = types::TY_INVALID |
||
) | const [virtual] |
ComputeLLVMTriple - Return the LLVM target triple to use, after taking command line arguments into account.
Definition at line 222 of file ToolChain.cpp.
References getArch(), clang::driver::tools::arm::getARMCPUForMArch(), clang::driver::tools::arm::getARMTargetCPU(), clang::driver::tools::arm::getLLVMArchSuffixForARM(), getTriple(), and getTripleString().
Referenced by clang::driver::toolchains::MachO::ComputeEffectiveClangTriple(), ComputeEffectiveClangTriple(), and clang::driver::toolchains::Darwin::ComputeEffectiveClangTriple().
llvm::Triple::ArchType clang::driver::ToolChain::getArch | ( | ) | const [inline] |
Definition at line 114 of file ToolChain.h.
Referenced by clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::toolchains::Darwin::addStartObjectFileArgs(), ComputeLLVMTriple(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::gnutools::Link::ConstructJob(), getArchNameForCompilerRTLib(), clang::driver::toolchains::NetBSD::GetCXXStdlibType(), getLinuxDynamicLinker(), clang::driver::toolchains::MachO::getMachOArchName(), clang::driver::toolchains::MSVCToolChain::getVisualStudioBinariesFolder(), clang::driver::toolchains::MSVCToolChain::getWindowsSDKLibraryPath(), isCrossCompiling(), clang::driver::toolchains::MSVCToolChain::isPICDefault(), clang::driver::toolchains::CrossWindowsToolChain::isPICDefault(), clang::driver::toolchains::MachO::isPICDefaultForced(), clang::driver::toolchains::MSVCToolChain::isPICDefaultForced(), clang::driver::toolchains::CrossWindowsToolChain::isPICDefaultForced(), clang::driver::toolchains::CrossWindowsToolChain::isPIEDefault(), clang::driver::toolchains::Generic_GCC::IsUnwindTablesDefault(), clang::driver::toolchains::MachO::IsUnwindTablesDefault(), clang::driver::toolchains::MSVCToolChain::IsUnwindTablesDefault(), clang::driver::toolchains::CrossWindowsToolChain::IsUnwindTablesDefault(), clang::driver::toolchains::MachO::SupportsProfiling(), clang::driver::toolchains::MachO::TranslateArgs(), clang::driver::toolchains::Darwin::TranslateArgs(), clang::driver::toolchains::Darwin::UseSjLjExceptions(), and clang::driver::toolchains::FreeBSD::UseSjLjExceptions().
StringRef clang::driver::ToolChain::getArchName | ( | ) | const [inline] |
Definition at line 115 of file ToolChain.h.
Referenced by clang::driver::Driver::BuildJobsForAction(), and getArchNameForCompilerRTLib().
ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType | ( | const llvm::opt::ArgList & | Args | ) | const [virtual] |
Reimplemented in clang::driver::toolchains::Hexagon_TC, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, and clang::driver::toolchains::Bitrig.
Definition at line 338 of file ToolChain.cpp.
References CST_Libcxx, CST_Libstdcxx, clang::driver::Driver::Diag(), and getDriver().
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), AddCXXStdlibLibArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddCXXStdlibLibArgs(), clang::driver::toolchains::CrossWindowsToolChain::CrossWindowsToolChain(), and clang::driver::toolchains::Darwin::TranslateArgs().
ObjCRuntime ToolChain::getDefaultObjCRuntime | ( | bool | isNonFragile | ) | const [virtual] |
getDefaultObjCRuntime - Return the default Objective-C runtime for this platform.
FIXME: this really belongs on some sort of DeploymentTarget abstraction
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 204 of file ToolChain.cpp.
References clang::ObjCRuntime::GCC, and clang::ObjCRuntime::GNUstep.
virtual RuntimeLibType clang::driver::ToolChain::GetDefaultRuntimeLibType | ( | ) | const [inline, virtual] |
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 215 of file ToolChain.h.
References RLT_Libgcc.
Referenced by GetRuntimeLibType().
virtual unsigned clang::driver::ToolChain::GetDefaultStackProtectorLevel | ( | bool | KernelOrKext | ) | const [inline, virtual] |
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain (0=off, 1=on, 2=strong, 3=all).
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::Bitrig, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::Darwin.
Definition at line 210 of file ToolChain.h.
StringRef ToolChain::getDefaultUniversalArchName | ( | ) | const |
Provide the default architecture name (as expected by -arch) for this toolchain. Note t.
Definition at line 58 of file ToolChain.cpp.
Referenced by clang::driver::Driver::BuildUniversalActions(), and clang::driver::toolchains::MachO::getMachOArchName().
const Driver & ToolChain::getDriver | ( | ) | const |
Definition at line 42 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::Bitrig::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::FreeBSD::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::NetBSD::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Hexagon_TC::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), addClangRTLinux(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hexagon_TC::AddClangSystemIncludeArgs(), clang::driver::toolchains::MSVCToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), AddGoldPlugin(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), AddLinkerInputs(), clang::driver::toolchains::MachO::AddLinkRuntimeLib(), clang::driver::toolchains::MachO::AddLinkRuntimeLibArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::toolchains::Bitrig::Bitrig(), clang::driver::toolchains::MSVCToolChain::buildAssembler(), clang::driver::toolchains::Darwin::CheckObjCARC(), clang::driver::tools::hexagon::Link::ConstructJob(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::gnutools::Link::ConstructJob(), clang::driver::toolchains::Darwin::Darwin(), clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::FallbackCommand::Execute(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::toolchains::Generic_GCC::Generic_GCC(), getCompilerRTLibDir(), GetCXXStdlibType(), clang::driver::toolchains::Bitrig::GetCXXStdlibType(), clang::driver::toolchains::FreeBSD::GetCXXStdlibType(), clang::driver::toolchains::NetBSD::GetCXXStdlibType(), clang::driver::toolchains::Hexagon_TC::GetCXXStdlibType(), GetLinkerPath(), GetRuntimeLibType(), clang::driver::toolchains::Hexagon_TC::Hexagon_TC(), clang::driver::toolchains::MachO::MachO(), clang::driver::toolchains::Minix::Minix(), clang::driver::toolchains::NetBSD::NetBSD(), clang::driver::toolchains::OpenBSD::OpenBSD(), clang::driver::SanitizerArgs::SanitizerArgs(), SelectTool(), clang::driver::toolchains::Solaris::Solaris(), clang::driver::toolchains::TCEToolChain::TCEToolChain(), clang::driver::toolchains::MachO::TranslateArgs(), and clang::driver::toolchains::Darwin::TranslateArgs().
std::string ToolChain::GetFilePath | ( | const char * | Name | ) | const |
Definition at line 147 of file ToolChain.cpp.
References clang::driver::Driver::GetFilePath().
Referenced by AddFastMathRuntimeIfAvailable(), clang::driver::toolchains::Darwin::addStartObjectFileArgs(), clang::driver::tools::freebsd::Link::ConstructJob(), and clang::driver::tools::gnutools::Link::ConstructJob().
path_list& clang::driver::ToolChain::getFilePaths | ( | ) | [inline] |
Definition at line 127 of file ToolChain.h.
Referenced by clang::driver::toolchains::Bitrig::Bitrig(), clang::driver::tools::hexagon::Link::ConstructJob(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::gnutools::Link::ConstructJob(), clang::driver::toolchains::CrossWindowsToolChain::CrossWindowsToolChain(), clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::Driver::GetFilePath(), clang::driver::Driver::HandleImmediateArgs(), clang::driver::toolchains::Hexagon_TC::Hexagon_TC(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::Minix::Minix(), clang::driver::toolchains::NetBSD::NetBSD(), clang::driver::toolchains::OpenBSD::OpenBSD(), and clang::driver::toolchains::Solaris::Solaris().
const path_list& clang::driver::ToolChain::getFilePaths | ( | ) | const [inline] |
Definition at line 128 of file ToolChain.h.
std::string ToolChain::GetLinkerPath | ( | ) | const |
Returns the linker path, respecting the -fuse-ld= argument to determine the linker suffix or name.
Definition at line 156 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), getDriver(), and GetProgramPath().
Referenced by clang::driver::toolchains::Linux::Linux().
const MultilibSet& clang::driver::ToolChain::getMultilibs | ( | ) | const [inline] |
Definition at line 133 of file ToolChain.h.
References Multilibs.
Referenced by clang::driver::Driver::HandleImmediateArgs().
StringRef clang::driver::ToolChain::getOS | ( | ) | const [inline] |
Definition at line 117 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), and getCompilerRTLibDir().
StringRef clang::driver::ToolChain::getPlatform | ( | ) | const [inline] |
Definition at line 116 of file ToolChain.h.
std::string ToolChain::GetProgramPath | ( | const char * | Name | ) | const |
Definition at line 152 of file ToolChain.cpp.
References clang::driver::Driver::GetProgramPath().
Referenced by clang::driver::tools::hexagon::Link::ConstructJob(), GetLinkerPath(), and SplitDebugInfo().
path_list& clang::driver::ToolChain::getProgramPaths | ( | ) | [inline] |
Definition at line 130 of file ToolChain.h.
Referenced by clang::driver::toolchains::DragonFly::DragonFly(), clang::driver::toolchains::Generic_GCC::Generic_GCC(), clang::driver::Driver::GetProgramPath(), clang::driver::Driver::HandleImmediateArgs(), clang::driver::toolchains::Hexagon_TC::Hexagon_TC(), clang::driver::toolchains::Linux::Linux(), clang::driver::toolchains::MachO::MachO(), clang::driver::toolchains::Solaris::Solaris(), and clang::driver::toolchains::TCEToolChain::TCEToolChain().
const path_list& clang::driver::ToolChain::getProgramPaths | ( | ) | const [inline] |
Definition at line 131 of file ToolChain.h.
ToolChain::RuntimeLibType ToolChain::GetRuntimeLibType | ( | const llvm::opt::ArgList & | Args | ) | const [virtual] |
Definition at line 322 of file ToolChain.cpp.
References clang::driver::Driver::Diag(), GetDefaultRuntimeLibType(), getDriver(), RLT_CompilerRT, and RLT_Libgcc.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and AddRunTimeLibs().
const SanitizerArgs & ToolChain::getSanitizerArgs | ( | ) | const |
Definition at line 52 of file ToolChain.cpp.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), collectSanitizerRuntimes(), clang::driver::toolchains::FreeBSD::isPIEDefault(), and clang::driver::toolchains::Linux::isPIEDefault().
virtual std::string clang::driver::ToolChain::getThreadModel | ( | ) | const [inline, virtual] |
getThreadModel() - Which thread model does this target use?
Definition at line 252 of file ToolChain.h.
Referenced by clang::driver::Driver::PrintVersion().
Tool * ToolChain::getTool | ( | Action::ActionClass | AC | ) | const [protected, virtual] |
Reimplemented in clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
Definition at line 111 of file ToolChain.cpp.
References clang::driver::Action::AnalyzeJobClass, clang::driver::Action::AssembleJobClass, clang::driver::Action::BindArchClass, clang::driver::Action::CompileJobClass, clang::driver::Action::DsymutilJobClass, clang::driver::Action::InputClass, clang::driver::Action::LinkJobClass, clang::driver::Action::LipoJobClass, clang::driver::Action::MigrateJobClass, clang::driver::Action::PrecompileJobClass, clang::driver::Action::PreprocessJobClass, clang::driver::Action::VerifyDebugInfoJobClass, and clang::driver::Action::VerifyPCHJobClass.
Referenced by SelectTool().
const llvm::Triple& clang::driver::ToolChain::getTriple | ( | ) | const [inline] |
Definition at line 112 of file ToolChain.h.
Referenced by clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::Bitrig::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::Generic_ELF::addClangTargetOptions(), clang::driver::toolchains::DarwinClang::addClangWarningOptions(), AddGoldPlugin(), clang::driver::toolchains::MachO::AddLinkRuntimeLibArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), AddRunTimeLibs(), clang::driver::toolchains::MSVCToolChain::buildAssembler(), clang::driver::Driver::BuildCompilation(), clang::driver::Driver::BuildJobs(), collectSanitizerRuntimes(), ComputeLLVMTriple(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::gnutools::Link::ConstructJob(), clang::driver::tools::CrossWindows::Link::ConstructJob(), clang::driver::Driver::generateCompilationDiagnostics(), getCompilerRTLibDir(), clang::driver::toolchains::FreeBSD::GetCXXStdlibType(), clang::driver::toolchains::NetBSD::GetCXXStdlibType(), getLinuxDynamicLinker(), clang::driver::toolchains::MachO::getMachOArchName(), getSanitizerRTLibName(), getToolchainUnsupportedKinds(), clang::driver::toolchains::Generic_GCC::IsIntegratedAssemblerDefault(), linkSanitizerRuntimeDeps(), clang::driver::SanitizerArgs::SanitizerArgs(), ShouldDisableAutolink(), clang::driver::toolchains::MachO::TranslateArgs(), clang::driver::toolchains::Darwin::TranslateArgs(), clang::driver::toolchains::Darwin::UseSjLjExceptions(), and clang::driver::toolchains::FreeBSD::UseSjLjExceptions().
std::string clang::driver::ToolChain::getTripleString | ( | ) | const [inline] |
Definition at line 123 of file ToolChain.h.
Referenced by AddLinkerInputs(), ComputeLLVMTriple(), clang::driver::Driver::HandleImmediateArgs(), and clang::driver::Driver::PrintVersion().
virtual bool clang::driver::ToolChain::hasBlocksRuntime | ( | ) | const [inline, virtual] |
hasBlocksRuntime - Given that the user is compiling with -fblocks, does this tool chain guarantee the existence of a blocks runtime?
FIXME: this really belongs on some sort of DeploymentTarget abstraction
Reimplemented in clang::driver::toolchains::XCore, and clang::driver::toolchains::Darwin.
Definition at line 283 of file ToolChain.h.
bool ToolChain::HasNativeLLVMSupport | ( | ) | const [virtual] |
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.
Reimplemented in clang::driver::toolchains::Linux, clang::driver::toolchains::FreeBSD, and clang::driver::toolchains::MachO.
Definition at line 184 of file ToolChain.cpp.
Referenced by AddLinkerInputs().
virtual bool clang::driver::ToolChain::IsBlocksDefault | ( | ) | const [inline, virtual] |
IsBlocksDefault - Does this tool chain enable -fblocks by default.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 184 of file ToolChain.h.
bool ToolChain::isCrossCompiling | ( | ) | const [virtual] |
Returns true if the toolchain is targeting a non-native architecture.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 188 of file ToolChain.cpp.
References getArch().
Referenced by AddLinkerInputs().
virtual bool clang::driver::ToolChain::IsEncodeExtendedBlockSignatureDefault | ( | ) | const [inline, virtual] |
IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable -fencode-extended-block-signature by default.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 198 of file ToolChain.h.
virtual bool clang::driver::ToolChain::IsIntegratedAssemblerDefault | ( | ) | const [inline, virtual] |
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::Solaris, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
Definition at line 188 of file ToolChain.h.
Referenced by useIntegratedAs().
virtual bool clang::driver::ToolChain::IsMathErrnoDefault | ( | ) | const [inline, virtual] |
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Reimplemented in clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::DragonFly, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Bitrig, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::MachO.
Definition at line 194 of file ToolChain.h.
virtual bool clang::driver::ToolChain::IsObjCNonFragileABIDefault | ( | ) | const [inline, virtual] |
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Reimplemented in clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Bitrig, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::MachO.
Definition at line 202 of file ToolChain.h.
virtual bool clang::driver::ToolChain::isPICDefault | ( | ) | const [pure virtual] |
Test whether this toolchain defaults to PIC.
Implemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
virtual bool clang::driver::ToolChain::isPICDefaultForced | ( | ) | const [pure virtual] |
Tests whether this toolchain forces its default for PIC, PIE or non-PIC. If this returns true, any PIC related flags should be ignored and instead the results of isPICDefault()
and isPIEDefault()
are used exclusively.
Implemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
virtual bool clang::driver::ToolChain::isPIEDefault | ( | ) | const [pure virtual] |
Test whether this toolchain defaults to PIE.
Implemented in clang::driver::toolchains::XCore, clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::TCEToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::OpenBSD, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
bool ToolChain::isThreadModelSupported | ( | const StringRef | Model | ) | const [virtual] |
supportsThreadModel() - Does this target support a thread model?
Definition at line 209 of file ToolChain.cpp.
Referenced by clang::driver::Driver::PrintVersion(), and ToolChain().
bool ToolChain::IsUnwindTablesDefault | ( | ) | const [virtual] |
IsUnwindTablesDefault - Does this tool chain use -funwind-tables by default.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::MSVCToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::MachO, and clang::driver::toolchains::Generic_GCC.
Definition at line 75 of file ToolChain.cpp.
types::ID ToolChain::LookupTypeForExtension | ( | const char * | Ext | ) | const [virtual] |
LookupTypeForExtension - Return the default language type to use for the given extension.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 180 of file ToolChain.cpp.
References clang::driver::types::lookupTypeForExtension().
Referenced by clang::driver::Driver::BuildInputs().
virtual void clang::driver::ToolChain::printVerboseInfo | ( | raw_ostream & | OS | ) | const [inline, virtual] |
Dispatch to the specific toolchain for verbose printing.
This is used when handling the verbose option to print detailed, toolchain-specific information useful for understanding the behavior of the driver on a specific platform.
Reimplemented in clang::driver::toolchains::Generic_GCC.
Definition at line 167 of file ToolChain.h.
Referenced by clang::driver::Driver::HandleImmediateArgs().
Tool * ToolChain::SelectTool | ( | const JobAction & | JA | ) | const |
Choose a tool to use to handle the action JA
.
Definition at line 138 of file ToolChain.cpp.
References clang::driver::Action::AssembleJobClass, getDriver(), clang::driver::Action::getKind(), getTool(), and useIntegratedAs().
Referenced by SelectToolForJob().
virtual bool clang::driver::ToolChain::SupportsObjCGC | ( | ) | const [inline, virtual] |
Does this tool chain support Objective-C garbage collection.
Reimplemented in clang::driver::toolchains::Darwin, and clang::driver::toolchains::MachO.
Definition at line 239 of file ToolChain.h.
virtual bool clang::driver::ToolChain::SupportsProfiling | ( | ) | const [inline, virtual] |
SupportsProfiling - Does this tool chain support -pg.
Reimplemented in clang::driver::toolchains::XCore, and clang::driver::toolchains::MachO.
Definition at line 236 of file ToolChain.h.
virtual llvm::opt::DerivedArgList* clang::driver::ToolChain::TranslateArgs | ( | const llvm::opt::DerivedArgList & | Args, |
const char * | BoundArch | ||
) | const [inline, virtual] |
TranslateArgs - Create a new derived argument list for any argument translations this ToolChain may wish to perform, or 0 if no tool chain specific translations are needed.
BoundArch | - The bound architecture name, or 0. |
Reimplemented in clang::driver::toolchains::Darwin, and clang::driver::toolchains::MachO.
Definition at line 145 of file ToolChain.h.
Referenced by clang::driver::Compilation::getArgsForToolChain().
virtual bool clang::driver::ToolChain::UseDwarfDebugFlags | ( | ) | const [inline, virtual] |
UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf compile unit information.
Reimplemented in clang::driver::toolchains::MachO.
Definition at line 246 of file ToolChain.h.
bool ToolChain::useIntegratedAs | ( | ) | const |
Check if the toolchain should use the integrated assembler.
Definition at line 46 of file ToolChain.cpp.
References IsIntegratedAssemblerDefault().
Referenced by SelectTool(), SelectToolForJob(), ShouldDisableAutolink(), and ShouldDisableDwarfDirectory().
virtual bool clang::driver::ToolChain::UseObjCMixedDispatch | ( | ) | const [inline, virtual] |
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be used?
Reimplemented in clang::driver::toolchains::Darwin, and clang::driver::toolchains::MachO.
Definition at line 206 of file ToolChain.h.
virtual bool clang::driver::ToolChain::UseSjLjExceptions | ( | ) | const [inline, virtual] |
UseSjLjExceptions - Does this tool chain use SjLj exceptions.
Reimplemented in clang::driver::toolchains::FreeBSD, clang::driver::toolchains::Darwin, and clang::driver::toolchains::MachO.
Definition at line 249 of file ToolChain.h.
MultilibSet clang::driver::ToolChain::Multilibs [protected] |
Definition at line 80 of file ToolChain.h.
Referenced by clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), getMultilibs(), clang::driver::toolchains::Linux::Linux(), and clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::print().