struct BinaryAnnotationIterator
Declaration
struct BinaryAnnotationIterator : public iterator_facade_base { /* full declaration omitted */ };
Description
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of the interface. Use this when it is reasonable to implement most of the iterator functionality in terms of a core subset. If you need special behavior or there are performance implications for this, you may want to override the relevant members instead. Note, one abstraction that this does *not* provide is implementing subtraction in terms of addition by negating the difference. Negation isn't always information preserving, and I can see very reasonable iterator designs where this doesn't work well. It doesn't really force much added boilerplate anyways. Another abstraction that this doesn't provide is implementing increment in terms of addition of one. These aren't equivalent for all iterator categories, and respecting that adds a lot of complexity for little gain. Iterators are expected to have const rules analogous to pointers, with a single, const-qualified operator*() that returns ReferenceT. This matches the second and third pointers in the following example: If an iterator facade returns a handle to its own state, then T (and PointerT and ReferenceT) should usually be const-qualified. Otherwise, if clients are expected to modify the handle itself, the field can be declared mutable or use const_cast. Classes wishing to use `iterator_facade_base` should implement the following methods: Forward Iterators: (All of the following methods) - DerivedT &operator =(const DerivedT &R ); - bool operator==(const DerivedT &R ) const; - T &operator *() const; - DerivedT &operator ++(); Bidirectional Iterators: (All methods of forward iterators, plus the following) - DerivedT &operator --(); Random-access Iterators: (All methods of bidirectional iterators excluding the following) - DerivedT &operator ++(); - DerivedT &operator --(); (and plus the following) - bool operator < (const DerivedT &RHS ) const; - DifferenceTypeT operator-(const DerivedT &R ) const; - DerivedT &operator +=(DifferenceTypeT N); - DerivedT &operator -=(DifferenceTypeT N);
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:168
Inherits from: iterator_facade_base
Member Variables
- private Optional<llvm::codeview::DecodedAnnotation> Current
- private ArrayRef<uint8_t> Data
- private ArrayRef<uint8_t> Next
Method Overview
- public BinaryAnnotationIterator()
- public BinaryAnnotationIterator(ArrayRef<uint8_t> Annotations)
- public BinaryAnnotationIterator(const llvm::codeview::BinaryAnnotationIterator & Other)
- private static int32_t DecodeSignedOperand(uint32_t Operand)
- private static int32_t DecodeSignedOperand(ArrayRef<uint8_t> & Annotations)
- private static uint32_t GetCompressedAnnotation(ArrayRef<uint8_t> & Annotations)
- private bool ParseCurrentAnnotation()
Methods
¶BinaryAnnotationIterator()
BinaryAnnotationIterator()
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:172
¶BinaryAnnotationIterator(
ArrayRef<uint8_t> Annotations)
BinaryAnnotationIterator(
ArrayRef<uint8_t> Annotations)
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:173
Parameters
- ArrayRef<uint8_t> Annotations
¶BinaryAnnotationIterator(
const llvm::codeview::
BinaryAnnotationIterator& Other)
BinaryAnnotationIterator(
const llvm::codeview::
BinaryAnnotationIterator& Other)
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:174
Parameters
- const llvm::codeview::BinaryAnnotationIterator& Other
¶static int32_t DecodeSignedOperand(
uint32_t Operand)
static int32_t DecodeSignedOperand(
uint32_t Operand)
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:241
Parameters
- uint32_t Operand
¶static int32_t DecodeSignedOperand(
ArrayRef<uint8_t>& Annotations)
static int32_t DecodeSignedOperand(
ArrayRef<uint8_t>& Annotations)
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:247
Parameters
- ArrayRef<uint8_t>& Annotations
¶static uint32_t GetCompressedAnnotation(
ArrayRef<uint8_t>& Annotations)
static uint32_t GetCompressedAnnotation(
ArrayRef<uint8_t>& Annotations)
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:203
Parameters
- ArrayRef<uint8_t>& Annotations
¶bool ParseCurrentAnnotation()
bool ParseCurrentAnnotation()
Declared at: llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h:251