Go to the documentation of this file.
14 #ifndef LLVM_ADT_SMALLSTRING_H
15 #define LLVM_ADT_SMALLSTRING_H
25 template<
unsigned InternalLen>
41 template<
typename ItTy>
56 void assign(std::initializer_list<StringRef> Refs) {
73 void append(std::initializer_list<StringRef> Refs) {
74 size_t CurrentSize = this->
size();
75 size_t SizeNeeded = CurrentSize;
77 SizeNeeded +=
Ref.size();
81 CurrentSize +=
Ref.size();
272 explicit operator std::string()
const {
273 return std::string(this->data(), this->
size());
294 #endif // LLVM_ADT_SMALLSTRING_H
LLVM_NODISCARD bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
size_t find_last_of(char C, size_t From=StringRef::npos) const
Find the last character in the string that is C, or npos if not found.
This is an optimization pass for GlobalISel generic memory operations.
size_t find(StringRef Str, size_t From=0) const
Search for the first string Str in the string.
StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
bool endswith(StringRef Suffix) const
endswith - Check if this string ends with the given Suffix.
size_t find(char C, size_t From=0) const
find - Search for the first character C in the string.
LLVM_NODISCARD size_t count(char C) const
Return the number of occurrences of C in the string.
LLVM_NODISCARD bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
LLVM_NODISCARD size_t rfind(char C, size_t From=npos) const
Search for the last character C in the string.
static constexpr size_t npos
LLVM_NODISCARD size_t find(char C, size_t From=0) const
Search for the first character C in the string.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef substr(size_t Start, size_t N=StringRef::npos) const
Return a reference to the substring from [Start, Start + N).
void append(std::initializer_list< StringRef > Refs)
Append from a list of StringRefs.
void assign(StringRef RHS)
Assign from a StringRef.
SmallString & operator+=(char C)
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.
int compare_insensitive(StringRef RHS) const
compare_insensitive - Compare two strings, ignoring case.
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
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.
LLVM_NODISCARD StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
SmallString & operator+=(StringRef RHS)
SmallString(StringRef S)
Initialize from a StringRef.
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
size_t rfind(char C, size_t From=StringRef::npos) const
Search for the last character C in the string.
SmallString(std::initializer_list< StringRef > Refs)
Initialize by concatenating a list of StringRefs.
LLVM_NODISCARD size_t find_last_of(char C, size_t From=npos) const
Find the last character in the string that is C, or npos if not found.
@ Ref
The access may reference the value stored in memory.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void append(in_iter in_start, in_iter in_end)
Add the specified range to the end of the SmallVector.
(vector float) vec_cmpeq(*A, *B) C
size_t find_first_of(StringRef Chars, size_t From=0) const
Find the first character in the string that is in Chars, or npos if not found.
SmallString()=default
Default ctor - Initialize to empty.
size_t count(StringRef Str) const
Return the number of non-overlapped occurrences of Str in the string.
int compare(StringRef RHS) const
Compare two strings; the result is -1, 0, or 1 if this string is lexicographically less than,...
LLVM_NODISCARD bool equals(StringRef RHS) const
equals - Check for string equality, this is more efficient than compare() when the relative ordering ...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
void resize_for_overwrite(size_type N)
Like resize, but T is POD, the new values won't be initialized.
void append(StringRef RHS)
Append from a StringRef.
size_t count(char C) const
Return the number of occurrences of C in the string.
LLVM_NODISCARD bool equals_insensitive(StringRef RHS) const
Check for string equality, ignoring case.
void assign(std::initializer_list< StringRef > Refs)
Assign from a list of StringRefs.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
LLVM_NODISCARD int compare_numeric(StringRef RHS) const
compare_numeric - Compare two strings, treating sequences of digits as numbers.
size_t rfind(StringRef Str) const
Search for the last string Str in the string.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
StringRef - Represent a constant reference to a string, i.e.
Analysis the ScalarEvolution expression for r is this
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
SmallString(ItTy S, ItTy E)
Initialize with a range.
SmallString & operator=(StringRef RHS)
void assign(size_type NumElts, ValueParamT Elt)
bool equals_insensitive(StringRef RHS) const
Check for string equality, ignoring case.
size_t find_last_of(StringRef Chars, size_t From=StringRef::npos) const
Find the last character in the string that is in C, or npos if not found.
StringRef str() const
Explicit conversion to StringRef.
bool equals(StringRef RHS) const
Check for string equality.
int compare_numeric(StringRef RHS) const
compare_numeric - Compare two strings, treating sequences of digits as numbers.
LLVM_NODISCARD int compare_insensitive(StringRef RHS) const
Compare two strings, ignoring case.
bool startswith(StringRef Prefix) const
startswith - Check if this string starts with the given Prefix.
size_t find_first_not_of(StringRef Chars, size_t From=0) const
Find the first character in the string that is not in the string Chars, or npos if not found.
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.
BlockVerifier::State From
we should consider alternate ways to model stack dependencies Lots of things could be done in WebAssemblyTargetTransformInfo cpp there are numerous optimization related hooks that can be overridden in WebAssemblyTargetLowering Instead of the OptimizeReturned which should consider preserving the returned attribute through to MachineInstrs and extending the MemIntrinsicResults pass to do this optimization on calls too That would also let the WebAssemblyPeephole pass clean up dead defs for such as it does for stores Consider implementing and or getMachineCombinerPatterns Find a clean way to fix the problem which leads to the Shrink Wrapping pass being run after the WebAssembly PEI pass When setting multiple variables to the same we currently get code like const It could be done with a smaller encoding like local tee $pop5 local copy
LLVM_NODISCARD int compare(StringRef RHS) const
compare - Compare two strings; the result is -1, 0, or 1 if this string is lexicographically less tha...