LLVM
8.0.1
|
Classes | |
struct | Writer |
Adapter to write values to a stream in a particular byte order. More... | |
Typedefs | |
template<typename value_type > | |
using | make_unsigned_t = typename std::make_unsigned< value_type >::type |
Functions | |
constexpr endianness | system_endianness () |
template<typename value_type > | |
value_type | byte_swap (value_type value, endianness endian) |
template<typename value_type , endianness endian> | |
value_type | byte_swap (value_type value) |
Swap the bytes of value to match the given endianness. More... | |
template<typename value_type , std::size_t alignment> | |
value_type | read (const void *memory, endianness endian) |
Read a value of a particular endianness from memory. More... | |
template<typename value_type , endianness endian, std::size_t alignment> | |
value_type | read (const void *memory) |
template<typename value_type , std::size_t alignment, typename CharT > | |
value_type | readNext (const CharT *&memory, endianness endian) |
Read a value of a particular endianness from a buffer, and increment the buffer past that value. More... | |
template<typename value_type , endianness endian, std::size_t alignment, typename CharT > | |
value_type | readNext (const CharT *&memory) |
template<typename value_type , std::size_t alignment> | |
void | write (void *memory, value_type value, endianness endian) |
Write a value to memory with a particular endianness. More... | |
template<typename value_type , endianness endian, std::size_t alignment> | |
void | write (void *memory, value_type value) |
template<typename value_type , endianness endian, std::size_t alignment> | |
value_type | readAtBitAlignment (const void *memory, uint64_t startBit) |
Read a value of a particular endianness from memory, for a location that starts at the given bit offset within the first byte. More... | |
template<typename value_type , endianness endian, std::size_t alignment> | |
void | writeAtBitAlignment (void *memory, value_type value, uint64_t startBit) |
Write a value to memory with a particular endianness, for a location that starts at the given bit offset within the first byte. More... | |
template<typename T > | |
T | read (const void *P, endianness E) |
template<typename T , endianness E> | |
T | read (const void *P) |
uint16_t | read16 (const void *P, endianness E) |
uint32_t | read32 (const void *P, endianness E) |
uint64_t | read64 (const void *P, endianness E) |
template<endianness E> | |
uint16_t | read16 (const void *P) |
template<endianness E> | |
uint32_t | read32 (const void *P) |
template<endianness E> | |
uint64_t | read64 (const void *P) |
uint16_t | read16le (const void *P) |
uint32_t | read32le (const void *P) |
uint64_t | read64le (const void *P) |
uint16_t | read16be (const void *P) |
uint32_t | read32be (const void *P) |
uint64_t | read64be (const void *P) |
template<typename T > | |
void | write (void *P, T V, endianness E) |
template<typename T , endianness E> | |
void | write (void *P, T V) |
void | write16 (void *P, uint16_t V, endianness E) |
void | write32 (void *P, uint32_t V, endianness E) |
void | write64 (void *P, uint64_t V, endianness E) |
template<endianness E> | |
void | write16 (void *P, uint16_t V) |
template<endianness E> | |
void | write32 (void *P, uint32_t V) |
template<endianness E> | |
void | write64 (void *P, uint64_t V) |
void | write16le (void *P, uint16_t V) |
void | write32le (void *P, uint32_t V) |
void | write64le (void *P, uint64_t V) |
void | write16be (void *P, uint16_t V) |
void | write32be (void *P, uint32_t V) |
void | write64be (void *P, uint64_t V) |
template<typename value_type > | |
void | write (raw_ostream &os, value_type value, endianness endian) |
template<> | |
void | write< float > (raw_ostream &os, float value, endianness endian) |
template<> | |
void | write< double > (raw_ostream &os, double value, endianness endian) |
template<typename value_type > | |
void | write (raw_ostream &os, ArrayRef< value_type > vals, endianness endian) |
using llvm::support::endian::make_unsigned_t = typedef typename std::make_unsigned<value_type>::type |
|
inline |
Definition at line 52 of file Endian.h.
References llvm::sys::swapByteOrder(), system_endianness(), and llvm::support::detail::PickAlignment< T, alignment >::value.
|
inline |
|
inline |
Read a value of a particular endianness from memory.
Definition at line 66 of file Endian.h.
References LLVM_ASSUME_ALIGNED, and llvm::Intrinsic::memcpy.
Referenced by llvm::sys::fs::copy_file_internal(), getMemoryBufferForStream(), getOpenFileImpl(), llvm::getRandomBytes(), llvm::sys::fs::md5_contents(), llvm::irsymtab::Reader::SymbolRef::moveNext(), llvm::OProfileWrapper::OProfileWrapper(), llvm::coverage::RawCoverageFilenamesReader::RawCoverageFilenamesReader(), llvm::coverage::RawCoverageMappingReader::RawCoverageMappingReader(), llvm::StackMapV2Parser< Endianness >::records(), and llvm::irsymtab::Reader::SymbolRef::SymbolRef().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 368 of file Endian.h.
References P.
Referenced by decodeFRMArg(), discoverTypeIndices(), getCondCode(), getDecoderTable(), getEncodedIntegerLength(), llvm::object::Archive::Symbol::getMember(), handleFieldList(), handleMethodOverloadList(), and handleOneMethod().
|
inline |
Definition at line 372 of file Endian.h.
References P.
Referenced by decodeCRBitMOperand(), llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::getNumberOfSymbols(), llvm::ARMAttributeParser::Parse(), llvm::object::Archive::symbol_begin(), and writeIdentificationBlock().
Definition at line 369 of file Endian.h.
References P.
Referenced by adjustDuplex(), decodeCRBitMOperand(), decodeFRMArg(), discoverTypeIndices(), llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::Symbol::getNext(), llvm::object::Archive::getNumberOfSymbols(), handlePointer(), or32le(), llvm::ARMAttributeParser::Parse(), readUint32(), llvm::SkipBitcodeWrapperHeader(), llvm::object::Archive::symbol_begin(), write32AArch64Addr(), and llvm::xxHash64().
|
inline |
Definition at line 354 of file Endian.h.
Referenced by llvm::CodeGenCoverage::parse().
|
inline |
|
inline |
Definition at line 373 of file Endian.h.
References P.
Referenced by llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::getNumberOfSymbols(), and llvm::object::Archive::symbol_begin().
|
inline |
Definition at line 370 of file Endian.h.
References P.
Referenced by llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::getNumberOfSymbols(), llvm::object::Archive::symbol_begin(), and llvm::xxHash64().
|
inline |
Read a value of a particular endianness from memory, for a location that starts at the given bit offset within the first byte.
Definition at line 120 of file Endian.h.
References assert(), LLVM_ASSUME_ALIGNED, and llvm::Intrinsic::memcpy.
|
inline |
|
inline |
constexpr endianness llvm::support::endian::system_endianness | ( | ) |
Definition at line 47 of file Endian.h.
References llvm::support::big, llvm::sys::IsBigEndianHost, and llvm::support::little.
Referenced by byte_swap().
|
inline |
Definition at line 28 of file EndianStream.h.
References llvm::raw_ostream::write().
|
inline |
Definition at line 45 of file EndianStream.h.
References write().
|
inline |
Write a value to memory with a particular endianness.
Definition at line 100 of file Endian.h.
References LLVM_ASSUME_ALIGNED, llvm::Intrinsic::memcpy, and llvm::support::detail::PickAlignment< T, alignment >::value.
Referenced by llvm::sys::fs::copy_file_internal(), llvm::createR600MCCodeEmitter(), llvm::createRISCVMCCodeEmitter(), llvm::MSP430MCCodeEmitter::encodeInstruction(), isWeak(), print(), write(), llvm::support::endian::Writer::write(), write< double >(), write< float >(), and llvm::ARMAsmBackend::writeNopData().
|
inline |
Definition at line 110 of file Endian.h.
References llvm::support::detail::PickAlignment< T, alignment >::value.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 403 of file Endian.h.
References P.
Referenced by llvm::object::WindowsResourceCOFFWriter::write().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 404 of file Endian.h.
References P.
Referenced by llvm::MD5::final(), getSourceLineHash(), or32le(), llvm::StringTableBuilder::write(), write32AArch64Addr(), WriteI32(), writeInt32ToBuffer(), and llvm::object::writeStringTable().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 39 of file EndianStream.h.
References llvm::DoubleToBits(), and write().
|
inline |
Definition at line 34 of file EndianStream.h.
References llvm::FloatToBits(), and write().
|
inline |
Write a value to memory with a particular endianness, for a location that starts at the given bit offset within the first byte.
Definition at line 154 of file Endian.h.
References assert(), LLVM_ASSUME_ALIGNED, llvm::Intrinsic::memcpy, and llvm::support::detail::PickAlignment< T, alignment >::value.