LLVM 20.0.0git
|
RopePiece - This class represents a view into a RopeRefCountString object. More...
#include "llvm/ADT/RewriteRope.h"
Public Member Functions | |
RopePiece ()=default | |
RopePiece (llvm::IntrusiveRefCntPtr< RopeRefCountString > Str, unsigned Start, unsigned End) | |
const char & | operator[] (unsigned Offset) const |
char & | operator[] (unsigned Offset) |
unsigned | size () const |
Public Attributes | |
llvm::IntrusiveRefCntPtr< RopeRefCountString > | StrData |
unsigned | StartOffs = 0 |
unsigned | EndOffs = 0 |
RopePiece - This class represents a view into a RopeRefCountString object.
This allows references to string data to be efficiently chopped up and moved around without having to push around the string data itself.
For example, we could have a 1M RopePiece and want to insert something into the middle of it. To do this, we split it into two RopePiece objects that both refer to the same underlying RopeRefCountString (just with different offsets) which is a nice constant time operation.
Definition at line 58 of file RewriteRope.h.
|
default |
|
inline |
Definition at line 64 of file RewriteRope.h.
Definition at line 71 of file RewriteRope.h.
References llvm::Offset, StartOffs, and StrData.
Definition at line 68 of file RewriteRope.h.
References llvm::Offset, StartOffs, and StrData.
|
inline |
Definition at line 75 of file RewriteRope.h.
References EndOffs, and StartOffs.
Referenced by llvm::RopePieceBTreeIterator::operator++(), and llvm::RopePieceBTreeIterator::piece().
unsigned llvm::RopePiece::EndOffs = 0 |
Definition at line 61 of file RewriteRope.h.
Referenced by size().
unsigned llvm::RopePiece::StartOffs = 0 |
Definition at line 60 of file RewriteRope.h.
Referenced by operator[](), and size().
llvm::IntrusiveRefCntPtr<RopeRefCountString> llvm::RopePiece::StrData |
Definition at line 59 of file RewriteRope.h.
Referenced by operator[]().