comparison unittests/ADT/SCCIteratorTest.cpp @ 77:54457678186b LLVM3.6

LLVM 3.6
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Mon, 08 Sep 2014 22:06:00 +0900
parents 95c75e76d11b
children afa8332a0e37
comparison
equal deleted inserted replaced
34:e874dbf0ad9d 77:54457678186b
211 for (unsigned i = 0; i != N; ++i) 211 for (unsigned i = 0; i != N; ++i)
212 if (Children.count(i)) 212 if (Children.count(i))
213 // Return a pointer to it. 213 // Return a pointer to it.
214 return FirstNode + i; 214 return FirstNode + i;
215 assert(false && "Dereferencing end iterator!"); 215 assert(false && "Dereferencing end iterator!");
216 return 0; // Avoid compiler warning. 216 return nullptr; // Avoid compiler warning.
217 } 217 }
218 }; 218 };
219 219
220 /// child_begin - Return an iterator pointing to the first child of the given 220 /// child_begin - Return an iterator pointing to the first child of the given
221 /// node. 221 /// node.
275 275
276 /// NodesInSomeSCC - Those nodes which are in some SCC. 276 /// NodesInSomeSCC - Those nodes which are in some SCC.
277 GT::NodeSubset NodesInSomeSCC; 277 GT::NodeSubset NodesInSomeSCC;
278 278
279 for (scc_iterator<GT> I = scc_begin(G), E = scc_end(G); I != E; ++I) { 279 for (scc_iterator<GT> I = scc_begin(G), E = scc_end(G); I != E; ++I) {
280 std::vector<GT::NodeType*> &SCC = *I; 280 const std::vector<GT::NodeType *> &SCC = *I;
281 281
282 // Get the nodes in this SCC as a NodeSubset rather than a vector. 282 // Get the nodes in this SCC as a NodeSubset rather than a vector.
283 GT::NodeSubset NodesInThisSCC; 283 GT::NodeSubset NodesInThisSCC;
284 for (unsigned i = 0, e = SCC.size(); i != e; ++i) 284 for (unsigned i = 0, e = SCC.size(); i != e; ++i)
285 NodesInThisSCC.AddNode(SCC[i]->first); 285 NodesInThisSCC.AddNode(SCC[i]->first);