10 #ifndef LLVM_DEBUGINFO_CODEVIEW_RECORDITERATOR_H 11 #define LLVM_DEBUGINFO_CODEVIEW_RECORDITERATOR_H 59 template <
typename Record,
typename Func>
61 while (!StreamBuffer.
empty()) {
69 if (StreamBuffer.
size() < RealLen)
73 StreamBuffer = StreamBuffer.
drop_front(RealLen);
84 template <
typename Kind>
100 return std::move(
EC);
106 template <
typename Kind>
110 auto ExpectedRec = codeview::readCVRecordFromStream<Kind>(Stream, 0);
112 return ExpectedRec.takeError();
114 Len = ExpectedRec->length();
121 #endif // LLVM_DEBUGINFO_CODEVIEW_RECORDITERATOR_H
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
ArrayRef< T > take_front(size_t N=1) const
Return a copy of *this with only the first N elements.
This class represents lattice values for constants.
Error readObject(const T *&Dest)
Get a pointer to an object of type T from the underlying stream, as if by memcpy, and store the resul...
SmallVector< std::pair< uint32_t, TypeIndex >, 8 > Mappings
CVRecord< Kind > OriginalRecord
ArrayRef< uint8_t > content() const
Tagged union holding either a T or a Error.
Error forEachCodeViewRecord(ArrayRef< uint8_t > StreamBuffer, Func F)
ArrayRef< uint8_t > data() const
The instances of the Type class are immutable: once they are created, they are never changed...
StringRef str_data() const
size_t size() const
size - Get the array size.
Expected< CVRecord< Kind > > readCVRecordFromStream(BinaryStreamRef Stream, uint32_t Offset)
Read a complete record from a stream at a random offset.
void setOffset(uint32_t Off)
static ErrorSuccess success()
Create a success value.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
CVRecord(Kind K, ArrayRef< uint8_t > Data)
ArrayRef< uint8_t > RecordData
Error readBytes(ArrayRef< uint8_t > &Buffer, uint32_t Size)
Read Size bytes from the underlying stream at the current offset and and set Buffer to the resulting ...
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
Lightweight error class with error context and mandatory checking.
RemappedRecord(const CVRecord< Kind > &R)
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
bool empty() const
empty - Check if the array is empty.