LLVM 18.0.0git
Functions
llvm::BitmaskEnumDetail Namespace Reference

Functions

template<typename E >
constexpr std::underlying_type_t< EMask ()
 Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
 
template<typename E >
constexpr std::underlying_type_t< EUnderlying (E Val)
 Check that Val is in range for E, and return Val cast to E's underlying type.
 
constexpr unsigned bitWidth (uint64_t Value)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E operator~ (E Val)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E operator| (E LHS, E RHS)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E operator& (E LHS, E RHS)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E operator^ (E LHS, E RHS)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
Eoperator|= (E &LHS, E RHS)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
Eoperator&= (E &LHS, E RHS)
 
template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
Eoperator^= (E &LHS, E RHS)
 

Function Documentation

◆ bitWidth()

constexpr unsigned llvm::BitmaskEnumDetail::bitWidth ( uint64_t  Value)
constexpr

Definition at line 134 of file BitmaskEnum.h.

References bitWidth().

Referenced by bitWidth().

◆ Mask()

template<typename E >
constexpr std::underlying_type_t< E > llvm::BitmaskEnumDetail::Mask ( )
constexpr

Get a bitmask with 1s in all places up to the high-order bit of E's largest value.

Definition at line 119 of file BitmaskEnum.h.

References llvm::NextPowerOf2().

◆ operator&()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E llvm::BitmaskEnumDetail::operator& ( E  LHS,
E  RHS 
)
constexpr

Definition at line 149 of file BitmaskEnum.h.

References E, LHS, RHS, and Underlying().

◆ operator&=()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
E & llvm::BitmaskEnumDetail::operator&= ( E LHS,
E  RHS 
)

Definition at line 168 of file BitmaskEnum.h.

References LHS, and RHS.

◆ operator^()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E llvm::BitmaskEnumDetail::operator^ ( E  LHS,
E  RHS 
)
constexpr

Definition at line 154 of file BitmaskEnum.h.

References E, LHS, RHS, and Underlying().

◆ operator^=()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
E & llvm::BitmaskEnumDetail::operator^= ( E LHS,
E  RHS 
)

Definition at line 174 of file BitmaskEnum.h.

References LHS, and RHS.

◆ operator|()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E llvm::BitmaskEnumDetail::operator| ( E  LHS,
E  RHS 
)
constexpr

Definition at line 144 of file BitmaskEnum.h.

References E, LHS, RHS, and Underlying().

◆ operator|=()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
E & llvm::BitmaskEnumDetail::operator|= ( E LHS,
E  RHS 
)

Definition at line 162 of file BitmaskEnum.h.

References LHS, and RHS.

◆ operator~()

template<typename E , typename = std::enable_if_t<is_bitmask_enum<E>::value>>
constexpr E llvm::BitmaskEnumDetail::operator~ ( E  Val)
constexpr

Definition at line 139 of file BitmaskEnum.h.

References E.

◆ Underlying()

template<typename E >
constexpr std::underlying_type_t< E > llvm::BitmaskEnumDetail::Underlying ( E  Val)
constexpr

Check that Val is in range for E, and return Val cast to E's underlying type.

Definition at line 127 of file BitmaskEnum.h.

References assert(), and Underlying().

Referenced by operator&(), operator^(), operator|(), and Underlying().