LLVM  15.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]
Collaboration diagram for llvm::BCRecordLayout< RecordCode, Fields >:
Collaboration 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. More...
 
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. More...
 
- 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. More...
 
void emit (BufferTy &buffer, unsigned id, Data &&...data) const
 Emit a record to the bitstream writer, using the given buffer for scratch space. More...
 

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. More...
 
- 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. More...
 
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. More...
 
static void readRecord (ArrayRef< ElementTy > buffer, Data &&...data)
 Extract record data from buffer into the given data fields. More...
 
static void readRecord (BufferTy &buffer, Data &&...data)
 Extract record data from buffer into the given data fields. More...
 

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. More...
 

Detailed Description

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

A record with a fixed record code.

Definition at line 437 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 442 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 448 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 455 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 465 of file BitcodeConvenience.h.

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


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