llvm.org GIT mirror llvm / 72d1f9d
[PM] [cleanup] Replace a reserved identifier "_Self" with the injected class name. I think we're no longer using any compilers with sufficiently broken ICN for this use case, but I'll watch the bots and introduce a typedef without a reserved name if any yell at me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195793 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 6 years ago
1 changed file(s) with 10 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
144144 inline scc_iterator() {}
145145
146146 public:
147 typedef scc_iterator _Self;
148
149 static inline _Self begin(const GraphT &G) {
150 return _Self(GT::getEntryNode(G));
151 }
152 static inline _Self end(const GraphT &) { return _Self(); }
147 static inline scc_iterator begin(const GraphT &G) {
148 return scc_iterator(GT::getEntryNode(G));
149 }
150 static inline scc_iterator end(const GraphT &) { return scc_iterator(); }
153151
154152 /// \brief Direct loop termination test which is more efficient than
155153 /// comparison with \c end().
158156 return CurrentSCC.empty();
159157 }
160158
161 inline bool operator==(const _Self &x) const {
159 inline bool operator==(const scc_iterator &x) const {
162160 return VisitStack == x.VisitStack && CurrentSCC == x.CurrentSCC;
163161 }
164 inline bool operator!=(const _Self &x) const { return !operator==(x); }
165
166 inline _Self &operator++() {
162 inline bool operator!=(const scc_iterator &x) const { return !operator==(x); }
163
164 inline scc_iterator &operator++() {
167165 GetNextSCC();
168166 return *this;
169167 }
170 inline _Self operator++(int) {
171 _Self tmp = *this;
168 inline scc_iterator operator++(int) {
169 scc_iterator tmp = *this;
172170 ++*this;
173171 return tmp;
174172 }