13#ifndef LLVM_ADT_REWRITEROPE_H
14#define LLVM_ADT_REWRITEROPE_H
43 delete[] (
char *)
this;
89 const void *CurNode =
nullptr;
111 return CurPiece ==
RHS.CurPiece && CurChar ==
RHS.CurChar;
118 if (CurChar + 1 < CurPiece->size())
178 enum { AllocChunkSize = 4080 };
179 unsigned AllocOffs = AllocChunkSize;
194 unsigned size()
const {
return Chunks.size(); }
198 void assign(
const char *Start,
const char *End) {
201 Chunks.insert(0, MakeRopeString(Start, End));
208 Chunks.insert(
Offset, MakeRopeString(Start, End));
215 Chunks.erase(
Offset, NumBytes);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
RewriteRope & operator=(const RewriteRope &)=delete
void insert(unsigned Offset, const char *Start, const char *End)
RopePieceBTree::iterator iterator
RewriteRope(const RewriteRope &RHS)
RopePieceBTree::iterator const_iterator
void erase(unsigned Offset, unsigned NumBytes)
void assign(const char *Start, const char *End)
RopePieceBTreeIterator - This class provides read-only forward iteration over bytes that are in a Rop...
RopePieceBTreeIterator & operator++()
bool operator==(const RopePieceBTreeIterator &RHS) const
RopePieceBTreeIterator()=default
std::forward_iterator_tag iterator_category
std::ptrdiff_t difference_type
LLVM_ABI void MoveToNextPiece()
RopePieceBTreeIterator operator++(int)
llvm::StringRef piece() const
bool operator!=(const RopePieceBTreeIterator &RHS) const
LLVM_ABI ~RopePieceBTree()
LLVM_ABI unsigned size() const
RopePieceBTreeIterator iterator
LLVM_ABI void insert(unsigned Offset, const RopePiece &R)
LLVM_ABI void erase(unsigned Offset, unsigned NumBytes)
RopePieceBTree & operator=(const RopePieceBTree &)=delete
LLVM_ABI RopePieceBTree()
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
RopePiece - This class represents a view into a RopeRefCountString object.
char & operator[](unsigned Offset)
RopePiece(llvm::IntrusiveRefCntPtr< RopeRefCountString > Str, unsigned Start, unsigned End)
const char & operator[](unsigned Offset) const
llvm::IntrusiveRefCntPtr< RopeRefCountString > StrData
RopeRefCountString - This struct is allocated with 'new char[]' from the heap, and represents a refer...