LLVM 20.0.0git
|
Represents a single bitcode record type. More...
#include "llvm/Bitcode/BitcodeConvenience.h"
Public Member Functions | |
BCGenericRecordLayout (llvm::BitstreamWriter &Stream) | |
Create a layout and register it with the given bitstream writer. | |
template<typename BufferTy , typename... Data> | |
void | emit (BufferTy &buffer, unsigned id, Data &&...data) const |
Emit a record to the bitstream writer, using the given buffer for scratch space. | |
Static Public Member Functions | |
static unsigned | emitAbbrev (llvm::BitstreamWriter &Stream) |
Registers this record's layout with the bitstream reader. | |
template<typename BufferTy , typename... Data> | |
static void | emitRecord (llvm::BitstreamWriter &Stream, BufferTy &buffer, unsigned abbrCode, unsigned recordID, Data &&...data) |
Emit a record identified by abbrCode to bitstream reader Stream , using buffer for scratch space. | |
template<typename ElementTy , typename... Data> | |
static void | readRecord (ArrayRef< ElementTy > buffer, Data &&...data) |
Extract record data from buffer into the given data fields. | |
template<typename BufferTy , typename... Data> | |
static void | readRecord (BufferTy &buffer, Data &&...data) |
Extract record data from buffer into the given data fields. | |
Public Attributes | |
const unsigned | AbbrevCode |
The abbreviation code used for this record in the current block. | |
Represents a single bitcode record type.
This class template is meant to be instantiated and then given a name, so that from then on that name can be used.
Definition at line 357 of file BitcodeConvenience.h.
|
inlineexplicit |
Create a layout and register it with the given bitstream writer.
Definition at line 368 of file BitcodeConvenience.h.
|
inline |
Emit a record to the bitstream writer, using the given buffer for scratch space.
Note that even fixed arguments must be specified here.
Definition at line 376 of file BitcodeConvenience.h.
References llvm::BCGenericRecordLayout< IDField, Fields >::AbbrevCode, and llvm::BCGenericRecordLayout< IDField, Fields >::emitRecord().
|
inlinestatic |
Registers this record's layout with the bitstream reader.
eturns The abbreviation code for the newly-registered record type.
Definition at line 383 of file BitcodeConvenience.h.
References llvm::BitstreamWriter::EmitAbbrev(), and llvm::detail::emitOps().
|
inlinestatic |
Emit a record identified by abbrCode
to bitstream reader Stream
, using buffer
for scratch space.
Note that even fixed arguments must be specified here. Blobs are passed as StringRefs, while arrays can be passed inline, as aggregates, or as pre-encoded StringRef data. Skipped values and empty arrays should use the special Nothing value.
Definition at line 397 of file BitcodeConvenience.h.
References llvm::detail::BCRecordCoding< ElementTy, Fields >::emit(), and value.
Referenced by llvm::BCGenericRecordLayout< IDField, Fields >::emit().
|
inlinestatic |
Extract record data from buffer
into the given data fields.
Note that even fixed arguments must be specified here. Pass Nothing
if you don't care about a particular parameter. Blob data is not included in the buffer and should be handled separately by the caller.
Definition at line 415 of file BitcodeConvenience.h.
References llvm::detail::BCRecordCoding< ElementTy, Fields >::read(), and value.
Referenced by llvm::BCGenericRecordLayout< IDField, Fields >::readRecord().
|
inlinestatic |
Extract record data from buffer
into the given data fields.
Note that even fixed arguments must be specified here. Pass Nothing
if you don't care about a particular parameter. Blob data is not included in the buffer and should be handled separately by the caller.
Definition at line 431 of file BitcodeConvenience.h.
References llvm::BCGenericRecordLayout< IDField, Fields >::readRecord().
const unsigned llvm::BCGenericRecordLayout< IDField, Fields >::AbbrevCode |
The abbreviation code used for this record in the current block.
Note that this is not the same as the semantic record code, which is the first field of the record.
Definition at line 365 of file BitcodeConvenience.h.
Referenced by llvm::BCGenericRecordLayout< IDField, Fields >::emit().