LLVM 20.0.0git
|
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 = std::make_unsigned_t< value_type > |
Functions | |
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. | |
template<typename value_type , std::size_t alignment = unaligned> | |
value_type | read (const void *memory, endianness endian) |
Read a value of a particular endianness from memory. | |
template<typename value_type , endianness endian, std::size_t alignment> | |
value_type | read (const void *memory) |
template<typename value_type , std::size_t alignment = unaligned, 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. | |
template<typename value_type , endianness endian, std::size_t alignment = unaligned, typename CharT > | |
value_type | readNext (const CharT *&memory) |
template<typename value_type , std::size_t alignment = unaligned> | |
void | write (void *memory, value_type value, endianness endian) |
Write a value to memory with a particular endianness. | |
template<typename value_type , endianness endian, std::size_t alignment> | |
void | write (void *memory, value_type value) |
template<typename value_type , std::size_t alignment = unaligned, typename CharT > | |
void | writeNext (CharT *&memory, value_type value, endianness endian) |
Write a value of a particular endianness, and increment the buffer past that value. | |
template<typename value_type , endianness endian, std::size_t alignment = unaligned, typename CharT > | |
void | writeNext (CharT *&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. | |
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. | |
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 , 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_array (raw_ostream &os, ArrayRef< value_type > values, endianness endian) |
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) |
template<typename value_type > | |
void | write (SmallVectorImpl< char > &Out, value_type V, endianness E) |
using llvm::support::endian::make_unsigned_t = typedef std::make_unsigned_t<value_type> |
|
inline |
Swap the bytes of value to match the given endianness.
Definition at line 52 of file Endian.h.
References byte_swap(), and value.
|
inline |
Definition at line 44 of file Endian.h.
References llvm::native, llvm::sys::swapByteOrder(), and value.
Referenced by llvm::HashBuilder< HasherT, Endianness >::adjustForEndiannessAndAdd(), byte_swap(), llvm::MCStreamer::emitIntValue(), llvm::gsym::FileWriter::fixup32(), llvm::M68k::swapWord(), llvm::gsym::FileWriter::writeU16(), llvm::gsym::FileWriter::writeU32(), and llvm::gsym::FileWriter::writeU64().
|
inline |
|
inline |
Read a value of a particular endianness from memory.
Definition at line 58 of file Endian.h.
References LLVM_ASSUME_ALIGNED.
Referenced by llvm::sys::fs::copy_file_internal(), llvm::IndexedInstrProfReader::getFunctionBitmap(), and llvm::sys::fs::md5_contents().
|
inline |
|
inline |
|
inline |
Definition at line 402 of file Endian.h.
Referenced by llvm::AMDGPUDisassembler::decodeKernelDescriptor(), and llvm::dwarf_linker::parallel::SectionDescriptor::getIntVal().
Definition at line 431 of file Endian.h.
References P.
Referenced by M68kDisassembler::getInstruction().
Definition at line 422 of file Endian.h.
References P.
Referenced by discoverTypeIndices(), llvm::object::Archive::ec_symbols(), getEncodedIntegerLength(), llvm::object::Archive::Symbol::getMember(), handleFieldList(), handleMethodOverloadList(), and handleOneMethod().
|
inline |
|
inline |
Definition at line 405 of file Endian.h.
Referenced by llvm::dwarf_linker::parallel::SectionDescriptor::getIntVal(), llvm::jitlink::aarch32::readAddendData(), and verifyNoteSection().
Definition at line 434 of file Endian.h.
References P.
Referenced by llvm::jitlink::aarch32::applyFixupData(), llvm::object::doesXCOFFTracebackTableBegin(), llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::getNumberOfSymbols(), llvm::object::Archive::symbol_begin(), llvm::SHA1::update(), and llvm::SHA256::update().
Definition at line 425 of file Endian.h.
References P.
Referenced by analyzeHeader(), llvm::jitlink::aarch32::applyFixupData(), discoverTypeIndices(), llvm::object::Archive::ec_symbols(), llvm::X86_MC::findX86_64PltEntries(), llvm::X86_MC::findX86PltEntries(), llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::Symbol::getNext(), llvm::object::Archive::getNumberOfECSymbols(), llvm::object::Archive::getNumberOfSymbols(), handlePointer(), llvm::identify_magic(), or32le(), readUint32(), llvm::jitlink::relaxCall(), llvm::SkipBitcodeWrapperHeader(), llvm::object::Archive::symbol_begin(), write32AArch64Addr(), XXH3_len_1to3_128b(), XXH3_len_1to3_64b(), XXH3_len_4to8_128b(), XXH3_len_4to8_64b(), and llvm::xxHash64().
|
inline |
|
inline |
Definition at line 408 of file Endian.h.
Referenced by llvm::dwarf_linker::parallel::SectionDescriptor::getIntVal(), and llvm::CodeGenCoverage::parse().
Definition at line 437 of file Endian.h.
References P.
Referenced by appendGlobalSymbolTableInfo(), llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::getNumberOfSymbols(), and llvm::object::Archive::symbol_begin().
Definition at line 428 of file Endian.h.
References P.
Referenced by llvm::object::Archive::Symbol::getMember(), llvm::object::Archive::getNumberOfSymbols(), llvm::getPointerAuthStableSipHash(), llvm::sampleprof::SampleProfileReaderBinary::readSampleContextFromTable(), llvm::object::Archive::symbol_begin(), XXH128_mix32B(), XXH3_accumulate_512_scalar(), XXH3_len_0to16_128b(), XXH3_len_0to16_64b(), XXH3_len_4to8_128b(), XXH3_len_4to8_64b(), XXH3_len_9to16_128b(), XXH3_len_9to16_64b(), XXH3_mix16B(), XXH3_mix2Accs(), XXH3_scrambleAcc_scalar(), 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 127 of file Endian.h.
References assert(), and LLVM_ASSUME_ALIGNED.
Referenced by llvm::BitstreamWriter::BackpatchByte().
|
inline |
|
inline |
|
inline |
Definition at line 54 of file EndianStream.h.
References write().
|
inline |
Definition at line 37 of file EndianStream.h.
References value, and llvm::raw_ostream::write().
|
inline |
Definition at line 61 of file EndianStream.h.
References llvm::SmallVectorImpl< T >::append(), and E.
|
inline |
|
inline |
Write a value to memory with a particular endianness.
Definition at line 92 of file Endian.h.
References LLVM_ASSUME_ALIGNED, and value.
Referenced by llvm::dwarf_linker::parallel::SectionDescriptor::applyIntVal(), emitOperand(), llvm::MSP430MCCodeEmitter::encodeInstruction(), llvm::MCContext::getELFSection(), print(), printLE(), llvm::support::endian::Writer::write(), write(), llvm::mcdxbc::PSVRuntimeInfo::write(), write< double >(), write< float >(), writeData(), writeNext(), llvm::ARMAsmBackend::writeNopData(), llvm::WinCOFFWriter::writeObject(), and llvm::MachObjectWriter::writeObject().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 465 of file Endian.h.
References P.
Referenced by llvm::jitlink::finalizeBlockRelax().
|
inline |
|
inline |
|
inline |
Definition at line 477 of file Endian.h.
References P.
Referenced by llvm::jitlink::aarch32::applyFixupData(), and llvm::StringTableBuilder::write().
|
inline |
Definition at line 468 of file Endian.h.
References P, and write32le().
Referenced by llvm::jitlink::aarch32::applyFixupData(), llvm::computeLTOCacheKey(), llvm::objcopy::coff::createGnuDebugLinkSectionContents(), llvm::MD5::final(), llvm::jitlink::finalizeBlockRelax(), getSourceLineHash(), or32le(), llvm::objcopy::wasm::Writer::write(), llvm::StringTableBuilder::write(), write32AArch64Addr(), write32le(), writeInt32ToBuffer(), llvm::object::writeStringTable(), and writeUint32().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 471 of file Endian.h.
References P.
Referenced by llvm::computeLTOCacheKey(), emitStrTab(), emitVersion(), llvm::BlockCoverageInference::getInstrumentedBlocksHash(), llvm::sampleprof::SampleProfileReaderExtBinaryBase::readNameTableSec(), llvm::sampleprof::SampleProfileReaderBinary::readSampleContextFromTable(), and writeUint64().
|
inline |
Definition at line 48 of file EndianStream.h.
|
inline |
Definition at line 43 of file EndianStream.h.
|
inline |
Definition at line 28 of file EndianStream.h.
References value, values(), and llvm::raw_ostream::write().
Referenced by llvm::mcdxbc::PSVRuntimeInfo::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 162 of file Endian.h.
References assert(), LLVM_ASSUME_ALIGNED, and value.
|
inline |
|
inline |