LLVM 20.0.0git
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
llvm::bitfields_details::Impl< Bitfield, StorageType > Struct Template Reference

Impl is where Bifield description and Storage are put together to interact with values. More...

#include "llvm/ADT/Bitfields.h"

Public Types

using IntegerType = typename Bitfield::IntegerType
 
using C = Compressor< IntegerType, Bitfield::Bits >
 
using BP = BitPatterns< StorageType, Bitfield::Bits >
 

Static Public Member Functions

static void update (StorageType &Packed, IntegerType UserValue)
 Checks UserValue is within bounds and packs it between FirstBit and LastBit of Packed leaving the rest unchanged.
 
static IntegerType extract (StorageType Packed)
 Interprets bits between FirstBit and LastBit of Packed as anIntegerType.
 
static StorageType test (StorageType Packed)
 Interprets bits between FirstBit and LastBit of Packed as anIntegerType.
 

Static Public Attributes

static constexpr size_t StorageBits = sizeof(StorageType) * CHAR_BIT
 
static constexpr StorageType Mask = BP::Umax << Bitfield::Shift
 

Detailed Description

template<typename Bitfield, typename StorageType>
struct llvm::bitfields_details::Impl< Bitfield, StorageType >

Impl is where Bifield description and Storage are put together to interact with values.

Definition at line 156 of file Bitfields.h.

Member Typedef Documentation

◆ BP

template<typename Bitfield , typename StorageType >
using llvm::bitfields_details::Impl< Bitfield, StorageType >::BP = BitPatterns<StorageType, Bitfield::Bits>

Definition at line 161 of file Bitfields.h.

◆ C

template<typename Bitfield , typename StorageType >
using llvm::bitfields_details::Impl< Bitfield, StorageType >::C = Compressor<IntegerType, Bitfield::Bits>

Definition at line 160 of file Bitfields.h.

◆ IntegerType

template<typename Bitfield , typename StorageType >
using llvm::bitfields_details::Impl< Bitfield, StorageType >::IntegerType = typename Bitfield::IntegerType

Definition at line 159 of file Bitfields.h.

Member Function Documentation

◆ extract()

template<typename Bitfield , typename StorageType >
static IntegerType llvm::bitfields_details::Impl< Bitfield, StorageType >::extract ( StorageType  Packed)
inlinestatic

Interprets bits between FirstBit and LastBit of Packed as anIntegerType.

Definition at line 178 of file Bitfields.h.

References llvm::bitfields_details::Impl< Bitfield, StorageType >::Mask, and llvm::bitfields_details::Compressor< T, Bits, bool >::unpack().

◆ test()

template<typename Bitfield , typename StorageType >
static StorageType llvm::bitfields_details::Impl< Bitfield, StorageType >::test ( StorageType  Packed)
inlinestatic

Interprets bits between FirstBit and LastBit of Packed as anIntegerType.

Definition at line 185 of file Bitfields.h.

References llvm::bitfields_details::Impl< Bitfield, StorageType >::Mask.

◆ update()

template<typename Bitfield , typename StorageType >
static void llvm::bitfields_details::Impl< Bitfield, StorageType >::update ( StorageType &  Packed,
IntegerType  UserValue 
)
inlinestatic

Checks UserValue is within bounds and packs it between FirstBit and LastBit of Packed leaving the rest unchanged.

Definition at line 170 of file Bitfields.h.

References llvm::bitfields_details::Compressor< T, Bits, bool >::pack().

Member Data Documentation

◆ Mask

template<typename Bitfield , typename StorageType >
constexpr StorageType llvm::bitfields_details::Impl< Bitfield, StorageType >::Mask = BP::Umax << Bitfield::Shift
staticconstexpr

◆ StorageBits

template<typename Bitfield , typename StorageType >
constexpr size_t llvm::bitfields_details::Impl< Bitfield, StorageType >::StorageBits = sizeof(StorageType) * CHAR_BIT
staticconstexpr

Definition at line 163 of file Bitfields.h.


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