LLVM API Documentation
#include <BitstreamWriter.h>
Public Member Functions | |
BitstreamWriter (SmallVectorImpl< char > &O) | |
~BitstreamWriter () | |
uint64_t | GetCurrentBitNo () const |
Retrieve the current position in the stream, in bits. More... | |
void | Emit (uint32_t Val, unsigned NumBits) |
void | Emit64 (uint64_t Val, unsigned NumBits) |
void | FlushToWord () |
void | EmitVBR (uint32_t Val, unsigned NumBits) |
void | EmitVBR64 (uint64_t Val, unsigned NumBits) |
void | EmitCode (unsigned Val) |
EmitCode - Emit the specified code. More... | |
BlockInfo * | getBlockInfo (unsigned BlockID) |
void | EnterSubblock (unsigned BlockID, unsigned CodeLen) |
void | ExitBlock () |
template<typename uintty > | |
void | EmitRecord (unsigned Code, SmallVectorImpl< uintty > &Vals, unsigned Abbrev=0) |
template<typename uintty > | |
void | EmitRecordWithAbbrev (unsigned Abbrev, SmallVectorImpl< uintty > &Vals) |
template<typename uintty > | |
void | EmitRecordWithBlob (unsigned Abbrev, SmallVectorImpl< uintty > &Vals, StringRef Blob) |
template<typename uintty > | |
void | EmitRecordWithBlob (unsigned Abbrev, SmallVectorImpl< uintty > &Vals, const char *BlobData, unsigned BlobLen) |
template<typename uintty > | |
void | EmitRecordWithArray (unsigned Abbrev, SmallVectorImpl< uintty > &Vals, StringRef Array) |
template<typename uintty > | |
void | EmitRecordWithArray (unsigned Abbrev, SmallVectorImpl< uintty > &Vals, const char *ArrayData, unsigned ArrayLen) |
unsigned | EmitAbbrev (BitCodeAbbrev *Abbv) |
void | EnterBlockInfoBlock (unsigned CodeWidth) |
EnterBlockInfoBlock - Start emitting the BLOCKINFO_BLOCK. More... | |
unsigned | EmitBlockInfoAbbrev (unsigned BlockID, BitCodeAbbrev *Abbv) |
Definition at line 25 of file BitstreamWriter.h.
|
inlineexplicit |
Definition at line 96 of file BitstreamWriter.h.
|
inline |
Definition at line 99 of file BitstreamWriter.h.
|
inline |
Definition at line 121 of file BitstreamWriter.h.
Referenced by Emit64(), EmitCode(), EmitVBR(), EmitVBR64(), EnterSubblock(), and llvm::WriteBitcodeToFile().
|
inline |
Definition at line 140 of file BitstreamWriter.h.
References Emit().
|
inline |
EmitAbbrev - This emits an abbreviation to the stream. Note that this method takes ownership of the specified abbrev.
Definition at line 492 of file BitstreamWriter.h.
Referenced by WriteConstants(), WriteModuleInfo(), WriteModuleMetadata(), and WriteTypeTable().
|
inline |
EmitBlockInfoAbbrev - Emit a DEFINE_ABBREV record for the specified BlockID.
Definition at line 534 of file BitstreamWriter.h.
References llvm::bitc::FIRST_APPLICATION_ABBREV.
Referenced by WriteBlockInfo().
|
inline |
EmitCode - Emit the specified code.
Definition at line 188 of file BitstreamWriter.h.
References Emit().
Referenced by EmitRecord(), EnterSubblock(), and ExitBlock().
|
inline |
EmitRecord - Emit the specified record to the stream, using an abbrev if we have one to compress the output.
Definition at line 409 of file BitstreamWriter.h.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::tgtok::Code, EmitCode(), EmitRecordWithAbbrev(), EmitVBR(), EmitVBR64(), llvm::SmallVectorImpl< T >::insert(), llvm::SmallVectorTemplateCommon< T >::size(), and llvm::bitc::UNABBREV_RECORD.
Referenced by WriteAttributeGroupTable(), WriteAttributeTable(), WriteConstants(), WriteFunction(), WriteInstruction(), WriteMDNode(), WriteMetadataAttachment(), WriteModule(), WriteModuleInfo(), WriteModuleMetadata(), WriteModuleMetadataStore(), WriteStringRecord(), WriteTypeTable(), and WriteValueSymbolTable().
|
inline |
EmitRecordWithAbbrev - Emit a record with the specified abbreviation. Unlike EmitRecord, the code for the record should be included in Vals as the first entry.
Definition at line 432 of file BitstreamWriter.h.
Referenced by EmitRecord().
|
inline |
EmitRecordWithArray - Just like EmitRecordWithBlob, works with records that end with an array.
Definition at line 455 of file BitstreamWriter.h.
|
inline |
Definition at line 460 of file BitstreamWriter.h.
|
inline |
EmitRecordWithBlob - Emit the specified record to the stream, using an abbrev that includes a blob at the end. The blob data to emit is specified by the pointer and length specified at the end. In contrast to EmitRecord, this routine expects that the first entry in Vals is the code of the record.
Definition at line 442 of file BitstreamWriter.h.
|
inline |
Definition at line 447 of file BitstreamWriter.h.
|
inline |
Definition at line 157 of file BitstreamWriter.h.
References Emit(), and Threshold.
Referenced by EmitRecord(), EmitVBR64(), and EnterSubblock().
|
inline |
Definition at line 170 of file BitstreamWriter.h.
References Emit(), EmitVBR(), and Threshold.
Referenced by EmitRecord().
|
inline |
EnterBlockInfoBlock - Start emitting the BLOCKINFO_BLOCK.
Definition at line 505 of file BitstreamWriter.h.
References llvm::bitc::BLOCKINFO_BLOCK_ID, and EnterSubblock().
Referenced by WriteBlockInfo().
Definition at line 210 of file BitstreamWriter.h.
References llvm::bitc::BlockIDWidth, llvm::bitc::BlockSizeWidth, llvm::bitc::CodeLenWidth, Emit(), EmitCode(), EmitVBR(), llvm::bitc::ENTER_SUBBLOCK, FlushToWord(), and getBlockInfo().
Referenced by EnterBlockInfoBlock(), WriteAttributeGroupTable(), WriteAttributeTable(), WriteConstants(), WriteFunction(), WriteFunctionLocalMetadata(), WriteMetadataAttachment(), WriteModule(), WriteModuleMetadata(), WriteModuleMetadataStore(), WriteModuleUseLists(), WriteTypeTable(), and WriteValueSymbolTable().
|
inline |
Definition at line 242 of file BitstreamWriter.h.
References EmitCode(), llvm::bitc::END_BLOCK, and FlushToWord().
Referenced by WriteAttributeGroupTable(), WriteAttributeTable(), WriteBlockInfo(), WriteConstants(), WriteFunction(), WriteFunctionLocalMetadata(), WriteMetadataAttachment(), WriteModule(), WriteModuleMetadata(), WriteModuleMetadataStore(), WriteModuleUseLists(), WriteTypeTable(), and WriteValueSymbolTable().
|
inline |
Definition at line 149 of file BitstreamWriter.h.
Referenced by EnterSubblock(), and ExitBlock().
|
inline |
getBlockInfo - If there is block info for the specified ID, return it, otherwise return null.
Definition at line 198 of file BitstreamWriter.h.
Referenced by EnterSubblock().
|
inline |
Retrieve the current position in the stream, in bits.
Definition at line 115 of file BitstreamWriter.h.