10 #ifndef LLVM_SUPPORT_DATAEXTRACTOR_H
11 #define LLVM_SUPPORT_DATAEXTRACTOR_H
14 #include "llvm/Support/DataTypes.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");
43 uint8_t IsLittleEndian;
52 : Data(Data), IsLittleEndian(IsLittleEndian), AddressSize(AddressSize) {}
411 return offset + length >= offset &&
isValidOffset(offset + length - 1);
An auxiliary type to facilitate extraction of 3-byte entities.
auto count(R &&Range, const E &Element) -> typename std::iterator_traits< decltype(std::begin(Range))>::difference_type
Wrapper function around std::count to count the number of times an element Element occurs in the give...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
uint24_t getSwappedBytes(uint24_t C)
Needed by swapByteOrder().
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
uint32_t getAsUint32(bool IsLittleEndian) const
Uint24(uint8_t U0, uint8_t U1, uint8_t U2)
StringRef - Represent a constant reference to a string, i.e.