LLVM 22.0.0git
llvm::Bitset< NumBits > Class Template Reference

This is a constexpr reimplementation of a subset of std::bitset. More...

#include "llvm/ADT/Bitset.h"

Inheritance diagram for llvm::Bitset< NumBits >:
[legend]

Public Member Functions

constexpr Bitset ()=default
constexpr Bitset (std::initializer_list< unsigned > Init)
Bitsetset ()
constexpr Bitsetset (unsigned I)
constexpr Bitsetreset (unsigned I)
constexpr Bitsetflip (unsigned I)
constexpr bool operator[] (unsigned I) const
constexpr bool test (unsigned I) const
constexpr size_t size () const
bool any () const
bool none () const
size_t count () const
constexpr Bitsetoperator^= (const Bitset &RHS)
constexpr Bitset operator^ (const Bitset &RHS) const
constexpr Bitsetoperator&= (const Bitset &RHS)
constexpr Bitset operator& (const Bitset &RHS) const
constexpr Bitsetoperator|= (const Bitset &RHS)
constexpr Bitset operator| (const Bitset &RHS) const
constexpr Bitset operator~ () const
bool operator== (const Bitset &RHS) const
bool operator!= (const Bitset &RHS) const
bool operator< (const Bitset &Other) const

Protected Types

using StorageType = std::array<BitWord, NumWords>

Protected Member Functions

constexpr Bitset (const StorageType &B)

Detailed Description

template<unsigned NumBits>
class llvm::Bitset< NumBits >

This is a constexpr reimplementation of a subset of std::bitset.

It would be nice to use std::bitset directly, but it doesn't support constant initialization.

Definition at line 30 of file Bitset.h.

Member Typedef Documentation

◆ StorageType

template<unsigned NumBits>
using llvm::Bitset< NumBits >::StorageType = std::array<BitWord, NumWords>
protected

Definition at line 42 of file Bitset.h.

Constructor & Destructor Documentation

◆ Bitset() [1/3]

template<unsigned NumBits>
llvm::Bitset< NumBits >::Bitset ( const StorageType & B)
inlineconstexprprotected

Definition at line 48 of file Bitset.h.

◆ Bitset() [2/3]

template<unsigned NumBits>
llvm::Bitset< NumBits >::Bitset ( )
constexprdefault

◆ Bitset() [3/3]

template<unsigned NumBits>
llvm::Bitset< NumBits >::Bitset ( std::initializer_list< unsigned > Init)
inlineconstexpr

Definition at line 52 of file Bitset.h.

Member Function Documentation

◆ any()

template<unsigned NumBits>
bool llvm::Bitset< NumBits >::any ( ) const
inline

Definition at line 86 of file Bitset.h.

Referenced by llvm::Bitset< AEK_NUM_EXTENSIONS >::none().

◆ count()

template<unsigned NumBits>
size_t llvm::Bitset< NumBits >::count ( ) const
inline

Definition at line 90 of file Bitset.h.

◆ flip()

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::flip ( unsigned I)
inlineconstexpr

Definition at line 72 of file Bitset.h.

◆ none()

template<unsigned NumBits>
bool llvm::Bitset< NumBits >::none ( ) const
inline

Definition at line 89 of file Bitset.h.

◆ operator!=()

template<unsigned NumBits>
bool llvm::Bitset< NumBits >::operator!= ( const Bitset< NumBits > & RHS) const
inline

Definition at line 143 of file Bitset.h.

◆ operator&()

template<unsigned NumBits>
Bitset llvm::Bitset< NumBits >::operator& ( const Bitset< NumBits > & RHS) const
inlineconstexpr

Definition at line 114 of file Bitset.h.

◆ operator&=()

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::operator&= ( const Bitset< NumBits > & RHS)
inlineconstexpr

Definition at line 109 of file Bitset.h.

◆ operator<()

template<unsigned NumBits>
bool llvm::Bitset< NumBits >::operator< ( const Bitset< NumBits > & Other) const
inline

Definition at line 145 of file Bitset.h.

◆ operator==()

template<unsigned NumBits>
bool llvm::Bitset< NumBits >::operator== ( const Bitset< NumBits > & RHS) const
inline

Definition at line 139 of file Bitset.h.

◆ operator[]()

template<unsigned NumBits>
bool llvm::Bitset< NumBits >::operator[] ( unsigned I) const
inlineconstexpr

Definition at line 77 of file Bitset.h.

◆ operator^()

template<unsigned NumBits>
Bitset llvm::Bitset< NumBits >::operator^ ( const Bitset< NumBits > & RHS) const
inlineconstexpr

Definition at line 103 of file Bitset.h.

◆ operator^=()

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::operator^= ( const Bitset< NumBits > & RHS)
inlineconstexpr

Definition at line 97 of file Bitset.h.

◆ operator|()

template<unsigned NumBits>
Bitset llvm::Bitset< NumBits >::operator| ( const Bitset< NumBits > & RHS) const
inlineconstexpr

Definition at line 126 of file Bitset.h.

◆ operator|=()

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::operator|= ( const Bitset< NumBits > & RHS)
inlineconstexpr

Definition at line 120 of file Bitset.h.

◆ operator~()

template<unsigned NumBits>
Bitset llvm::Bitset< NumBits >::operator~ ( ) const
inlineconstexpr

Definition at line 132 of file Bitset.h.

◆ reset()

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::reset ( unsigned I)
inlineconstexpr

Definition at line 67 of file Bitset.h.

◆ set() [1/2]

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::set ( )
inline

Definition at line 57 of file Bitset.h.

Referenced by llvm::Bitset< AEK_NUM_EXTENSIONS >::Bitset().

◆ set() [2/2]

template<unsigned NumBits>
Bitset & llvm::Bitset< NumBits >::set ( unsigned I)
inlineconstexpr

Definition at line 62 of file Bitset.h.

◆ size()

template<unsigned NumBits>
size_t llvm::Bitset< NumBits >::size ( ) const
inlineconstexpr

Definition at line 84 of file Bitset.h.

Referenced by llvm::Bitset< AEK_NUM_EXTENSIONS >::operator<().

◆ test()


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