llvm.org GIT mirror llvm / 3358093
[IR] Rollback changes in r302744 which caused buildbots failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302745 91177308-0d34-0410-b5e6-96231b3b80d8 Eugene Zelenko 3 years ago
1 changed file(s) with 14 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
None //===- llvm/Value.h - Definition of the Value class -------------*- C++ -*-===//
0 //===-- llvm/Value.h - Definition of the Value class ------------*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
4343 class Module;
4444 class ModuleSlotTracker;
4545 class raw_ostream;
46 template class StringMapEntry;
4746 class StringRef;
4847 class Twine;
4948 class Type;
5049
51 using ValueName = StringMapEntry;
50 template class StringMapEntry;
51 typedef StringMapEntry ValueName;
5252
5353 //===----------------------------------------------------------------------===//
5454 // Value Class
119119 template // UseT == 'Use' or 'const Use'
120120 class use_iterator_impl
121121 : public std::iterator {
122 UseT *U;
123 explicit use_iterator_impl(UseT *u) : U(u) {}
122124 friend class Value;
123125
124 UseT *U = nullptr;
125
126 explicit use_iterator_impl(UseT *u) : U(u) {}
127
128126 public:
129 use_iterator_impl() = default;
127 use_iterator_impl() : U() {}
130128
131129 bool operator==(const use_iterator_impl &x) const { return U == x.U; }
132130 bool operator!=(const use_iterator_impl &x) const { return !operator==(x); }
158156 template // UserTy == 'User' or 'const User'
159157 class user_iterator_impl
160158 : public std::iterator {
159 use_iterator_impl UI;
160 explicit user_iterator_impl(Use *U) : UI(U) {}
161161 friend class Value;
162
163 use_iterator_impl UI;
164
165 explicit user_iterator_impl(Use *U) : UI(U) {}
166162
167163 public:
168164 user_iterator_impl() = default;
312308 return UseList == nullptr;
313309 }
314310
315 using use_iterator = use_iterator_impl;
316 using const_use_iterator = use_iterator_impl;
311 typedef use_iterator_impl use_iterator;
312 typedef use_iterator_impl const_use_iterator;
317313 use_iterator materialized_use_begin() { return use_iterator(UseList); }
318314 const_use_iterator materialized_use_begin() const {
319315 return const_use_iterator(UseList);
348344 return UseList == nullptr;
349345 }
350346
351 using user_iterator = user_iterator_impl;
352 using const_user_iterator = user_iterator_impl;
347 typedef user_iterator_impl user_iterator;
348 typedef user_iterator_impl const_user_iterator;
353349 user_iterator materialized_user_begin() { return user_iterator(UseList); }
354350 const_user_iterator materialized_user_begin() const {
355351 return const_user_iterator(UseList);
563559 /// block.
564560 const Value *DoPHITranslation(const BasicBlock *CurBB,
565561 const BasicBlock *PredBB) const;
562
566563 Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) {
567564 return const_cast(
568565 static_cast(this)->DoPHITranslation(CurBB, PredBB));
608605 Use *Merged;
609606 Use **Next = &Merged;
610607
611 while (true) {
608 for (;;) {
612609 if (!L) {
613610 *Next = R;
614611 break;