clang 22.0.0git
clang::driver::toolchains::Generic_GCC::GCCInstallationDetector Class Reference

This is a class to find a viable GCC installation for Clang to use. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Driver/ToolChains/Gnu.h"

Public Member Functions

 GCCInstallationDetector (const Driver &D)
void init (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 GCCInstallCandidategetSelectedInstallation () const
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 MultilibgetMultilib () const
 Get the detected Multilib.
const MultilibSetgetMultilibs () const
 Get the whole MultilibSet.
bool getBiarchSibling (Multilib &M) const
 Get the biarch sibling multilib (if it exists).
const GCCVersiongetVersion () const
 Get the detected GCC version string.
void print (raw_ostream &OS) const
 Print information about the detected GCC installation.

Public Attributes

std::function< StringRef(const llvm::Triple &)> TripleToDebianMultiarch
 Function for converting a triple to a Debian multiarch.

Detailed Description

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 226 of file Gnu.h.

Constructor & Destructor Documentation

◆ GCCInstallationDetector()

clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::GCCInstallationDetector ( const Driver & D)
inlineexplicit

Definition at line 257 of file Gnu.h.

References false.

Member Function Documentation

◆ getBiarchSibling()

bool Generic_GCC::GCCInstallationDetector::getBiarchSibling ( Multilib & M) const

Get the biarch sibling multilib (if it exists).

Returns
true iff such a sibling exists

Definition at line 2240 of file Gnu.cpp.

◆ getInstallPath()

StringRef clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getInstallPath ( ) const
inline

Get the detected GCC installation path.

Definition at line 279 of file Gnu.h.

◆ getMultilib()

const Multilib & clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getMultilib ( ) const
inline

Get the detected Multilib.

Definition at line 289 of file Gnu.h.

◆ getMultilibs()

const MultilibSet & clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getMultilibs ( ) const
inline

Get the whole MultilibSet.

Definition at line 294 of file Gnu.h.

◆ getParentLibPath()

StringRef clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getParentLibPath ( ) const
inline

Get the detected GCC parent lib path.

Definition at line 284 of file Gnu.h.

◆ getSelectedInstallation()

const GCCInstallCandidate & clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getSelectedInstallation ( ) const
inline

Definition at line 269 of file Gnu.h.

◆ getTriple()

const llvm::Triple & clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getTriple ( ) const
inline

Get the GCC triple for the detected install.

Definition at line 274 of file Gnu.h.

◆ getVersion()

const GCCVersion & clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getVersion ( ) const
inline

Get the detected GCC version string.

Definition at line 301 of file Gnu.h.

◆ init()

void Generic_GCC::GCCInstallationDetector::init ( 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 2083 of file Gnu.cpp.

References clang::driver::ToolChain::concat(), getGCCToolchainDir(), and clang::driver::toolchains::Generic_GCC::GCCVersion::Parse().

◆ isValid()

bool clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::isValid ( ) const
inline

Check whether we detected a valid GCC install.

Definition at line 267 of file Gnu.h.

◆ print()

void Generic_GCC::GCCInstallationDetector::print ( raw_ostream & OS) const

Print information about the detected GCC installation.

Definition at line 2223 of file Gnu.cpp.

Member Data Documentation

◆ TripleToDebianMultiarch

std::function<StringRef(const llvm::Triple &)> clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::TripleToDebianMultiarch
Initial value:
=
[](const llvm::Triple &T) {
StringRef S = T.str();
return S;
}
const FunctionProtoType * T

Function for converting a triple to a Debian multiarch.

The toolchains use this to adjust the target specific component of include paths for Debian.

Definition at line 251 of file Gnu.h.


The documentation for this class was generated from the following files: