summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/SCCIteratorTest.cpp
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2016-08-01 22:32:20 +0000
committerTim Shen <timshen91@gmail.com>2016-08-01 22:32:20 +0000
commitb44909eccbe79902e9f3002d72b4b6d596f0a94b (patch)
treefdfa13e9fa3cac6d05bafdd03db449210927da83 /llvm/unittests/ADT/SCCIteratorTest.cpp
parentc64d7655b231c88d1c9fa3f482725cd70f7b2e92 (diff)
downloadbcm5719-llvm-b44909eccbe79902e9f3002d72b4b6d596f0a94b.tar.gz
bcm5719-llvm-b44909eccbe79902e9f3002d72b4b6d596f0a94b.zip
[ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef
Summary: By generalize the interface, users are able to inject more flexible Node token into the algorithm, for example, a pair of vector<Node>* and index integer. Currently I only migrated SCCIterator to use NodeRef, but more is coming. It's a NFC. Reviewers: dblaikie, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22937 llvm-svn: 277399
Diffstat (limited to 'llvm/unittests/ADT/SCCIteratorTest.cpp')
-rw-r--r--llvm/unittests/ADT/SCCIteratorTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/SCCIteratorTest.cpp b/llvm/unittests/ADT/SCCIteratorTest.cpp
index da8c04483f9..597661fd8cc 100644
--- a/llvm/unittests/ADT/SCCIteratorTest.cpp
+++ b/llvm/unittests/ADT/SCCIteratorTest.cpp
@@ -230,6 +230,7 @@ public:
template <unsigned N>
struct GraphTraits<Graph<N> > {
typedef typename Graph<N>::NodeType NodeType;
+ typedef typename Graph<N>::NodeType *NodeRef;
typedef typename Graph<N>::ChildIterator ChildIteratorType;
static inline NodeType *getEntryNode(const Graph<N> &G) { return G.AccessNode(0); }
OpenPOWER on IntegriCloud