LLVM API Documentation
#include <BitstreamReader.h>
Classes | |
struct | BlockInfo |
Public Member Functions | |
BitstreamReader () | |
BitstreamReader (const unsigned char *Start, const unsigned char *End) | |
BitstreamReader (StreamableMemoryObject *bytes) | |
BitstreamReader (BitstreamReader &&Other) | |
BitstreamReader & | operator= (BitstreamReader &&Other) |
void | init (const unsigned char *Start, const unsigned char *End) |
StreamableMemoryObject & | getBitcodeBytes () |
void | CollectBlockInfoNames () |
bool | isIgnoringBlockInfoNames () |
bool | hasBlockInfoRecords () const |
const BlockInfo * | getBlockInfo (unsigned BlockID) const |
BlockInfo & | getOrCreateBlockInfo (unsigned BlockID) |
void | takeBlockInfo (BitstreamReader &&Other) |
BitstreamReader - This class is used to read from an LLVM bitcode stream, maintaining information that is global to decoding the entire file. While a file is being read, multiple cursors can be independently advanced or skipped around within the file. These are represented by the BitstreamCursor class.
Definition at line 34 of file BitstreamReader.h.
llvm::BitstreamReader::BitstreamReader | ( | ) | [inline] |
Definition at line 58 of file BitstreamReader.h.
llvm::BitstreamReader::BitstreamReader | ( | const unsigned char * | Start, |
const unsigned char * | End | ||
) | [inline] |
Definition at line 61 of file BitstreamReader.h.
References init().
llvm::BitstreamReader::BitstreamReader | ( | StreamableMemoryObject * | bytes | ) | [inline] |
Definition at line 66 of file BitstreamReader.h.
llvm::BitstreamReader::BitstreamReader | ( | BitstreamReader && | Other | ) | [inline] |
Definition at line 70 of file BitstreamReader.h.
void llvm::BitstreamReader::CollectBlockInfoNames | ( | ) | [inline] |
CollectBlockInfoNames - This is called by clients that want block/record name information.
Definition at line 91 of file BitstreamReader.h.
StreamableMemoryObject& llvm::BitstreamReader::getBitcodeBytes | ( | ) | [inline] |
Definition at line 87 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::canSkipToPos(), llvm::BitstreamCursor::getWord(), llvm::BitstreamCursor::isEndPos(), llvm::BitstreamCursor::Read(), llvm::BitstreamCursor::readRecord(), and llvm::BitstreamCursor::skipRecord().
const BlockInfo* llvm::BitstreamReader::getBlockInfo | ( | unsigned | BlockID | ) | const [inline] |
getBlockInfo - If there is block info for the specified ID, return it, otherwise return null.
Definition at line 105 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::EnterSubBlock(), and getOrCreateBlockInfo().
BlockInfo& llvm::BitstreamReader::getOrCreateBlockInfo | ( | unsigned | BlockID | ) | [inline] |
Definition at line 117 of file BitstreamReader.h.
References getBlockInfo().
Referenced by llvm::BitstreamCursor::ReadBlockInfoBlock().
bool llvm::BitstreamReader::hasBlockInfoRecords | ( | ) | const [inline] |
hasBlockInfoRecords - Return true if we've already read and processed the block info block for this Bitstream. We only process it for the first cursor that walks over it.
Definition at line 101 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::ReadBlockInfoBlock(), and takeBlockInfo().
void llvm::BitstreamReader::init | ( | const unsigned char * | Start, |
const unsigned char * | End | ||
) | [inline] |
Definition at line 82 of file BitstreamReader.h.
References llvm::getNonStreamedMemoryObject().
Referenced by BitstreamReader().
bool llvm::BitstreamReader::isIgnoringBlockInfoNames | ( | ) | [inline] |
Definition at line 92 of file BitstreamReader.h.
Referenced by llvm::BitstreamCursor::ReadBlockInfoBlock().
BitstreamReader& llvm::BitstreamReader::operator= | ( | BitstreamReader && | Other | ) | [inline] |
Definition at line 74 of file BitstreamReader.h.
References std::swap().
void llvm::BitstreamReader::takeBlockInfo | ( | BitstreamReader && | Other | ) | [inline] |
Takes block info from the other bitstream reader.
This is a "take" operation because BlockInfo records are non-trivial, and indeed rather expensive.
Definition at line 131 of file BitstreamReader.h.
References hasBlockInfoRecords().