llvm::Bitfield::Element

Describes an element of a Bitfield. This type is then used with the Bitfield static member functions.

Synopsis

Declared in <llvm/ADT/Bitfields.h>

template<
    typename T,
    unsigned int Offset,
    unsigned int Size,
    T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
struct Element;

Type Aliases

NameDescription
IntegerType Integer type used when packing and unpacking this element.
Type Unpacked value type of this bitfield element.

Static Data Members

NameDescription
Bits Width of this field in bits.
FirstBit Index of the first bit occupied by this field.
LastBit Index of the last bit occupied by this field.
NextBit Index of the first bit after this field (start of a contiguous neighbor).
Shift Bit offset where this field begins in the packed storage word.

Friends

NameDescription
llvm::bitfields_details::ImplImpl is where Bifield description and Storage are put together to interact with values.

Template Parameters

NameDescription
TThe type of the field once in unpacked form.
OffsetThe position of the first bit.
SizeThe size of the field.
MaxValueFor enums the maximum enum allowed.