13 #ifndef LLVM_ADT_ENUMERATEDARRAY_H 14 #define LLVM_ADT_ENUMERATEDARRAY_H 20 template <
typename ValueType,
typename Enumeration,
21 Enumeration LargestEnum = Enumeration::Last,
typename IndexType = int,
22 IndexType
Size = 1 +
static_cast<IndexType
>(LargestEnum)>
27 for (IndexType IX = 0; IX <
Size; ++IX) {
32 auto IX =
static_cast<const IndexType
>(
Index);
33 assert(IX >= 0 && IX < Size &&
"Index is out of bounds.");
39 IndexType, Size
> &>(*this)[
Index]);
48 #endif // LLVM_ADT_ENUMERATEDARRAY_H PointerUnion< const Value *, const PseudoSourceValue * > ValueType
This class represents lattice values for constants.
const ValueType & operator[](const Enumeration Index) const
std::underlying_type< E >::type Underlying(E Val)
Check that Val is in range for E, and return Val cast to E's underlying type.
EnumeratedArray(ValueType V)
ValueType & operator[](const Enumeration Index)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...