LLVM API Documentation

llvm::BitstreamReader Class Reference

#include <BitstreamReader.h>

Collaboration diagram for llvm::BitstreamReader:
[legend]

List of all members.

Public Member Functions

 BitstreamReader ()
 BitstreamReader (const unsigned char *Start, const unsigned char *End)
void init (const unsigned char *Start, const unsigned char *End)
 ~BitstreamReader ()
bool AtEndOfStream () const
uint64_t GetCurrentBitNo () const
 GetCurrentBitNo - Return the bit # of the bit we are reading.
void JumpToBit (uint64_t BitNo)
 JumpToBit - Reset the stream to the specified bit number.
unsigned GetAbbrevIDWidth () const
 GetAbbrevIDWidth - Return the number of bits used to encode an abbrev #.
uint32_t Read (unsigned NumBits)
uint64_t Read64 (unsigned NumBits)
uint32_t ReadVBR (unsigned NumBits)
uint64_t ReadVBR64 (unsigned NumBits)
void SkipToWord ()
unsigned ReadCode ()
unsigned ReadSubBlockID ()
bool SkipBlock ()
bool EnterSubBlock (unsigned BlockID, unsigned *NumWordsP=0)
bool ReadBlockEnd ()
unsigned ReadRecord (unsigned AbbrevID, SmallVectorImpl< uint64_t > &Vals)
void ReadAbbrevRecord ()
bool ReadBlockInfoBlock ()

Friends

class Deserializer

Classes

struct  Block
struct  BlockInfo


Detailed Description

Definition at line 25 of file BitstreamReader.h.


Constructor & Destructor Documentation

llvm::BitstreamReader::BitstreamReader (  )  [inline]

Definition at line 65 of file BitstreamReader.h.

llvm::BitstreamReader::BitstreamReader ( const unsigned char *  Start,
const unsigned char *  End 
) [inline]

Definition at line 72 of file BitstreamReader.h.

References init().

llvm::BitstreamReader::~BitstreamReader (  )  [inline]

Definition at line 85 of file BitstreamReader.h.

References BlockInfo.


Member Function Documentation

void llvm::BitstreamReader::init ( const unsigned char *  Start,
const unsigned char *  End 
) [inline]

Definition at line 76 of file BitstreamReader.h.

Referenced by BitstreamReader(), and llvm::BitcodeReader::ParseBitcode().

bool llvm::BitstreamReader::AtEndOfStream (  )  const [inline]

Definition at line 111 of file BitstreamReader.h.

Referenced by EnterSubBlock(), llvm::BitcodeReader::ParseBitcode(), and SkipBlock().

uint64_t llvm::BitstreamReader::GetCurrentBitNo (  )  const [inline]

GetCurrentBitNo - Return the bit # of the bit we are reading.

Definition at line 116 of file BitstreamReader.h.

Referenced by llvm::Deserializer::Deserializer().

void llvm::BitstreamReader::JumpToBit ( uint64_t  BitNo  )  [inline]

JumpToBit - Reset the stream to the specified bit number.

Definition at line 121 of file BitstreamReader.h.

References Read().

Referenced by llvm::Deserializer::JumpTo(), llvm::BitcodeReader::materializeFunction(), and llvm::Deserializer::Rewind().

unsigned llvm::BitstreamReader::GetAbbrevIDWidth (  )  const [inline]

GetAbbrevIDWidth - Return the number of bits used to encode an abbrev #.

Definition at line 139 of file BitstreamReader.h.

uint32_t llvm::BitstreamReader::Read ( unsigned  NumBits  )  [inline]

uint64_t llvm::BitstreamReader::Read64 ( unsigned  NumBits  )  [inline]

Definition at line 179 of file BitstreamReader.h.

References Read(), and V.

uint32_t llvm::BitstreamReader::ReadVBR ( unsigned  NumBits  )  [inline]

Definition at line 186 of file BitstreamReader.h.

References Read().

Referenced by EnterSubBlock(), ReadAbbrevRecord(), ReadRecord(), ReadSubBlockID(), and SkipBlock().

uint64_t llvm::BitstreamReader::ReadVBR64 ( unsigned  NumBits  )  [inline]

Definition at line 204 of file BitstreamReader.h.

References Read().

Referenced by ReadAbbrevRecord(), and ReadRecord().

void llvm::BitstreamReader::SkipToWord (  )  [inline]

Definition at line 222 of file BitstreamReader.h.

Referenced by EnterSubBlock(), ReadBlockEnd(), and SkipBlock().

unsigned llvm::BitstreamReader::ReadCode (  )  [inline]

Definition at line 228 of file BitstreamReader.h.

References Read().

Referenced by llvm::BitcodeReader::ParseBitcode(), and ReadBlockInfoBlock().

unsigned llvm::BitstreamReader::ReadSubBlockID (  )  [inline]

ReadSubBlockID - Having read the ENTER_SUBBLOCK code, read the BlockID for the block.

Definition at line 258 of file BitstreamReader.h.

References llvm::bitc::BlockIDWidth, and ReadVBR().

Referenced by llvm::BitcodeReader::ParseBitcode(), and ReadBlockInfoBlock().

bool llvm::BitstreamReader::SkipBlock (  )  [inline]

SkipBlock - Having read the ENTER_SUBBLOCK abbrevid and a BlockID, skip over the body of this block. If the block record is malformed, return true.

Definition at line 265 of file BitstreamReader.h.

References AtEndOfStream(), llvm::bitc::BlockSizeWidth, llvm::bitc::CodeLenWidth, Read(), ReadVBR(), and SkipToWord().

Referenced by llvm::BitcodeReader::ParseBitcode(), ReadBlockInfoBlock(), and llvm::Deserializer::SkipBlock().

bool llvm::BitstreamReader::EnterSubBlock ( unsigned  BlockID,
unsigned *  NumWordsP = 0 
) [inline]

EnterSubBlock - Having read the ENTER_SUBBLOCK abbrevid, enter the block, and return true if the block is valid.

Definition at line 283 of file BitstreamReader.h.

References AtEndOfStream(), BlockInfo, llvm::bitc::BlockSizeWidth, llvm::bitc::CodeLenWidth, Read(), ReadVBR(), and SkipToWord().

Referenced by llvm::Deserializer::JumpTo(), and ReadBlockInfoBlock().

bool llvm::BitstreamReader::ReadBlockEnd (  )  [inline]

Definition at line 310 of file BitstreamReader.h.

References SkipToWord().

Referenced by ReadBlockInfoBlock().

unsigned llvm::BitstreamReader::ReadRecord ( unsigned  AbbrevID,
SmallVectorImpl< uint64_t > &  Vals 
) [inline]

void llvm::BitstreamReader::ReadAbbrevRecord (  )  [inline]

bool llvm::BitstreamReader::ReadBlockInfoBlock (  )  [inline]


Friends And Related Function Documentation

friend class Deserializer [friend]

Definition at line 28 of file BitstreamReader.h.


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