template<typename IntT, int Bits = sizeof(IntT) * CHAR_BIT>
class llvm::PointerEmbeddedInt< IntT, Bits >
Utility to embed an integer into a pointer-like type.
This is specifically intended to allow embedding integers where fewer bits are required than exist in a pointer, and the integer can participate in abstractions along side other pointer-like types. For example it can be placed into a PointerSumType
or PointerUnion
.
Note that much like pointers, an integer value of zero has special utility due to boolean conversions. For example, a non-null value can be tested for in the above abstractions without testing the particular active member. Also, the default constructed value zero initializes the integer.
Definition at line 33 of file PointerEmbeddedInt.h.