17 return AlignStyle::Left;
19 return AlignStyle::Center;
21 return AlignStyle::Right;
25 LLVM_BUILTIN_UNREACHABLE;
29 size_t &
Align,
char &Pad) {
36 if (
Spec.size() > 1) {
58std::optional<ReplacementItem>
65 std::size_t
Align = 0;
69 RepString = RepString.
trim();
71 assert(
false &&
"Invalid replacement sequence index!");
74 RepString = RepString.
trim();
77 assert(
false &&
"Invalid replacement field layout specification!");
79 RepString = RepString.
trim();
84 RepString = RepString.
trim();
85 if (!RepString.
empty()) {
86 assert(
false &&
"Unexpected characters found in replacement string!");
92std::pair<ReplacementItem, StringRef>
104 if (Braces.
size() > 1) {
105 size_t NumEscapedBraces = Braces.
size() / 2;
117 "Unterminated brace sequence. Escape with {{ for a literal brace.");
118 return std::make_pair(
137 return std::make_pair(*RI,
Right);
158void support::detail::format_adapter::anchor() {}
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
bool consumeInteger(unsigned Radix, T &Result)
Parse the current string as an integer of the specified radix.
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.
StringRef take_while(function_ref< bool(char)> F) const
Return the longest prefix of 'this' such that every character in the prefix satisfies the given predi...
StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
constexpr size_t size() const
size - Get the string size.
char front() const
front - Get the first character in the string.
bool consume_front(StringRef Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
size_t find_first_of(char C, size_t From=0) const
Find the first character in the string that is C, or npos if not found.
StringRef take_front(size_t N=1) const
Return a StringRef equal to 'this' but with only the first N elements remaining.
StringRef trim(char Char) const
Return string with consecutive Char characters starting from the left and right removed.
static constexpr size_t npos
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
testing::Matcher< const detail::ErrorHolder & > Failed()
This struct is a compact representation of a valid (non-zero power of two) alignment.