Lines Matching refs:Val

33   PtrUnion Val;
38 if (VecTy *V = Val.template dyn_cast<VecTy*>())
42 TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
43 if (VecTy *V = Val.template dyn_cast<VecTy*>())
44 Val = new VecTy(*V);
56 if (Val.template is<EltTy>()) {
58 Val = RHS.front();
60 Val = new VecTy(*RHS.Val.template get<VecTy*>());
65 if (RHS.Val.template is<EltTy>()) {
66 Val.template get<VecTy*>()->clear();
67 Val.template get<VecTy*>()->push_back(RHS.front());
69 *Val.template get<VecTy*>() = *RHS.Val.template get<VecTy*>();
74 TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
75 RHS.Val = (EltTy)nullptr;
88 if (VecTy *V = Val.template dyn_cast<VecTy*>()) {
89 if (RHS.Val.template is<EltTy>()) {
97 Val = RHS.Val;
98 RHS.Val = (EltTy)nullptr;
107 : Val(Elts.size() == 1 ? PtrUnion(Elts[0])
112 if (Val.isNull())
114 if (Val.template is<EltTy>())
115 return *Val.getAddrOfPtr1();
116 return *Val.template get<VecTy*>();
121 if (Val.isNull())
123 if (Val.template is<EltTy>())
124 return *Val.getAddrOfPtr1();
125 return *Val.template get<VecTy*>();
131 if (Val.isNull()) return true;
132 if (VecTy *Vec = Val.template dyn_cast<VecTy*>())
140 if (Val.template is<EltTy>())
142 return Val.template get<VecTy*>()->size();
149 if (Val.template is<EltTy>())
150 return Val.getAddrOfPtr1();
152 return Val.template get<VecTy *>()->begin();
156 if (Val.template is<EltTy>())
157 return begin() + (Val.isNull() ? 0 : 1);
159 return Val.template get<VecTy *>()->end();
171 assert(!Val.isNull() && "can't index into an empty vector");
172 if (EltTy V = Val.template dyn_cast<EltTy>()) {
177 assert(i < Val.template get<VecTy*>()->size() &&
179 return (*Val.template get<VecTy*>())[i];
184 if (EltTy V = Val.template dyn_cast<EltTy>())
186 return Val.template get<VecTy*>()->front();
191 if (EltTy V = Val.template dyn_cast<EltTy>())
193 return Val.template get<VecTy*>()->back();
200 if (Val.isNull()) {
201 Val = NewVal;
206 if (EltTy V = Val.template dyn_cast<EltTy>()) {
207 Val = new VecTy();
208 Val.template get<VecTy*>()->push_back(V);
212 Val.template get<VecTy*>()->push_back(NewVal);
217 if (Val.template is<EltTy>())
218 Val = (EltTy)nullptr;
219 else if (VecTy *Vec = Val.template get<VecTy*>())
225 if (Val.template is<EltTy>()) {
226 Val = (EltTy)nullptr;
227 } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
239 if (Val.template is<EltTy>()) {
241 Val = (EltTy)nullptr;
242 } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
255 if (Val.template is<EltTy>()) {
257 Val = (EltTy)nullptr;
258 } else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
271 assert(!Val.isNull() && "Null value with non-end insert iterator.");
272 if (EltTy V = Val.template dyn_cast<EltTy>()) {
274 Val = Elt;
279 return Val.template get<VecTy*>()->insert(I, Elt);
291 if (Val.isNull()) {
293 Val = *From;
297 Val = new VecTy();
298 } else if (EltTy V = Val.template dyn_cast<EltTy>()) {
299 Val = new VecTy();
300 Val.template get<VecTy*>()->push_back(V);
302 return Val.template get<VecTy*>()->insert(begin() + Offset, From, To);