LLVM 22.0.0git
llvm::Bitfield::Element< T, Offset, Size, MaxValue > Struct Template Reference

Describes an element of a Bitfield. More...

#include "llvm/ADT/Bitfields.h"

Inheritance diagram for llvm::Bitfield::Element< T, Offset, Size, MaxValue >:
[legend]

Public Types

using Type = T
using IntegerType

Static Public Attributes

static constexpr unsigned Shift = Offset
static constexpr unsigned Bits = Size
static constexpr unsigned FirstBit = Offset
static constexpr unsigned LastBit = Shift + Bits - 1
static constexpr unsigned NextBit = Shift + Bits

Friends

template<typename, typename>
struct bitfields_details::Impl

Detailed Description

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

Describes an element of a Bitfield.

This type is then used with the Bitfield static member functions.

Template Parameters
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.

Definition at line 179 of file Bitfields.h.

Member Typedef Documentation

◆ IntegerType

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
using llvm::Bitfield::Element< T, Offset, Size, MaxValue >::IntegerType
Initial value:

Definition at line 181 of file Bitfields.h.

◆ Type

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
using llvm::Bitfield::Element< T, Offset, Size, MaxValue >::Type = T

Definition at line 180 of file Bitfields.h.

◆ bitfields_details::Impl

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
template<typename, typename>
friend struct bitfields_details::Impl
friend

Definition at line 190 of file Bitfields.h.

Member Data Documentation

◆ Bits

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::Bits = Size
staticconstexpr

Definition at line 184 of file Bitfields.h.

◆ FirstBit

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::FirstBit = Offset
staticconstexpr

Definition at line 185 of file Bitfields.h.

◆ LastBit

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::LastBit = Shift + Bits - 1
staticconstexpr

Definition at line 186 of file Bitfields.h.

◆ NextBit

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::NextBit = Shift + Bits
staticconstexpr

Definition at line 187 of file Bitfields.h.

◆ Shift

template<typename T, unsigned Offset, unsigned Size, T MaxValue = std::is_enum<T>::value ? T(0) : std::numeric_limits<T>::max()>
unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::Shift = Offset
staticconstexpr

Definition at line 183 of file Bitfields.h.


The documentation for this struct was generated from the following file: