18 int PaddingBytes = 4 -
Align;
19 while (PaddingBytes > 0) {
20 uint8_t Pad =
static_cast<uint8_t
>(LF_PAD0 + PaddingBytes);
41 cantFail(Mapping.visitKnownRecord(CVT, Record));
51 return {ScratchBuffer.data(), Writer.
getOffset()};
56 #define TYPE_RECORD(EnumName, EnumVal, Name) \ 57 template ArrayRef<uint8_t> llvm::codeview::SimpleTypeSerializer::serialize( \ 58 Name##Record &Record); 59 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 60 #define MEMBER_RECORD(EnumName, EnumVal, Name) 61 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 62 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
static void addPadding(BinaryStreamWriter &Writer)
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
static void writeRecordPrefix(BinaryStreamWriter &Writer, TypeLeafKind Kind)
This class represents lattice values for constants.
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
Error visitTypeEnd(CVType &Record) override
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
uint32_t getOffset() const
ArrayRef< uint8_t > serialize(T &Record)
Provides write only access to a subclass of WritableBinaryStream.
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.