LLVM 23.0.0git
llvm::Bitfield Struct Reference

Holds functions to get, set or test bitfields. More...

#include "llvm/ADT/Bitfields.h"

Classes

struct  Element
 Describes an element of a Bitfield. More...

Static Public Member Functions

template<typename Bitfield, typename StorageType>
static Bitfield::Type get (StorageType Packed)
 Unpacks the field from the Packed value.
template<typename Bitfield, typename StorageType>
static StorageType test (StorageType Packed)
 Return a non-zero value if the field is non-zero.
template<typename Bitfield, typename StorageType>
static void set (StorageType &Packed, typename Bitfield::Type Value)
 Sets the typed value in the provided Packed value.
template<typename A, typename B>
static constexpr bool isOverlapping ()
 Returns whether the two bitfields share common bits.
template<typename A>
static constexpr bool areContiguous ()
template<typename A, typename B, typename... Others>
static constexpr bool areContiguous ()

Detailed Description

Holds functions to get, set or test bitfields.

Definition at line 165 of file Bitfields.h.

Member Function Documentation

◆ areContiguous() [1/2]

template<typename A>
constexpr bool llvm::Bitfield::areContiguous ( )
inlinestaticconstexpr

Definition at line 233 of file Bitfields.h.

Referenced by areContiguous().

◆ areContiguous() [2/2]

template<typename A, typename B, typename... Others>
constexpr bool llvm::Bitfield::areContiguous ( )
inlinestaticconstexpr

Definition at line 235 of file Bitfields.h.

References areContiguous(), and B().

◆ get()

template<typename Bitfield, typename StorageType>
Bitfield::Type llvm::Bitfield::get ( StorageType Packed)
inlinestatic

◆ isOverlapping()

template<typename A, typename B>
constexpr bool llvm::Bitfield::isOverlapping ( )
inlinestaticconstexpr

Returns whether the two bitfields share common bits.

Definition at line 229 of file Bitfields.h.

Referenced by llvm::Instruction::getSubclassData(), and llvm::Instruction::setSubclassData().

◆ set()

template<typename Bitfield, typename StorageType>
void llvm::Bitfield::set ( StorageType & Packed,
typename Bitfield::Type Value )
inlinestatic

◆ test()

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

Return a non-zero value if the field is non-zero.

It is more efficient than getField.

Definition at line 215 of file Bitfields.h.

References I.


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