20#ifndef LLVM_ADT_INDEXEDMAP_H
21#define LLVM_ADT_INDEXEDMAP_H
35 const Ty &
operator()(
const Ty &self)
const {
return self; }
39template <
typename T,
typename ToIndexT = detail::IdentityIndex<
unsigned>>
41 using IndexT =
typename ToIndexT::argument_type;
57 assert(ToIndex(
N) < Storage.size() &&
"index out of bounds!");
58 return Storage[ToIndex(
N)];
62 assert(ToIndex(
N) < Storage.size() &&
"index out of bounds!");
63 return Storage[ToIndex(
N)];
70 void clear() { Storage.clear(); }
73 unsigned NewSize = ToIndex(
N) + 1;
74 if (NewSize > Storage.size())
78 bool inBounds(IndexT
N)
const {
return ToIndex(
N) < Storage.size(); }
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_ATTRIBUTE_WARN_UNUSED
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