20#ifndef LLVM_ADT_INDEXEDMAP_H
21#define LLVM_ADT_INDEXEDMAP_H
34 const Ty &
operator()(
const Ty &self)
const {
return self; }
38template <
typename T,
typename ToIndexT = detail::IdentityIndex<
unsigned>>
40 using IndexT =
typename ToIndexT::argument_type;
56 assert(ToIndex(
N) < Storage.size() &&
"index out of bounds!");
57 return Storage[ToIndex(
N)];
61 assert(ToIndex(
N) < Storage.size() &&
"index out of bounds!");
62 return Storage[ToIndex(
N)];
69 void clear() { Storage.clear(); }
72 unsigned NewSize = ToIndex(
N) + 1;
73 if (NewSize > Storage.size())
77 bool inBounds(IndexT
N)
const {
return ToIndex(
N) < Storage.size(); }
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the SmallVector class.
StorageT::size_type size() const
StorageT::const_reference operator[](IndexT N) const
void resize(typename StorageT::size_type S)
void reserve(typename StorageT::size_type S)
StorageT::reference operator[](IndexT N)
bool inBounds(IndexT N) const
const T & const_reference
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
This is an optimization pass for GlobalISel generic memory operations.
Ty & operator()(Ty &self) const
const Ty & operator()(const Ty &self) const