26 for (
size_t i = 0, e = M - N + 1; i != e; ++i)
46 return std::make_pair(Source.
slice(Start, End), Source.
substr(End));
54 std::pair<StringRef, StringRef> S =
getToken(Source, Delimiters);
55 while (!S.first.empty()) {
62 for (
unsigned i = 0, e = Name.
size(); i != e; ++i) {
63 unsigned char C = Name[i];
64 if (
isPrint(C) && C !=
'\\' && C !=
'"')
67 Out << '\\' << hexdigit(C >> 4) <<
hexdigit(C & 0x0F);
72 for (
char C : String) {
89 for (
const char C : String)
bool isPrint(char C)
Checks whether character C is printable.
This class represents lattice values for constants.
LLVM_NODISCARD bool equals_lower(StringRef RHS) const
equals_lower - Check for string equality, ignoring case.
void push_back(const T &Elt)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
void printEscapedString(StringRef Name, raw_ostream &Out)
Print each character of the specified string, escaping it if it is not printable or if it is an escap...
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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.
std::pair< StringRef, StringRef > getToken(StringRef Source, StringRef Delimiters=" \\\)
getToken - This function extracts one token from source, ignoring any leading characters that appear ...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
char hexdigit(unsigned X, bool LowerCase=false)
hexdigit - Return the hexadecimal character for the given number X (which should be less than 16)...
LLVM_NODISCARD size_t find_first_not_of(char C, size_t From=0) const
Find the first character in the string that is not C or npos if not found.
char toLower(char x)
Returns the corresponding lowercase character if x is uppercase.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
LLVM_NODISCARD 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::size_type StrInStrNoCase(StringRef s1, StringRef s2)
StrInStrNoCase - Portable version of strcasestr.
void printLowerCase(StringRef String, raw_ostream &Out)
printLowerCase - Print each character as lowercase if it is uppercase.
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.
void printHTMLEscaped(StringRef String, raw_ostream &Out)
Print each character of the specified string, escaping HTML special characters.