Lines Matching defs:SetVector

1 //===- llvm/ADT/SetVector.h - Set with insert order iteration ---*- C++ -*-===//
15 // This file defines SetVector and SmallSetVector, which performs no allocations
16 // if the SetVector has less than a certain number of elements.
39 class SetVector {
53 /// \brief Construct an empty SetVector
54 SetVector() {}
56 /// \brief Initialize a SetVector with a range of elements
58 SetVector(It Start, It End) {
64 /// \brief Determine if the SetVector is empty or not.
69 /// \brief Determine the number of elements in the SetVector.
74 /// \brief Get an iterator to the beginning of the SetVector.
79 /// \brief Get a const_iterator to the beginning of the SetVector.
84 /// \brief Get an iterator to the end of the SetVector.
89 /// \brief Get a const_iterator to the end of the SetVector.
94 /// \brief Get an reverse_iterator to the end of the SetVector.
99 /// \brief Get a const_reverse_iterator to the end of the SetVector.
104 /// \brief Get a reverse_iterator to the beginning of the SetVector.
109 /// \brief Get a const_reverse_iterator to the beginning of the SetVector.
114 /// \brief Return the last element of the SetVector.
116 assert(!empty() && "Cannot call back() on empty SetVector!");
120 /// \brief Index into the SetVector.
122 assert(n < vector_.size() && "SetVector access out of range!");
126 /// \brief Insert a new element into the SetVector.
127 /// \returns true if the element was inserted into the SetVector.
135 /// \brief Insert a range of elements into the SetVector.
148 assert(I != vector_.end() && "Corrupted SetVector instances!");
157 /// element erased. This is the end of the SetVector if the last element is
161 assert(set_.count(V) && "Corrupted SetVector instances!");
182 /// However, SetVector doesn't expose non-const iterators, making any
197 /// \brief Count the number of elements of a given key in the SetVector.
198 /// \returns 0 if the element is not in the SetVector, 1 if it is.
203 /// \brief Completely clear the SetVector
209 /// \brief Remove the last element of the SetVector.
211 assert(!empty() && "Cannot remove an element from an empty SetVector!");
222 bool operator==(const SetVector &that) const {
226 bool operator!=(const SetVector &that) const {
232 /// SetVector interface is inconsistent with DenseSet.
247 /// SetVector interface is inconsistent with DenseSet.
283 /// \brief A SetVector that performs no allocations if smaller than
286 class SmallSetVector : public SetVector<T, SmallVector<T, N>, SmallSet<T, N> > {