clang API Documentation
Darwin - The base Darwin tool chain. More...
#include <ToolChains.h>
Public Types | |
enum | DarwinPlatformKind { MacOS, IPhoneOS, IPhoneOSSimulator } |
Public Member Functions | |
Darwin (const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args) | |
Darwin - Darwin tool chain for i386 and x86_64. | |
~Darwin () | |
std::string | ComputeEffectiveClangTriple (const llvm::opt::ArgList &Args, types::ID InputType) const override |
Apple Specific Toolchain Implementation | |
{ | |
void | addMinVersionArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override |
void | addStartObjectFileArgs (const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override |
bool | isKernelStatic () const override |
ToolChain Implementation | |
} { | |
bool | isCrossCompiling () const override |
Returns true if the toolchain is targeting a non-native architecture. | |
llvm::opt::DerivedArgList * | TranslateArgs (const llvm::opt::DerivedArgList &Args, const char *BoundArch) const override |
ObjCRuntime | getDefaultObjCRuntime (bool isNonFragile) const override |
Darwin provides an ARC runtime starting in MacOS X 10.7 and iOS 5.0. | |
bool | hasBlocksRuntime () const override |
Darwin provides a blocks runtime starting in MacOS X 10.6 and iOS 3.2. | |
bool | UseObjCMixedDispatch () const override |
unsigned | GetDefaultStackProtectorLevel (bool KernelOrKext) const override |
bool | SupportsObjCGC () const override |
Does this tool chain support Objective-C garbage collection. | |
void | CheckObjCARC () const override |
Complain if this tool chain doesn't support Objective-C ARC. | |
bool | UseSjLjExceptions () const override |
UseSjLjExceptions - Does this tool chain use SjLj exceptions. | |
Public Attributes | |
unsigned | DarwinVersion [3] |
The host version. | |
bool | TargetInitialized |
Whether the information on the target has been initialized. | |
DarwinPlatformKind | TargetPlatform |
VersionTuple | TargetVersion |
The OS version we are targeting. | |
Protected Member Functions | |
Darwin specific Toolchain functions | |
} { | |
void | setTarget (DarwinPlatformKind Platform, unsigned Major, unsigned Minor, unsigned Micro) const |
bool | isTargetIPhoneOS () const |
bool | isTargetIOSSimulator () const |
bool | isTargetIOSBased () const |
Is the target either iOS or an iOS simulator? | |
bool | isTargetMacOS () const |
bool | isTargetInitialized () const |
VersionTuple | getTargetVersion () const |
bool | isIPhoneOSVersionLT (unsigned V0, unsigned V1=0, unsigned V2=0) const |
bool | isMacosxVersionLT (unsigned V0, unsigned V1=0, unsigned V2=0) const |
Darwin - The base Darwin tool chain.
Definition at line 310 of file ToolChains.h.
Definition at line 322 of file ToolChains.h.
Darwin::Darwin | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const llvm::opt::ArgList & | Args | ||
) |
Darwin - Darwin tool chain for i386 and x86_64.
Definition at line 55 of file ToolChains.cpp.
References DarwinVersion, clang::driver::Driver::Diag(), and clang::driver::ToolChain::getDriver().
Darwin::~Darwin | ( | ) |
Definition at line 179 of file ToolChains.cpp.
void Darwin::addMinVersionArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [override, virtual] |
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 981 of file ToolChains.cpp.
References clang::VersionTuple::getAsString(), getTargetVersion(), isTargetIOSBased(), isTargetIOSSimulator(), isTargetMacOS(), and TargetVersion.
void Darwin::addStartObjectFileArgs | ( | const llvm::opt::ArgList & | Args, |
llvm::opt::ArgStringList & | CmdArgs | ||
) | const [override, virtual] |
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 997 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch(), clang::driver::ToolChain::GetFilePath(), isIPhoneOSVersionLT(), isMacosxVersionLT(), isTargetIOSSimulator(), isTargetIPhoneOS(), isTargetMacOS(), and clang::driver::toolchains::MachO::SupportsProfiling().
void Darwin::CheckObjCARC | ( | ) | const [override, virtual] |
Complain if this tool chain doesn't support Objective-C ARC.
Reimplemented from clang::driver::ToolChain.
Definition at line 1087 of file ToolChains.cpp.
References clang::driver::Driver::Diag(), clang::driver::ToolChain::getDriver(), isMacosxVersionLT(), isTargetIOSBased(), and isTargetMacOS().
std::string Darwin::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::toolchains::MachO.
Definition at line 193 of file ToolChains.cpp.
References clang::driver::ToolChain::ComputeLLVMTriple(), clang::VersionTuple::getAsString(), getTargetVersion(), isTargetInitialized(), and isTargetIOSBased().
ObjCRuntime Darwin::getDefaultObjCRuntime | ( | bool | isNonFragile | ) | const [override, virtual] |
Darwin provides an ARC runtime starting in MacOS X 10.7 and iOS 5.0.
Reimplemented from clang::driver::ToolChain.
Definition at line 93 of file ToolChains.cpp.
References clang::ObjCRuntime::FragileMacOSX, clang::ObjCRuntime::iOS, isTargetIOSBased(), clang::ObjCRuntime::MacOSX, and TargetVersion.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkARCArgs().
unsigned clang::driver::toolchains::Darwin::GetDefaultStackProtectorLevel | ( | bool | KernelOrKext | ) | const [inline, override, virtual] |
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain (0=off, 1=on, 2=strong, 3=all).
Reimplemented from clang::driver::ToolChain.
Definition at line 450 of file ToolChains.h.
VersionTuple clang::driver::toolchains::Darwin::getTargetVersion | ( | ) | const [inline, protected] |
Definition at line 411 of file ToolChains.h.
Referenced by addMinVersionArgs(), and ComputeEffectiveClangTriple().
bool Darwin::hasBlocksRuntime | ( | ) | const [override, virtual] |
Darwin provides a blocks runtime starting in MacOS X 10.6 and iOS 3.2.
Reimplemented from clang::driver::ToolChain.
Definition at line 102 of file ToolChains.cpp.
References isIPhoneOSVersionLT(), isMacosxVersionLT(), isTargetIOSBased(), and isTargetMacOS().
bool clang::driver::toolchains::Darwin::isCrossCompiling | ( | ) | const [inline, override, virtual] |
Returns true if the toolchain is targeting a non-native architecture.
Reimplemented from clang::driver::ToolChain.
Definition at line 434 of file ToolChains.h.
bool clang::driver::toolchains::Darwin::isIPhoneOSVersionLT | ( | unsigned | V0, |
unsigned | V1 = 0 , |
||
unsigned | V2 = 0 |
||
) | const [inline, protected] |
Definition at line 416 of file ToolChains.h.
Referenced by clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), addStartObjectFileArgs(), hasBlocksRuntime(), and TranslateArgs().
bool clang::driver::toolchains::Darwin::isKernelStatic | ( | ) | const [inline, override, virtual] |
On some iOS platforms, kernel and kernel modules were built statically. Is this such a target?
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 364 of file ToolChains.h.
bool clang::driver::toolchains::Darwin::isMacosxVersionLT | ( | unsigned | V0, |
unsigned | V1 = 0 , |
||
unsigned | V2 = 0 |
||
) | const [inline, protected] |
Definition at line 421 of file ToolChains.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), addStartObjectFileArgs(), CheckObjCARC(), hasBlocksRuntime(), and TranslateArgs().
bool clang::driver::toolchains::Darwin::isTargetInitialized | ( | ) | const [inline, protected] |
Definition at line 409 of file ToolChains.h.
Referenced by ComputeEffectiveClangTriple().
bool clang::driver::toolchains::Darwin::isTargetIOSBased | ( | ) | const [inline, protected] |
Is the target either iOS or an iOS simulator?
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 400 of file ToolChains.h.
Referenced by clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), addMinVersionArgs(), CheckObjCARC(), ComputeEffectiveClangTriple(), getDefaultObjCRuntime(), hasBlocksRuntime(), and TranslateArgs().
bool clang::driver::toolchains::Darwin::isTargetIOSSimulator | ( | ) | const [inline, protected] |
bool clang::driver::toolchains::Darwin::isTargetIPhoneOS | ( | ) | const [inline, protected] |
Definition at line 390 of file ToolChains.h.
Referenced by clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), and addStartObjectFileArgs().
bool clang::driver::toolchains::Darwin::isTargetMacOS | ( | ) | const [inline, protected] |
Definition at line 405 of file ToolChains.h.
Referenced by clang::driver::toolchains::DarwinClang::addClangWarningOptions(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), addMinVersionArgs(), addStartObjectFileArgs(), CheckObjCARC(), hasBlocksRuntime(), SupportsObjCGC(), and TranslateArgs().
void clang::driver::toolchains::Darwin::setTarget | ( | DarwinPlatformKind | Platform, |
unsigned | Major, | ||
unsigned | Minor, | ||
unsigned | Micro | ||
) | const [inline, protected] |
Definition at line 376 of file ToolChains.h.
bool Darwin::SupportsObjCGC | ( | ) | const [override, virtual] |
Does this tool chain support Objective-C garbage collection.
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 1083 of file ToolChains.cpp.
References isTargetMacOS().
DerivedArgList * Darwin::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::toolchains::MachO.
Definition at line 886 of file ToolChains.cpp.
References clang::driver::ToolChain::CST_Libcxx, clang::driver::Driver::Diag(), clang::driver::ToolChain::getArch(), clang::driver::ToolChain::GetCXXStdlibType(), clang::driver::ToolChain::getDriver(), clang::driver::Driver::getOpts(), clang::driver::ToolChain::getTriple(), isIPhoneOSVersionLT(), isMacosxVersionLT(), isTargetIOSBased(), and isTargetMacOS().
bool clang::driver::toolchains::Darwin::UseObjCMixedDispatch | ( | ) | const [inline, override, virtual] |
UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the mixed dispatch method be used?
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 443 of file ToolChains.h.
bool Darwin::UseSjLjExceptions | ( | ) | const [override, virtual] |
UseSjLjExceptions - Does this tool chain use SjLj exceptions.
Reimplemented from clang::driver::toolchains::MachO.
Definition at line 957 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch(), and clang::driver::ToolChain::getTriple().
Whether the information on the target has been initialized.
Definition at line 320 of file ToolChains.h.
Definition at line 328 of file ToolChains.h.
The OS version we are targeting.
Definition at line 331 of file ToolChains.h.
Referenced by addMinVersionArgs(), and getDefaultObjCRuntime().