LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::BitCodeAbbrevOp Class Reference

BitCodeAbbrevOp - This describes one or more operands in an abbreviation. More...

#include "llvm/Bitstream/BitCodes.h"

Public Types

enum  Encoding {
  Fixed = 1 , VBR = 2 , Array = 3 , Char6 = 4 ,
  Blob = 5
}
 

Public Member Functions

 BitCodeAbbrevOp (uint64_t V)
 
 BitCodeAbbrevOp (Encoding E, uint64_t Data=0)
 
bool isLiteral () const
 
bool isEncoding () const
 
uint64_t getLiteralValue () const
 
Encoding getEncoding () const
 
uint64_t getEncodingData () const
 
bool hasEncodingData () const
 

Static Public Member Functions

static bool isValidEncoding (uint64_t E)
 
static bool hasEncodingData (Encoding E)
 
static bool isChar6 (char C)
 isChar6 - Return true if this character is legal in the Char6 encoding.
 
static unsigned EncodeChar6 (char C)
 
static char DecodeChar6 (unsigned V)
 

Detailed Description

BitCodeAbbrevOp - This describes one or more operands in an abbreviation.

This is actually a union of two different things:

  1. It could be a literal integer value ("the operand is always 17").
  2. It could be an encoding specification ("this operand encoded like so").

Definition at line 33 of file BitCodes.h.

Member Enumeration Documentation

◆ Encoding

Enumerator
Fixed 
VBR 
Array 
Char6 
Blob 

Definition at line 38 of file BitCodes.h.

Constructor & Destructor Documentation

◆ BitCodeAbbrevOp() [1/2]

llvm::BitCodeAbbrevOp::BitCodeAbbrevOp ( uint64_t  V)
inlineexplicit

Definition at line 50 of file BitCodes.h.

◆ BitCodeAbbrevOp() [2/2]

llvm::BitCodeAbbrevOp::BitCodeAbbrevOp ( Encoding  E,
uint64_t  Data = 0 
)
inlineexplicit

Definition at line 51 of file BitCodes.h.

Member Function Documentation

◆ DecodeChar6()

static char llvm::BitCodeAbbrevOp::DecodeChar6 ( unsigned  V)
inlinestatic

Definition at line 92 of file BitCodes.h.

References assert().

Referenced by readAbbreviatedField(), and llvm::BitstreamCursor::readRecord().

◆ EncodeChar6()

static unsigned llvm::BitCodeAbbrevOp::EncodeChar6 ( char  C)
inlinestatic

Definition at line 83 of file BitCodes.h.

References llvm::CallingConv::C, and llvm_unreachable.

◆ getEncoding()

Encoding llvm::BitCodeAbbrevOp::getEncoding ( ) const
inline

◆ getEncodingData()

uint64_t llvm::BitCodeAbbrevOp::getEncodingData ( ) const
inline

◆ getLiteralValue()

uint64_t llvm::BitCodeAbbrevOp::getLiteralValue ( ) const
inline

Definition at line 58 of file BitCodes.h.

References assert(), and isLiteral().

Referenced by llvm::BitstreamCursor::readRecord(), and llvm::BitstreamCursor::skipRecord().

◆ hasEncodingData() [1/2]

bool llvm::BitCodeAbbrevOp::hasEncodingData ( ) const
inline

◆ hasEncodingData() [2/2]

static bool llvm::BitCodeAbbrevOp::hasEncodingData ( Encoding  E)
inlinestatic

Definition at line 68 of file BitCodes.h.

References Array, Blob, Char6, E, Fixed, llvm::report_fatal_error(), and VBR.

◆ isChar6()

static bool llvm::BitCodeAbbrevOp::isChar6 ( char  C)
inlinestatic

isChar6 - Return true if this character is legal in the Char6 encoding.

Definition at line 82 of file BitCodes.h.

References llvm::CallingConv::C.

Referenced by llvm::BCChar6::assertValid(), getStringEncoding(), writeStringRecord(), and llvm::dxil::DXILBitcodeWriter::writeStringRecord().

◆ isEncoding()

bool llvm::BitCodeAbbrevOp::isEncoding ( ) const
inline

Definition at line 55 of file BitCodes.h.

Referenced by getEncoding(), getEncodingData(), and llvm::BitstreamCursor::readRecord().

◆ isLiteral()

bool llvm::BitCodeAbbrevOp::isLiteral ( ) const
inline

◆ isValidEncoding()

static bool llvm::BitCodeAbbrevOp::isValidEncoding ( uint64_t  E)
inlinestatic

Definition at line 46 of file BitCodes.h.

References E.

Referenced by llvm::BitstreamCursor::ReadAbbrevRecord().


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