LLVM API Documentation
#include <BitstreamReader.h>
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 |
Definition at line 25 of file BitstreamReader.h.
| llvm::BitstreamReader::BitstreamReader | ( | ) | [inline] |
Definition at line 65 of file BitstreamReader.h.
| llvm::BitstreamReader::~BitstreamReader | ( | ) | [inline] |
| 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] |
Definition at line 141 of file BitstreamReader.h.
References R.
Referenced by EnterSubBlock(), JumpToBit(), llvm::BitcodeReader::ParseBitcode(), Read64(), ReadAbbrevRecord(), ReadCode(), ReadVBR(), ReadVBR64(), and SkipBlock().
| uint64_t llvm::BitstreamReader::Read64 | ( | unsigned | NumBits | ) | [inline] |
| 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().
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] |
Definition at line 361 of file BitstreamReader.h.
References llvm::BitCodeAbbrevOp::Array, llvm::SmallVectorImpl< T >::begin(), llvm::SectionFlags::Code, llvm::SmallVectorImpl< T >::erase(), llvm::bitc::FIRST_APPLICATION_ABBREV, llvm::BitCodeAbbrevOp::getEncoding(), llvm::BitCodeAbbrevOp::isLiteral(), llvm::SmallVectorImpl< T >::push_back(), ReadVBR(), ReadVBR64(), and llvm::bitc::UNABBREV_RECORD.
Referenced by ReadBlockInfoBlock().
| void llvm::BitstreamReader::ReadAbbrevRecord | ( | ) | [inline] |
Definition at line 401 of file BitstreamReader.h.
References llvm::BitCodeAbbrev::Add(), E, llvm::BitCodeAbbrevOp::hasEncodingData(), Read(), ReadVBR(), and ReadVBR64().
Referenced by ReadBlockInfoBlock().
| bool llvm::BitstreamReader::ReadBlockInfoBlock | ( | ) | [inline] |
Definition at line 437 of file BitstreamReader.h.
References BlockInfo, llvm::bitc::BLOCKINFO_BLOCK_ID, llvm::bitc::BLOCKINFO_CODE_SETBID, llvm::SmallVectorImpl< T >::clear(), llvm::SectionFlags::Code, llvm::bitc::DEFINE_ABBREV, llvm::bitc::END_BLOCK, llvm::bitc::ENTER_SUBBLOCK, EnterSubBlock(), ReadAbbrevRecord(), ReadBlockEnd(), ReadCode(), ReadRecord(), ReadSubBlockID(), llvm::SmallVectorImpl< T >::size(), and SkipBlock().
Referenced by llvm::BitcodeReader::ParseBitcode().
friend class Deserializer [friend] |
Definition at line 28 of file BitstreamReader.h.