LLVM
8.0.1
|
This represents a position within a bitstream. More...
#include "llvm/Bitcode/BitstreamReader.h"
Public Types | |
using | word_t = size_t |
This is the current data we have pulled from the stream but have not returned to the client. More... | |
Public Member Functions | |
SimpleBitstreamCursor ()=default | |
SimpleBitstreamCursor (ArrayRef< uint8_t > BitcodeBytes) | |
SimpleBitstreamCursor (StringRef BitcodeBytes) | |
SimpleBitstreamCursor (MemoryBufferRef BitcodeBytes) | |
bool | canSkipToPos (size_t pos) const |
bool | AtEndOfStream () |
uint64_t | GetCurrentBitNo () const |
Return the bit # of the bit we are reading. More... | |
uint64_t | getCurrentByteNo () const |
ArrayRef< uint8_t > | getBitcodeBytes () const |
void | JumpToBit (uint64_t BitNo) |
Reset the stream to the specified bit number. More... | |
const uint8_t * | getPointerToByte (uint64_t ByteNo, uint64_t NumBytes) |
Get a pointer into the bitstream at the specified byte offset. More... | |
const uint8_t * | getPointerToBit (uint64_t BitNo, uint64_t NumBytes) |
Get a pointer into the bitstream at the specified bit offset. More... | |
void | fillCurWord () |
word_t | Read (unsigned NumBits) |
uint32_t | ReadVBR (unsigned NumBits) |
uint64_t | ReadVBR64 (unsigned NumBits) |
void | SkipToFourByteBoundary () |
void | skipToEnd () |
Skip to the end of the file. More... | |
Static Public Attributes | |
static const size_t | MaxChunkSize = sizeof(word_t) * 8 |
This represents a position within a bitstream.
There may be multiple independent cursors reading within one bitstream, each maintaining their own local state.
Definition at line 81 of file BitstreamReader.h.
This is the current data we have pulled from the stream but have not returned to the client.
This is specifically and intentionally defined to follow the word size of the host machine for efficiency. We use word_t in places that are aware of this to make it perfectly explicit what is going on.
Definition at line 91 of file BitstreamReader.h.
|
default |
|
inlineexplicit |
Definition at line 104 of file BitstreamReader.h.
|
inlineexplicit |
Definition at line 106 of file BitstreamReader.h.
|
inlineexplicit |
Definition at line 109 of file BitstreamReader.h.
|
inline |
Definition at line 117 of file BitstreamReader.h.
References llvm::ArrayRef< T >::size().
Referenced by llvm::BitstreamCursor::BitstreamCursor(), llvm::BitstreamCursor::EnterSubBlock(), and readIdentificationCode().
Definition at line 112 of file BitstreamReader.h.
References llvm::ArrayRef< T >::size().
Referenced by llvm::BitstreamCursor::BitstreamCursor(), hasValidBitcodeHeader(), llvm::BitstreamCursor::readRecord(), and llvm::BitstreamCursor::skipRecord().
|
inline |
Definition at line 159 of file BitstreamReader.h.
References B, llvm::ArrayRef< T >::data(), llvm::report_fatal_error(), and llvm::ArrayRef< T >::size().
Referenced by llvm::BitstreamCursor::BitstreamCursor().
|
inline |
Definition at line 129 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::BitstreamCursor(), and llvm::getBitcodeFileContents().
|
inline |
Return the bit # of the bit we are reading.
Definition at line 122 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::BitstreamCursor(), llvm::getBitcodeFileContents(), jumpToValueSymbolTable(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::BitstreamCursor::readRecord(), readWideAPInt(), llvm::BitstreamCursor::skipRecord(), and llvm::MetadataLoader::MetadataLoaderImpl::upgradeDebugIntrinsics().
|
inline |
Definition at line 127 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::BitstreamCursor(), and llvm::getBitcodeFileContents().
|
inline |
Get a pointer into the bitstream at the specified bit offset.
The bit offset must be on a byte boundary.
Definition at line 154 of file BitstreamReader.h.
References assert().
Referenced by llvm::BitstreamCursor::readRecord().
|
inline |
Get a pointer into the bitstream at the specified byte offset.
Definition at line 147 of file BitstreamReader.h.
References llvm::ArrayRef< T >::data().
Referenced by llvm::BitstreamCursor::BitstreamCursor().
|
inline |
Reset the stream to the specified bit number.
Definition at line 132 of file BitstreamReader.h.
References assert().
Referenced by llvm::BitstreamCursor::BitstreamCursor(), llvm::getBitcodeFileContents(), llvm::BitcodeModule::getLTOInfo(), llvm::BitcodeModule::getSummary(), jumpToValueSymbolTable(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::BitstreamCursor::readRecord(), llvm::BitcodeModule::readSummary(), readWideAPInt(), llvm::BitstreamCursor::skipRecord(), and llvm::MetadataLoader::MetadataLoaderImpl::upgradeDebugIntrinsics().
Definition at line 182 of file BitstreamReader.h.
References assert(), llvm::BitmaskEnumDetail::Mask(), R2, and llvm::report_fatal_error().
Referenced by llvm::BitstreamCursor::BitstreamCursor(), llvm::BitstreamCursor::EnterSubBlock(), hasValidBitcodeHeader(), readAbbreviatedField(), llvm::BitstreamCursor::ReadAbbrevRecord(), llvm::BitstreamCursor::readRecord(), and skipAbbreviatedField().
Definition at line 222 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::BitstreamCursor(), llvm::BitstreamCursor::EnterSubBlock(), llvm::BitstreamCursor::ReadAbbrevRecord(), llvm::BitstreamCursor::readRecord(), and llvm::BitstreamCursor::skipRecord().
|
inline |
Definition at line 242 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::BitstreamCursor(), readAbbreviatedField(), llvm::BitstreamCursor::ReadAbbrevRecord(), llvm::BitstreamCursor::readRecord(), skipAbbreviatedField(), and llvm::BitstreamCursor::skipRecord().
|
inline |
Skip to the end of the file.
Definition at line 274 of file BitstreamReader.h.
References llvm::ArrayRef< T >::size().
Referenced by llvm::BitstreamCursor::readRecord(), and llvm::BitstreamCursor::skipRecord().
|
inline |
Definition at line 260 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::EnterSubBlock(), llvm::BitstreamCursor::readRecord(), and llvm::BitstreamCursor::skipRecord().
Definition at line 101 of file BitstreamReader.h.