clang API Documentation
#include <ToolChains.h>
Public Member Functions | |
MachO (const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args) | |
~MachO () | |
MachO specific toolchain API | |
{ | |
StringRef | getMachOArchName (const llvm::opt::ArgList &Args) const |
virtual void | AddLinkARCArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
Add the linker arguments to link the ARC runtime library. | |
virtual void | AddLinkRuntimeLibArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
Add the linker arguments to link the compiler runtime library. | |
virtual void | addStartObjectFileArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
virtual void | addMinVersionArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const |
virtual bool | isKernelStatic () const |
bool | isTargetIOSBased () const |
Is the target either iOS or an iOS simulator? | |
void | AddLinkRuntimeLib (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, StringRef DarwinLibName, bool AlwaysLink=false, bool IsEmbedded=false, bool AddRPath=false) const |
ToolChain Implementation | |
} { | |
std::string | ComputeEffectiveClangTriple (const llvm::opt::ArgList &Args, types::ID InputType) const override |
types::ID | LookupTypeForExtension (const char *Ext) const override |
bool | HasNativeLLVMSupport () const override |
llvm::opt::DerivedArgList * | TranslateArgs (const llvm::opt::DerivedArgList &Args, const char *BoundArch) const override |
bool | IsBlocksDefault () const override |
IsBlocksDefault - Does this tool chain enable -fblocks by default. | |
bool | IsIntegratedAssemblerDefault () const override |
bool | IsMathErrnoDefault () const override |
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default. | |
bool | IsEncodeExtendedBlockSignatureDefault () const override |
bool | IsObjCNonFragileABIDefault () const override |
bool | UseObjCMixedDispatch () const override |
bool | IsUnwindTablesDefault () const override |
RuntimeLibType | GetDefaultRuntimeLibType () const override |
GetDefaultRuntimeLibType - Get the default runtime library variant to use. | |
bool | isPICDefault () const override |
Test whether this toolchain defaults to PIC. | |
bool | isPIEDefault () const override |
Test whether this toolchain defaults to PIE. | |
bool | isPICDefaultForced () const override |
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. | |
bool | SupportsProfiling () const override |
SupportsProfiling - Does this tool chain support -pg. | |
bool | SupportsObjCGC () const override |
Does this tool chain support Objective-C garbage collection. | |
bool | UseDwarfDebugFlags () const override |
bool | UseSjLjExceptions () const override |
UseSjLjExceptions - Does this tool chain use SjLj exceptions. | |
Protected Member Functions | |
Tool * | buildAssembler () const override |
Tool * | buildLinker () const override |
Tool * | getTool (Action::ActionClass AC) const override |
Definition at line 186 of file ToolChains.h.
MachO::MachO | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const llvm::opt::ArgList & | Args | ||
) |
Definition at line 41 of file ToolChains.cpp.
References clang::driver::ToolChain::getDriver(), and clang::driver::ToolChain::getProgramPaths().
MachO::~MachO | ( | ) |
Definition at line 182 of file ToolChains.cpp.
virtual void clang::driver::toolchains::MachO::AddLinkARCArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [inline, virtual] |
Add the linker arguments to link the ARC runtime library.
Reimplemented in clang::driver::toolchains::DarwinClang.
Definition at line 210 of file ToolChains.h.
void MachO::AddLinkRuntimeLib | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs, | ||
StringRef | DarwinLibName, | ||
bool | AlwaysLink = false , |
||
bool | IsEmbedded = false , |
||
bool | AddRPath = false |
||
) | const |
Definition at line 293 of file ToolChains.cpp.
References clang::driver::ToolChain::getDriver(), and P.
Referenced by AddLinkRuntimeLibArgs(), and clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs().
void MachO::AddLinkRuntimeLibArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [virtual] |
Add the linker arguments to link the compiler runtime library.
Reimplemented in clang::driver::toolchains::DarwinClang.
Definition at line 870 of file ToolChains.cpp.
References AddLinkRuntimeLib(), clang::driver::tools::arm::getARMFloatABI(), clang::driver::ToolChain::getDriver(), and clang::driver::ToolChain::getTriple().
virtual void clang::driver::toolchains::MachO::addMinVersionArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [inline, virtual] |
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 221 of file ToolChains.h.
virtual void clang::driver::toolchains::MachO::addStartObjectFileArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [inline, virtual] |
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 218 of file ToolChains.h.
Tool * MachO::buildAssembler | ( | ) | const [override, protected, virtual] |
Reimplemented from clang::driver::ToolChain.
Definition at line 235 of file ToolChains.cpp.
Tool * MachO::buildLinker | ( | ) | const [override, protected, virtual] |
Reimplemented from clang::driver::ToolChain.
Definition at line 231 of file ToolChains.cpp.
std::string MachO::ComputeEffectiveClangTriple | ( | const llvm::opt::ArgList & | Args, |
types::ID | InputType | ||
) | const [override, 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 from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 186 of file ToolChains.cpp.
References clang::driver::ToolChain::ComputeLLVMTriple().
RuntimeLibType clang::driver::toolchains::MachO::GetDefaultRuntimeLibType | ( | ) | const [inline, override, virtual] |
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Reimplemented from clang::driver::ToolChain.
Definition at line 286 of file ToolChains.h.
References clang::driver::ToolChain::RLT_CompilerRT.
StringRef MachO::getMachOArchName | ( | const llvm::opt::ArgList & | Args | ) | const |
Get the "MachO" arch name for a particular compiler invocation. For example, Apple treats different ARM variations as distinct architectures.
Definition at line 156 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch(), GetArmArchForMArch(), GetArmArchForMCpu(), clang::driver::ToolChain::getDefaultUniversalArchName(), and clang::driver::ToolChain::getTriple().
Tool * MachO::getTool | ( | Action::ActionClass | AC | ) | const [override, protected, virtual] |
Reimplemented from clang::driver::ToolChain.
Definition at line 212 of file ToolChains.cpp.
References clang::driver::Action::DsymutilJobClass, clang::driver::Action::LipoJobClass, and clang::driver::Action::VerifyDebugInfoJobClass.
bool MachO::HasNativeLLVMSupport | ( | ) | const [override, virtual] |
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.
Reimplemented from clang::driver::ToolChain.
Definition at line 88 of file ToolChains.cpp.
bool clang::driver::toolchains::MachO::IsBlocksDefault | ( | ) | const [inline, override, virtual] |
IsBlocksDefault - Does this tool chain enable -fblocks by default.
Reimplemented from clang::driver::ToolChain.
Definition at line 257 of file ToolChains.h.
bool clang::driver::toolchains::MachO::IsEncodeExtendedBlockSignatureDefault | ( | ) | const [inline, override, virtual] |
IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable -fencode-extended-block-signature by default.
Reimplemented from clang::driver::ToolChain.
Definition at line 271 of file ToolChains.h.
bool clang::driver::toolchains::MachO::IsIntegratedAssemblerDefault | ( | ) | const [inline, override, virtual] |
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Reimplemented from clang::driver::ToolChain.
Definition at line 262 of file ToolChains.h.
virtual bool clang::driver::toolchains::MachO::isKernelStatic | ( | ) | const [inline, virtual] |
On some iOS platforms, kernel and kernel modules were built statically. Is this such a target?
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 226 of file ToolChains.h.
bool clang::driver::toolchains::MachO::IsMathErrnoDefault | ( | ) | const [inline, override, virtual] |
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Reimplemented from clang::driver::ToolChain.
Definition at line 267 of file ToolChains.h.
bool clang::driver::toolchains::MachO::IsObjCNonFragileABIDefault | ( | ) | const [inline, override, virtual] |
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Reimplemented from clang::driver::ToolChain.
Definition at line 275 of file ToolChains.h.
bool MachO::isPICDefault | ( | ) | const [override, virtual] |
Test whether this toolchain defaults to PIC.
Implements clang::driver::ToolChain.
Definition at line 963 of file ToolChains.cpp.
bool MachO::isPICDefaultForced | ( | ) | const [override, 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.
Implements clang::driver::ToolChain.
Definition at line 971 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch().
bool MachO::isPIEDefault | ( | ) | const [override, virtual] |
Test whether this toolchain defaults to PIE.
Implements clang::driver::ToolChain.
Definition at line 967 of file ToolChains.cpp.
bool clang::driver::toolchains::MachO::isTargetIOSBased | ( | ) | const [inline] |
Is the target either iOS or an iOS simulator?
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 231 of file ToolChains.h.
bool MachO::IsUnwindTablesDefault | ( | ) | const [override, virtual] |
IsUnwindTablesDefault - Does this tool chain use -funwind-tables by default.
Reimplemented from clang::driver::ToolChain.
Definition at line 947 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch().
types::ID MachO::LookupTypeForExtension | ( | const char * | Ext | ) | const [override, virtual] |
LookupTypeForExtension - Return the default language type to use for the given extension.
Reimplemented from clang::driver::ToolChain.
Definition at line 78 of file ToolChains.cpp.
References clang::driver::types::lookupTypeForExtension().
bool clang::driver::toolchains::MachO::SupportsObjCGC | ( | ) | const [inline, override, virtual] |
Does this tool chain support Objective-C garbage collection.
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 296 of file ToolChains.h.
bool MachO::SupportsProfiling | ( | ) | const [override, virtual] |
SupportsProfiling - Does this tool chain support -pg.
Reimplemented from clang::driver::ToolChain.
Definition at line 976 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch().
Referenced by clang::driver::toolchains::Darwin::addStartObjectFileArgs().
DerivedArgList * MachO::TranslateArgs | ( | const llvm::opt::DerivedArgList & | Args, |
const char * | BoundArch | ||
) | const [override, 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 from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 653 of file ToolChains.cpp.
References clang::driver::Driver::Diag(), clang::driver::options::DriverOption, clang::driver::ToolChain::getArch(), clang::driver::tools::darwin::getArchTypeForMachOArchName(), clang::driver::ToolChain::getDriver(), clang::driver::Driver::getOpts(), clang::driver::ToolChain::getTriple(), and clang::driver::options::LinkerInput.
bool MachO::UseDwarfDebugFlags | ( | ) | const [override, virtual] |
UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf compile unit information.
Reimplemented from clang::driver::ToolChain.
Definition at line 951 of file ToolChains.cpp.
References S.
bool clang::driver::toolchains::MachO::UseObjCMixedDispatch | ( | ) | const [inline, override, virtual] |
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be used?
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 280 of file ToolChains.h.
bool clang::driver::toolchains::MachO::UseSjLjExceptions | ( | ) | const [inline, override, virtual] |
UseSjLjExceptions - Does this tool chain use SjLj exceptions.
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::Darwin.
Definition at line 302 of file ToolChains.h.