9#ifndef LLVM_ADT_TINYPTRVECTOR_H
10#define LLVM_ADT_TINYPTRVECTOR_H
28template <
typename EltTy>
84 RHS.Val = (EltTy)
nullptr;
101 V->push_back(
RHS.front());
145 return Val.isNull() ? 0 : 1;
156 return Val.getAddrOfPtr1();
163 return begin() + (Val.isNull() ? 0 : 1);
191 assert(!Val.isNull() &&
"can't index into an empty vector");
193 assert(i == 0 &&
"tinyvector index out of range");
219 assert(!Val.isNull() &&
"Can't add a null value");
226 Val =
new VecTy({V, NewVal});
253 assert(
I >=
begin() &&
"Iterator to erase is out of bounds.");
254 assert(
I <
end() &&
"Erasing at past-the-end iterator.");
269 assert(S >=
begin() &&
"Range to erase is out of bounds.");
270 assert(S <=
E &&
"Trying to erase invalid range.");
271 assert(
E <=
end() &&
"Trying to erase past the end.");
274 if (S ==
begin() && S !=
E)
283 assert(
I >= this->
begin() &&
"Insertion iterator is out of bounds.");
287 return std::prev(
end());
289 assert(!Val.isNull() &&
"Null value with non-end insert iterator.");
301 template<
typename ItTy>
303 assert(
I >= this->
begin() &&
"Insertion iterator is out of bounds.");
311 if (std::next(From) == To) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the PointerUnion class, which is a discriminated union of pointer types.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
reverse_iterator rbegin()
const EltTy * const_iterator
TinyPtrVector(std::initializer_list< EltTy > IL)
void push_back(EltTy NewVal)
TinyPtrVector & operator=(TinyPtrVector &&RHS)
std::reverse_iterator< const_iterator > const_reverse_iterator
const_reverse_iterator rbegin() const
TinyPtrVector(ArrayRef< EltTy > Elts)
Constructor from an ArrayRef.
std::reverse_iterator< iterator > reverse_iterator
const_iterator begin() const
iterator erase(iterator I)
TinyPtrVector & operator=(const TinyPtrVector &RHS)
TinyPtrVector(const TinyPtrVector &RHS)
const_reverse_iterator rend() const
const EltTy * data() const
const_iterator end() const
PointerUnion< EltTy, VecTy * > PtrUnion
iterator insert(iterator I, const EltTy &Elt)
iterator erase(iterator S, iterator E)
SmallVector< EltTy, 4 > VecTy
typename VecTy::value_type value_type
TinyPtrVector(TinyPtrVector &&RHS)
iterator insert(iterator I, ItTy From, ItTy To)
EltTy operator[](unsigned i) const
TinyPtrVector(size_t Count, EltTy Value)
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
auto dyn_cast_if_present(const Y &Val)
dyn_cast_if_present<X> - Functionally identical to dyn_cast, except that a null (or none in the case ...
FunctionAddr VTableAddr Count
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.