LLVM 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::BCRecordLayout< RecordCode, Fields > Class Template Reference

A record with a fixed record code. More...

#include "llvm/Bitcode/BitcodeConvenience.h"

Inheritance diagram for llvm::BCRecordLayout< RecordCode, Fields >:
Inheritance graph
[legend]

Public Types

enum  : unsigned { Code = RecordCode }
 

Public Member Functions

 BCRecordLayout (llvm::BitstreamWriter &Stream)
 Create a layout and register it with the given bitstream writer.
 
template<typename BufferTy , typename... Data>
void emit (BufferTy &buffer, Data &&...data) const
 Emit a record to the bitstream writer, using the given buffer for scratch space.
 
- Public Member Functions inherited from llvm::BCGenericRecordLayout< BCLiteral< RecordCode >, Fields... >
 BCGenericRecordLayout (llvm::BitstreamWriter &Stream)
 Create a layout and register it with the given bitstream writer.
 
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

template<typename BufferTy , typename... Data>
static void emitRecord (llvm::BitstreamWriter &Stream, BufferTy &buffer, unsigned abbrCode, Data &&...data)
 Emit a record identified by abbrCode to bitstream reader Stream, using buffer for scratch space.
 
- Static Public Member Functions inherited from llvm::BCGenericRecordLayout< BCLiteral< RecordCode >, Fields... >
static unsigned emitAbbrev (llvm::BitstreamWriter &Stream)
 Registers this record's layout with the bitstream reader.
 
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.
 
static void readRecord (ArrayRef< ElementTy > buffer, Data &&...data)
 Extract record data from buffer into the given data fields.
 
static void readRecord (BufferTy &buffer, Data &&...data)
 Extract record data from buffer into the given data fields.
 

Additional Inherited Members

- Public Attributes inherited from llvm::BCGenericRecordLayout< BCLiteral< RecordCode >, Fields... >
const unsigned AbbrevCode
 The abbreviation code used for this record in the current block.
 

Detailed Description

template<unsigned RecordCode, typename... Fields>
class llvm::BCRecordLayout< RecordCode, Fields >

A record with a fixed record code.

Definition at line 438 of file BitcodeConvenience.h.

Member Enumeration Documentation

◆ anonymous enum

template<unsigned RecordCode, typename... Fields>
anonymous enum : unsigned
Enumerator
Code 

The record code associated with this layout.

Definition at line 443 of file BitcodeConvenience.h.

Constructor & Destructor Documentation

◆ BCRecordLayout()

template<unsigned RecordCode, typename... Fields>
llvm::BCRecordLayout< RecordCode, Fields >::BCRecordLayout ( llvm::BitstreamWriter Stream)
inlineexplicit

Create a layout and register it with the given bitstream writer.

Definition at line 449 of file BitcodeConvenience.h.

Member Function Documentation

◆ emit()

template<unsigned RecordCode, typename... Fields>
template<typename BufferTy , typename... Data>
void llvm::BCRecordLayout< RecordCode, Fields >::emit ( BufferTy &  buffer,
Data &&...  data 
) const
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 456 of file BitcodeConvenience.h.

References llvm::BCGenericRecordLayout< BCLiteral< RecordCode >, Fields... >::emit().

◆ emitRecord()

template<unsigned RecordCode, typename... Fields>
template<typename BufferTy , typename... Data>
static void llvm::BCRecordLayout< RecordCode, Fields >::emitRecord ( llvm::BitstreamWriter Stream,
BufferTy &  buffer,
unsigned  abbrCode,
Data &&...  data 
)
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. Currently, arrays and blobs can only be passed as StringRefs.

Definition at line 466 of file BitcodeConvenience.h.

References llvm::BCGenericRecordLayout< BCLiteral< RecordCode >, Fields... >::emitRecord().


The documentation for this class was generated from the following file: