LLVM  12.0.0git
Public Types | Static Public Attributes | Friends | List of all members
llvm::Bitfield::Element< T, Offset, Size, MaxValue > Struct Template Reference

Describes an element of a Bitfield. More...

#include "llvm/ADT/Bitfields.h"

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

Public Types

using Type = T
 
using IntegerType = typename bitfields_details::ResolveUnderlyingType< T >::type
 

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 223 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 = typename bitfields_details::ResolveUnderlyingType<T>::type

Definition at line 226 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 224 of file Bitfields.h.

Friends And Related Function Documentation

◆ 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 234 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()>
constexpr unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::Bits = Size
static

Definition at line 228 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()>
constexpr unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::FirstBit = Offset
static

Definition at line 229 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()>
constexpr unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::LastBit = Shift + Bits - 1
static

Definition at line 230 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()>
constexpr unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::NextBit = Shift + Bits
static

Definition at line 231 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()>
constexpr unsigned llvm::Bitfield::Element< T, Offset, Size, MaxValue >::Shift = Offset
static

Definition at line 227 of file Bitfields.h.


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