11 int PaddingBytes = 4 -
Align;
12 while (PaddingBytes > 0) {
13 uint8_t Pad =
static_cast<uint8_t
>(LF_PAD0 + PaddingBytes);
36 cantFail(Mapping.visitKnownRecord(CVT, Record));
42 Prefix->RecordKind = CVT.
kind();
45 return {ScratchBuffer.data(), Writer.
getOffset()};
50 #define TYPE_RECORD(EnumName, EnumVal, Name) \ 51 template ArrayRef<uint8_t> llvm::codeview::SimpleTypeSerializer::serialize( \ 52 Name##Record &Record); 53 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 54 #define MEMBER_RECORD(EnumName, EnumVal, Name) 55 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 56 #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.
This class represents lattice values for constants.
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.
This struct is a compact representation of a valid (non-zero power of two) alignment.