clang API Documentation
#include <ToolChains.h>
Classes | |
class | GCCInstallationDetector |
This is a class to find a viable GCC installation for Clang to use. More... | |
struct | GCCVersion |
Struct to store and manipulate GCC versions. More... | |
Public Member Functions | |
Generic_GCC (const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args) | |
~Generic_GCC () | |
void | printVerboseInfo (raw_ostream &OS) const override |
Dispatch to the specific toolchain for verbose printing. | |
bool | IsUnwindTablesDefault () const override |
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 | IsIntegratedAssemblerDefault () const override |
Protected Member Functions | |
Tool * | getTool (Action::ActionClass AC) const override |
Tool * | buildAssembler () const override |
Tool * | buildLinker () const override |
ToolChain Implementation Helper Functions | |
bool | isTarget64Bit () const |
Check whether the target triple's architecture is 64-bits. | |
bool | isTarget32Bit () const |
Check whether the target triple's architecture is 32-bits. | |
Protected Attributes | |
GCCInstallationDetector | GCCInstallation |
Generic_GCC - A tool chain using the 'gcc' command to perform all subcommands; this relies on gcc translating the majority of command line options.
Definition at line 31 of file ToolChains.h.
Generic_GCC::Generic_GCC | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const llvm::opt::ArgList & | Args | ||
) |
Definition at line 2007 of file ToolChains.cpp.
References clang::driver::ToolChain::getDriver(), and clang::driver::ToolChain::getProgramPaths().
Definition at line 2015 of file ToolChains.cpp.
Tool * Generic_GCC::buildAssembler | ( | ) | const [override, protected, virtual] |
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, 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, and clang::driver::toolchains::Solaris.
Definition at line 2033 of file ToolChains.cpp.
Tool * Generic_GCC::buildLinker | ( | ) | const [override, protected, virtual] |
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, 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, and clang::driver::toolchains::Solaris.
Definition at line 2037 of file ToolChains.cpp.
Tool * Generic_GCC::getTool | ( | Action::ActionClass | AC | ) | const [override, protected, virtual] |
Reimplemented from clang::driver::ToolChain.
Definition at line 2018 of file ToolChains.cpp.
References clang::driver::Action::CompileJobClass, and clang::driver::Action::PreprocessJobClass.
bool Generic_GCC::IsIntegratedAssemblerDefault | ( | ) | const [override, virtual] |
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::NetBSD, clang::driver::toolchains::FreeBSD, clang::driver::toolchains::OpenBSD, and clang::driver::toolchains::Solaris.
Definition at line 2062 of file ToolChains.cpp.
References clang::driver::ToolChain::getTriple().
Referenced by clang::driver::toolchains::OpenBSD::IsIntegratedAssemblerDefault(), clang::driver::toolchains::FreeBSD::IsIntegratedAssemblerDefault(), and clang::driver::toolchains::NetBSD::IsIntegratedAssemblerDefault().
bool Generic_GCC::isPICDefault | ( | ) | const [override, virtual] |
Test whether this toolchain defaults to PIC.
Implements clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain.
Definition at line 2050 of file ToolChains.cpp.
bool Generic_GCC::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.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain.
Definition at line 2058 of file ToolChains.cpp.
bool Generic_GCC::isPIEDefault | ( | ) | const [override, virtual] |
Test whether this toolchain defaults to PIE.
Implements clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, clang::driver::toolchains::Linux, clang::driver::toolchains::FreeBSD, and clang::driver::toolchains::OpenBSD.
Definition at line 2054 of file ToolChains.cpp.
bool clang::driver::toolchains::Generic_GCC::isTarget32Bit | ( | ) | const [inline, protected] |
Check whether the target triple's architecture is 32-bits.
Definition at line 177 of file ToolChains.h.
bool clang::driver::toolchains::Generic_GCC::isTarget64Bit | ( | ) | const [inline, protected] |
Check whether the target triple's architecture is 64-bits.
Definition at line 174 of file ToolChains.h.
bool Generic_GCC::IsUnwindTablesDefault | ( | ) | const [override, virtual] |
IsUnwindTablesDefault - Does this tool chain use -funwind-tables by default.
Reimplemented from clang::driver::ToolChain.
Reimplemented in clang::driver::toolchains::CrossWindowsToolChain, and clang::driver::toolchains::NetBSD.
Definition at line 2046 of file ToolChains.cpp.
References clang::driver::ToolChain::getArch().
void Generic_GCC::printVerboseInfo | ( | raw_ostream & | OS | ) | const [override, 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 from clang::driver::ToolChain.
Definition at line 2041 of file ToolChains.cpp.
References GCCInstallation, and clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::print().
Definition at line 150 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::Generic_ELF::addClangTargetOptions(), clang::driver::toolchains::Linux::Linux(), and printVerboseInfo().