llvm.org GIT mirror llvm / f40905c
SCC: Remove redundant inline keywords, NFC Functions declared in line in a class are inlined by default. There's no reason for the `inline` keyword. <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207248 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 6 years ago
1 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
150150 }
151151 }
152152
153 inline scc_iterator(NodeType *entryN) : visitNum(0) {
153 scc_iterator(NodeType *entryN) : visitNum(0) {
154154 DFSVisitOne(entryN);
155155 GetNextSCC();
156156 }
157157
158158 // End is when the DFS stack is empty.
159 inline scc_iterator() {}
159 scc_iterator() {}
160160
161161 public:
162 static inline scc_iterator begin(const GraphT &G) {
162 static scc_iterator begin(const GraphT &G) {
163163 return scc_iterator(GT::getEntryNode(G));
164164 }
165 static inline scc_iterator end(const GraphT &) { return scc_iterator(); }
165 static scc_iterator end(const GraphT &) { return scc_iterator(); }
166166
167167 /// \brief Direct loop termination test which is more efficient than
168168 /// comparison with \c end().
169 inline bool isAtEnd() const {
169 bool isAtEnd() const {
170170 assert(!CurrentSCC.empty() || VisitStack.empty());
171171 return CurrentSCC.empty();
172172 }
173173
174 inline bool operator==(const scc_iterator &x) const {
174 bool operator==(const scc_iterator &x) const {
175175 return VisitStack == x.VisitStack && CurrentSCC == x.CurrentSCC;
176176 }
177 inline bool operator!=(const scc_iterator &x) const { return !operator==(x); }
178
179 inline scc_iterator &operator++() {
177 bool operator!=(const scc_iterator &x) const { return !operator==(x); }
178
179 scc_iterator &operator++() {
180180 GetNextSCC();
181181 return *this;
182182 }
183 inline scc_iterator operator++(int) {
183 scc_iterator operator++(int) {
184184 scc_iterator tmp = *this;
185185 ++*this;
186186 return tmp;
187187 }
188188
189 inline const SccTy &operator*() const {
189 const SccTy &operator*() const {
190190 assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!");
191191 return CurrentSCC;
192192 }
193 inline SccTy &operator*() {
193 SccTy &operator*() {
194194 assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!");
195195 return CurrentSCC;
196196 }