[LCG] Normalize the post-order SCC iterator to just iterate over the SCC

values rather than having pointers in weird places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2014-04-23 23:51:07 +00:00
parent e3273c50a2
commit 9f2150c046
4 changed files with 32 additions and 33 deletions

View File

@ -248,8 +248,7 @@ public:
/// always visits SCCs for a callee prior to visiting the SCC for a caller
/// (when they are in different SCCs).
class postorder_scc_iterator
: public std::iterator<std::forward_iterator_tag, SCC *, ptrdiff_t, SCC *,
SCC *> {
: public std::iterator<std::forward_iterator_tag, SCC> {
friend class LazyCallGraph;
friend class LazyCallGraph::Node;
@ -276,8 +275,8 @@ public:
return !operator==(Arg);
}
reference operator*() const { return C; }
pointer operator->() const { return operator*(); }
reference operator*() const { return *C; }
pointer operator->() const { return &operator*(); }
postorder_scc_iterator &operator++() {
C = G->getNextSCCInPostOrder();