class VersionTuple

Declaration

class VersionTuple { /* full declaration omitted */ };

Description

Represents a version number in the form major[.minor[.subminor[.build]]].

Declared at: llvm/include/llvm/Support/VersionTuple.h:31

Member Variables

private unsigned int Major
private unsigned int Minor
private unsigned int HasMinor
private unsigned int Subminor
private unsigned int HasSubminor
private unsigned int Build
private unsigned int HasBuild

Method Overview

Methods

VersionTuple()

Declared at: llvm/include/llvm/Support/VersionTuple.h:44

VersionTuple(unsigned int Major)

Declared at: llvm/include/llvm/Support/VersionTuple.h:48

Parameters

unsigned int Major

VersionTuple(unsigned int Major,
             unsigned int Minor)

Declared at: llvm/include/llvm/Support/VersionTuple.h:52

Parameters

unsigned int Major
unsigned int Minor

VersionTuple(unsigned int Major,
             unsigned int Minor,
             unsigned int Subminor)

Declared at: llvm/include/llvm/Support/VersionTuple.h:56

Parameters

unsigned int Major
unsigned int Minor
unsigned int Subminor

VersionTuple(unsigned int Major,
             unsigned int Minor,
             unsigned int Subminor,
             unsigned int Build)

Declared at: llvm/include/llvm/Support/VersionTuple.h:60

Parameters

unsigned int Major
unsigned int Minor
unsigned int Subminor
unsigned int Build

bool empty() const

Description

Determine whether this version information is empty (e.g., all version components are zero).

Declared at: llvm/include/llvm/Support/VersionTuple.h:67

std::string getAsString() const

Description

Retrieve a string representation of the version number.

Declared at: llvm/include/llvm/Support/VersionTuple.h:183

Optional<unsigned int> getBuild() const

Description

Retrieve the build version number, if provided.

Declared at: llvm/include/llvm/Support/VersionTuple.h:89

unsigned int getMajor() const

Description

Retrieve the major version number.

Declared at: llvm/include/llvm/Support/VersionTuple.h:72

Optional<unsigned int> getMinor() const

Description

Retrieve the minor version number, if provided.

Declared at: llvm/include/llvm/Support/VersionTuple.h:75

Optional<unsigned int> getSubminor() const

Description

Retrieve the subminor version number, if provided.

Declared at: llvm/include/llvm/Support/VersionTuple.h:82

llvm::VersionTuple normalize() const

Description

Return a version tuple that contains only components that are non-zero.

Declared at: llvm/include/llvm/Support/VersionTuple.h:109

bool tryParse(llvm::StringRef string)

Description

Try to parse the given string as a version number.

Declared at: llvm/include/llvm/Support/VersionTuple.h:188

Parameters

llvm::StringRef string

Returns

\c true if the string does not match the regular expression [0-9]+( . [0-9]+){0,3}

llvm::VersionTuple withMajorReplaced(
    unsigned int NewMajor) const

Description

Return a version tuple that contains a different major version but everything else is the same.

Declared at: llvm/include/llvm/Support/VersionTuple.h:104

Parameters

unsigned int NewMajor

llvm::VersionTuple withoutBuild() const

Description

Return a version tuple that contains only the first 3 version components.

Declared at: llvm/include/llvm/Support/VersionTuple.h:96