LLVM API Documentation

llvm::BitstreamCursor Class Reference

#include <BitstreamReader.h>

Collaboration diagram for llvm::BitstreamCursor:
[legend]

List of all members.

Public Member Functions

 BitstreamCursor ()
 BitstreamCursor (const BitstreamCursor &RHS)
 BitstreamCursor (BitstreamReader &R)
void init (BitstreamReader &R)
 ~BitstreamCursor ()
void operator= (const BitstreamCursor &RHS)
void freeState ()
unsigned GetAbbrevIDWidth () const
 GetAbbrevIDWidth - Return the number of bits used to encode an abbrev #.
bool AtEndOfStream () const
uint64_t GetCurrentBitNo () const
 GetCurrentBitNo - Return the bit # of the bit we are reading.
BitstreamReader * getBitStreamReader ()
const BitstreamReader * getBitStreamReader () const
void JumpToBit (uint64_t BitNo)
 JumpToBit - Reset the stream to the specified bit number.
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 ()
const BitCodeAbbrev * getAbbrev (unsigned AbbrevID)
 getAbbrev - Return the abbreviation for the specified AbbrevId.
unsigned ReadRecord (unsigned AbbrevID, SmallVectorImpl< uint64_t > &Vals, const char **BlobStart=0, unsigned *BlobLen=0)
unsigned ReadRecord (unsigned AbbrevID, SmallVectorImpl< uint64_t > &Vals, const char *&BlobStart, unsigned &BlobLen)
void ReadAbbrevRecord ()
bool ReadBlockInfoBlock ()

Friends

class Deserializer

Classes

struct  Block


Detailed Description

Definition at line 121 of file BitstreamReader.h.


Constructor & Destructor Documentation

llvm::BitstreamCursor::BitstreamCursor (  )  [inline]

Definition at line 151 of file BitstreamReader.h.

llvm::BitstreamCursor::BitstreamCursor ( const BitstreamCursor &  RHS  )  [inline]

Definition at line 153 of file BitstreamReader.h.

References operator=().

llvm::BitstreamCursor::BitstreamCursor ( BitstreamReader &  R  )  [inline, explicit]

Definition at line 157 of file BitstreamReader.h.

References llvm::BitstreamReader::getFirstChar().

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

Definition at line 176 of file BitstreamReader.h.

References freeState().


Member Function Documentation

void llvm::BitstreamCursor::init ( BitstreamReader &  R  )  [inline]

void llvm::BitstreamCursor::operator= ( const BitstreamCursor &  RHS  )  [inline]

Definition at line 180 of file BitstreamReader.h.

References BitsInCurWord, BitStream, CurAbbrevs, CurCodeSize, CurWord, freeState(), NextChar, and S.

Referenced by BitstreamCursor().

void llvm::BitstreamCursor::freeState (  )  [inline]

Definition at line 205 of file BitstreamReader.h.

References S.

Referenced by init(), operator=(), and ~BitstreamCursor().

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

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

Definition at line 224 of file BitstreamReader.h.

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

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

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

Definition at line 231 of file BitstreamReader.h.

References llvm::BitstreamReader::getFirstChar().

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

BitstreamReader* llvm::BitstreamCursor::getBitStreamReader (  )  [inline]

Definition at line 235 of file BitstreamReader.h.

const BitstreamReader* llvm::BitstreamCursor::getBitStreamReader (  )  const [inline]

Definition at line 238 of file BitstreamReader.h.

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

JumpToBit - Reset the stream to the specified bit number.

Definition at line 244 of file BitstreamReader.h.

References llvm::BitstreamReader::getFirstChar(), llvm::BitstreamReader::getLastChar(), and Read().

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

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

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

Definition at line 301 of file BitstreamReader.h.

References Read(), and V.

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

Definition at line 308 of file BitstreamReader.h.

References Read().

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

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

Definition at line 328 of file BitstreamReader.h.

References Read().

Referenced by ReadAbbrevRecord(), and ReadRecord().

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

Definition at line 346 of file BitstreamReader.h.

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

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

Definition at line 351 of file BitstreamReader.h.

References Read().

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

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

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

Definition at line 361 of file BitstreamReader.h.

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

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

bool llvm::BitstreamCursor::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 368 of file BitstreamReader.h.

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

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

bool llvm::BitstreamCursor::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 386 of file BitstreamReader.h.

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

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

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

Definition at line 415 of file BitstreamReader.h.

References SkipToWord().

Referenced by ReadBlockInfoBlock().

const BitCodeAbbrev* llvm::BitstreamCursor::getAbbrev ( unsigned  AbbrevID  )  [inline]

getAbbrev - Return the abbreviation for the specified AbbrevId.

Definition at line 472 of file BitstreamReader.h.

References llvm::bitc::FIRST_APPLICATION_ABBREV.

Referenced by ReadRecord().

unsigned llvm::BitstreamCursor::ReadRecord ( unsigned  AbbrevID,
SmallVectorImpl< uint64_t > &  Vals,
const char **  BlobStart = 0,
unsigned *  BlobLen = 0 
) [inline]

unsigned llvm::BitstreamCursor::ReadRecord ( unsigned  AbbrevID,
SmallVectorImpl< uint64_t > &  Vals,
const char *&  BlobStart,
unsigned &  BlobLen 
) [inline]

Definition at line 542 of file BitstreamReader.h.

References ReadRecord().

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

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


Friends And Related Function Documentation

friend class Deserializer [friend]

Definition at line 122 of file BitstreamReader.h.


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