13#ifndef LLVM_TEXTAPI_PACKEDVERSION_H
14#define LLVM_TEXTAPI_PACKEDVERSION_H
34 : Version((Major << 16) | ((Minor & 0xff) << 8) | (Subminor & 0xff)) {}
37 unsigned Minor = 0, Subminor = 0;
45 bool empty()
const {
return Version == 0; }
48 unsigned getMajor()
const {
return Version >> 16; }
51 unsigned getMinor()
const {
return (Version >> 8) & 0xff; }
67 operator std::string()
const;
Defines the llvm::VersionTuple class, which represents a version in the form major[....
bool operator==(const PackedVersion &O) const
void print(raw_ostream &OS) const
unsigned getMinor() const
Retrieve the minor version number, if provided.
bool parse32(StringRef Str)
constexpr PackedVersion()=default
std::pair< bool, bool > parse64(StringRef Str)
bool operator!=(const PackedVersion &O) const
PackedVersion(unsigned Major, unsigned Minor, unsigned Subminor)
constexpr PackedVersion(uint32_t RawVersion)
PackedVersion(VersionTuple VT)
uint32_t rawValue() const
unsigned getSubminor() const
Retrieve the subminor version number, if provided.
unsigned getMajor() const
Retrieve the major version number.
bool operator<(const PackedVersion &O) const
StringRef - Represent a constant reference to a string, i.e.
Represents a version number in the form major[.minor[.subminor[.build]]].
unsigned getMajor() const
Retrieve the major version number.
std::optional< unsigned > getSubminor() const
Retrieve the subminor version number, if provided.
std::optional< unsigned > getMinor() const
Retrieve the minor version number, if provided.
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & operator<<(raw_ostream &OS, Architecture Arch)
This is an optimization pass for GlobalISel generic memory operations.