9#ifndef LLVM_SUPPORT_DATAEXTRACTOR_H
10#define LLVM_SUPPORT_DATAEXTRACTOR_H
24 Uint24(uint8_t U0, uint8_t U1, uint8_t U2) {
28 int LoIx = IsLittleEndian ? 0 : 2;
34static_assert(
sizeof(
uint24_t) == 3,
"sizeof(uint24_t) != 3");
38 return uint24_t(
C.Bytes[2],
C.Bytes[1],
C.Bytes[0]);
43 uint8_t IsLittleEndian;
67 explicit operator bool() {
return !Err; }
87 : Data(Data), IsLittleEndian(IsLittleEndian), AddressSize(AddressSize) {}
92 IsLittleEndian(IsLittleEndian), AddressSize(AddressSize) {}
234 Error *Err =
nullptr)
const;
274 Error *Err =
nullptr)
const;
403 getU8(
C, Dst.data(), Count);
673 return offset + length >= offset &&
isValidOffset(offset + length - 1);
688 size_t size()
const {
return Data.size(); }
702 template <
typename T>
T getU(
uint64_t *OffsetPtr,
Error *Err)
const;
703 template <
typename T>
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
uint24_t getSwappedBytes(uint24_t C)
Needed by swapByteOrder().
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
An auxiliary type to facilitate extraction of 3-byte entities.
uint32_t getAsUint32(bool IsLittleEndian) const
Uint24(uint8_t U0, uint8_t U1, uint8_t U2)