32 if (std::optional<unsigned> Minor = V.getMinor())
34 if (std::optional<unsigned> Subminor = V.getSubminor())
35 Out <<
'.' << *Subminor;
36 if (std::optional<unsigned> Build = V.getBuild())
38 if (std::optional<unsigned> Subbuild = V.getSubbuild())
39 Out <<
'.' << *Subbuild;
50 if (next <
'0' || next >
'9')
54 while (!input.
empty()) {
56 if (next <
'0' || next >
'9')
59 value = value * 10 + (
unsigned)(next -
'0');
66 unsigned major = 0, minor = 0, subminor = 0, build = 0, subbuild = 0;
105 if (build >= 1024 * 1024)
118 if (subbuild >= 1024)
125 *
this =
VersionTuple(major, minor, subminor, build, subbuild);
131 return VersionTuple(NewMajor, Minor, Subminor, Build, Subbuild);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool parseInt(StringRef &input, unsigned &value)
Defines the llvm::VersionTuple class, which represents a version in the form major[....
StringRef - Represent a constant reference to a string, i.e.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
constexpr bool empty() const
empty - Check if the string is empty.
bool consume_front(char Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
Represents a version number in the form major[.minor[.subminor[.build]]].
LLVM_ABI bool tryParse(StringRef string)
Try to parse the given string as a version number.
LLVM_ABI std::string getAsString() const
Retrieve a string representation of the version number.
LLVM_ABI VersionTuple withMajorReplaced(unsigned NewMajor) const
Return a version tuple that contains a different major version but everything else is the same.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)