llvm.org GIT mirror llvm / d9dc957
SCC: Use the reference typedef Actually use the `reference` typedef, and remove the private redefinition of `pointer` since it has no users. Using `reference` exposes a problem with r207257, which specified the wrong `value_type` to `iterator_facade_base` (fixed that too). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207270 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 6 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
3636 /// build up a vector of nodes in a particular SCC. Note that it is a forward
3737 /// iterator and thus you cannot backtrack or re-visit nodes.
3838 template >
39 class scc_iterator : public iterator_facade_base<
40 scc_iterator, std::forward_iterator_tag,
41 const std::vector, ptrdiff_t> {
39 class scc_iterator
40 : public iterator_facade_base<
41 scc_iterator, std::forward_iterator_tag,
42 const std::vector, ptrdiff_t> {
4243 typedef typename GT::NodeType NodeType;
4344 typedef typename GT::ChildIteratorType ChildItTy;
4445 typedef std::vector SccTy;
4546 typedef typename scc_iterator::reference reference;
46 typedef typename scc_iterator::pointer pointer;
4747
4848 /// Element of VisitStack during DFS.
4949 struct StackElement {
117117 return *this;
118118 }
119119
120 const SccTy &operator*() const {
120 reference operator*() const {
121121 assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!");
122122 return CurrentSCC;
123123 }