clang 20.0.0git
|
Struct to store and manipulate GCC versions. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Driver/ToolChains/Gnu.h"
Public Member Functions | |
bool | isOlderThan (int RHSMajor, int RHSMinor, int RHSPatch, StringRef RHSPatchSuffix=StringRef()) const |
Generic_GCC - A tool chain using the 'gcc' command to perform all subcommands; this relies on gcc translating the majority of command line options. | |
bool | operator< (const GCCVersion &RHS) const |
bool | operator> (const GCCVersion &RHS) const |
bool | operator<= (const GCCVersion &RHS) const |
bool | operator>= (const GCCVersion &RHS) const |
Static Public Member Functions | |
static GCCVersion | Parse (StringRef VersionText) |
Parse a GCCVersion object out of a string of text. | |
Public Attributes | |
std::string | Text |
The unparsed text of the version. | |
int | Major |
The parsed major, minor, and patch numbers. | |
int | Minor |
int | Patch |
std::string | MajorStr |
The text of the parsed major, and major+minor versions. | |
std::string | MinorStr |
std::string | PatchSuffix |
Any textual suffix on the patch number. | |
Struct to store and manipulate GCC versions.
We rely on assumptions about the form and structure of GCC version numbers: they consist of at most three '.'-separated components, and each component is a non-negative integer except for the last component. For the last component we are very flexible in order to tolerate release candidates or 'x' wildcards.
Note that the ordering established among GCCVersions is based on the preferred version string to use. For example we prefer versions without a hard-coded patch number to those with a hard coded patch number.
Currently this doesn't provide any logic for textual suffixes to patches in the way that (for example) Debian's version format does. If that ever becomes necessary, it can be added.
bool Generic_GCC::GCCVersion::isOlderThan | ( | int | RHSMajor, |
int | RHSMinor, | ||
int | RHSPatch, | ||
StringRef | RHSPatchSuffix = StringRef() |
||
) | const |
Generic_GCC - A tool chain using the 'gcc' command to perform all subcommands; this relies on gcc translating the majority of command line options.
Less-than for GCCVersion, implementing a Strict Weak Ordering.
Definition at line 2077 of file Gnu.cpp.
Referenced by clang::driver::toolchains::Linux::IsAArch64OutlineAtomicsDefault().
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Parse a GCCVersion object out of a string of text.
This is the primary means of forming GCCVersion objects.
Definition at line 2121 of file Gnu.cpp.
References clang::First, Major, MajorStr, Minor, MinorStr, Patch, and PatchSuffix.
Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), and findGccVersion().
int clang::driver::toolchains::Generic_GCC::GCCVersion::Major |
The parsed major, minor, and patch numbers.
Definition at line 167 of file Gnu.h.
Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), operator<(), and Parse().
std::string clang::driver::toolchains::Generic_GCC::GCCVersion::MajorStr |
The text of the parsed major, and major+minor versions.
Definition at line 170 of file Gnu.h.
Referenced by clang::driver::toolchains::Generic_GCC::addGCCLibStdCxxIncludePaths(), and Parse().
int clang::driver::toolchains::Generic_GCC::GCCVersion::Minor |
Definition at line 167 of file Gnu.h.
Referenced by operator<(), and Parse().
std::string clang::driver::toolchains::Generic_GCC::GCCVersion::MinorStr |
Definition at line 170 of file Gnu.h.
Referenced by clang::driver::toolchains::Generic_GCC::addGCCLibStdCxxIncludePaths(), and Parse().
int clang::driver::toolchains::Generic_GCC::GCCVersion::Patch |
Definition at line 167 of file Gnu.h.
Referenced by operator<(), and Parse().
std::string clang::driver::toolchains::Generic_GCC::GCCVersion::PatchSuffix |
Any textual suffix on the patch number.
Definition at line 173 of file Gnu.h.
Referenced by operator<(), and Parse().
std::string clang::driver::toolchains::Generic_GCC::GCCVersion::Text |
The unparsed text of the version.
Definition at line 164 of file Gnu.h.
Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Generic_GCC::addGCCLibStdCxxIncludePaths(), clang::driver::toolchains::CSKYToolChain::addLibStdCxxIncludePaths(), clang::driver::toolchains::Linux::addLibStdCxxIncludePaths(), clang::driver::toolchains::RISCVToolChain::addLibStdCxxIncludePaths(), clang::driver::toolchains::Solaris::addLibStdCxxIncludePaths(), and clang::driver::toolchains::HexagonToolChain::GetGCCLibAndIncVersion().