llvm::encodeSLEB128

encodeSLEB128 overloads

Synopses

Declared in <llvm/Support/LEB128.h>

Utility function to encode a SLEB128 value to an output stream.

unsigned int
encodeSLEB128(
    int64_t Value,
    raw_ostream& OS,
    unsigned int PadTo = 0);
» more...

Utility function to encode a SLEB128 value to a buffer.

unsigned int
encodeSLEB128(
    int64_t Value,
    uint8_t* p,
    unsigned int PadTo = 0);
» more...

Return Value

The length in bytes of the encoded value.

Parameters

NameDescription
ValueThe signed value to encode.
OSThe output stream to write the encoded bytes to.
PadToIf non-zero, pad the encoding to at least this many bytes.
pThe buffer to write the encoded bytes to.