LLVM: llvm::VersionTuple Class Reference (original) (raw)
Represents a version number in the form major[.minor[.subminor[.build]]]. More...
#include "[llvm/Support/VersionTuple.h](VersionTuple%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
constexpr | VersionTuple () |
constexpr | VersionTuple (unsigned Major) |
constexpr | VersionTuple (unsigned Major, unsigned Minor) |
constexpr | VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor) |
constexpr | VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor, unsigned Build) |
bool | empty () const |
Determine whether this version information is empty (e.g., all version components are zero). | |
unsigned | getMajor () const |
Retrieve the major version number. | |
std::optional< unsigned > | getMinor () const |
Retrieve the minor version number, if provided. | |
std::optional< unsigned > | getSubminor () const |
Retrieve the subminor version number, if provided. | |
std::optional< unsigned > | getBuild () const |
Retrieve the build version number, if provided. | |
VersionTuple | withoutBuild () const |
Return a version tuple that contains only the first 3 version components. | |
VersionTuple | withMajorReplaced (unsigned NewMajor) const |
Return a version tuple that contains a different major version but everything else is the same. | |
VersionTuple | normalize () const |
Return a version tuple that contains only components that are non-zero. | |
std::string | getAsString () const |
Retrieve a string representation of the version number. | |
bool | tryParse (StringRef string) |
Try to parse the given string as a version number. | |
Friends | |
---|---|
bool | operator== (const VersionTuple &X, const VersionTuple &Y) |
Determine if two version numbers are equivalent. | |
bool | operator!= (const VersionTuple &X, const VersionTuple &Y) |
Determine if two version numbers are not equivalent. | |
bool | operator< (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number precedes another. | |
bool | operator> (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number follows another. | |
bool | operator<= (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number precedes or is equivalent to another. | |
bool | operator>= (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number follows or is equivalent to another. | |
hash_code | hash_value (const VersionTuple &VT) |
template<typename HasherT , llvm::endianness Endianness> | |
void | addHash (HashBuilder< HasherT, Endianness > &HBuilder, const VersionTuple &VT) |
Represents a version number in the form major[.minor[.subminor[.build]]].
Definition at line 29 of file VersionTuple.h.
constexpr llvm::VersionTuple::VersionTuple ( ) | inlineconstexpr |
---|
◆ VersionTuple() [2/5]
constexpr llvm::VersionTuple::VersionTuple ( unsigned Major) | inlineexplicitconstexpr |
---|
◆ VersionTuple() [3/5]
constexpr llvm::VersionTuple::VersionTuple ( unsigned Major, unsigned Minor ) | inlineexplicitconstexpr |
---|
◆ VersionTuple() [4/5]
constexpr llvm::VersionTuple::VersionTuple ( unsigned Major, unsigned Minor, unsigned Subminor ) | inlineexplicitconstexpr |
---|
◆ VersionTuple() [5/5]
◆ empty()
bool llvm::VersionTuple::empty ( ) const | inline |
---|
◆ getAsString()
std::string VersionTuple::getAsString | ( | ) | const |
---|
◆ getBuild()
std::optional< unsigned > llvm::VersionTuple::getBuild ( ) const | inline |
---|
Retrieve the build version number, if provided.
Definition at line 88 of file VersionTuple.h.
◆ getMajor()
unsigned llvm::VersionTuple::getMajor ( ) const | inline |
---|
◆ getMinor()
std::optional< unsigned > llvm::VersionTuple::getMinor ( ) const | inline |
---|
◆ getSubminor()
std::optional< unsigned > llvm::VersionTuple::getSubminor ( ) const | inline |
---|
◆ normalize()
Return a version tuple that contains only components that are non-zero.
Definition at line 108 of file VersionTuple.h.
◆ tryParse()
◆ withMajorReplaced()
Return a version tuple that contains a different major version but everything else is the same.
Definition at line 103 of file VersionTuple.h.
References VersionTuple().
◆ withoutBuild()
VersionTuple llvm::VersionTuple::withoutBuild ( ) const | inline |
---|
◆ addHash
◆ hash_value
◆ operator!=
Determine if two version numbers are not equivalent.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 132 of file VersionTuple.h.
◆ operator<
Determine whether one version number precedes another.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 140 of file VersionTuple.h.
◆ operator<=
Determine whether one version number precedes or is equivalent to another.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 158 of file VersionTuple.h.
◆ operator==
Determine if two version numbers are equivalent.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 123 of file VersionTuple.h.
◆ operator>
Determine whether one version number follows another.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 149 of file VersionTuple.h.
◆ operator>=
Determine whether one version number follows or is equivalent to another.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 167 of file VersionTuple.h.
The documentation for this class was generated from the following files:
- include/llvm/Support/VersionTuple.h
- lib/Support/VersionTuple.cpp