clang
3.9.0
|
Represents a version number in the form major[.minor[.subminor[.build]]]. More...
#include <VersionTuple.h>
Public Member Functions | |
VersionTuple () | |
VersionTuple (unsigned Major) | |
VersionTuple (unsigned Major, unsigned Minor, bool UsesUnderscores=false) | |
VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor, bool UsesUnderscores=false) | |
VersionTuple (unsigned Major, unsigned Minor, unsigned Subminor, unsigned Build, bool UsesUnderscores=false) | |
bool | empty () const |
Determine whether this version information is empty (e.g., all version components are zero). More... | |
unsigned | getMajor () const |
Retrieve the major version number. More... | |
Optional< unsigned > | getMinor () const |
Retrieve the minor version number, if provided. More... | |
Optional< unsigned > | getSubminor () const |
Retrieve the subminor version number, if provided. More... | |
Optional< unsigned > | getBuild () const |
Retrieve the build version number, if provided. More... | |
bool | usesUnderscores () const |
void | UseDotAsSeparator () |
std::string | getAsString () const |
Retrieve a string representation of the version number. More... | |
bool | tryParse (StringRef string) |
Try to parse the given string as a version number. More... | |
Friends | |
bool | operator== (const VersionTuple &X, const VersionTuple &Y) |
Determine if two version numbers are equivalent. More... | |
bool | operator!= (const VersionTuple &X, const VersionTuple &Y) |
Determine if two version numbers are not equivalent. More... | |
bool | operator< (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number precedes another. More... | |
bool | operator> (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number follows another. More... | |
bool | operator<= (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number precedes or is equivalent to another. More... | |
bool | operator>= (const VersionTuple &X, const VersionTuple &Y) |
Determine whether one version number follows or is equivalent to another. More... | |
Represents a version number in the form major[.minor[.subminor[.build]]].
Definition at line 26 of file VersionTuple.h.
|
inline |
Definition at line 41 of file VersionTuple.h.
Referenced by tryParse().
|
inlineexplicit |
Definition at line 45 of file VersionTuple.h.
|
inlineexplicit |
Definition at line 49 of file VersionTuple.h.
|
inlineexplicit |
Definition at line 55 of file VersionTuple.h.
|
inlineexplicit |
Definition at line 61 of file VersionTuple.h.
|
inline |
Determine whether this version information is empty (e.g., all version components are zero).
Definition at line 69 of file VersionTuple.h.
Referenced by CheckAvailability(), checkAvailabilityAttr(), clang::driver::toolchains::MSVCToolChain::ComputeEffectiveClangTriple(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::visualstudio::getMSVCVersion(), clang::ObjCAvailabilityCheckExpr::hasVersion(), clang::AvailabilitySpec::isOtherPlatformSpec(), clang::AvailabilityChange::isValid(), clang::Sema::mergeAvailabilityAttr(), and versionsMatch().
std::string VersionTuple::getAsString | ( | ) | const |
Retrieve a string representation of the version number.
Definition at line 19 of file VersionTuple.cpp.
References clang::Result.
Referenced by clang::driver::toolchains::Darwin::addMinVersionArgs(), checkAvailabilityAttr(), clang::driver::toolchains::Darwin::ComputeEffectiveClangTriple(), clang::driver::toolchains::MSVCToolChain::ComputeEffectiveClangTriple(), clang::driver::tools::Clang::ConstructJob(), and clang::Sema::mergeAvailabilityAttr().
Retrieve the build version number, if provided.
Definition at line 91 of file VersionTuple.h.
References clang::None.
Referenced by clang::operator<<().
|
inline |
Retrieve the major version number.
Definition at line 74 of file VersionTuple.h.
Referenced by clang::ASTWriter::AddVersionTuple(), clang::driver::toolchains::MSVCToolChain::ComputeEffectiveClangTriple(), clang::driver::tools::Clang::ConstructJob(), handleAvailabilityAttr(), InitializePredefinedMacros(), clang::operator<<(), and ParseLangArgs().
Retrieve the minor version number, if provided.
Definition at line 77 of file VersionTuple.h.
References clang::None.
Referenced by clang::ASTWriter::AddVersionTuple(), clang::driver::toolchains::MSVCToolChain::ComputeEffectiveClangTriple(), InitializePredefinedMacros(), clang::operator<<(), and ParseLangArgs().
Retrieve the subminor version number, if provided.
Definition at line 84 of file VersionTuple.h.
References clang::None.
Referenced by clang::ASTWriter::AddVersionTuple(), clang::driver::toolchains::MSVCToolChain::ComputeEffectiveClangTriple(), InitializePredefinedMacros(), clang::operator<<(), and ParseLangArgs().
bool VersionTuple::tryParse | ( | StringRef | string | ) |
Try to parse the given string as a version number.
true
if the string does not match the regular expression [0-9]+(.[0-9]+){0,3} Definition at line 59 of file VersionTuple.cpp.
References parseInt(), and VersionTuple().
Referenced by clang::driver::tools::visualstudio::getMSVCVersion(), ParseLangArgs(), and clang::ObjCRuntime::tryParse().
|
inline |
Definition at line 101 of file VersionTuple.h.
Referenced by CheckAvailability().
|
inline |
Definition at line 97 of file VersionTuple.h.
Referenced by clang::operator<<().
|
friend |
Determine if two version numbers are not equivalent.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 116 of file VersionTuple.h.
|
friend |
Determine whether one version number precedes another.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 124 of file VersionTuple.h.
|
friend |
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 142 of file VersionTuple.h.
|
friend |
Determine if two version numbers are equivalent.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 107 of file VersionTuple.h.
|
friend |
Determine whether one version number follows another.
If not provided, minor and subminor version numbers are considered to be zero.
Definition at line 133 of file VersionTuple.h.
|
friend |
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 151 of file VersionTuple.h.