clang API Documentation
This is a class to find a viable GCC installation for Clang to use. More...
#include <ToolChains.h>
Public Member Functions | |
GCCInstallationDetector () | |
void | init (const Driver &D, const llvm::Triple &TargetTriple, const llvm::opt::ArgList &Args) |
Initialize a GCCInstallationDetector from the driver. | |
bool | isValid () const |
Check whether we detected a valid GCC install. | |
const llvm::Triple & | getTriple () const |
Get the GCC triple for the detected install. | |
StringRef | getInstallPath () const |
Get the detected GCC installation path. | |
StringRef | getParentLibPath () const |
Get the detected GCC parent lib path. | |
const Multilib & | getMultilib () const |
Get the detected Multilib. | |
const MultilibSet & | getMultilibs () const |
Get the whole MultilibSet. | |
bool | getBiarchSibling (Multilib &M) const |
const GCCVersion & | getVersion () const |
Get the detected GCC version string. | |
void | print (raw_ostream &OS) const |
Print information about the detected GCC installation. |
This is a class to find a viable GCC installation for Clang to use.
This class tries to find a GCC installation on the system, and report information about it. It starts from the host information provided to the Driver, and has logic for fuzzing that where appropriate.
Definition at line 78 of file ToolChains.h.
clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::GCCInstallationDetector | ( | ) | [inline] |
Definition at line 102 of file ToolChains.h.
Get the biarch sibling multilib (if it exists).
Definition at line 1270 of file ToolChains.cpp.
Referenced by clang::driver::toolchains::Linux::Linux().
StringRef clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getInstallPath | ( | ) | const [inline] |
Get the detected GCC installation path.
Definition at line 113 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), and clang::driver::toolchains::Linux::Linux().
const Multilib& clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getMultilib | ( | ) | const [inline] |
Get the detected Multilib.
Definition at line 119 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), and clang::driver::toolchains::Linux::Linux().
const MultilibSet& clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getMultilibs | ( | ) | const [inline] |
Get the whole MultilibSet.
Definition at line 122 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::Linux().
StringRef clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getParentLibPath | ( | ) | const [inline] |
Get the detected GCC parent lib path.
Definition at line 116 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), and clang::driver::toolchains::Linux::Linux().
const llvm::Triple& clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getTriple | ( | ) | const [inline] |
Get the GCC triple for the detected install.
Definition at line 110 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), and clang::driver::toolchains::Linux::Linux().
const GCCVersion& clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getVersion | ( | ) | const [inline] |
Get the detected GCC version string.
Definition at line 129 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), and clang::driver::toolchains::Generic_ELF::addClangTargetOptions().
void Generic_GCC::GCCInstallationDetector::init | ( | const Driver & | D, |
const llvm::Triple & | TargetTriple, | ||
const llvm::opt::ArgList & | Args | ||
) |
Initialize a GCCInstallationDetector from the driver.
This performs all of the autodetection and sets up the various paths. Once constructed, a GCCInstallationDetector is essentially immutable.
FIXME: We shouldn't need an explicit TargetTriple parameter here, and should instead pull the target out of the driver. This is currently necessary because the driver doesn't store the final version of the target triple.
Definition at line 1190 of file ToolChains.cpp.
References getGCCToolchainDir(), clang::driver::Driver::InstalledDir, clang::driver::toolchains::Generic_GCC::GCCVersion::Parse(), clang::driver::Driver::PrefixDirs, and clang::driver::Driver::SysRoot.
Referenced by clang::driver::toolchains::Linux::Linux().
bool clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::isValid | ( | ) | const [inline] |
Check whether we detected a valid GCC install.
Definition at line 107 of file ToolChains.h.
Referenced by clang::driver::toolchains::Linux::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), and clang::driver::toolchains::Linux::Linux().
void Generic_GCC::GCCInstallationDetector::print | ( | raw_ostream & | OS | ) | const |
Print information about the detected GCC installation.
Definition at line 1256 of file ToolChains.cpp.
References clang::driver::Multilib::isDefault(), and clang::driver::ToolChain::Multilibs.
Referenced by clang::driver::toolchains::Generic_GCC::printVerboseInfo().