Go to the documentation of this file.
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;
34 static_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);
702 template <
typename T>
T getU(
uint64_t *OffsetPtr,
Error *Err)
const;
703 template <
typename T>
This is an optimization pass for GlobalISel generic memory operations.
An auxiliary type to facilitate extraction of 3-byte entities.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
(vector float) vec_cmpeq(*A, *B) C
Uint24(uint8_t U0, uint8_t U1, uint8_t U2)
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...
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
uint32_t getAsUint32(bool IsLittleEndian) const
StringRef - Represent a constant reference to a string, i.e.
Lightweight error class with error context and mandatory checking.
const LLVM_NODISCARD char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
uint24_t getSwappedBytes(uint24_t C)
Needed by swapByteOrder().