From ff8fc078906da46b00aa102d724590b1b96e5526 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 31 Aug 2003 19:55:31 +0000 Subject: [PATCH] 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 --- include/Support/SCCIterator.h | 34 +++++++++------------------------- include/llvm/ADT/SCCIterator.h | 34 +++++++++------------------------- 2 files changed, 18 insertions(+), 50 deletions(-) diff --git a/include/Support/SCCIterator.h b/include/Support/SCCIterator.h index 753dd55343c..9daa6bd149c 100644 --- a/include/Support/SCCIterator.h +++ b/include/Support/SCCIterator.h @@ -20,36 +20,20 @@ #include #include -//-------------------------------------------------------------------------- -// class SCC - A simple representation of an SCC in a generic Graph. -//-------------------------------------------------------------------------- - +//===----------------------------------------------------------------------===// +/// +/// TarjanSCC_iterator - Enumerate the SCCs of a directed graph, in +/// reverse topological order of the SCC DAG. +/// template > -struct SCC : public std::vector { - - typedef typename GT::NodeType NodeType; +class TarjanSCC_iterator + : public forward_iterator, ptrdiff_t> { + typedef typename GT::NodeType NodeType; typedef typename GT::ChildIteratorType ChildItTy; - - typedef std::vector super; - typedef typename super::iterator iterator; - typedef typename super::const_iterator const_iterator; - typedef typename super::reverse_iterator reverse_iterator; - typedef typename super::const_reverse_iterator const_reverse_iterator; -}; - -//-------------------------------------------------------------------------- -// class TarjanSCC_iterator: Enumerate the SCCs of a directed graph, in -// reverse topological order of the SCC DAG. -//-------------------------------------------------------------------------- - -template > -class TarjanSCC_iterator : public forward_iterator, ptrdiff_t> { - typedef SCC SccTy; + typedef std::vector SccTy; typedef forward_iterator super; typedef typename super::reference reference; typedef typename super::pointer pointer; - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; // The visit counters used to detect when a complete SCC is on the stack. // visitNum is the global counter. diff --git a/include/llvm/ADT/SCCIterator.h b/include/llvm/ADT/SCCIterator.h index 753dd55343c..9daa6bd149c 100644 --- a/include/llvm/ADT/SCCIterator.h +++ b/include/llvm/ADT/SCCIterator.h @@ -20,36 +20,20 @@ #include #include -//-------------------------------------------------------------------------- -// class SCC - A simple representation of an SCC in a generic Graph. -//-------------------------------------------------------------------------- - +//===----------------------------------------------------------------------===// +/// +/// TarjanSCC_iterator - Enumerate the SCCs of a directed graph, in +/// reverse topological order of the SCC DAG. +/// template > -struct SCC : public std::vector { - - typedef typename GT::NodeType NodeType; +class TarjanSCC_iterator + : public forward_iterator, ptrdiff_t> { + typedef typename GT::NodeType NodeType; typedef typename GT::ChildIteratorType ChildItTy; - - typedef std::vector super; - typedef typename super::iterator iterator; - typedef typename super::const_iterator const_iterator; - typedef typename super::reverse_iterator reverse_iterator; - typedef typename super::const_reverse_iterator const_reverse_iterator; -}; - -//-------------------------------------------------------------------------- -// class TarjanSCC_iterator: Enumerate the SCCs of a directed graph, in -// reverse topological order of the SCC DAG. -//-------------------------------------------------------------------------- - -template > -class TarjanSCC_iterator : public forward_iterator, ptrdiff_t> { - typedef SCC SccTy; + typedef std::vector SccTy; typedef forward_iterator super; typedef typename super::reference reference; typedef typename super::pointer pointer; - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; // The visit counters used to detect when a complete SCC is on the stack. // visitNum is the global counter. -- 2.34.1