LLVM 23.0.0git
llvm::pointer_union_detail Namespace Reference

Classes

class  PointerUnionMembers
 CRTP base that generates non-template constructors and assignment operators for each type in the union. More...
class  PointerUnionMembers< Derived, Idx >
class  PointerUnionMembers< Derived, Idx, Type, Types... >

Functions

constexpr int bitsRequired (unsigned NumValues)
 Determine the number of bits required to store values in [0, NumValues).
template<typename... Ts>
constexpr int lowBitsAvailable ()

Function Documentation

◆ bitsRequired()

int llvm::pointer_union_detail::bitsRequired ( unsigned NumValues)
constexpr

Determine the number of bits required to store values in [0, NumValues).

This is ceil(log2(NumValues)).

Definition at line 34 of file PointerUnion.h.

References llvm::bit_width_constexpr().

◆ lowBitsAvailable()

template<typename... Ts>
int llvm::pointer_union_detail::lowBitsAvailable ( )
constexpr