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:26

Method Overview

Methods

VersionTuple()

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

VersionTuple(unsigned int Major)

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

Parameters

unsigned int Major

VersionTuple(unsigned int Major,
             unsigned int Minor)

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

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:51

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:55

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:62

std::string getAsString() const

Description

Retrieve a string representation of the version number.

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

Optional<unsigned int> getBuild() const

Description

Retrieve the build version number, if provided.

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

unsigned int getMajor() const

Description

Retrieve the major version number.

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

Optional<unsigned int> getMinor() const

Description

Retrieve the minor version number, if provided.

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

Optional<unsigned int> getSubminor() const

Description

Retrieve the subminor version number, if provided.

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

bool tryParse(llvm::StringRef string)

Description

Try to parse the given string as a version number.

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

Parameters

llvm::StringRef string

Returns

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

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:91