llvm::support::endian

Helpers to read and write values with an explicit byte order.

Types

NameDescription
Writer Adapter to write values to a stream in a particular byte order.

Type Aliases

NameDescription
make_unsigned_t Unsigned integer type corresponding to value_type.

Functions

NameDescription
byte_swap Swap the bytes of value to match the given endianness.
read read overloads
read16 read16 overloads
read16be Read an unaligned big-endian uint16_t from P.
read16le Read an unaligned little-endian uint16_t from P.
read32 read32 overloads
read32be Read an unaligned big-endian uint32_t from P.
read32le Read an unaligned little-endian uint32_t from P.
read64 read64 overloads
read64be Read an unaligned big-endian uint64_t from P.
read64le Read an unaligned little-endian uint64_t from P.
readAtBitAlignment Read a value of a particular endianness from memory, for a location that starts at the given bit offset within the first byte.
readNext readNext overloads
write write overloads
write16 write16 overloads
write16be Write big-endian uint16_t V to P.
write16le Write little-endian uint16_t V to P.
write32 write32 overloads
write32be Write big-endian uint32_t V to P.
write32le Write little-endian uint32_t V to P.
write64 write64 overloads
write64be Write big-endian uint64_t V to P.
write64le Write little-endian uint64_t V to P.
writeAtBitAlignment Write a value to memory with a particular endianness, for a location that starts at the given bit offset within the first byte.
writeNext writeNext overloads
write_array Write each value in values to os using the given byte order.