Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_CVRECORD_H
10 #define LLVM_DEBUGINFO_CODEVIEW_CVRECORD_H
67 template <
typename Record,
typename Func>
69 while (!StreamBuffer.
empty()) {
76 size_t RealLen =
Prefix->RecordLen + 2;
77 if (StreamBuffer.
size() < RealLen)
81 StreamBuffer = StreamBuffer.
drop_front(RealLen);
91 template <
typename Kind>
100 if (
Prefix->RecordLen < 2)
112 template <
typename Kind>
116 auto ExpectedRec = codeview::readCVRecordFromStream<Kind>(Stream, 0);
118 return ExpectedRec.takeError();
120 Len = ExpectedRec->length();
133 #endif // LLVM_DEBUGINFO_CODEVIEW_CVRECORD_H
void setOffset(uint64_t Off)
This is an optimization pass for GlobalISel generic memory operations.
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 ...
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
CVRecord(const RecordPrefix *P, size_t Size)
ArrayRef< uint8_t > RecordData
bool empty() const
empty - Check if the array is empty.
Error forEachCodeViewRecord(ArrayRef< uint8_t > StreamBuffer, Func F)
Provides read only access to a subclass of BinaryStream.
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
CVRecord(ArrayRef< uint8_t > Data)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
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...
Expected< CVRecord< Kind > > readCVRecordFromStream(BinaryStreamRef Stream, uint32_t Offset)
Read a complete record from a stream at a random offset.
ArrayRef< uint8_t > content() const
StringRef - Represent a constant reference to a string, i.e.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
ArrayRef< T > take_front(size_t N=1) const
Return a copy of *this with only the first N elements.
Lightweight error class with error context and mandatory checking.
ArrayRef< uint8_t > data() const
size_t size() const
size - Get the array size.
A range adaptor for a pair of iterators.
StringRef str_data() const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.