Utility function to decode a SLEB128 value.
Declared in <llvm/Support/LEB128.h>
int64_t
decodeSLEB128(
uint8_t const* p,
unsigned int* n = nullptr,
uint8_t const* end = nullptr,
char const** error = nullptr);
If error is non-null, it will point to a static error message, if an error occurred. It will not be modified on success.
The decoded signed value, or 0 on error.
| Name | Description |
|---|---|
| p | Pointer to the SLEB128-encoded bytes. |
| n | If non-null, set to the number of bytes consumed. |
| end | Optional end of buffer; decoding stops with an error if reached. |
| error | If non-null, receives a static error message on failure. |