35 unsigned long long Num;
44 for (
unsigned i = 1, ShiftNum = 8; i < Parts.
size(); ++i, ShiftNum -= 8) {
51 Version |= (Num << ShiftNum);
58 bool Truncated =
false;
62 return std::make_pair(
false, Truncated);
68 return std::make_pair(
false, Truncated);
70 unsigned long long Num;
72 return std::make_pair(
false, Truncated);
74 if (Num > 0xFFFFFFULL)
75 return std::make_pair(
false, Truncated);
77 if (Num > 0xFFFFULL) {
83 for (
unsigned i = 1, ShiftNum = 8; i < Parts.
size() && i < 3;
86 return std::make_pair(
false, Truncated);
89 return std::make_pair(
false, Truncated);
95 Version |= (Num << ShiftNum);
101 return std::make_pair(
true, Truncated);
This class represents lattice values for constants.
bool getAsUnsignedInteger(StringRef Str, unsigned Radix, unsigned long long &Result)
Helper functions for StringRef::getAsInteger.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
void SplitString(StringRef Source, SmallVectorImpl< StringRef > &OutFragments, StringRef Delimiters=" \\\)
SplitString - Split up the specified string according to the specified delimiters, appending the result fragments to the output list.
bool parse32(StringRef Str)
void print(raw_ostream &OS) const
unsigned getMajor() const
Retrieve the major version number.
std::pair< bool, bool > parse64(StringRef Str)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
unsigned getMinor() const
Retrieve the minor version number, if provided.
unsigned getSubminor() const
Retrieve the subminor version number, if provided.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.