llvm.org GIT mirror llvm / ff8fc07
ELIMINATE the SCC class completely. One less thing deriving from std::vector git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8272 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 18 addition(s) and 50 deletion(s). Raw diff Collapse all Expand all
1919 #include
2020 #include
2121
22 //--------------------------------------------------------------------------
23 // class SCC - A simple representation of an SCC in a generic Graph.
24 //--------------------------------------------------------------------------
25
22 //===----------------------------------------------------------------------===//
23 ///
24 /// TarjanSCC_iterator - Enumerate the SCCs of a directed graph, in
25 /// reverse topological order of the SCC DAG.
26 ///
2627 template >
27 struct SCC : public std::vector {
28
29 typedef typename GT::NodeType NodeType;
28 class TarjanSCC_iterator
29 : public forward_iterator, ptrdiff_t> {
30 typedef typename GT::NodeType NodeType;
3031 typedef typename GT::ChildIteratorType ChildItTy;
31
32 typedef std::vector super;
33 typedef typename super::iterator iterator;
34 typedef typename super::const_iterator const_iterator;
35 typedef typename super::reverse_iterator reverse_iterator;
36 typedef typename super::const_reverse_iterator const_reverse_iterator;
37 };
38
39 //--------------------------------------------------------------------------
40 // class TarjanSCC_iterator: Enumerate the SCCs of a directed graph, in
41 // reverse topological order of the SCC DAG.
42 //--------------------------------------------------------------------------
43
44 template >
45 class TarjanSCC_iterator : public forward_iterator, ptrdiff_t> {
46 typedef SCC> SccTy;
32 typedef std::vector> SccTy;
4733 typedef forward_iterator super;
4834 typedef typename super::reference reference;
4935 typedef typename super::pointer pointer;
50 typedef typename GT::NodeType NodeType;
51 typedef typename GT::ChildIteratorType ChildItTy;
5236
5337 // The visit counters used to detect when a complete SCC is on the stack.
5438 // visitNum is the global counter.
1919 #include
2020 #include
2121
22 //--------------------------------------------------------------------------
23 // class SCC - A simple representation of an SCC in a generic Graph.
24 //--------------------------------------------------------------------------
25
22 //===----------------------------------------------------------------------===//
23 ///
24 /// TarjanSCC_iterator - Enumerate the SCCs of a directed graph, in
25 /// reverse topological order of the SCC DAG.
26 ///
2627 template >
27 struct SCC : public std::vector {
28
29 typedef typename GT::NodeType NodeType;
28 class TarjanSCC_iterator
29 : public forward_iterator, ptrdiff_t> {
30 typedef typename GT::NodeType NodeType;
3031 typedef typename GT::ChildIteratorType ChildItTy;
31
32 typedef std::vector super;
33 typedef typename super::iterator iterator;
34 typedef typename super::const_iterator const_iterator;
35 typedef typename super::reverse_iterator reverse_iterator;
36 typedef typename super::const_reverse_iterator const_reverse_iterator;
37 };
38
39 //--------------------------------------------------------------------------
40 // class TarjanSCC_iterator: Enumerate the SCCs of a directed graph, in
41 // reverse topological order of the SCC DAG.
42 //--------------------------------------------------------------------------
43
44 template >
45 class TarjanSCC_iterator : public forward_iterator, ptrdiff_t> {
46 typedef SCC> SccTy;
32 typedef std::vector> SccTy;
4733 typedef forward_iterator super;
4834 typedef typename super::reference reference;
4935 typedef typename super::pointer pointer;
50 typedef typename GT::NodeType NodeType;
51 typedef typename GT::ChildIteratorType ChildItTy;
5236
5337 // The visit counters used to detect when a complete SCC is on the stack.
5438 // visitNum is the global counter.